[Trilinos-Users] linking against blas/lapack

Baker, Christopher G. bakercg at ornl.gov
Wed Oct 5 08:25:27 MDT 2011


Those are symbols from the GNU Fortran compiler libraries (libgfortran.a,
I believe). You will need to add that library to the library list. See if
this works:
-D BLAS_LIBRARY_NAMES:STRING="blas_LINUX;gfortran"
-D LAPACK_LIBRARY_NAMES:STRING="lapack_LINUX;gfortran"
-D BLAS_LIBRARY_DIRS:PATH=/tmp/tramanto/lapack/lapack-3.3.1
-D LAPACK_LIBRARY_DIRS:PATH=/tmp/tramanto/lapack/lapack-3.3.1

Chris











On 10/5/11 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
>>
>> 
>>
>





More information about the Trilinos-Users mailing list