[Trilinos-Users] linking against blas/lapack

Edsall, William (WJ) WJEdsall at dow.com
Wed Oct 5 09:37:49 MDT 2011


Thank you, this solved the current problem! Trilinos seemed to build
completely, including all tests.

 

I'm having the same issue with tramanto, it doesn't seem to pick up the
extra link flags from trilinos.

 

Do you know the equivalent extra link flags for Tramanto? I've tried
CMAKE_Fortran_FLAGS.

 

I know this is not the Tramanto list, please excuse me if it's the wrong
place.

 

[100%] Building C object src/CMakeFiles/dft_exec.dir/dft_maindriver.c.o

Linking CXX executable dft_exec

/tmp/tramanto/lapack/lapack-3.3.1/lapack_LINUX.a(sgesvd.o): In function
`sgesvd_':

/tmp/tramanto/lapack/lapack-3.3.1/SRC/sgesvd.f:219: undefined reference
to `_gfortran_concat_string'

/tmp/tramanto/lapack/lapack-3.3.1/SRC/sgesvd.f:383: undefined reference
to `_gfortran_concat_string'

/tmp/tramanto/lapack/lapack-3.3.1/lapack_LINUX.a(shseqr.o): In function
`shseqr_':

 

From: Shota Soga [mailto:ssoga at ncsu.edu] 
Sent: Wednesday, October 05, 2011 10:26 AM
To: Edsall, William (WJ)
Cc: Baker, Christopher G.; trilinos-users at software.sandia.gov
Subject: Re: [Trilinos-Users] linking against blas/lapack

 

Add this in your cmake files.

 

-D Trilinos_EXTRA_LINK_FLAGS:STRING="-lgfortran" \

 

 

 

Shota

 

On Wed, Oct 5, 2011 at 10:21 AM, Edsall, William (WJ) <WJEdsall at dow.com>
wrote:

[  6%] Building CXX object
packages/teuchos/test/BLAS/CMakeFiles/Teuchos_BLAS_test.dir/cxx_main.cpp

.o
Linking CXX executable Teuchos_BLAS_test.exe
/tmp/tramanto/lapack/lapack-3.3.1/blas_LINUX.a(xerbla.o): In function
`xerbla_':

/tmp/tramanto/lapack/lapack-3.3.1/BLAS/SRC/xerbla.f:39: undefined
reference to `_gfortran_st_write'
/tmp/tramanto/lapack/lapack-3.3.1/BLAS/SRC/xerbla.f:39: undefined
reference to `_gfortran_string_len_trim'
/tmp/tramanto/lapack/lapack-3.3.1/BLAS/SRC/xerbla.f:39: undefined
reference to `_gfortran_transfer_character'
/tmp/tramanto/lapack/lapack-3.3.1/BLAS/SRC/xerbla.f:39: undefined
reference to `_gfortran_transfer_integer'
/tmp/tramanto/lapack/lapack-3.3.1/BLAS/SRC/xerbla.f:39: undefined
reference to `_gfortran_st_write_done'
/tmp/tramanto/lapack/lapack-3.3.1/BLAS/SRC/xerbla.f:41: undefined
reference to `_gfortran_stop_numeric'
collect2: ld returned 1 exit status
make[2]: *** [packages/teuchos/test/BLAS/Teuchos_BLAS_test.exe] Error 1
make[1]: ***
[packages/teuchos/test/BLAS/CMakeFiles/Teuchos_BLAS_test.dir/all] Error
2
make: *** [all] Error 2

-----Original Message-----
From: Baker, Christopher G. [mailto:bakercg at ornl.gov]
Sent: Wednesday, October 05, 2011 10:21 AM
To: Edsall, William (WJ); trilinos-users at software.sandia.gov
Subject: Re: [Trilinos-Users] linking against blas/lapack

Would you mind pasting the whole error, i.e., what follows the "in
function xerbla_" line?

Chris


On 10/5/11 10:13 AM, "Edsall, William (WJ)" <WJEdsall at dow.com> wrote:

>Hello,
>
>Would appreciate some suggestions on what I may be doing incorrectly..
>
>
>
>I'm trying to compile trilinos using BLAS and LAPACK source builds.
When
>building I can't seem to get around the following error:
>
>[  6%] Built target teuchos
>
>[  6%] Building CXX object
>packages/teuchos/test/BLAS/CMakeFiles/Teuchos_BLAS_test.dir/cxx_main.cp
p
>.o
>
>Linking CXX executable Teuchos_BLAS_test.exe
>
>/tmp/tramanto/lapack/lapack-3.3.1/blas_LINUX.a(xerbla.o): In function
>`xerbla_':
>
>
>
>Also tried with a separate BLAS build blas_LINUX.a but it produced the
>same results.
>
>
>
>Here are my cmake parameters.
>
>/tmp/tramanto/cmake-2.8.5-Linux-i386/bin/cmake \
>
>     -DTPL_ENABLE_MPI:BOOL=ON \
>
>     -DTrilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
>
>     -DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF \
>
>     -DTrilinos_ENABLE_Amesos:BOOL=ON \
>
>     -DTrilinos_ENABLE_AztecOO:BOOL=ON \
>
>     -DTrilinos_ENABLE_Triutils:BOOL=ON \
>
>     -DTrilinos_ENABLE_Ifpack:BOOL=ON \
>
>     -DTrilinos_ENABLE_EpetraExt:BOOL=ON \
>
>     -DTrilinos_ENABLE_Epetra:BOOL=ON \
>
>     -DNOX_ENABLE_LOCA:BOOL=ON \
>
>     -DTrilinos_ENABLE_ML:BOOL=ON \
>
>     -DTrilinos_ENABLE_NOX:BOOL=ON \
>
>     -DTrilinos_ENABLE_Teuchos:BOOL=ON \
>
>     -DTrilinos_ENABLE_TESTS:BOOL=ON \
>
>     -D CMAKE_BUILD_TYPE:STRING=DEBUG \
>
>     -D MPI_BASE_DIR="/tmp/tramanto/mpich2" \
>
>     -D MPI_BIN_DIR="/tmp/tramanto/mpich2/bin" \
>
>     -D
>TPL_BLAS_LIBRARIES:PATH="/tmp/tramanto/lapack/lapack-3.3.1/blas_LINUX.a
"
>\
>
>     -D
>TPL_LAPACK_LIBRARIES:PATH="/tmp/tramanto/lapack/lapack-3.3.1/lapack_LIN
U
>X.a" \
>
>     -D CMAKE_INSTALL_PREFIX:PATH=/tmp/tramanto/trilinos/BUILD \
>
>     $EXTRA_ARGS \
>
>     ${TRILINOS_PATH}
>
>
>
>_______________________________________
>William J. Edsall
>
>
>




_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
http://software.sandia.gov/mailman/listinfo/trilinos-users





 

-- 
Shota Soga

Graduate Assistant at North Carolina State University

 

Email: ssoga at ncsu.edu

URL:http://abdelk.ne.ncsu.edu/
<http://abdelk.ne.ncsu.edu/wiki/index.php/Shota_Soga> w/

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20111005/42b93caf/attachment.html 


More information about the Trilinos-Users mailing list