-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added support for spack-stack on hera
- Loading branch information
1 parent
ec29995
commit 32a379a
Showing
3 changed files
with
108 additions
and
12 deletions.
There are no files selected for viewing
Submodule NEMS
updated
from 11482f to b239e2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
### 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 ########## | ||
|