[Trilinos-Users] Tpetra: multiple definitions
cgbaker at gmail.com
Tue Oct 13 11:35:00 MDT 2009
The cause of this is that the class Tpetra::Distributor used to be
templated, but is no longer. However, the implementation was never moved out
of the header into a compiled-once library file, so multiple inclusions of
Tpetra_Distributor (which is included by many Tpetra classes) will cause the
Tpetra::Distributor methods to be compiled.
The solution is straightforward. I will get to this right away and send you
a patch. We never noticed this bug because we haven't tried linking multiple
On Tue, Oct 13, 2009 at 11:48, Nico Schlömer <nico.schloemer at ua.ac.be>wrote:
> I came across something awkward when trying to link with Tpetra. There's
> of multiple definitions, such as
> ================== *snip* ==================
> classA.cpp:(.text+0x3134): multiple definition of
> tpetraTest.o:tpetraTest.cpp:(.text+0x29a0): first defined here
> classA.o: In function
> `Tpetra::Distributor::createFromSends(Teuchos::ArrayView<int const>
> ================== *snap* ==================
> when, e.g., Tpetra_MultiVector.hpp is included twice (I think).
> A minimalistic example reproducing the error is appended.
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Trilinos-Users