[Trilinos-Users] trilinos errors, cannot find reference

Antonella Longo longo at pi.ingv.it
Thu Oct 2 06:34:19 MDT 2014


We are writing a wrapper for the LSQR solver of the trilinos-11.2.5 package. In the wrapper, after declaration of several needed parameters, we call the Belos::LinearProblem as

    RCP<Belos::LinearProblem<double,MV,OP> > problem
    = rcp( new Belos::LinearProblem<double,MV,OP>( A, X, B ) );

Where the system to be solved is AX=B.

Afterwards, we call the Belos::LSQRSolMgr as

    RCP< Belos::LSQRSolMgr<double,MV,OP> > solver
    = rcp( new Belos::LSQRSolMgr<double,MV,OP>(problem, rcp(&belosList,false)));

The compilation of the file apparently does not show any error in classes or functions, but
in the end it produces a series of undefined references like the followings


main.o: In function `TSQR::CombineNative<int, double, false>::apply_pair(TSQR::ApplyType const&, int, int, double const*, int, double const*, double*, int, double*, int, double*) const':
main.cpp:(.text._ZNK4TSQR13CombineNativeIidLb0EE10apply_pairERKNS_9ApplyTypeEiiPKdiS6_PdiS7_iS7_[TSQR::CombineNative<int, double, false>::apply_pair(TSQR::ApplyType const&, int, int, double const*, int, double const*, double*, int, double*, int, double*) const]+0x49): undefined reference to `TSQR::ApplyType::NoTranspose'
main.cpp:(.text._ZNK4TSQR13CombineNativeIidLb0EE10apply_pairERKNS_9ApplyTypeEiiPKdiS6_PdiS7_iS7_[TSQR::CombineNative<int, double, false>::apply_pair(TSQR::ApplyType const&, int, int, double const*, int, double const*, double*, int, double*, int, double*) const]+0x1b5): undefined reference to `TSQR::BLAS<int, double>::GER(int, int, double, double const*, int, double const*, int, double*, int)'

Is there any way to fix this?

Deepak Garg and Antonella Longo


-----------------------------------------------
Antonella Longo
Istituto Nazionale di Geofisica e Vulcanologia
Sezione di Pisa
Via Uguccione della Faggiola, 32
Pisa, Italy
Tel. office: 050 8311939
Cell.: 339 7532089



More information about the Trilinos-Users mailing list