diff --git a/builds/derecho-gnu/derecho-gnu-cmake b/builds/derecho-gnu/derecho-gnu-cmake new file mode 100755 index 00000000..bdbd8c43 --- /dev/null +++ b/builds/derecho-gnu/derecho-gnu-cmake @@ -0,0 +1,50 @@ +# Run this script by typing: source cheyenne-intel-cmake +# After this script completes, type: make -j 8 +# If rebuilding, type 'make clean' before running 'make -j 8' + +# This cmake configuration script is set up to perform a parallel build with Trilinos + +source /etc/profile.d/z00_modules.csh + +source derecho-gnu-modules + +# remove old build data: +rm -f ./CMakeCache.txt +rm -rf ./CMakeFiles + +echo +echo "Doing CMake Configuration step" + +# Note: the compilation flags were taken from the defaults for a CESM build on +# cheyenne-intel (using cime at 84aafd5). Some of these options are probably +# unnecessary for a standalone cism build, but I am keeping things consistent +# with the CESM build for simplicity. + +cmake \ + -D CISM_BUILD_CISM_DRIVER:BOOL=ON \ + -D CISM_ENABLE_BISICLES=OFF \ + -D CISM_ENABLE_FELIX=OFF \ +\ + -D CISM_USE_TRILINOS:BOOL=OFF \ + -D CISM_MPI_MODE:BOOL=ON \ + -D CISM_SERIAL_MODE:BOOL=OFF \ +\ + -D CISM_USE_GPTL_INSTRUMENTATION:BOOL=OFF \ + -D CISM_COUPLED:BOOL=OFF \ + -D CISM_USE_CISM_FRONT_END:BOOL=OFF \ +\ + -D CISM_NETCDF_DIR=$NETCDF \ + -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \ +\ + -D CMAKE_CXX_COMPILER=CC \ + -D CMAKE_C_COMPILER=cc \ + -D CMAKE_Fortran_COMPILER=ftn \ +\ + -D CMAKE_EXE_LINKER_FLAGS="" \ +\ + -D CMAKE_Fortran_FLAGS:STRING="-fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -fallow-argument-mismatch -fallow-invalid-boz -g -Wall -O0 -g -fbacktrace -ffpe-trap=zero,overflow -fcheck=bounds " \ + -D CMAKE_C_FLAGS:STRING="-std=gnu99 -g -Wall -O0 -g -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds" \ + -D CMAKE_CXX_FLAGS:STRING="-std=c++17 -g -Wall -O0 -g -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds " \ + ../.. + +# Note: last argument above "../.." is path to top-level cism directory diff --git a/builds/derecho-gnu/derecho-gnu-cmake.sh b/builds/derecho-gnu/derecho-gnu-cmake.sh new file mode 100644 index 00000000..7c4c57aa --- /dev/null +++ b/builds/derecho-gnu/derecho-gnu-cmake.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +# After this script completes, type: make -j 8 +# If rebuilding, type 'make clean' before running 'make -j 8' + +# Set path to top cism directory +# Note, this is an easy way to build out of source. +# In directory you want to build in, run: +# $ source $CISM/builds/linux-gnu-cism/linux-gnu-cism-cmake $CISM +# where $CISM is the path to the top level cism directory. +if [ $# -eq 0 ] +then + cism_top="../.." +else + cism_top=${1%/} +fi + +source /etc/profile.d/z00_modules.sh + +source derecho-gnu-modules + +echo CISM: "${cism_top}" + +# remove old build data: +rm -f ./CMakeCache.txt +rm -rf ./CMakeFiles + +echo +echo "Doing CMake Configuration step" + +# Note: the compilation flags were taken from the defaults for a CESM build on +# cheyenne-intel (using cime at 84aafd5). Some of these options are probably +# unnecessary for a standalone cism build, but I am keeping things consistent +# with the CESM build for simplicity. + +# CISM_USE_GPTL_INSTRUMENTATION -- ON by default, set to OFF to not use GPTL instrumentation. + +cmake \ + -D CISM_BUILD_CISM_DRIVER:BOOL=ON \ + -D CISM_ENABLE_BISICLES=OFF \ + -D CISM_ENABLE_FELIX=OFF \ +\ + -D CISM_USE_TRILINOS:BOOL=OFF \ + -D CISM_MPI_MODE:BOOL=ON \ + -D CISM_SERIAL_MODE:BOOL=OFF \ +\ + -D CISM_USE_GPTL_INSTRUMENTATION:BOOL="${CISM_USE_GPTL_INSTRUMENTATION:=ON}" \ + -D CISM_COUPLED:BOOL=OFF \ + -D CISM_USE_CISM_FRONT_END:BOOL=OFF \ +\ + -D CISM_NETCDF_DIR="$NETCDF" \ + -D CISM_GPTL_DIR= "utils/libgptl" \ + -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \ +\ + -D CMAKE_CXX_COMPILER=CC \ + -D CMAKE_C_COMPILER=cc \ + -D CMAKE_Fortran_COMPILER=ftn \ +\ + -D CMAKE_EXE_LINKER_FLAGS="" \ +\ + -D CMAKE_Fortran_FLAGS:STRING="-fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -fallow-argument-mismatch -fallow-invalid-boz -g -Wall -O0 -g -fbacktrace -ffpe-trap=zero,overflow -fcheck=bounds " \ + -D CMAKE_C_FLAGS:STRING="-std=gnu99 -g -Wall -O0 -g -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds " \ + -D CMAKE_CXX_FLAGS:STRING="-std=c++17 -g -Wall -O0 -g -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds " \ + "${cism_top}" + diff --git a/builds/derecho-gnu/derecho-gnu-modules b/builds/derecho-gnu/derecho-gnu-modules new file mode 100755 index 00000000..75ca204d --- /dev/null +++ b/builds/derecho-gnu/derecho-gnu-modules @@ -0,0 +1,11 @@ +module purge +module load ncarenv/23.09 +module load cce/17.0.1 +module load gcc/12.2.0 +module load ncarcompilers/1.0.0 +module load cray-mpich/8.1.27 +module load netcdf-mpi/4.9.2 +module load cmake/3.26.3 +module load craype/2.7.31 +module load cray-libsci/23.02.1.1 +module load parallel-netcdf/1.12.3