-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'jgfouca/replace_xml_with_cmake_macros' into master (PR #…
…4537) Major build system enhancement: deprecate config_compilers.xml! This is the most significant change to the case-control system since the cmake-ification (#3043) effort 2 years ago. This PR is a natural follow-on to that effort that further cmake-ifies our build system and reduces technical debt / complexity in the build system by stripping away layers of CIME magic that were not adding much value for us. Specifically, the config_compilers.xml file, which CIME uses to generate the Macros.make and Macros.cmake casedir files (specifies compilers, flags, link flags etc), will be replaced with hierarchical CMake cache files that are persistently stored in our repo. [BFB] * jgfouca/replace_xml_with_cmake_macros: Fix handling of '\!' Add CIME hotfix Use COMP_NAME, not MODEL Sync with latest config_compilers.xml Add support for compiler_os.cmake macros Improve dox for compare-flags compare-flags: make tool more flexible and better output Refresh cache files after upstream merge Add some helper scripts for this effort Update CIME with latest Add support for universal macro Update CIME to bring in new macro capability Remove obsolete comment Add new cmake-based macros
- Loading branch information
Showing
92 changed files
with
2,449 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
if (NOT MPILIB STREQUAL impi) | ||
string(APPEND CMAKE_OPTS " -DCMAKE_SYSTEM_NAME=Catamount") | ||
endif() | ||
string(APPEND CPPDEFS " -DLINUX") | ||
if (COMP_NAME STREQUAL gptl) | ||
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY") | ||
endif() | ||
set(MPICC "cc") | ||
set(MPICXX "CC") | ||
set(MPIFC "ftn") | ||
set(MPI_LIB_NAME "mpich") | ||
set(MPI_PATH "$ENV{MPICH_DIR}") | ||
set(NETCDF_PATH "$ENV{NETCDF_DIR}") | ||
set(PIO_FILESYSTEM_HINTS "lustre") | ||
set(PNETCDF_PATH "$ENV{PARALLEL_NETCDF_DIR}") | ||
set(SCC "cc") | ||
set(SCXX "CC") | ||
set(SFC "ftn") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
string(APPEND CPPDEFS " -DSYSDARWIN") | ||
if (COMP_CLASS STREQUAL cpl) | ||
string(APPEND LDFLAGS " -all_load") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# | ||
# Use this file to include the relevant macros based on | ||
# machine/compiler settings. This file gets copied to CASEROOT | ||
# and that's the one that gets included by the build system. Feel free | ||
# to modify this file in the CASEROOT. | ||
# | ||
cmake_policy(SET CMP0057 NEW) | ||
|
||
set(MACROS_DIR ${CASEROOT}/cmake_macros) | ||
|
||
set(UNIVERSAL_MACRO ${MACROS_DIR}/universal.cmake) | ||
set(COMPILER_MACRO ${MACROS_DIR}/${COMPILER}.cmake) | ||
set(OS_MACRO ${MACROS_DIR}/${OS}.cmake) | ||
set(MACHINE_MACRO ${MACROS_DIR}/${MACH}.cmake) | ||
set(COMPILER_OS_MACRO ${MACROS_DIR}/${COMPILER}_${OS}.cmake) | ||
set(COMPILER_MACHINE_MACRO ${MACROS_DIR}/${COMPILER}_${MACH}.cmake) | ||
|
||
if (CONVERT_TO_MAKE) | ||
get_cmake_property(VARS_BEFORE_BUILD_INTERNAL_IGNORE VARIABLES) | ||
endif() | ||
|
||
# Include order defines precedence | ||
foreach (MACRO_FILE ${UNIVERSAL_MACRO} ${COMPILER_MACRO} ${OS_MACRO} ${MACHINE_MACRO} ${COMPILER_OS_MACRO} ${COMPILER_MACHINE_MACRO}) | ||
if (EXISTS ${MACRO_FILE}) | ||
include(${MACRO_FILE}) | ||
else() | ||
message("No macro file found: ${MACRO_FILE}") | ||
endif() | ||
endforeach() | ||
|
||
if (CONVERT_TO_MAKE) | ||
get_cmake_property(VARS_AFTER VARIABLES) | ||
|
||
foreach (VAR_AFTER IN LISTS VARS_AFTER) | ||
if (NOT VAR_AFTER IN_LIST VARS_BEFORE_BUILD_INTERNAL_IGNORE) | ||
message("E3SM_SET_MAKEFILE_VAR ${VAR_AFTER} := ${${VAR_AFTER}}") | ||
endif() | ||
endforeach() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
if (compile_threaded) | ||
string(APPEND CFLAGS " -h omp") | ||
endif() | ||
if (DEBUG) | ||
string(APPEND CFLAGS " -g -O0") | ||
endif() | ||
string(APPEND CPPDEFS " -DFORTRANUNDERSCORE -DNO_R16 -DCPRCRAY") | ||
set(FC_AUTO_R8 "-s real64") | ||
set(FFLAGS "-f free -N 255 -h byteswapio -em") | ||
if (compile_threaded) | ||
string(APPEND FFLAGS " -h omp") | ||
endif() | ||
if (NOT compile_threaded) | ||
string(APPEND FFLAGS " -M1077") | ||
endif() | ||
if (DEBUG) | ||
string(APPEND FFLAGS " -g -O0") | ||
endif() | ||
set(FFLAGS_NOOPT "-O0") | ||
set(HAS_F2008_CONTIGUOUS "TRUE") | ||
set(LDFLAGS "-Wl,--allow-multiple-definition -h byteswapio") | ||
if (compile_threaded) | ||
string(APPEND LDFLAGS " -h omp") | ||
endif() | ||
set(SUPPORTS_CXX "TRUE") | ||
set(CXX_LINKER "FORTRAN") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
if (NOT DEBUG) | ||
string(APPEND CFLAGS " -O1") | ||
endif() | ||
if (NOT DEBUG) | ||
string(APPEND FFLAGS " -O1") | ||
endif() | ||
if (COMP_NAME STREQUAL eam) | ||
string(APPEND FFLAGS " -vector0") | ||
endif() | ||
set(CXX_LINKER "CXX") | ||
set(KOKKOS_OPTIONS "--gcc-toolchain=/opt/gcc/9.3.0/snos --with-serial") | ||
set(CXXFLAGS "-std=c++14") | ||
if (compile_threaded) | ||
string(APPEND CXXFLAGS " -fopenmp") | ||
endif() | ||
if (DEBUG) | ||
string(APPEND CXXFLAGS " -g -Wall") | ||
endif() | ||
if (NOT DEBUG) | ||
string(APPEND CXXFLAGS " -O1") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
set(CFLAGS "-mcmodel=medium") | ||
if (compile_threaded) | ||
string(APPEND CFLAGS " -fopenmp") | ||
endif() | ||
if (DEBUG) | ||
string(APPEND CFLAGS " -g -Wall -fbacktrace -fcheck=bounds -ffpe-trap=invalid,zero,overflow") | ||
endif() | ||
if (NOT DEBUG) | ||
string(APPEND CFLAGS " -O") | ||
endif() | ||
if (COMP_NAME STREQUAL csm_share) | ||
string(APPEND CFLAGS " -std=c99") | ||
endif() | ||
set(CXXFLAGS "-std=c++14") | ||
if (compile_threaded) | ||
string(APPEND CXXFLAGS " -fopenmp") | ||
endif() | ||
if (DEBUG) | ||
string(APPEND CXXFLAGS " -g -Wall -fbacktrace") | ||
endif() | ||
if (NOT DEBUG) | ||
string(APPEND CXXFLAGS " -O") | ||
endif() | ||
if (COMP_NAME STREQUAL cism) | ||
string(APPEND CMAKE_OPTS " -D CISM_GNU=ON") | ||
endif() | ||
string(APPEND CPPDEFS " -DFORTRANUNDERSCORE -DNO_R16 -DCPRGNU") | ||
if (DEBUG) | ||
string(APPEND CPPDEFS " -DYAKL_DEBUG") | ||
endif() | ||
set(CXX_LINKER "FORTRAN") | ||
set(FC_AUTO_R8 "-fdefault-real-8") | ||
set(FFLAGS "-mcmodel=medium -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none") | ||
if (compile_threaded) | ||
string(APPEND FFLAGS " -fopenmp") | ||
endif() | ||
if (DEBUG) | ||
string(APPEND FFLAGS " -g -Wall -fbacktrace -fcheck=bounds -ffpe-trap=zero,overflow") | ||
endif() | ||
if (NOT DEBUG) | ||
string(APPEND FFLAGS " -O") | ||
endif() | ||
set(FFLAGS_NOOPT "-O0") | ||
set(FIXEDFLAGS "-ffixed-form") | ||
set(FREEFLAGS "-ffree-form") | ||
set(HAS_F2008_CONTIGUOUS "FALSE") | ||
if (compile_threaded) | ||
string(APPEND LDFLAGS " -fopenmp") | ||
endif() | ||
set(MPICC "mpicc") | ||
set(MPICXX "mpicxx") | ||
set(MPIFC "mpif90") | ||
set(SCC "gcc") | ||
set(SCXX "g++") | ||
set(SFC "gfortran") | ||
set(SUPPORTS_CXX "TRUE") |
15 changes: 15 additions & 0 deletions
15
cime_config/machines/cmake_macros/gnu_anlworkstation.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
set(ALBANY_PATH "/projects/install/rhel6-x86_64/ACME/AlbanyTrilinos/Albany/build/install") | ||
if (NOT DEBUG) | ||
string(APPEND CFLAGS " -O2") | ||
endif() | ||
set(CXX_LIBS "-lstdc++") | ||
if (NOT DEBUG) | ||
string(APPEND FFLAGS " -O2") | ||
endif() | ||
execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lblas -llapack") | ||
set(NETCDF_PATH "$ENV{NETCDF_PATH}") | ||
set(PNETCDF_PATH "$ENV{PNETCDF_PATH}") | ||
set(HDF5_PATH "$ENV{HDF5_PATH}") | ||
set(SZIP_PATH "$ENV{SZIP_PATH}") | ||
set(ZLIB_PATH "$ENV{ZLIB_PATH}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
if (COMP_NAME STREQUAL gptl) | ||
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY") | ||
endif() | ||
set(PIO_FILESYSTEM_HINTS "gpfs") | ||
execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -L$ENV{MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl") | ||
execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}") | ||
set(CXX_LIBS "-lstdc++") | ||
set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}") | ||
set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}") | ||
set(PNETCDF_PATH "$ENV{PNETCDF_PATH}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
if (NOT DEBUG) | ||
string(APPEND CFLAGS " -O2") | ||
endif() | ||
if (NOT DEBUG) | ||
string(APPEND FFLAGS " -O2") | ||
endif() | ||
if (COMP_NAME STREQUAL gptl) | ||
string(APPEND CPPDEFS " -DHAVE_SLASHPROC") | ||
endif() | ||
if (MPILIB STREQUAL mpi-serial) | ||
string(APPEND SLIBS " -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib -llapack") | ||
endif() | ||
if (NOT MPILIB STREQUAL mpi-serial) | ||
string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib -llapack") | ||
endif() | ||
set(CXX_LIBS "-lstdc++") | ||
set(MPICC "mpicc") | ||
set(MPICXX "mpiCC") | ||
set(MPIFC "mpif90") | ||
set(SCC "gcc") | ||
set(SCXX "g++") | ||
set(SFC "gfortran") | ||
set(PIO_FILESYSTEM_HINTS "gpfs") | ||
set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}") | ||
set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}") | ||
set(PNETCDF_PATH "$ENV{PNETCDF_PATH}") | ||
set(SUPPORTS_CXX "TRUE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
set(PIO_FILESYSTEM_HINTS "lustre") | ||
set(MPICC "mpicc") | ||
set(MPIFC "mpif90") | ||
set(MPICXX "mpic++") | ||
set(SFC "gfortran") | ||
set(SCC "gcc") | ||
set(SCXX "g++") | ||
execute_process(COMMAND nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}") | ||
execute_process(COMMAND nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lnetcdff -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(CXX_LIBS "-lstdc++") | ||
set(NETCDF_C_PATH "$ENV{NETCDF_PATH}") | ||
set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_PATH}") | ||
set(PNETCDF_PATH "$ENV{PNETCDF_PATH}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
if (COMP_NAME STREQUAL gptl) | ||
string(APPEND CPPDEFS " -DHAVE_SLASHPROC") | ||
endif() | ||
set(CXX_LIBS "-lstdc++") | ||
execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1}") | ||
string(APPEND SLIBS " -L$ENV{MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl") | ||
set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}") | ||
set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}") | ||
set(PNETCDF_PATH "$ENV{PNETCDF_PATH}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
if (compile_threaded) | ||
string(APPEND CFLAGS " -fopenmp") | ||
endif() | ||
if (COMP_NAME STREQUAL cism) | ||
string(APPEND CMAKE_OPTS " -D CISM_GNU=ON") | ||
endif() | ||
string(APPEND CPPDEFS " -DFORTRANUNDERSCORE -DNO_R16") | ||
set(CXX_LINKER "FORTRAN") | ||
set(FC_AUTO_R8 "-fdefault-real-8") | ||
set(FFLAGS "-O -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -fno-range-check") | ||
if (compile_threaded) | ||
string(APPEND FFLAGS " -fopenmp") | ||
endif() | ||
if (DEBUG) | ||
string(APPEND FFLAGS " -g -Wall") | ||
endif() | ||
set(FIXEDFLAGS "-ffixed-form") | ||
set(FREEFLAGS "-ffree-form") | ||
set(HDF5_PATH "/software/dev_tools/swtree/cs400_centos7.2_pe2016-08/hdf5-parallel/1.8.17/centos7.2_gnu5.3.0") | ||
set(NETCDF_PATH "/software/dev_tools/swtree/cs400_centos7.2_pe2016-08/netcdf-hdf5parallel/4.3.3.1/centos7.2_gnu5.3.0") | ||
set(PNETCDF_PATH "/software/dev_tools/swtree/cs400_centos7.2_pe2016-08/pnetcdf/1.9.0/centos7.2_gnu5.3.0") | ||
set(LAPACK_LIBDIR "/software/tools/compilers/intel_2017/mkl/lib/intel64") | ||
if (compile_threaded) | ||
string(APPEND LDFLAGS " -fopenmp") | ||
endif() | ||
string(APPEND SLIBS " -L${NETCDF_PATH}/lib -Wl,-rpath=${NETCDF_PATH}/lib -lnetcdff -lnetcdf") | ||
set(MPICC "mpicc") | ||
set(MPICXX "mpic++") | ||
set(MPIFC "mpif90") | ||
set(SCC "gcc") | ||
set(SCXX "gcpp") | ||
set(SFC "gfortran") | ||
set(SUPPORTS_CXX "TRUE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
if (COMP_NAME STREQUAL gptl) | ||
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY") | ||
endif() | ||
set(PIO_FILESYSTEM_HINTS "gpfs") | ||
execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1}") | ||
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(CXX_LIBS "-lstdc++") | ||
set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}") | ||
set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}") | ||
set(PNETCDF_PATH "$ENV{PNETCDF_PATH}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
if (NOT DEBUG) | ||
string(APPEND CFLAGS " -O2") | ||
endif() | ||
if (NOT DEBUG) | ||
string(APPEND FFLAGS " -O2") | ||
endif() | ||
set(CXX_LIBS "-lstdc++") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
if (NOT DEBUG) | ||
string(APPEND CFLAGS " -O2") | ||
endif() | ||
if (NOT DEBUG) | ||
string(APPEND FFLAGS " -O2") | ||
endif() | ||
set(CXX_LIBS "-lstdc++") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
set(SUPPORTS_CXX "TRUE") | ||
if (COMP_NAME STREQUAL gptl) | ||
string(APPEND CPPDEFS " -DHAVE_VPRINTF -DHAVE_GETTIMEOFDAY -DHAVE_BACKTRACE") | ||
endif() | ||
set(NETCDF_PATH "$ENV{NETCDF_HOME}") | ||
if (NOT DEBUG) | ||
string(APPEND FFLAGS " -fno-unsafe-math-optimizations") | ||
endif() | ||
if (DEBUG) | ||
string(APPEND FFLAGS " -g -fbacktrace -fbounds-check -ffpe-trap=invalid,zero,overflow") | ||
endif() | ||
string(APPEND SLIBS " -L$ENV{NETCDF_HOME}/lib/ -lnetcdff -lnetcdf -lcurl -llapack -lblas") | ||
if (MPILIB STREQUAL mpi-serial) | ||
set(SCC "gcc") | ||
endif() | ||
if (MPILIB STREQUAL mpi-serial) | ||
set(SFC "gfortran") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
set(SUPPORTS_CXX "TRUE") | ||
if (COMP_NAME STREQUAL gptl) | ||
string(APPEND CPPDEFS " -DHAVE_VPRINTF -DHAVE_GETTIMEOFDAY -DHAVE_BACKTRACE -DHAVE_SLASHPROC") | ||
endif() | ||
set(CXX_LIBS "-lstdc++") | ||
if (NOT DEBUG) | ||
string(APPEND FFLAGS " -fno-unsafe-math-optimizations") | ||
endif() | ||
if (DEBUG) | ||
string(APPEND FFLAGS " -g -fbacktrace -fbounds-check -ffpe-trap=invalid,zero,overflow") | ||
endif() | ||
string(APPEND SLIBS " -L$ENV{HDF5_PATH}/lib -lhdf5_fortran -lhdf5 -lhdf5_hl -lhdf5hl_fortran") | ||
string(APPEND SLIBS " -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff") | ||
string(APPEND SLIBS " -L$ENV{CURL_PATH}/lib -lcurl -lblas -llapack") | ||
string(APPEND SLIBS " -L$ENV{LAPACK_PATH}/lib64 -lblas -llapack") | ||
string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf") | ||
set(HDF5_PATH "$ENV{HDF5_PATH}") | ||
set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}") | ||
set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}") | ||
set(PNETCDF_PATH "$ENV{PNETCDF_PATH}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
set(PIO_FILESYSTEM_HINTS "lustre") | ||
set(MPICC "mpicc") | ||
set(MPIFC "mpif90") | ||
set(MPICXX "mpic++") | ||
set(SFC "gfortran") | ||
set(SCC "gcc") | ||
set(SCXX "g++") | ||
execute_process(COMMAND nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}") | ||
execute_process(COMMAND nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lnetcdff -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(CXX_LIBS "-lstdc++") | ||
set(NETCDF_C_PATH "$ENV{NETCDF_PATH}") | ||
set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_PATH}") | ||
set(PNETCDF_PATH "$ENV{PNETCDF_PATH}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
string(APPEND CPPDEFS " -DHAVE_SLASHPROC") | ||
if (NOT DEBUG) | ||
string(APPEND CFLAGS " -O2") | ||
endif() | ||
if (NOT DEBUG) | ||
string(APPEND FFLAGS " -O2") | ||
endif() | ||
execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -Wl,-rpath -Wl,$ENV{NETCDF_PATH}/lib") | ||
execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}") | ||
string(APPEND SLIBS " -L/home/azamat/soft/libs -llapack -lblas") | ||
set(NETCDF_PATH "$ENV{NETCDF_PATH}") | ||
set(PNETCDF_PATH "$ENV{PNETCDF_PATH}") |
Oops, something went wrong.