Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions builds/derecho-gnu/derecho-gnu-cmake
Original file line number Diff line number Diff line change
@@ -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
65 changes: 65 additions & 0 deletions builds/derecho-gnu/derecho-gnu-cmake.sh
Original file line number Diff line number Diff line change
@@ -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}"

11 changes: 11 additions & 0 deletions builds/derecho-gnu/derecho-gnu-modules
Original file line number Diff line number Diff line change
@@ -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