[Trilinos-Users] [EXTERNAL] OpenBLAS library for LAPACK

Gyorgy Matyasfalvi matyasfalvi at gmail.com
Fri Apr 4 08:25:59 MDT 2014


I see. Thank you Eric!
Best,
Gyorgy


On Fri, Apr 4, 2014 at 10:21 AM, Eric Bavier <bavier at cray.com> wrote:

>  The OpenBLAS rotg does not handle "very large" inputs gracefully.
>
> `~Eric Bavier, Scientific Libraries, Cray Inc.
>
>  ------------------------------
> *From:* trilinos-users-bounces at software.sandia.gov [
> trilinos-users-bounces at software.sandia.gov] on behalf of Gyorgy
> Matyasfalvi [matyasfalvi at gmail.com]
> *Sent:* Friday, April 04, 2014 08:42
> *To:* Perschbacher, Brent M
> *Cc:* trilinos-users at software.sandia.gov
> *Subject:* Re: [Trilinos-Users] [EXTERNAL] OpenBLAS library for LAPACK
>
>   Dear Brent:
> Thank  you for your help! Adding:
>
>  -DTrilinos_EXTRA_LINK_FLAGS:STRING="-lgfortran" \
>
>  to the do-configure file got rid of the errors. And make ran
> successfully.
>
>  I ran the test:
>
>  $ ctest -j16
>
>  One test failed from the 184, namely:
>
>  *********************************
>  The following tests FAILED:
> 96 - TeuchosNumerics_BLAS_ROTG_test_MPI_1 (Failed)
> Errors while running CTest
>  ********************************
>
>  Does this mean there is a discrepancy between the OpenBLAS rotg and the
> Teuchos implementation? Did anyone else encounter this? Workarounds?
>
>  Thanks! Best,
> Gyorgy
>
>
>
> On Thu, Apr 3, 2014 at 5:04 PM, Perschbacher, Brent M <bmpersc at sandia.gov>wrote:
>
>>  First the failures during the configure step are fine. They are tests
>> to see if features are available, the failure is just a report that the
>> feature wasn't available, however, the code will work without those
>> features. In this case it is possible that some of those are false failures
>> based on the linking error you are getting. Once that is fixed it is
>> possible that some of those will turn to success.
>>
>>  The issue you are seeing is that openblas apparently depends on
>> gfortran. However, by default we link with the c++ compiler, which usually
>> doesn't link in any necessary fortran libraries. You can get around this by
>> adding the following to your configure script:
>>
>>  -DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran
>>
>>  Which should ensure that the gfortran library is linked properly.
>>
>>
>>  Brent
>>
>>   From: Gyorgy Matyasfalvi <matyasfalvi at gmail.com>
>> Date: Thursday, April 3, 2014 12:26 PM
>> To: "trilinos-users at software.sandia.gov" <
>> trilinos-users at software.sandia.gov>
>> Subject: [EXTERNAL] [Trilinos-Users] OpenBLAS library for LAPACK
>>
>>   Dear User Community:
>>
>>  I am trying to build Trilinos on a 32 core (Intel Xeon ES-2660 @ 2.20
>> GHz) Ubuntu (12.04) system.
>>  I have encountered an error while trying to build all targets after the
>> configuration step.
>> I intended to use OpenBlas (libopenblas.a) for both the BLAS and the
>> LAPACK library. It seems to me that this is causing the issue.
>>
>>  Initially I have noticed that some of the LAPACK tests during the
>> configurations step fail. For example: DLARFP, SLARFP, ZLARFP ...
>> Nonetheless the configuration step completes with:
>> -- Configuring done
>> and I only get one warning:
>> ********************
>>  CMake Warning:
>>   Manually-specified variables were not used by the project:
>>
>>      Trilinos_ENABLE_TEUCHOS_TIME_MONITOR
>>  *************************************************************
>>
>>  So I thought that the LAPACK functionality might not be needed for the
>> Trilinos packages I am trying to install.
>>
>>
>>  But then during the building phase I got the following error:
>>  **********************************************************
>> Building CXX object
>> packages/teuchos/numerics/test/Polynomial/CMakeFiles/TeuchosNumerics_Polynomial_test.dir/cxx_main.cpp.o
>>  /usr/local/openblas/lib/libopenblas.a(dtrtri_lapack.o): In function
>> `dtrtrilapack_':
>> dtrtri_lapack.f:(.text+0x140): undefined reference to
>> `_gfortran_concat_string'
>> /usr/local/openblas/lib/libopenblas.a(sgesvd.o): In function `sgesvd_':
>> sgesvd.f:(.text+0x3cc): undefined reference to `_gfortran_concat_string'
>> sgesvd.f:(.text+0xef8): undefined reference to `_gfortran_concat_string'
>> /usr/local/openblas/lib/libopenblas.a(shseqr.o): In function `shseqr_':
>> shseqr.f:(.text+0x3e2): undefined reference to `_gfortran_concat_string'
>> /usr/local/openblas/lib/libopenblas.a(sormbr.o): In function `sormbr_':
>> sormbr.f:(.text+0x3e3): undefined reference to `_gfortran_concat_string'
>> /usr/local/openblas/lib/libopenblas.a(sormbr.o):sormbr.f:(.text+0x602):
>> more undefined references to `_gfortran_concat_string' follow
>> /usr/local/openblas/lib/libopenblas.a(ilaenv.o): In function `ilaenv_':
>> ilaenv.f:(.text+0x8d): undefined reference to `_gfortran_compare_string'
>> ilaenv.f:(.text+0xb4): undefined reference to `_gfortran_compare_string'
>> ilaenv.f:(.text+0x26f): undefined reference to `_gfortran_compare_string'
>> ilaenv.f:(.text+0x29c): undefined reference to `_gfortran_compare_string'
>> ilaenv.f:(.text+0x2c2): undefined reference to `_gfortran_compare_string'
>> /usr/local/openblas/lib/libopenblas.a(ilaenv.o):ilaenv.f:(.text+0x2e5):
>> more undefined references to `_gfortran_compare_string' follow
>> collect2: ld returned 1 exit status
>> make[2]: ***
>> [packages/teuchos/numerics/test/DenseMatrix/TeuchosNumerics_BandDenseSolver_test.exe]
>> Error 1
>> make[1]: ***
>> [packages/teuchos/numerics/test/DenseMatrix/CMakeFiles/TeuchosNumerics_BandDenseSolver_test.dir/all]
>> Error 2
>> make[1]: *** Waiting for unfinished jobs....
>>  *************************************************
>>
>>  If I just try to build Epetra with:
>>
>>  $ make Epetra_all
>>
>>  the build is successful, so it seems this issue is only affecting
>> certain packages.
>>
>>  Did anyone else experience issues with OpenBLAS? Is there a fix? What
>> are some of the LAPACK and BLAS libraries recommended for Trilinos?
>>
>>  Thanks! Best,
>> Gyorgy
>>
>>
>>  PS: My do-configure file:
>> *************
>>  #!/bin/bash
>>
>>  EXTRA_ARGS=$@
>>
>>  export CMAKE_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
>>
>>  cmake \
>> -D CMAKE_BUILD_TYPE:STRING=DEBUG \
>> \
>> -D TPL_ENABLE_BLAS:BOOL=ON \
>> -D BLAS_INCLUDE_DIRS:PATH="/usr/local/openblas/" \
>> -D BLAS_LIBRARY_DIRS:FILEPATH="/usr/local/openblas/lib" \
>> -D BLAS_LIBRARY_NAMES:STRING="libopenblas.a" \
>> \
>> -D TPL_ENABLE_LAPACK:BOOL=ON \
>> -D LAPACK_INCLUDE_DIRS:PATH="/usr/local/openblas/" \
>> -D LAPACK_LIBRARY_DIRS:FILEPATH="/usr/local/openblas/lib" \
>> -D LAPACK_LIBRARY_NAMES:STRING="libopenblas.a" \
>> \
>> -D TPL_ENABLE_MPI:BOOL=ON \
>> \
>> -D Trilinos_ENABLE_DEBUG:BOOL=ON \
>> -D Trilinos_ENABLE_TESTS:BOOL=ON \
>> -D Trilinos_ENABLE_OpenMP:BOOL=ON \
>> -D Trilinos_ENABLE_Epetra:BOOL=ON \
>> -D Trilinos_ENABLE_EpetraExt=ON \
>> -D Trilinos_ENABLE_Kokkos:BOOL=ON \
>> -D Kokkos_ENABLE_EXAMPLES:BOOL=ON \
>> -D Trilinos_ENABLE_Teuchos:BOOL=ON \
>> -D Trilinos_ENABLE_TEUCHOS_TIME_MONITOR:BOOL=ON \
>> $EXTRA_ARGS \
>> ../trilinos-11.4.3-Source
>>  ***************************
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20140404/61dbaa98/attachment.html>


More information about the Trilinos-Users mailing list