Skip to content

Commit 32a379a

Browse files
committed
added support for spack-stack on hera
1 parent ec29995 commit 32a379a

File tree

3 files changed

+108
-12
lines changed

3 files changed

+108
-12
lines changed

NEMS

Submodule NEMS updated from 11482fc to b239e22

modulefiles/envmodules_intel.hera

+12-11
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,21 @@ myDIRS="${myDIRS} . ${APPMODS_DIR}"
2626
####################
2727
### (1) Load all needed environment modules.
2828
module purge
29-
module load cmake
3029

31-
module use /scratch2/STI/coastal/common/apps/modulefiles
32-
module load hpc-common
30+
module use /scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/unified-env-rocky8/install/modulefiles/Core
3331

34-
#module load hpc-intel/19.0.5.281 hpc-impi
35-
#module load hpc-intel/2020.2 hpc-impi
36-
module load hpc-intel/2022.1.2 hpc-impi
37-
#module load hpc-intel/2022.3.0 hpc-impi
32+
module load stack-intel/2021.5.1
33+
module load stack-intel-oneapi-mpi/2021.5.1
3834

39-
module load hdf5/1.10.9 netcdf/4.7.4
40-
module load proj/4.8.0
41-
module load parmetis/4.0.3
42-
module load esmf/8.3.1
35+
module load cmake/3.23.1
36+
37+
#module load jasper/2.0.32
38+
#module load zlib/1.2.13
39+
#module load libpng/1.6.37
40+
41+
module load hdf5/1.14.0
42+
module load netcdf-c/4.9.2 netcdf-fortran/4.6.0
43+
module load esmf/8.5.0
4344

4445

4546
###################
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#!/usr/bin/env bash-*-Shell-script-functions*-
2+
3+
###########################################################################
4+
### Module File to load the required environment modules for the NEMS application
5+
###
6+
### Author: Panagiotis Velissariou <[email protected]>
7+
### Date: June 26 2021
8+
###########################################################################
9+
10+
11+
####################
12+
# Get the directory where the script is located
13+
if [[ $(uname -s) == Darwin ]]; then
14+
myDIRS="$(cd "$(dirname "$(grealpath -s "${BASH_SOURCE[0]}" )" )" && pwd -P)"
15+
else
16+
myDIRS="$(cd "$(dirname "$(realpath -s "${BASH_SOURCE[0]}" )" )" && pwd -P)"
17+
fi
18+
myDIRS="${myDIRS} . ${APPMODS_DIR}"
19+
####################
20+
21+
22+
# This script is responsible for loading modules that are
23+
# compatible with the NUOPC Layer version used in NEMS.
24+
25+
26+
####################
27+
### (1) Load all needed environment modules.
28+
module purge
29+
module load cmake
30+
31+
module use /scratch2/STI/coastal/common/apps/modulefiles
32+
module load hpc-common
33+
34+
#module load hpc-intel/19.0.5.281 hpc-impi
35+
#module load hpc-intel/2020.2 hpc-impi
36+
module load hpc-intel/2022.1.2 hpc-impi
37+
#module load hpc-intel/2022.3.0 hpc-impi
38+
39+
module load hdf5/1.10.9 netcdf/4.7.4
40+
module load proj/4.8.0
41+
module load parmetis/4.0.3
42+
module load esmf/8.3.1
43+
44+
45+
###################
46+
### (2) Set some environments varaiables related to the loaded
47+
### modules and required to compile the NEMS application properly.
48+
funcs="$( find ${myDIRS} -type f -iname "PlatformFuncs" | head -n 1 )"
49+
if [ -f "${funcs}" ]; then
50+
source "${funcs}"
51+
52+
get_env_hdf5
53+
get_env_netcdf
54+
fi
55+
unset funcs myDIRS
56+
57+
58+
########## BEG:: PLATFORM CUSTOMIZED SETTINGS ##########
59+
# Is this needed in all systems?
60+
# If file locking is not allowed in the filesystem, or the
61+
# HDF5 locking mechanism is not compatible with the
62+
# OS locking mechanism, then HDF5 (>=1.10.x) throws errors like
63+
# access denied when trying to READ/WRITE NetCDF files.
64+
# On some platforms HDF5 locking is disabled on other it is not.
65+
# If you experience these problems uncomment the next line
66+
# (this should be done automatically when loading this file - todo).
67+
#export HDF5_USE_FILE_LOCKING=FALSE
68+
69+
if [ -z "${NETCDF_CONFIG}" ]; then
70+
export NETCDF_CONFIG=${NETCDF_HOME:+${NETCDF_HOME}/bin/nc-config}
71+
fi
72+
73+
if [ -z "${NETCDF_INCDIR}" ]; then
74+
export NETCDF_INCDIR=${NETCDF_INC:+${NETCDF_INC}}
75+
if [ -z "${NETCDF_INCDIR}" ]; then
76+
export NETCDF_INCDIR=${NETCDF_HOME:+${NETCDF_HOME}/include}
77+
fi
78+
fi
79+
80+
if [ -z "${NETCDF_LIBDIR}" ]; then
81+
export NETCDF_LIBDIR=${NETCDF_LIB:+${NETCDF_LIB}}
82+
if [ -z "${NETCDF_LIBDIR}" ]; then
83+
export NETCDF_LIBDIR=${NETCDF_HOME:+${NETCDF_HOME}/lib}
84+
fi
85+
fi
86+
87+
if [ -z "${ESMFMKFILE}" ]; then
88+
echo "The variable ESMFMKFILE is not set. Please load the esmf module for your platform"
89+
echo "Exiting ..."
90+
exit 1
91+
else
92+
export ESMFMKFILE=${ESMFMKFILE}
93+
fi
94+
########## END:: PLATFORM CUSTOMIZED SETTINGS ##########
95+

0 commit comments

Comments
 (0)