[Trilinos-Users] Tpetra example compilation error
Martin Vymazal
martin.vymazal at vki.ac.be
Wed Nov 12 16:35:56 MST 2014
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.
When I typedef
typedef unsigned local_ordinal_type;
/home/martin/local/trilinos-11.2.3/lib/cmake/Trilinos/../../../include/BelosTsqrOrthoManagerImpl.hpp:1545:7:
error: no matching function for call to
‘Tpetra::TsqrAdaptor<Tpetra::MultiVector<double, unsigned int, long int,
Kokkos::TPINode> >::factorExplicit(Tpetra::MultiVector<double, unsigned int,
long int, Kokkos::TPINode>&, Tpetra::MultiVector<double, unsigned int, long
int, Kokkos::TPINode>&, Teuchos::SerialDenseMatrix<int, double>&, bool&)’
tsqrAdaptor_.factorExplicit (X, Q, B, forceNonnegativeDiagonal_);
^
I don't know if that's a bug or feature, but I suppose this should normally
compile with unsigned integers used as local ordinal type.
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; but besides this reason,
why are signed integers preferred?
Best regards,
Martin Vymazal
More information about the Trilinos-Users
mailing list