Skip to content

Commit

Permalink
Merge branch 'jgfouca/cmake_blas_lapack' into next (PR #5972)
Browse files Browse the repository at this point in the history
Convert blas/lapack/mkl to new cmake style

This was a more challenging task than I thought it would. FindBLAS /
FindLAPACK are built in to cmake and can also handle MKL stuff via the
BLA_VENDOR setting (if you set it to Intel... you get various flavors
of MKL). For machines that looked like they were trying to use MKL in
their cache files, I added set(BLA_VENDOR Intel10_64_dyn). I'm not
100% sure this is what we want in all cases, but it should at least
get us building and running. Machine POCs should refine the settings
on their machines using
https://cmake.org/cmake/help/latest/module/FindBLAS.html#blas-lapack-vendors
as as guide. I suspect many of these cache files were copy/pasted
without a ton of consideration.

The documentation indicates that the find modules for blas may be smart enough to auto detect the bla_vendor:
BLA_VENDOR
Set to one of the [BLAS/LAPACK Vendors] to search for BLAS only from the specified vendor.
If not set, all vendors are considered.

Once again, I am impressed at how much clutter is removed when we do
things t "right" (using find_package instead of packing stuff into
SLIBS) way.

[BFB]
  • Loading branch information
jgfouca committed Oct 11, 2023
2 parents ff0eec8 + 9b40b2d commit 6b7cf2d
Show file tree
Hide file tree
Showing 94 changed files with 99 additions and 139 deletions.
1 change: 0 additions & 1 deletion .circleci/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

# Replace all ssh URLs to submodules with HTTP URLs
sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
sed -i 's/git@github.com:/https:\/\/github.com\//' cime/.gitmodules
git submodule update --init --recursive
5 changes: 3 additions & 2 deletions .circleci/container.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

wget -t 3 -O e3sm.sif http://portal.nersc.gov/project/e3sm/lukasz/e3sm.sif || \
wget -t 3 -O e3sm.sif https://dabdceba-6d04-11e5-ba46-22000b92c6ec.e.globus.org/containers/public/e3sm.sif
singularity pull e3sm.sif \
docker://ghcr.io/mahf708/e3sm-imgs@sha256:d1030a6f4e3a53f682859436a26b30a9477d69423829ae1d9c1b5ab4e255430d

if [ $? -ne 0 ]; then
exit -1
fi
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/amdclang_alvarez.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND SLIBS " -lblas -llapack -lamdlibm")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
string(APPEND CXXFLAGS " -O2 -g")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND SLIBS " -lblas -llapack -lamdlibm")
set(PIO_FILESYSTEM_HINTS "lustre")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
Expand Down
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/amdclang_pm-cpu.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND SLIBS " -lblas -llapack -lamdlibm")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
string(APPEND CXXFLAGS " -O2 -g")
Expand Down
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/fj.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ set(MPIFC "mpifrt")
set(SCC "fcc")
set(SCXX "FCC")
set(SFC "frt")
string(APPEND SLIBS " -lblas -llapack")
if (COMP_NAME MATCHES "^pio")
string(APPEND CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
endif()
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu9_mappy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ endif()
if (MPILIB STREQUAL mpi-serial AND NOT compile_threaded)
set(PFUNIT_PATH "$ENV{SEMS_PFUNIT_ROOT}")
endif()
string(APPEND SLIBS " -lblas -llapack")
2 changes: 0 additions & 2 deletions cime_config/machines/cmake_macros/gnu_WSL2.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
set(HDF5_PATH "$ENV{HDF5_PATH}")
set(LAPACK_LIBDIR "$ENV{BLASLAPACK_LIBDIR}")
set(CXX_LINKER "CXX")
string(APPEND SLIBS " -L${LAPACK_LIBDIR} -lblas -llapack")
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_alvarez.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND SLIBS " -lblas -llapack")
set(CXX_LINKER "FORTRAN")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
Expand Down
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_anlgce-ub18.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ string(APPEND CXX_LIBS " -lstdc++")
if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
string(APPEND SLIBS " -lblas -llapack")
set(ZLIB_PATH "$ENV{ZLIB_PATH}")
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_anlgce.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ string(APPEND CXX_LIBS " -lstdc++")
if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
string(APPEND SLIBS " -lblas -llapack")
set(ZLIB_PATH "$ENV{ZLIB_PATH}")
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_anlworkstation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ string(APPEND CXX_LIBS " -lstdc++")
if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
string(APPEND SLIBS " -lblas -llapack")
set(SZIP_PATH "$ENV{SZIP_PATH}")
set(ZLIB_PATH "$ENV{ZLIB_PATH}")
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnu_anvil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
set(PIO_FILESYSTEM_HINTS "gpfs")
string(APPEND SLIBS " -L$ENV{MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl")
set(BLA_VENDOR Intel10_64_dyn)
string(APPEND CXX_LIBS " -lstdc++")
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnu_ascent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif()
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl")
string(APPEND CXX_LIBS " -lstdc++")
set(MPICXX "mpiCC")
set(PIO_FILESYSTEM_HINTS "gpfs")
3 changes: 1 addition & 2 deletions cime_config/machines/cmake_macros/gnu_badger.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
set(PIO_FILESYSTEM_HINTS "lustre")
set(MPICXX "mpic++")
string(APPEND SLIBS " -llapack -lblas")
string(APPEND SLIBS " $ENV{MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_intel_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group $ENV{MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.a -lpthread -lm -lz")
set(BLA_VENDOR Intel10_64_dyn)
string(APPEND CXX_LIBS " -lstdc++")
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnu_bebop.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
string(APPEND CXX_LIBS " -lstdc++")
string(APPEND SLIBS " -L$ENV{MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl")
set(BLA_VENDOR Intel10_64_dyn)
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_cades.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
string(APPEND FFLAGS " -O -fno-range-check")
set(HDF5_PATH "/software/dev_tools/swtree/cs400_centos7.2_pe2016-08/hdf5-parallel/1.8.17/centos7.2_gnu5.3.0")
set(LAPACK_LIBDIR "/software/tools/compilers/intel_2017/mkl/lib/intel64")
set(MPICXX "mpic++")
set(SCXX "gcpp")
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnu_chrysalis.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
set(PIO_FILESYSTEM_HINTS "gpfs")
string(APPEND SLIBS " -Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_gf_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl")
set(BLA_VENDOR Intel10_64_dyn)
string(APPEND CXX_LIBS " -lstdc++")
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnu_eddi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif()
if (DEBUG)
string(APPEND FFLAGS " -g -fbacktrace -fbounds-check -ffpe-trap=invalid,zero,overflow -Wall")
endif()
string(APPEND SLIBS " -lcurl -llapack -lblas")
string(APPEND SLIBS " -lcurl")
if (MPILIB STREQUAL mpi-serial)
set(SCC "gcc")
endif()
Expand Down
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_fugaku.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
string(APPEND FFLAGS " -O2")
endif()
string(APPEND SLIBS " -llapack -lblas")
set(CXX_LIBS "-lstdc++")
if (COMP_NAME MATCHES "^pio")
string(APPEND CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
Expand Down
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_gcp10.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ if (NOT DEBUG)
string(APPEND FFLAGS " -fno-unsafe-math-optimizations")
endif()
string(APPEND SLIBS " -L$ENV{CURL_PATH}/lib -lcurl")
string(APPEND SLIBS " -L$ENV{LAPACK_PATH}/lib64 -lblas -llapack")
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_gcp12.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ if (NOT DEBUG)
string(APPEND FFLAGS " -fno-unsafe-math-optimizations")
endif()
string(APPEND SLIBS " -L$ENV{CURL_PATH}/lib -lcurl")
string(APPEND SLIBS " -L$ENV{LAPACK_PATH}/lib64 -lblas -llapack")
3 changes: 1 addition & 2 deletions cime_config/machines/cmake_macros/gnu_grizzly.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
set(PIO_FILESYSTEM_HINTS "lustre")
set(MPICXX "mpic++")
string(APPEND SLIBS " -llapack -lblas")
string(APPEND SLIBS " $ENV{MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_intel_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group $ENV{MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.a -lpthread -lm -lz")
set(BLA_VENDOR Intel10_64_dyn)
string(APPEND CXX_LIBS " -lstdc++")
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_jlse.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
string(APPEND FFLAGS " -O2")
endif()
string(APPEND SLIBS " -L/home/azamat/soft/libs -llapack -lblas")
2 changes: 0 additions & 2 deletions cime_config/machines/cmake_macros/gnu_lawrencium-lr6.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
set(LAPACK_LIBDIR "$ENV{LAPACK_DIR}/lib")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
endif()
string(APPEND CXX_LIBS " -lstdc++ -lmpi_cxx")
if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
string(APPEND SLIBS " -lblas -llapack")
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnu_lobata.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set(SUPPORTS_CXX "TRUE")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_VPRINTF -DHAVE_TIMES -DHAVE_GETTIMEOFDAY -DHAVE_BACKTRACE")
endif()
string(APPEND SLIBS " -lcurl -llapack -lblas")
string(APPEND SLIBS " -lcurl")
if (DEBUG)
string(APPEND FFLAGS " -g -fbacktrace -fbounds-check -ffpe-trap=invalid,zero,overflow")
else()
Expand Down
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_mappy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ endif()
if (MPILIB STREQUAL mpi-serial AND NOT compile_threaded)
set(PFUNIT_PATH "$ENV{SEMS_PFUNIT_ROOT}")
endif()
string(APPEND SLIBS " -lblas -llapack")
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_melvin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ endif()
if (MPILIB STREQUAL mpi-serial AND NOT compile_threaded)
set(PFUNIT_PATH "$ENV{SEMS_PFUNIT_ROOT}")
endif()
string(APPEND SLIBS " -lblas -llapack")
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnu_modex.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ endif()
if (DEBUG)
string(APPEND FFLAGS " -fbounds-check -ffpe-trap=invalid,zero,overflow")
endif()
string(APPEND SLIBS " -lcurl -lblas -llapack")
string(APPEND SLIBS " -lcurl")
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_pm-cpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND SLIBS " -lblas -llapack")
set(CXX_LINKER "FORTRAN")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
Expand Down
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_pm-gpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND SLIBS " -lblas -llapack")
set(CXX_LINKER "FORTRAN")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
Expand Down
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnu_singularity.cmake
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
string(APPEND SLIBS " -lblas -llapack")
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnu_summit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif()
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl")
string(APPEND CXX_LIBS " -lstdc++")
set(MPICXX "mpiCC")
set(PIO_FILESYSTEM_HINTS "gpfs")
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnu_tulip.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
string(APPEND CXX_LIBS " -lstdc++")
string(APPEND SLIBS " -llapack -lblas")

