[Trilinos-Users] BLAS/LAPACK automatically linked by compiler

Baker, Christopher G. bakercg at ornl.gov
Mon Sep 10 12:01:25 MDT 2012


I have this problem on Jaguar. I tried telling Cmake to use null
libraries, just as you did, with no success. Ultimately, my solution was
to pick up the library names from environment variables that Cray
provides; this results in a redundant occurrence of the libraries at link
time, but there isn't a danger of providing two incompatible versions.

If you can manage to discover (via some trickery or another, like some
scripting magic preceding the cmake call), that's what I would recommend.

Alternatively, you can hard-code them and attempt to insert a failure to
notify you of any change in the implicit versions.

Chris

On 9/10/12 1:45 PM, "Nico Schlömer" <nico.schloemer at gmail.com> wrote:

>Hm. Doing this
>
>  -D TPL_ENABLE_BLAS:BOOL=ON \
>      -D TPL_BLAS_LIBRARIES="" \
>
>yields this
>
>-- Processing enabled TPL: BLAS
>--   Searching for library 'blas' ...
>--   Searching for library 'blas_win32' ...
>--   Warning: Could not find a library in the set "blas blas_win32"
>for the TPL BLAS!  Please manually set BLAS_LIBRARY_DIRS and/or
>BLAS_LIBRARY_NAMES or just TPL_BLAS_LIBRARIES to point to the BLAS
>libraries!
>
>--Nico
>
>On Mon, Sep 10, 2012 at 6:02 PM, Antonio Cervone <ant.cervone at gmail.com>
>wrote:
>> hi Nico,
>> one way to go around this problem is to explicitly set the internal
>> variable that tribits uses to link the library, i.e.
>>
>> TPL_BLAS_LIBRARIES
>> TPL_BLAS_INCLUDE_DIRS
>>
>> if you set them to empty you should avoid the double linking.
>> bye
>>
>> antonio
>>
>>
>>
>> On Mon, Sep 10, 2012 at 5:54 PM, Nico Schlömer
>><nico.schloemer at gmail.com> wrote:
>>> Hi all,
>>>
>>> here's a funny compiler issue.
>>> On NERSC, the BLAS and LAPACK libraries are automatically included on
>>> the link line by their compiler wrappers, much like libmpi.a is
>>> automatically linked on many other platforms.
>>> We've got outselves a little bit of a conflict of responsibilities
>>> here since also CMake tries to care of BLAS and LAPACK, e.g.,
>>>
>>> -D TPL_ENABLE_BLAS:BOOL=ON \
>>>       -D BLAS_LIBRARY_DIRS:FILEPATH="$CRAY_LIBSCI_PREFIX_DIR/lib" \
>>>       -D BLAS_LIBRARY_NAMES="sci_gnu" \
>>>
>>> The exact library locations aren't officially disclosed, so at best
>>> I'm getting BLAS and LAPACK implicitly twice on the link line. Should
>>> they decide to change their BLAS/LAPACK directories in the wrappers
>>> one day, however, this'll lead to two different BLAS/LAPACK libraries
>>> on the link line which is less than ideal.
>>>
>>> What's the situation on other HPCs, and how do you deal with this?
>>>
>>> --Nico
>>>
>>> _______________________________________________
>>> Trilinos-Users mailing list
>>> Trilinos-Users at software.sandia.gov
>>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>>
>
>
>_______________________________________________
>Trilinos-Users mailing list
>Trilinos-Users at software.sandia.gov
>http://software.sandia.gov/mailman/listinfo/trilinos-users
>





More information about the Trilinos-Users mailing list