diff --git a/NEMS b/NEMS index 11482fcc..b239e229 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit 11482fcc2c17f74fd33e80534a36f95d94a3c2b8 +Subproject commit b239e2295ccfab8a8ac90f153112f89098ae3f14 diff --git a/modulefiles/envmodules_intel.hera b/modulefiles/envmodules_intel.hera index fed2ba9c..5031d9f3 100644 --- a/modulefiles/envmodules_intel.hera +++ b/modulefiles/envmodules_intel.hera @@ -26,20 +26,21 @@ myDIRS="${myDIRS} . ${APPMODS_DIR}" #################### ### (1) Load all needed environment modules. module purge -module load cmake -module use /scratch2/STI/coastal/common/apps/modulefiles -module load hpc-common +module use /scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/unified-env-rocky8/install/modulefiles/Core -#module load hpc-intel/19.0.5.281 hpc-impi -#module load hpc-intel/2020.2 hpc-impi -module load hpc-intel/2022.1.2 hpc-impi -#module load hpc-intel/2022.3.0 hpc-impi +module load stack-intel/2021.5.1 +module load stack-intel-oneapi-mpi/2021.5.1 -module load hdf5/1.10.9 netcdf/4.7.4 -module load proj/4.8.0 -module load parmetis/4.0.3 -module load esmf/8.3.1 +module load cmake/3.23.1 + +#module load jasper/2.0.32 +#module load zlib/1.2.13 +#module load libpng/1.6.37 + +module load hdf5/1.14.0 +module load netcdf-c/4.9.2 netcdf-fortran/4.6.0 +module load esmf/8.5.0 ################### diff --git a/modulefiles/envmodules_intel.hera.cmmb_libs b/modulefiles/envmodules_intel.hera.cmmb_libs new file mode 100644 index 00000000..fed2ba9c --- /dev/null +++ b/modulefiles/envmodules_intel.hera.cmmb_libs @@ -0,0 +1,95 @@ +#!/usr/bin/env bash-*-Shell-script-functions*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + +#################### +# Get the directory where the script is located +if [[ $(uname -s) == Darwin ]]; then + myDIRS="$(cd "$(dirname "$(grealpath -s "${BASH_SOURCE[0]}" )" )" && pwd -P)" +else + myDIRS="$(cd "$(dirname "$(realpath -s "${BASH_SOURCE[0]}" )" )" && pwd -P)" +fi +myDIRS="${myDIRS} . ${APPMODS_DIR}" +#################### + + +# This script is responsible for loading modules that are +# compatible with the NUOPC Layer version used in NEMS. + + +#################### +### (1) Load all needed environment modules. +module purge +module load cmake + +module use /scratch2/STI/coastal/common/apps/modulefiles +module load hpc-common + +#module load hpc-intel/19.0.5.281 hpc-impi +#module load hpc-intel/2020.2 hpc-impi +module load hpc-intel/2022.1.2 hpc-impi +#module load hpc-intel/2022.3.0 hpc-impi + +module load hdf5/1.10.9 netcdf/4.7.4 +module load proj/4.8.0 +module load parmetis/4.0.3 +module load esmf/8.3.1 + + +################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find ${myDIRS} -type f -iname "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs myDIRS + + +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +# Is this needed in all systems? +# If file locking is not allowed in the filesystem, or the +# HDF5 locking mechanism is not compatible with the +# OS locking mechanism, then HDF5 (>=1.10.x) throws errors like +# access denied when trying to READ/WRITE NetCDF files. +# On some platforms HDF5 locking is disabled on other it is not. +# If you experience these problems uncomment the next line +# (this should be done automatically when loading this file - todo). +#export HDF5_USE_FILE_LOCKING=FALSE + +if [ -z "${NETCDF_CONFIG}" ]; then + export NETCDF_CONFIG=${NETCDF_HOME:+${NETCDF_HOME}/bin/nc-config} +fi + +if [ -z "${NETCDF_INCDIR}" ]; then + export NETCDF_INCDIR=${NETCDF_INC:+${NETCDF_INC}} + if [ -z "${NETCDF_INCDIR}" ]; then + export NETCDF_INCDIR=${NETCDF_HOME:+${NETCDF_HOME}/include} + fi +fi + +if [ -z "${NETCDF_LIBDIR}" ]; then + export NETCDF_LIBDIR=${NETCDF_LIB:+${NETCDF_LIB}} + if [ -z "${NETCDF_LIBDIR}" ]; then + export NETCDF_LIBDIR=${NETCDF_HOME:+${NETCDF_HOME}/lib} + fi +fi + +if [ -z "${ESMFMKFILE}" ]; then + echo "The variable ESMFMKFILE is not set. Please load the esmf module for your platform" + echo "Exiting ..." + exit 1 +else + export ESMFMKFILE=${ESMFMKFILE} +fi +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## +