2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnugpu_ascent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ endif()
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl")
set(MPICXX "mpiCC")
set(PIO_FILESYSTEM_HINTS "gpfs")
set(USE_CUDA "TRUE")
1 change: 0 additions & 1 deletion cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND CPPDEFS " -DTHRUST_IGNORE_CUB_VERSION_CHECK")
string(APPEND SLIBS " -lblas -llapack")
string(APPEND CUDA_FLAGS " -ccbin CC -O2 -arch sm_80 --use_fast_math")
string(APPEND KOKKOS_OPTIONS " -DKokkos_ARCH_AMPERE80=On -DKokkos_ENABLE_CUDA=On -DKokkos_ENABLE_CUDA_LAMBDA=On -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_OPENMP=Off")
if (NOT DEBUG)
Expand Down
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnugpu_summit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
string(APPEND CPPDEFS " -DTHRUST_IGNORE_CUB_VERSION_CHECK")
string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl")
set(MPICXX "mpiCC")
set(PIO_FILESYSTEM_HINTS "gpfs")
set(USE_CUDA "TRUE")
Expand Down
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/ibm_ascent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (COMP_NAME STREQUAL cice AND compile_threaded)
string(APPEND FFLAGS " -qsmp=omp:noopt")
endif()
string(APPEND LDFLAGS " -Wl,--relax -Wl,--allow-multiple-definition")
string(APPEND SLIBS " -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -lxlopt -lxl -lxlsmp -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND SLIBS " -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -lxlopt -lxl -lxlsmp -L$ENV{ESSL_PATH}/lib64 -lessl")
string(APPEND CXX_LIBS "-lstdc++ -L$ENV{OLCF_XLC_ROOT}/lib -libmc++")
set(MPICC "mpicc")
set(MPICXX "mpiCC")
Expand Down
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/ibm_summit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (COMP_NAME STREQUAL cice AND compile_threaded)
string(APPEND FFLAGS " -qsmp=omp:noopt")
endif()
string(APPEND LDFLAGS " -Wl,--relax -Wl,--allow-multiple-definition")
string(APPEND SLIBS " -lxlopt -lxl -lxlsmp -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND SLIBS " -lxlopt -lxl -lxlsmp -L$ENV{ESSL_PATH}/lib64 -lessl")
string(APPEND CXX_LIBS "-lstdc++ -L$ENV{OLCF_XLC_ROOT}/lib -libmc++")
set(MPICC "mpicc")
set(MPICXX "mpiCC")
Expand Down
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/ibmgpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ string(APPEND FIXEDFLAGS " -qsuffix=f=f -qfixed=132")
string(APPEND FREEFLAGS " -qsuffix=f=f90:cpp=F90")
set(HAS_F2008_CONTIGUOUS "TRUE")
string(APPEND LDFLAGS " -Wl,--relax -Wl,--allow-multiple-definition -qsmp -qoffload -lcudart -L$ENV{CUDA_DIR}/lib64")
string(APPEND SLIBS " -lxlopt -lxl -lxlsmp -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND SLIBS " -lxlopt -lxl -lxlsmp -L$ENV{ESSL_PATH}/lib64 -lessl")
string(APPEND CXX_LIBS " -lstdc++ -L$ENV{OLCF_XLC_ROOT}/lib -libmc++")
set(MPICC "mpicc")
set(MPICXX "mpiCC")
Expand Down
3 changes: 2 additions & 1 deletion cime_config/machines/cmake_macros/intel18_snl-blake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ endif()
if (DEBUG)
string(APPEND FFLAGS " -O0 -g -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created")
endif()
string(APPEND LDFLAGS " -mkl -lstdc++")
set(BLA_VENDOR Intel10_64_dyn)
string(APPEND LDFLAGS " -lstdc++")
if (compile_threaded)
string(APPEND LDFLAGS " -qopenmp")
endif()
Expand Down
11 changes: 1 addition & 10 deletions cime_config/machines/cmake_macros/intel_alvarez.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,8 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}/lib -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
#if (NOT MPILIB STREQUAL mpi-serial)
# string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
#endif()
string(APPEND SLIBS " -qmkl")
set(BLA_VENDOR Intel10_64_dyn)
set(CXX_LINKER "FORTRAN")
set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")

set(MPICC "cc")
set(MPICXX "CC")
Expand Down
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/intel_anvil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ if (MPILIB STREQUAL impi)
set(MPIFC "mpiifort")
endif()
set(PIO_FILESYSTEM_HINTS "gpfs")
string(APPEND SLIBS " -Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_intel_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl")
set(BLA_VENDOR Intel10_64_dyn)
3 changes: 2 additions & 1 deletion cime_config/machines/cmake_macros/intel_badger.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ endif()
if (NOT MPILIB STREQUAL impi)
set(MPICXX "mpic++")
endif()
string(APPEND SLIBS " -llapack -lblas -mkl -lpthread")
string(APPEND SLIBS " -lpthread")
set(BLA_VENDOR Intel10_64_dyn)
string(APPEND CXX_LIBS " -lstdc++")
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/intel_bebop.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ if (MPILIB STREQUAL impi)
set(MPICXX "mpiicpc")
set(MPIFC "mpiifort")
endif()
string(APPEND SLIBS " -mkl")
set(BLA_VENDOR Intel10_64_dyn)
8 changes: 1 addition & 7 deletions cime_config/machines/cmake_macros/intel_cascade.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,4 @@ if (DEBUG)
string(APPEND FFLAGS " -check all -ftrapuv")
endif()
set(PIO_FILESYSTEM_HINTS "lustre")
string(APPEND SLIBS " -L$ENV{MKL_PATH}/lib/intel64 -lmkl_rt")
if (MPILIB STREQUAL mpich2)
string(APPEND SLIBS " -mkl=cluster")
endif()
if (MPILIB STREQUAL mpi-serial)
string(APPEND SLIBS " -mkl")
endif()
set(BLA_VENDOR Intel10_64_dyn)
3 changes: 2 additions & 1 deletion cime_config/machines/cmake_macros/intel_chicoma.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ endif()
if (NOT MPILIB STREQUAL impi)
set(MPICXX "mpic++")
endif()
string(APPEND SLIBS " -llapack -lblas -mkl -lpthread")
string(APPEND SLIBS " -lpthread")
string(APPEND CXX_LIBS " -lstdc++")
set(BLA_VENDOR Intel10_64_dyn)
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/intel_chrysalis.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (NOT DEBUG)
string(APPEND FFLAGS " -O3 -qno-opt-dynamic-align")
endif()
set(PIO_FILESYSTEM_HINTS "gpfs")
string(APPEND SLIBS " -mkl")
set(BLA_VENDOR Intel10_64_dyn)
string(APPEND LDFLAGS " -static-intel")
if (MPILIB STREQUAL impi)
set(MPICC "mpiicc")
Expand Down
3 changes: 2 additions & 1 deletion cime_config/machines/cmake_macros/intel_compy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ if (DEBUG)
string(APPEND FFLAGS " -check all -ftrapuv -init=snan")
endif()
set(PIO_FILESYSTEM_HINTS "lustre")
string(APPEND SLIBS " -lpmi -L$ENV{MKL_PATH}/lib/intel64/ -lmkl_rt")
set(BLA_VENDOR Intel10_64_dyn)
string(APPEND SLIBS " -lpmi ")
if (MPILIB STREQUAL impi)
set(MPICC "mpiicc")
set(MPICXX "mpiicpc")
Expand Down
3 changes: 2 additions & 1 deletion cime_config/machines/cmake_macros/intel_constance.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ if (DEBUG)
string(APPEND FFLAGS " -check all -ftrapuv")
endif()
set(PIO_FILESYSTEM_HINTS "lustre")
string(APPEND SLIBS " -lpmi -L$ENV{MKL_PATH} -lmkl_rt")
set(BLA_VENDOR Intel10_64_dyn)
string(APPEND SLIBS " -lpmi")
8 changes: 1 addition & 7 deletions cime_config/machines/cmake_macros/intel_ghost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@ if (MPILIB STREQUAL mpi-serial AND NOT compile_threaded)
set(PFUNIT_PATH "/projects/ccsm/pfunit/3.2.9/mpi-serial")
endif()
set(PIO_FILESYSTEM_HINTS "lustre")
string(APPEND SLIBS " -L/projects/ccsm/BLAS-intel -lblas_LINUX")
if (MPILIB STREQUAL openmpi)
string(APPEND SLIBS " -mkl=cluster")
endif()
if (MPILIB STREQUAL mpi-serial)
string(APPEND SLIBS " -mkl")
endif()
set(BLA_VENDOR Intel10_64_dyn)
Loading

0 comments on commit 6b7cf2d

Please sign in to comment.