[Trilinos-Users] Tpetra example compilation error

Hoemmen, Mark mhoemme at sandia.gov
Thu Nov 13 12:18:32 MST 2014



On 11/13/14, 12:00 PM, "trilinos-users-request at software.sandia.gov"
<trilinos-users-request at software.sandia.gov> wrote:
>Message: 1
>Date: Thu, 13 Nov 2014 00:35:56 +0100
>From: Martin Vymazal <martin.vymazal at vki.ac.be>
>To: trilinos-users at software.sandia.gov
>Subject: [Trilinos-Users] Tpetra example compilation error
>Message-ID: <118002104.DGWF7o2v5u at tinlaptop>
>Content-Type: text/plain; charset="utf-8"
>
>Dear Trilinos developers,
>
> the example 
>
> "Create and use a preconditioner for a sequence of linear systems"
>
>from 
>
>  https://code.google.com/p/trilinos/wiki/Tpetra_Belos_CreateSolver
>
>does not compile with local_ordinal_type set to unsigned integer.

Tpetra does not support unsigned local ordinal types.  You must use a
signed type there.  Please refer to the Tpetra documentation, in
particular the documentation of Map's template parameters, for more
details.

>Could you explain why is (signed) integer type used for indexing entries
>in 
>matrices and vectors? I understand that subtracting two unsigned integers
>can 
>give unexpected results when not handled with care;

That's the reason.  You should think of local ordinals as an
implementation detail.  We actually have users who exercise unsigned
_global_ ordinals, so that case is well tested.  We prefer signed ordinals
(both local and global) in general.

mfh





More information about the Trilinos-Users mailing list