Skip to content

Commit

Permalink
Use default finds for BLAS and LAPACK
Browse files Browse the repository at this point in the history
In a desire to make Trilinos easier to configure by default, try to use the
default finds for BLAS and LAPACK.

Signed-off-by: Roscoe A. Bartlett <[email protected]>
  • Loading branch information
bartlettroscoe committed Nov 2, 2024
1 parent b371dd8 commit c597034
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions packages/framework/ini-files/config-specs.ini
Original file line number Diff line number Diff line change
Expand Up @@ -392,17 +392,12 @@ opt-set-cmake-var Scotch_LIBRARY_DIRS PATH : ${SEMS_SCOTCH_LIBRARY_PATH|ENV}
# Explicit libraries
opt-set-cmake-var TPL_DLlib_LIBRARIES PATH : ${DL_LIBRARIES|ENV}
opt-set-cmake-var TPL_Netcdf_LIBRARIES STRING : ${SEMS_NETCDF_LIBRARY_PATH|ENV}/libnetcdf.so;${SEMS_NETCDF_LIBRARY_PATH|ENV}/libpnetcdf.a
opt-set-cmake-var TPL_BLAS_LIBRARIES STRING : ${BLAS_LIBRARIES|ENV}
opt-set-cmake-var TPL_LAPACK_LIBRARIES STRING : ${LAPACK_LIBRARIES|ENV}

[COMMON_SPACK_TPLS]
use COMMON

# BLAS & LAPACK
opt-set-cmake-var TPL_BLAS_LIBRARIES STRING FORCE : -L${BLAS_ROOT|ENV}/lib;-lblas;-lgfortran;-lgomp
opt-set-cmake-var TPL_BLAS_LIBRARY_DIRS STRING FORCE : ${BLAS_ROOT|ENV}/lib
opt-set-cmake-var TPL_LAPACK_LIBRARIES STRING FORCE : -L${BLAS_ROOT|ENV}/lib;-llapack;-lgfortran;-lgomp
opt-set-cmake-var TPL_LAPACK_LIBRARY_DIRS STRING FORCE : ${BLAS_ROOT|ENV}/lib
# Use default finds

# Boost
opt-set-cmake-var BoostLib_INCLUDE_DIRS PATH FORCE : ${BOOST_INC|ENV}
Expand Down Expand Up @@ -1175,10 +1170,6 @@ opt-set-cmake-var Rythmos_StepperBuilder_UnitTest_MPI_1_DISABLE BOOL : ON
[RHEL_COMPILER|CUDA]
use NODE-TYPE|CUDA
opt-set-cmake-var MPI_EXEC FILEPATH : mpiexec
opt-set-cmake-var TPL_BLAS_LIBRARY_DIRS STRING FORCE : ${CBLAS_ROOT|ENV}/lib
opt-set-cmake-var TPL_BLAS_LIBRARIES STRING FORCE : ${CBLAS_ROOT|ENV}/lib/libblas.a;-L${CBLAS_ROOT|ENV}/lib;-lgfortran;-lgomp;-lm
opt-set-cmake-var TPL_LAPACK_LIBRARY_DIRS STRING FORCE : ${LAPACK_ROOT|ENV}/lib
opt-set-cmake-var TPL_LAPACK_LIBRARIES STRING FORCE : -L${LAPACK_ROOT|ENV}/lib;-lgfortran;-lgomp;${LAPACK_ROOT|ENV}/lib/liblapack.a

[COMPILER|GNU]
opt-set-cmake-var MPI_EXEC FILEPATH : mpirun
Expand Down Expand Up @@ -1211,14 +1202,10 @@ opt-set-cmake-var TPL_ENABLE_SuperLUDist BOOL FORCE : OFF
opt-set-cmake-var TPL_ENABLE_Zlib BOOL FORCE : ON

