Skip to content

Commit

Permalink
Merge pull request #173 from noaa-ocs-modeling/develop
Browse files Browse the repository at this point in the history
Upadated develop branch to use the new model system on "hera", "orion", "TACC" and ParallelWorks platforms.
  • Loading branch information
saeed-moghimi-noaa authored May 22, 2023
2 parents a150956 + f404805 commit 9aa706f
Show file tree
Hide file tree
Showing 53 changed files with 1,385 additions and 551 deletions.
18 changes: 18 additions & 0 deletions modulefiles/PlatformFuncs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ function strTrim ()
echo -n ${out_str}
}

toUPPER()
{
echo "${1}" | tr '[:lower:]' '[:upper:]'
}

toLOWER()
{
echo "${1}" | tr '[:upper:]' '[:lower:]'
}

get_env_hdf5()
{
local _DEFINED_HDF5
Expand All @@ -35,6 +45,7 @@ get_env_hdf5()
if [ -n "${_hdf5_env_name:+1}" ]; then
export HDF5="${_hdf5_env_name}"
export HDF5HOME="${_hdf5_env_name}"
export HDF5_HOME="${_hdf5_env_name}"
export HDF5_DIR="${_hdf5_env_name}"
export HDF5_PATH="${_hdf5_env_name}"
export HDF5_ROOT="${_hdf5_env_name}"
Expand All @@ -46,6 +57,7 @@ get_env_hdf5()
_hdf5_env_name="${HDF5}"
if [ -n "${_hdf5_env_name:+1}" ]; then
export HDF5HOME="${_hdf5_env_name}"
export HDF5_HOME="${_hdf5_env_name}"
export HDF5_DIR="${_hdf5_env_name}"
export HDF5_PATH="${_hdf5_env_name}"
export HDF5_ROOT="${_hdf5_env_name}"
Expand All @@ -57,6 +69,7 @@ get_env_hdf5()
if [ -n "${_hdf5_env_name:+1}" ]; then
export HDF5="${_hdf5_env_name}"
export HDF5HOME="${_hdf5_env_name}"
export HDF5_HOME="${_hdf5_env_name}"
export HDF5_DIR="${_hdf5_env_name}"
export HDF5_PATH="${_hdf5_env_name}"
export HDF5_ROOT="${_hdf5_env_name}"
Expand All @@ -67,6 +80,7 @@ get_env_hdf5()
if [ -n "${_hdf5_env_name:+1}" ]; then
export HDF5="${_hdf5_env_name}"
export HDF5HOME="${_hdf5_env_name}"
export HDF5_HOME="${_hdf5_env_name}"
export HDF5_DIR="${_hdf5_env_name}"
export HDF5_PATH="${_hdf5_env_name}"
export HDF5_ROOT="${_hdf5_env_name}"
Expand Down Expand Up @@ -95,6 +109,7 @@ get_env_netcdf()
if [ -n "${_netcdf_env_name:+1}" ]; then
export NETCDF="${_netcdf_env_name}"
export NETCDFHOME="${_netcdf_env_name}"
export NETCDF_HOME="${_netcdf_env_name}"
export NETCDF_DIR="${_netcdf_env_name}"
export NETCDF_PATH="${_netcdf_env_name}"
export NETCDF_ROOT="${_netcdf_env_name}"
Expand All @@ -113,6 +128,7 @@ get_env_netcdf()
if [ -n "${_netcdf_env_name:+1}" ]; then
export NETCDF="${_netcdf_env_name}"
export NETCDFHOME="${_netcdf_env_name}"
export NETCDF_HOME="${_netcdf_env_name}"
export NETCDF_DIR="${_netcdf_env_name}"
export NETCDF_PATH="${_netcdf_env_name}"
export NETCDF_ROOT="${_netcdf_env_name}"
Expand All @@ -124,6 +140,7 @@ get_env_netcdf()
if [ -n "${_netcdf_env_name:+1}" ]; then
export NETCDF="${_netcdf_env_name}"
export NETCDFHOME="${_netcdf_env_name}"
export NETCDF_HOME="${_netcdf_env_name}"
export NETCDF_DIR="${_netcdf_env_name}"
export NETCDF_PATH="${_netcdf_env_name}"
export NETCDF_ROOT="${_netcdf_env_name}"
Expand All @@ -134,6 +151,7 @@ get_env_netcdf()
if [ -n "${_netcdf_env_name:+1}" ]; then
export NETCDF="${_netcdf_env_name}"
export NETCDFHOME="${_netcdf_env_name}"
export NETCDF_HOME="${_netcdf_env_name}"
export NETCDF_DIR="${_netcdf_env_name}"
export NETCDF_PATH="${_netcdf_env_name}"
export NETCDF_ROOT="${_netcdf_env_name}"
Expand Down
35 changes: 28 additions & 7 deletions modulefiles/envmodules_gnu.cheyenne
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ myDIRS="${myDIRS} . ${APPMODS_DIR}"
####################
### (1) Load all needed environment modules.
module purge
module load gcc impi
module load cmake

module load gcc openmpi

module load szip hdf5
module load netcdf

module use /contrib/modulefiles
module load esmf


Expand Down Expand Up @@ -64,9 +65,29 @@ unset funcs myDIRS
# (this should be done automatically when loading this file - todo).
#export HDF5_USE_FILE_LOCKING=FALSE

export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config}
export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include}
export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib}
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

