Skip to content

Commit

Permalink
update and split modulefiles for gaea c5 and c6 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBurrows-NCO committed Oct 18, 2024
1 parent a9ee9f0 commit 620f4ef
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 7 deletions.
6 changes: 3 additions & 3 deletions modulefiles/gaea.lua → modulefiles/gaeac5.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
help([[
This module loads libraries required for building and running UPP
on the NOAA RDHPC machine Gaea C5 using Intel-2023.1.0.
on the NOAA RDHPC machine Gaea C5 using Intel-2023.2.0.
]])

whatis([===[Loads libraries needed for building the UPP on Gaea ]===])
whatis([===[Loads libraries needed for building the UPP on Gaea C5 ]===])

prepend_path("MODULEPATH", "/autofs/ncrc-svm1_proj/epic/spack-stack/spack-stack-1.6.0/envs/upp-addon-env/install/modulefiles/Core")

Expand All @@ -25,4 +25,4 @@ setenv("CC","cc")
setenv("CXX","CC")
setenv("FC","ftn")

setenv("CMAKE_Platform","gaea.intel")
setenv("CMAKE_Platform","gaeac5.intel")
28 changes: 28 additions & 0 deletions modulefiles/gaeac6.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
help([[
This module loads libraries required for building and running UPP
on the NOAA RDHPC machine Gaea C6 using Intel-2023.2.0.
]])

whatis([===[Loads libraries needed for building the UPP on Gaea C6 ]===])

prepend_path("MODULEPATH", "/autofs/ncrc-svm1_proj/epic/spack-stack/spack-stack-1.6.0/envs/upp-addon-env/install/modulefiles/Core")

stack_intel_ver=os.getenv("stack_intel_ver") or "2023.2.0"
load(pathJoin("stack-intel", stack_intel_ver))

stack_cray_mpich_ver=os.getenv("stack_cray_mpich_ver") or "8.1.28"
load(pathJoin("stack-cray-mpich", stack_cray_mpich_ver))

cmake_ver=os.getenv("cmake_ver") or "3.23.1"
load(pathJoin("cmake", cmake_ver))

load("upp_common")

unload("darshan-runtime")
unload("cray-libsci")

setenv("CC","cc")
setenv("CXX","CC")
setenv("FC","ftn")

setenv("CMAKE_Platform","gaeac6.intel")
33 changes: 29 additions & 4 deletions tests/compile_upp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,51 @@ set -eu

usage() {
echo
echo "Usage: $0 [-p] [-g] [-w] [-v] [-c] [-i] [-d] -h"
echo "Usage: $0 [options]"
echo
echo " -p installation prefix <prefix> DEFAULT: ../install"
echo " -g build with GTG(users with gtg repos. access only) DEFAULT: OFF"
echo " -I build with libIFI(users with ifi repos. access only) DEFAULT: OFF"
echo " -i build with libIFI(users with ifi install access only) DEFAULT: OFF"
echo " -I build with libIFI (users with ifi repos. access only) DEFAULT: OFF"
echo " -B build libIFI test programs (only valid with -I) DEFAULT: OFF"
echo " -n build without nemsio DEFAULT: ON"
echo " -w build without WRF-IO DEFAULT: ON"
echo " -v build with cmake verbose DEFAULT: NO"
echo " -c Compiler to use for build DEFAULT: intel"
echo " -d Debug mode of CMAKE_BUILD_TYPE DEFAULT: Release"
echo " -Doption=value Passes this option to cmake (can use more than once)"
echo " -h display this message and quit"
echo
exit 1
}

load_ifi_module=NO
prefix="../install"
ifi_opt=" -DBUILD_WITH_IFI=OFF"
build_ifi_executables_opt=" "
build_ifi_executables=NO
gtg_opt=" -DBUILD_WITH_GTG=OFF"
nemsio_opt=" -DBUILD_WITH_NEMSIO=ON"
wrfio_opt=" -DBUILD_WITH_WRFIO=ON"
more=" "
compiler="intel"
verbose_opt=""
debug_opt=""
while getopts ":p:gnwc:vhiId" opt; do
while getopts ":p:gnwc:vhiIdBD:" opt; do
case $opt in
D)
more="$more -$opt$OPTARG"
;;
p)
prefix=$OPTARG
;;
g)
gtg_opt=" -DBUILD_WITH_GTG=ON"
;;
B)
build_ifi_executables_opt=" -DBUILD_IFI_EXECUTABLES=ON"
build_ifi_executables=YES
;;
n)
nemsio_opt=" -DBUILD_WITH_NEMSIO=OFF"
;;
Expand All @@ -51,6 +64,7 @@ while getopts ":p:gnwc:vhiId" opt; do
;;
i)
ifi_opt=" -DREQUIRE_IFI=ON"
load_ifi_module=YES
;;
c)
compiler=$OPTARG
Expand All @@ -74,7 +88,7 @@ if [[ ! -z $debug_opt && $ifi_opt =~ INTERNAL.*=ON ]] ; then
debug_opt="$debug_opt -DIFI_DEBUG=ON"
fi

cmake_opts=" -DCMAKE_INSTALL_PREFIX=$prefix"${nemsio_opt}${wrfio_opt}${gtg_opt}${ifi_opt}${debug_opt}
cmake_opts=" -DCMAKE_INSTALL_PREFIX=$prefix"${nemsio_opt}${wrfio_opt}${gtg_opt}${ifi_opt}${debug_opt}${build_ifi_executables_opt}${more}

if [[ $(uname -s) == Darwin ]]; then
readonly MYDIR=$(cd "$(dirname "$(greadlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P)
Expand Down Expand Up @@ -110,6 +124,14 @@ if [[ $MACHINE_ID != "unknown" ]]; then
exit 1
fi
module load $modulefile
if [[ "$load_ifi_module" == YES ]] ; then
echo "Loading modulefile for external libIFI library"
module load ${modulefile}_external_ifi
fi
if [[ "$build_ifi_executables" == YES ]] ; then
echo "Loading libIFI executables' prerequisites"
module load ${modulefile}_ifi_test_prereqs
fi
module list
fi

Expand All @@ -123,3 +145,6 @@ make install

rm -rf $PATHTR/exec && mkdir -p $PATHTR/exec
cp $prefix/bin/upp.x $PATHTR/exec/.
if [[ "$build_ifi_executables" == YES ]] ; then
cp $prefix/bin/fip2-lookalike.x $PATHTR/exec/.
fi

0 comments on commit 620f4ef

Please sign in to comment.