#TPL_*_LIBRARIES
opt-set-cmake-var TPL_BLAS_LIBRARIES STRING FORCE : -L${BLAS_ROOT|ENV}/lib;-lopenblas;-lgfortran;-lgomp
opt-set-cmake-var TPL_BLAS_LIBRARY_DIRS STRING FORCE : ${BLAS_ROOT|ENV}/lib
opt-set-cmake-var TPL_BoostLib_LIBRARIES STRING FORCE : ${BOOST_LIB|ENV}/libboost_program_options.a;${BOOST_LIB|ENV}/libboost_system.a
opt-set-cmake-var TPL_Boost_LIBRARIES STRING FORCE : ${BOOST_LIB|ENV}/libboost_program_options.a;${BOOST_LIB|ENV}/libboost_system.a
opt-set-cmake-var TPL_DLlib_LIBRARIES FILEPATH FORCE : "-ldl"
opt-set-cmake-var TPL_HDF5_LIBRARIES STRING FORCE : ${HDF5_LIB|ENV}/libhdf5_hl.so;${HDF5_LIB|ENV}/libhdf5.a;${ZLIB_LIB|ENV}/libz.a;-ldl
opt-set-cmake-var TPL_LAPACK_LIBRARIES STRING FORCE : -L${BLAS_ROOT|ENV}/lib;-lopenblas;-lgfortran;-lgomp
opt-set-cmake-var TPL_LAPACK_LIBRARY_DIRS STRING FORCE : ${BLAS_ROOT|ENV}/lib
opt-set-cmake-var TPL_METIS_LIBRARIES STRING FORCE : ${METIS_LIB|ENV}/libmetis.so
opt-set-cmake-var TPL_Netcdf_LIBRARIES STRING FORCE : -L${NETCDF_C_ROOT|ENV}/lib64;${NETCDF_C_ROOT|ENV}/lib/libnetcdf.a;${PARALLEL_NETCDF_ROOT|ENV}/lib/libpnetcdf.a;${TPL_HDF5_LIBRARIES|CMAKE}

Expand Down Expand Up @@ -1466,13 +1453,11 @@ opt-set-cmake-var TPL_ENABLE_Zlib BOOL FORCE : ON

#TPL_*_LIBRARIES
# see https://github.com/trilinos/Trilinos/issues/11109#issuecomment-1272146298
opt-set-cmake-var TPL_BLAS_LIBRARIES STRING FORCE : /lib64/libblas.so.3
opt-set-cmake-var TPL_BoostLib_LIBRARIES STRING FORCE : ${BOOST_LIB|ENV}/libboost_program_options.a;${BOOST_LIB|ENV}/libboost_system.a
opt-set-cmake-var TPL_Boost_LIBRARIES STRING FORCE : ${BOOST_LIB|ENV}/libboost_program_options.a;${BOOST_LIB|ENV}/libboost_system.a
opt-set-cmake-var TPL_DLlib_LIBRARIES FILEPATH FORCE : "-ldl"
opt-set-cmake-var TPL_HDF5_LIBRARIES STRING FORCE : ${HDF5_LIB|ENV}/libhdf5_hl.so;${HDF5_LIB|ENV}/libhdf5.a;${ZLIB_LIB|ENV}/libz.a;-ldl
# see https://github.com/trilinos/Trilinos/issues/11109#issuecomment-1272146298
opt-set-cmake-var TPL_LAPACK_LIBRARIES STRING FORCE : /lib64/liblapack.so.3
opt-set-cmake-var TPL_METIS_LIBRARIES STRING FORCE : ${METIS_LIB|ENV}/libmetis.so
opt-set-cmake-var TPL_Netcdf_LIBRARIES STRING FORCE : -L${NETCDF_C_ROOT|ENV}/lib64;${NETCDF_C_ROOT|ENV}/lib/libnetcdf.a;${PARALLEL_NETCDF_ROOT|ENV}/lib/libpnetcdf.a;${TPL_HDF5_LIBRARIES|CMAKE}

Expand Down Expand Up @@ -1608,13 +1593,11 @@ opt-set-cmake-var TPL_ENABLE_Zlib BOOL FORCE : ON

#TPL_*_LIBRARIES
# see https://github.com/trilinos/Trilinos/issues/11109#issuecomment-1272146298
opt-set-cmake-var TPL_BLAS_LIBRARIES STRING FORCE : /lib64/libblas.so.3
opt-set-cmake-var TPL_BoostLib_LIBRARIES STRING FORCE : ${BOOST_LIB|ENV}/libboost_program_options.a;${BOOST_LIB|ENV}/libboost_system.a
opt-set-cmake-var TPL_Boost_LIBRARIES STRING FORCE : ${BOOST_LIB|ENV}/libboost_program_options.a;${BOOST_LIB|ENV}/libboost_system.a
opt-set-cmake-var TPL_DLlib_LIBRARIES FILEPATH FORCE : "-ldl"
opt-set-cmake-var TPL_HDF5_LIBRARIES STRING FORCE : ${HDF5_LIB|ENV}/libhdf5_hl.so;${HDF5_LIB|ENV}/libhdf5.a;${ZLIB_LIB|ENV}/libz.a;-ldl
# see https://github.com/trilinos/Trilinos/issues/11109#issuecomment-1272146298
opt-set-cmake-var TPL_LAPACK_LIBRARIES STRING FORCE : /lib64/liblapack.so.3
opt-set-cmake-var TPL_METIS_LIBRARIES STRING FORCE : ${METIS_LIB|ENV}/libmetis.so
opt-set-cmake-var TPL_Netcdf_LIBRARIES STRING FORCE : -L${NETCDF_C_ROOT|ENV}/lib64;${NETCDF_C_ROOT|ENV}/lib/libnetcdf.a;${PARALLEL_NETCDF_ROOT|ENV}/lib/libpnetcdf.a;${TPL_HDF5_LIBRARIES|CMAKE}