export ESMFMKFILE=${ESMFMKFILE}
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 ##########
40 changes: 32 additions & 8 deletions modulefiles/envmodules_gnu.custom
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ myDIRS="${myDIRS} . ${APPMODS_DIR}"

####################
### (1) Load all needed environment modules.
module purge
module load gnu openmpi
module load hdf5 netcdf
#module purge
#module load cmake

module load esmf
#module load gnu openmpi

#module load hdf5 netcdf
#module load proj
#module load parmetis
#module load esmf


####################
Expand All @@ -56,9 +60,29 @@ unset funcs myDIRS
# (this should be done automatically when loading this file - todo).
#export HDF5_USE_FILE_LOCKING=FALSE

export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config}
export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include}
export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib}
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

export ESMFMKFILE=${ESMFMKFILE}
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 ##########
34 changes: 27 additions & 7 deletions modulefiles/envmodules_gnu.gaea
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ myDIRS="${myDIRS} . ${APPMODS_DIR}"
####################
### (1) Load all needed environment modules.
module purge
module load gcc impi
module load cmake

module load pgi impi
module load szip hdf5
module load netcdf

module use /contrib/modulefiles
module load esmf


Expand Down Expand Up @@ -64,9 +64,29 @@ unset funcs myDIRS
# (this should be done automatically when loading this file - todo).
#export HDF5_USE_FILE_LOCKING=FALSE

export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config}
export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include}
export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib}
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

export ESMFMKFILE=${ESMFMKFILE}
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 ##########
31 changes: 25 additions & 6 deletions modulefiles/envmodules_gnu.hera
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ module load cmake

module use /scratch2/STI/coastal/common/apps/modulefiles
module load hpc-common
module load hpc-gnu/9.2.0 openmpi
module load hdf5 netcdf/4.7.4
module load esmf

module load hpc-gnu/6.5.0 openmpi
#module load hpc-gnu/9.2.0 openmpi

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


####################
Expand All @@ -59,9 +64,23 @@ unset funcs myDIRS
# (this should be done automatically when loading this file - todo).
#export HDF5_USE_FILE_LOCKING=FALSE

export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config}
export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include}
export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib}
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,15 @@ myDIRS="${myDIRS} . ${APPMODS_DIR}"

####################
### (1) Load all needed environment modules.
use_defaults=0
module purge
module use /scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack
module load hpc
module load cmake
if [ ${use_defaults:-0} -le 0 ]; then
module load hpc-intel/18.0.5.274 hpc-impi
module load szip hdf5 netcdf
module load esmf/8_1_1
else
module load hpc-intel hpc-impi
module load szip hdf5 netcdf
module load esmf
fi

module load gnu/9.2.0 openmpi

module load hdf5/1.10.5 netcdf/4.7.2
# NOT AVAILABLE module load proj/4.8.0
# NOT AVAILABLE module load parmetis/4.0.3
# NOT AVAILABLE module load esmf/8.3.1


###################
Expand All @@ -65,9 +60,30 @@ unset funcs myDIRS
# (this should be done automatically when loading this file - todo).
#export HDF5_USE_FILE_LOCKING=FALSE

export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config}
export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include}
export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib}
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

export ESMFMKFILE=${ESMFMKFILE}
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 ##########

32 changes: 26 additions & 6 deletions modulefiles/envmodules_gnu.jet
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ myDIRS="${myDIRS} . ${APPMODS_DIR}"
####################
### (1) Load all needed environment modules.
module purge
module load cmake

module load gcc impi
module load szip hdf5
module load netcdf

module use /contrib/modulefiles
module load esmf


Expand Down Expand Up @@ -64,9 +64,29 @@ unset funcs myDIRS
# (this should be done automatically when loading this file - todo).
#export HDF5_USE_FILE_LOCKING=FALSE

export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config}
export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include}
export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib}
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

export ESMFMKFILE=${ESMFMKFILE}
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 ##########
Loading

0 comments on commit 9aa706f

Please sign in to comment.