[Trilinos-Users] Better default find for BLAS and LAPACK?

Bartlett, Roscoe A. bartlettra at ornl.gov
Thu Aug 13 10:01:49 EDT 2015

Hello Trilinos Users and Developers,

Are any  of you interested in better default find operations for BLAS and LAPACK?  Nico has proposed updating the FindTPLBLAS.cmake and FindTPLLAPACK.cmake find modules to use the built-in CMake FindBLAS.cmake and FindLAPACK.cmake modules as the default find.  But these still allow the standard overrides defined as before to maintain backward compatibility as defined here:


To try this out and help us test this, you can do:

$ cd Trilinos/
$ git clone https://github.com/TriBITSPub/TriBITS
$ git checkout --track origin/better-find-blas-lapack-69

Then just configure Trilinos with the additional option:


and see how it works to find BLAS and LAPACK on your machines.

The default find for BLAS and LAPACK should use FIND_PACKAGE(BLAS ...) and FIND_PACKAGE(LAPACK ...) (if you don't set any of the BLAS_XXX or LAPACK_XXX variables directing what to find).  Consult documentation for the FindBLAS.cmake and FindLAPACK.cmake modules for your version of CMake for details on how to direct these on where to find BLAS and LAPACK using these.  If the default find is working, you should see something like:

Processing enabled TPL: BLAS (enabled by TeuchosNumerics, disable with -DTPL_ENABLE_BLAS=OFF)
-- Using FIND_PACKAGE(BLAS ...) ...
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- A library with BLAS API found.
-- TPL_BLAS_LIBRARIES='/usr/lib64/libblas.so'
Processing enabled TPL: LAPACK (enabled by TeuchosNumerics, disable with -DTPL_ENABLE_LAPACK=OFF)
-- Using FIND_PACKAGE(LAPACK ...) ...
-- A library with BLAS API found.
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- TPL_LAPACK_LIBRARIES='/usr/lib64/liblapack.so;/usr/lib64/libblas.so'

If you do test this out, please comment on this at:


Otherwise, we will do what testing we can and then push this to TriBITS and then snapshot to Trilinos and other projects.

The issue is that we are trying to provide better default find operations without breaking backward compatibility for projects and customers that rely on standardized TriBITS overrides.



P.S. We will need to add specific documentation of which FindTPL<TPLNAME>.cmake modules are set up to use the provided Find<TPLNAME>.cmake modules shipped with CMake using the FIND_PACKAGE(...) commands as specified at:


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20150813/59de0ed3/attachment.html>

More information about the Trilinos-Users mailing list