Expand Down Expand Up @@ -1734,7 +1717,6 @@ opt-set-cmake-var Teko_DISABLE_LSCSTABALIZED_TPETRA_ALPAH_INV_D BOOL : O
opt-set-cmake-var CMAKE_CXX_FLAGS STRING : -fno-strict-aliasing -Wall -Wno-clobbered -Wno-vla -Wno-pragmas -Wno-unknown-pragmas -Wno-unused-local-typedefs -Wno-literal-suffix -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-int-in-bool-context -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-inline -Wno-nonnull-compare -Wno-address

# TPL_BLAS_LIBRARIES is redefined here with libm for SuperLU to properly link
opt-set-cmake-var TPL_BLAS_LIBRARIES STRING FORCE : -L${BLAS_ROOT|ENV}/lib;-lblas;-lgfortran;-lgomp;-lm
opt-set-cmake-var TPL_HDF5_LIBRARIES STRING : ${HDF5_LIB|ENV}/libhdf5_hl.so;${HDF5_LIB|ENV}/libhdf5.so;${ZLIB_LIB|ENV}/libz.so;-ldl
opt-set-cmake-var ML_ENABLE_SuperLU BOOL FORCE : OFF

Expand Down Expand Up @@ -1865,11 +1847,6 @@ use PACKAGE-ENABLES|NO-PACKAGE-ENABLES

use COMMON_SPACK_TPLS

opt-set-cmake-var TPL_BLAS_LIBRARY_DIRS STRING FORCE : ${OPENBLAS_ROOT|ENV}/lib
opt-set-cmake-var TPL_BLAS_LIBRARIES STRING FORCE : ${OPENBLAS_ROOT|ENV}/lib/libopenblas.a;-L${OPENBLAS_ROOT|ENV}/lib;-lgfortran;-lgomp;-lm
opt-set-cmake-var TPL_LAPACK_LIBRARY_DIRS STRING FORCE : ${OPENBLAS_ROOT|ENV}/lib
opt-set-cmake-var TPL_LAPACK_LIBRARIES STRING FORCE : ${OPENBLAS_ROOT|ENV}/lib/libopenblas.a;-L${OPENBLAS_ROOT|ENV}/lib;-lgfortran;-lgomp;-lm

opt-set-cmake-var MPI_EXEC_PRE_NUMPROCS_FLAGS STRING : --bind-to;none --mca btl vader,self
opt-set-cmake-var CMAKE_CXX_FLAGS STRING FORCE : -Wall -Wno-clobbered -Wno-vla -Wno-pragmas -Wno-unknown-pragmas -Wno-unused-local-typedefs -Wno-literal-suffix -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-int-in-bool-context -Wno-maybe-uninitialized -Wno-nonnull-compare -Wno-address -Wno-inline

Expand Down Expand Up @@ -1922,11 +1899,6 @@ use COMMON_SPACK_TPLS

opt-set-cmake-var CMAKE_CXX_FLAGS STRING : -Wall -Wno-clobbered -Wno-vla -Wno-pragmas -Wno-unknown-pragmas -Wno-unused-local-typedefs -Wno-literal-suffix -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-int-in-bool-context -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-nonnull-compare -Wno-address -Wno-inline -Wno-unused-but-set-variable -Wno-unused-label

opt-set-cmake-var TPL_BLAS_LIBRARY_DIRS STRING FORCE : ${OPENBLAS_ROOT|ENV}/lib
opt-set-cmake-var TPL_BLAS_LIBRARIES STRING FORCE : ${OPENBLAS_ROOT|ENV}/lib/libopenblas.a;-L${OPENBLAS_ROOT|ENV}/lib;-lgfortran;-lgomp;-lm
opt-set-cmake-var TPL_LAPACK_LIBRARY_DIRS STRING FORCE : ${OPENBLAS_ROOT|ENV}/lib
opt-set-cmake-var TPL_LAPACK_LIBRARIES STRING FORCE : ${OPENBLAS_ROOT|ENV}/lib/libopenblas.a;-L${OPENBLAS_ROOT|ENV}/lib;-lgfortran;-lgomp;-lm

opt-set-cmake-var TPL_Netcdf_LIBRARIES STRING FORCE : ""

opt-set-cmake-var TPL_ENABLE_ParMETIS BOOL FORCE : OFF
Expand Down

0 comments on commit c597034

Please sign in to comment.