From e02a257cebebc83723b1221f184ecda375ed2b87 Mon Sep 17 00:00:00 2001 From: "zachary.burnett" Date: Mon, 24 May 2021 12:11:55 -0400 Subject: [PATCH 01/96] add PaHM as submodule --- .gitmodules | 3 +++ PaHM | 1 + 2 files changed, 4 insertions(+) create mode 160000 PaHM diff --git a/.gitmodules b/.gitmodules index 53771378..0e3f75fa 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,6 @@ path = NWM url = https://github.com/noaa-ocs-modeling/nwm_public_nuopc.git branch = master +[submodule "PaHM"] + path = PaHM + url = https://github.com/noaa-ocs-modeling/PaHM.git diff --git a/PaHM b/PaHM new file mode 160000 index 00000000..2e798bef --- /dev/null +++ b/PaHM @@ -0,0 +1 @@ +Subproject commit 2e798befb9a6e6551976e638095da4422ec0dfd0 From 7cc5d32b262a6295fd02e02029822b43de68c655 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 21 Jun 2021 19:24:37 +0000 Subject: [PATCH 02/96] updated PaHM submodule to point to newest commit + changed name to PAHM --- .gitmodules | 2 +- PAHM | 1 + PaHM | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) create mode 160000 PAHM delete mode 160000 PaHM diff --git a/.gitmodules b/.gitmodules index 0e3f75fa..acdc834a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -23,5 +23,5 @@ url = https://github.com/noaa-ocs-modeling/nwm_public_nuopc.git branch = master [submodule "PaHM"] - path = PaHM + path = PAHM url = https://github.com/noaa-ocs-modeling/PaHM.git diff --git a/PAHM b/PAHM new file mode 160000 index 00000000..9a6b35d8 --- /dev/null +++ b/PAHM @@ -0,0 +1 @@ +Subproject commit 9a6b35d85b2bca2277ab4c94c5d1b3d886c5f62c diff --git a/PaHM b/PaHM deleted file mode 160000 index 2e798bef..00000000 --- a/PaHM +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2e798befb9a6e6551976e638095da4422ec0dfd0 From fa468b008b4ae35c8624fcbb1b8c819fa0144d22 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 24 Jun 2021 11:36:20 -0500 Subject: [PATCH 03/96] updated PaHM sources to include the nuopc folder --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 9a6b35d8..7a248b42 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 9a6b35d85b2bca2277ab4c94c5d1b3d886c5f62c +Subproject commit 7a248b42f91ee4540aa383371b5670b38bd5304f From ebefcd385593bb6f206924e5fad22d12d1dee57d Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Thu, 24 Jun 2021 17:51:27 +0000 Subject: [PATCH 04/96] update modulefile to use stable parallel ESMF build --- modulefiles/envmodules_intel.hera | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modulefiles/envmodules_intel.hera b/modulefiles/envmodules_intel.hera index 6f8b0aa5..6b023b97 100644 --- a/modulefiles/envmodules_intel.hera +++ b/modulefiles/envmodules_intel.hera @@ -9,10 +9,11 @@ module purge module load intel/18.0.5.274 impi/2018.0.4 module load szip -module use /home/emc.nemspara/SOFT-hera/modulefiles module load hdf5_parallel/1.10.6.release module load netcdf_parallel/4.7.4.release -module load esmf/8.1.0bs36g + +module use /home/emc.nemspara/SOFT-hera/modulefiles +module load esmf/8.0.1_ParallelNetCDF.release #################### From e62388e4db800042628721a57c25bb7231d7c4c3 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Thu, 24 Jun 2021 17:56:54 +0000 Subject: [PATCH 05/96] modules are under emc-nemspara --- modulefiles/envmodules_intel.hera | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modulefiles/envmodules_intel.hera b/modulefiles/envmodules_intel.hera index 6b023b97..37e88778 100644 --- a/modulefiles/envmodules_intel.hera +++ b/modulefiles/envmodules_intel.hera @@ -9,10 +9,9 @@ module purge module load intel/18.0.5.274 impi/2018.0.4 module load szip +module use /home/emc.nemspara/SOFT-hera/modulefiles module load hdf5_parallel/1.10.6.release module load netcdf_parallel/4.7.4.release - -module use /home/emc.nemspara/SOFT-hera/modulefiles module load esmf/8.0.1_ParallelNetCDF.release From 32d79c1c93fd5a8a2ea4a1920ba76b53343677d8 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Fri, 25 Jun 2021 14:05:58 -0500 Subject: [PATCH 06/96] updated build scripts to fix compilation errors --- build.sh | 2 +- modulefiles/envmodules_intel.orion | 9 +- modulefiles/envmodules_intel.orion.orig | 27 ++ scripts/build-v1.0.sh | 214 -------- scripts/{build-v1.1.sh => build.sh} | 69 ++- scripts/functions_build | 25 +- scripts/functions_build-v1.0 | 611 ----------------------- scripts/functions_build.del | 617 ------------------------ 8 files changed, 123 insertions(+), 1451 deletions(-) create mode 100644 modulefiles/envmodules_intel.orion.orig delete mode 100644 scripts/build-v1.0.sh rename scripts/{build-v1.1.sh => build.sh} (76%) mode change 100644 => 100755 delete mode 100644 scripts/functions_build-v1.0 delete mode 100644 scripts/functions_build.del diff --git a/build.sh b/build.sh index 7def0452..8538245c 120000 --- a/build.sh +++ b/build.sh @@ -1 +1 @@ -scripts/build-v1.1.sh \ No newline at end of file +scripts/build.sh \ No newline at end of file diff --git a/modulefiles/envmodules_intel.orion b/modulefiles/envmodules_intel.orion index 0e915c9f..c50777f6 100644 --- a/modulefiles/envmodules_intel.orion +++ b/modulefiles/envmodules_intel.orion @@ -6,11 +6,12 @@ #################### ### (1) Load all needed environment modules. module purge -module load intel impi -module load szip hdf5 -module load netcdf +module load cmake +module load intel/2019.5 impi +module load szip hdf5/1.10.5-parallel +module load netcdf/4.7.2-parallel -module load esmf +module load esmf/7.1.0r #################### diff --git a/modulefiles/envmodules_intel.orion.orig b/modulefiles/envmodules_intel.orion.orig new file mode 100644 index 00000000..0e915c9f --- /dev/null +++ b/modulefiles/envmodules_intel.orion.orig @@ -0,0 +1,27 @@ +#!/bin/bash-*-Shell-script-modules*- + +# 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 intel impi +module load szip hdf5 +module load netcdf + +module load esmf + + +#################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. + +export HDF5HOME=${HDF5_ROOT} +export NETCDFHOME=${NETCDF_ROOT} + +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} +export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} +export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} + +export ESMFMKFILE=${ESMFMKFILE} diff --git a/scripts/build-v1.0.sh b/scripts/build-v1.0.sh deleted file mode 100644 index ba6f6cb4..00000000 --- a/scripts/build-v1.0.sh +++ /dev/null @@ -1,214 +0,0 @@ -#!/bin/bash - -########################################################################### -### Author: Panagiotis Velissariou -### -### Version - 1.0 Fri Dec 04 2020 -########################################################################### - - -###==================== -# Make sure that the current working directory is in the PATH -[[ ! :$PATH: == *:".":* ]] && export PATH="${PATH}:." - - -# Get the directory where the script is located -scrNAME="${BASH_SOURCE[0]}" -if [[ $(uname -s) == Darwin ]]; then -# readonly scrDIR="$(cd "$(dirname "$(greadlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P)" - readonly scrDIR="$(cd "$(dirname "$(grealpath -s "${scrNAME}" )" )" && pwd -P)" -else -# readonly scrDIR="$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P)" - readonly scrDIR="$(cd "$(dirname "$(realpath -s "${scrNAME}")" )" && pwd -P)" -fi - -funcs="$( find ${scrDIR} -type f -name "functions_build" | head -n 1 )" -if [ -f "${funcs}" ]; then - source "${funcs}" -else - echo " ### ERROR :: in ${scrNAME}" - echo " Cannot load the required file: ${funcs}" - echo " Exiting now ..." - echo - exit 1 -fi - -unset funcs -###==================== - - -######### -# Call ParseArgs to get the user input. -ParseArgs "${@}" - - -########## -# Set the variables for this script -CLEAN=${MY_CLEAN:-0} - -[ -n "${MY_COMPILER:+1}" ] && COMPILER="$( toLOWER "${MY_COMPILER}" )" - -[ -n "${MY_COMPONENT:+1}" ] && COMPONENT="$( toUPPER "${MY_COMPONENT}" )" - -[ -n "${MY_OS:+1}" ] && OS="$( toLOWER "${MY_OS}" )" - -[ "${MY_PARMAKE:0}" -gt 1 ] && PARMAKE=${MY_PARMAKE} - -[ -n "${MY_PLATFORM:+1}" ] && PLATFORM="$( toLOWER "${MY_PLATFORM}" )" - -[ -n "${MY_VERBOSE:+1}" ] && VERBOSE="$( toLOWER "${MY_VERBOSE}" )" - -modFILE="envmodules${COMPILER:+_${COMPILER}}${PLATFORM:+.${PLATFORM}}" - -# Customize the NEMS.x filename to include the component names -if [ -n "${COMPONENT:+1}" ]; then - compFNAME="$( strTrim "$( toLOWER "${COMPONENT}" )" )" - compFNAME="$( echo "${compFNAME}" | sed 's/ /_/g' )" -fi - -# Export some environment variables for NEMS -export NEMS_COMPILER=${COMPILER} -########## - - -########## -# Get the project directories and perform a basic check on them -readonly nemsDIR="${NEMS_DIR:-${scrDIR}/NEMS}" -if [ ! -f "${nemsDIR}/NEMSAppBuilder" ]; then - echo "The project directory \"${nemsDIR}\" does not appear to contain NEMSAppBuilder." - echo "Is this the correct NEMS directory?" - echo "You might need to set the environment variable NEMS_DIR before running this script." - echo "Exiting ..." - exit 1 -fi - -readonly modDIR="${NEMSMODS_DIR:-${scrDIR}/modulefiles}" -if [ ! -f "${modDIR}/${modFILE}" ]; then - echo "The modulefiles directory \"${modDIR}\" does not appear to contain module: ${modFILE}." - echo "Is this the correct modulefiles directory?" - echo "You might need to set the environment variable NEMSMODS_DIR before running this script." - echo "Exiting ..." - exit 1 -fi -########## - - -########## -# If the user requested to clean the build folder, do the cleaning end exit -if [ ${CLEAN:-0} -ge 1 ]; then - echo "User requested to only clean the project. Cleaning ..." - - pushd ${nemsDIR} >/dev/null 2>&1 - [ ${CLEAN:-0} -eq 1 ] && compileNems clean - [ ${CLEAN:-0} -eq 2 ] && compileNems distclean - popd >/dev/null 2>&1 - - exit 0 -fi -########## - - -########## -# Source the environment module -source ${modDIR}/${modFILE} - -component_ww3="$( echo "${COMPONENT}" | sed 's/ /:/g' )" -if [[ :${component_ww3}: == *:"WW3":* ]]; then - export WW3_CONFOPT="${COMPILER}" - export WW3_COMP="${COMPILER}" - export WWATCH3_NETCDF=NC4 -fi -########## - - -########## -# Get a final user response for the variables -echo -echo "The following variables are defined:" -echo " CLEAN = ${CLEAN}" -echo " COMPILER = ${COMPILER:-Undefined, Supported values are: [${MY_COMPILING_SYTEMS}]}" -echo " NEMS_COMPILER = ${NEMS_COMPILER}" -if [[ :${component_ww3}: == *:"WW3":* ]]; then - echo " WW3_CONFOPT = ${WW3_CONFOPT}" - echo " WW3_COMP = ${WW3_COMP}" - echo " WWATCH3_NETCDF = ${WWATCH3_NETCDF}" -fi -echo " COMPONENTS = ${COMPONENT:-Undefined, Supported values are: [${MY_COMPONENT_LIST}]}" -echo " OS = ${OS}" -echo " PLATFORM = ${PLATFORM}" -echo " VERBOSE = ${VERBOSE}" -echo -echo " HDF5HOME = ${HDF5HOME}" -echo " NETCDFHOME = ${NETCDFHOME}" -echo " NETCDF_INCDIR = ${NETCDF_INCDIR}" -echo " NETCDF_LIBDIR = ${NETCDF_LIBDIR}" -echo -echo " ESMFMKFILE = ${ESMFMKFILE}" -echo - -module list - -echo_response= -while [ -z "${echo_response}" ] ; do - echo -n "Are these values correct? [y/n]: " - read echo_response - echo_response="$( getYesNo "${echo_response}" )" -done - -if [ "${echo_response:-no}" = "no" ]; then - echo - echo "User responded: ${echo_response}" - echo "Exiting now ..." - echo - exit 1 -fi - -unset echo_response -########## - - -############################################################ -### START THE CALCULATIONS -############################################################ - -########## -# Compile the project -compileERR=0 -pushd ${nemsDIR} >/dev/null 2>&1 - case ${CLEAN:-0} in - -1 ) - compileNems clean - compileERR=$? - ;; - -2 ) - compileNems distclean - compileERR=$? - ;; - -3 ) - compileNems noclean - compileERR=$? - ;; - * ) - compileNems clean - compileERR=$? - ;; - esac - - if [ ${compileERR} -eq 0 ]; then - compileNems build - compileERR=$? - fi - - if [ ${compileERR} -eq 0 ]; then - if [ -f exe/NEMS.x ]; then - cp -p exe/NEMS.x exe/NEMS${compFNAME:+-${compFNAME}}.x - fi - fi -popd >/dev/null 2>&1 - -########## -# Install all data, executables, libraries in a common directory -[ ${compileERR:-0} -eq 0 ] && installNems -########## - -exit 0 diff --git a/scripts/build-v1.1.sh b/scripts/build.sh old mode 100644 new mode 100755 similarity index 76% rename from scripts/build-v1.1.sh rename to scripts/build.sh index 30f8880e..798e1fbe --- a/scripts/build-v1.1.sh +++ b/scripts/build.sh @@ -48,10 +48,12 @@ ParseArgs "${@}" # Set the variables for this script CLEAN=${MY_CLEAN:-0} -[ -n "${MY_COMPILER:+1}" ] && COMPILER="$( toLOWER "${MY_COMPILER}" )" +[ -n "${MY_COMPILER:+1}" ] && COMPILER="$( toLOWER "$( basename "${MY_COMPILER}" )" )" [ -n "${MY_COMPONENT:+1}" ] && COMPONENT="$( toUPPER "${MY_COMPONENT}" )" +PARALLEL=${MY_PARALLEL:-1} +export NEMS_PARALLEL=${PARALLEL} [ -n "${MY_OS:+1}" ] && OS="$( toLOWER "${MY_OS}" )" if [ -n "${MY_PLATFORM:+1}" ]; then @@ -75,7 +77,7 @@ if [ -n "${COMPONENT:+1}" ]; then compFNAME="$( echo "${compFNAME}" | sed 's/ /_/g' )" fi -# Export some environment variables for NEMS +# Export some environment variables for NEMS and for other models export NEMS_COMPILER=${COMPILER} ########## @@ -119,6 +121,60 @@ fi ########## +########## +# Get the compilers to use for this project compilation +case "${COMPILER}" in + gnu) + CC=gcc + CXX=g++ + FC=gfortran + F90=gfortran + PCC=mpicc + PCXX=mpicxx + PFC=mpif90 + PF90=mpif90 + ;; + intel) + CC=icc + CXX=icpc + FC=ifort + F90=ifort + PCC=mpiicc + PCXX=mpiicpc + PFC=mpiifort + PF90=mpiifort + ;; + pgi) + CC=pgcc + CXX=pgc++ + FC=pgfortran + F90=pgfortran + PCC=pgcc + PCXX=pgc++ + PFC=pgfortran + PF90=pgfortran + ;; + *) # No defaults. Give the user the option to define the environment variables + # CC, CXX, FC, F90 before running this script. + #echo "WARNING: The supplied compiling system \"${COMPILER}\", is not suported." + #echo " Supported systems are anyone of: compiling_system=[${MY_COMPILING_SYTEMS}]" + #echo " Use: --compiler=compiling_system." + #echo " Will continue with OS defaults." + CC=${CC:-} + CXX=${CXX:-} + FC=${FC:-} + F90=${F90:-} + PCC=${CC:-} + PCXX=${CXX:-} + PFC=${FC:-} + PF90=${F90:-} + ;; +esac + +export CC CXX FC F90 PCC PCXX PFC PF90 +########## + + ########## # Source the environment module source ${modDIR}/${modFILE} @@ -139,6 +195,15 @@ echo "The following variables are defined:" echo " CLEAN = ${CLEAN}" echo " COMPILER = ${COMPILER:-Undefined, Supported values are: [${MY_COMPILING_SYTEMS}]}" echo " NEMS_COMPILER = ${NEMS_COMPILER}" +echo " NEMS_PARALLEL = ${PARALLEL:-0}" +echo " CC = ${CC:-UNDEF}" +echo " CXX = ${CXX:-UNDEF}" +echo " FC = ${FC:-UNDEF}" +echo " F90 = ${F90:-UNDEF}" +echo " PCC = ${PCC:-UNDEF}" +echo " PCXX = ${PCXX:-UNDEF}" +echo " PFC = ${PFC:-UNDEF}" +echo " PF90 = ${PF90:-UNDEF}" echo " MODULES FILE = ${modFILE}" if [[ :${component_ww3}: == *:"WW3":* ]]; then echo " WW3_CONFOPT = ${WW3_CONFOPT}" diff --git a/scripts/functions_build b/scripts/functions_build index ebb69270..e08a6460 100644 --- a/scripts/functions_build +++ b/scripts/functions_build @@ -40,7 +40,7 @@ ParseArgs() local ans0 ans ival intN local all_evars - all_evars="MY_CLEAN MY_COMPILER MY_COMPONENT MY_OS MY_PARMAKE MY_PLATFORM MY_VERBOSE" + all_evars="MY_CLEAN MY_COMPILER MY_COMPONENT MY_OS MY_PARALLEL MY_PARMAKE MY_PLATFORM MY_VERBOSE" for ival in ${all_evars}; do unset __${ival}; done @@ -49,6 +49,7 @@ ParseArgs() __MY_COMPILER=intel __MY_COMPONENT="ADCIRC WW3DATA ATMESH" __MY_OS= + __MY_PARALLEL=1 __MY_PARMAKE=1 __MY_PLATFORM= __MY_VERBOSE= @@ -56,7 +57,7 @@ ParseArgs() # ----- # Process the function options - opt_all=( c clean compiler component j os plat v verbose h help ) + opt_all=( c clean compiler component j par parallel os plat v verbose h help ) opt_all=":$( echo "${opt_all[@]/#/-} ${opt_all[@]/#/--}" | sed 's/ /:/g' ):" unset __OPTION_LIST @@ -127,6 +128,21 @@ ParseArgs() fi fi ;; + -par | --par | -parallel | --parallel ) + checkFuncOpt "--parallel" + if [ $? -eq 0 ]; then + __MY_PARALLEL=1 + if [ "X${opt_arg}" != "X" ]; then + if `isInteger "${opt_arg}"` ; then + __MY_PARALLEL=0 + [ ${opt_arg} -ge 1 ] && __MY_PARALLEL=1 + else + __MY_PARALLEL=0 + [ "$( getYesNo "${opt_arg}" )" = "yes" ] && __MY_PARALLEL=1 + fi + fi + fi + ;; -os | --os ) checkFuncOpt "--os" if [ $? -eq 0 ]; then @@ -220,6 +236,11 @@ UsageBuild() echo " Default: 1." echo #--- + echo " -par|--par|-parallel|--parallel [=|space] \"0|1|yes|no\" (OPTIONAL)." + echo " Activate the use of parallel compilers." + echo " Default: 1|yes." + echo + #--- echo " -os|--os [=|space] \"OS string\" (OPTIONAL)." echo " The name of the Operating system." echo " Supported OSes: linux macosx." diff --git a/scripts/functions_build-v1.0 b/scripts/functions_build-v1.0 deleted file mode 100644 index 05111ddc..00000000 --- a/scripts/functions_build-v1.0 +++ /dev/null @@ -1,611 +0,0 @@ -#!/bin/bash-*-Shell-script-functions*- - -########################################################################### -### Author: Panagiotis Velissariou -### -### Version - 1.0 Fri Dec 04 2020 -########################################################################### - -set +u - -MY_COMPILING_SYTEMS="gnu, intel, pgi" -MY_COMPONENT_LIST="ADCIRC WW3DATA WW3 NWM ATMESH" - -################################################## -### MODELLING SYSTEM BUILD FUNCTIONS -################################################## - -###======================================== -### ParseArgs() -### Usage: ParseArgs args -### Parameters: args = the script options -### Returns: 0 -### Echoes: NONE -### -### Gets the supplied options to the script. -###======================================== -ParseArgs() -{ - local nm_func=$( basename ${BASH_SOURCE[${#BASH_SOURCE[@]}-1]} ) - - local opt_all opt_opt opt_arg opt_chk - - local t_VAR - local ans0 ans ival intN - local all_evars - - all_evars="MY_CLEAN MY_COMPILER MY_COMPONENT MY_OS MY_PARMAKE MY_PLATFORM MY_VERBOSE" - - for ival in ${all_evars}; do unset __${ival}; done - - - __MY_CLEAN=0 - __MY_COMPILER=intel - __MY_COMPONENT="ADCIRC WW3DATA ATMESH" - __MY_OS= - __MY_PARMAKE=1 - __MY_PLATFORM= - __MY_VERBOSE= - - - # ----- - # Process the function options - opt_all=( c clean compiler component j os plat v verbose h help ) - opt_all=":$( echo "${opt_all[@]/#/-} ${opt_all[@]/#/--}" | sed 's/ /:/g' ):" - - unset __OPTION_LIST - while test $# -gt 0; do - case "${1}" in - -[^-]*=* | --[^-]*=* ) - opt_opt="$( toLOWER "$( echo "${1}" | sed 's/=.*//' )" )" - len=$(( ${#opt_opt} + 1 )) - opt_arg="$( strTrim "$( echo "${1:${len}}" )" 2 )" - [ "$( echo "${opt_all}" | egrep -o ":${opt_arg}:" )" ] && \ - opt_arg= - ;; - -[^-]* | --[^-]* ) - opt_opt="$( toLOWER "${1}" )" - opt_chk="$( toLOWER "$( echo "${2}" | sed 's/=.*//' )" )" - if [ "$( echo "${opt_all}" | egrep -o ":${opt_chk}:" )" ]; then - opt_arg= - else - opt_arg="$( strTrim "$( echo "${2}" )" )" - fi - ;; - *) - opt_opt= - opt_arg= - ;; - esac - - case "${opt_opt}" in - -c | --c | -clean | --clean ) - checkFuncOpt "--clean" - if [ $? -eq 0 ]; then - __MY_CLEAN=1 - if [ "X${opt_arg}" != "X" ]; then - if `isInteger "${opt_arg}"` ; then - __MY_CLEAN=$( echo "${opt_arg}" ) - [ ${opt_arg} -le -3 ] && __MY_CLEAN=-3 - [ ${opt_arg} -ge 2 ] && __MY_CLEAN=2 - else - __MY_CLEAN=0 - [ "$( getYesNo "${opt_arg}" )" = "yes" ] && __MY_CLEAN=1 - fi - fi - fi - ;; - -compiler | --compiler ) - checkFuncOpt "--compiler" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_COMPILER="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -component | --component ) - checkFuncOpt "--component" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_COMPONENT="$( strTrim "${opt_arg}" )" - fi - fi - ;; - -j | --j ) - checkFuncOpt "--j" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_PARMAKE=1 - t_VAR="$( getPosInteger "${opt_arg}" )" - [ ! -z "${t_VAR}" ] && __MY_PARMAKE=${t_VAR} - fi - fi - ;; - -os | --os ) - checkFuncOpt "--os" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_OS="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -plat | --plat ) - checkFuncOpt "--plat" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_PLATFORM="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -v | --v | -verbose | --verbose ) - checkFuncOpt "--verbose" - if [ $? -eq 0 ]; then - __MY_VERBOSE=b - if [ "X${opt_arg}" != "X" ]; then - __MY_VERBOSE="$( echo "$( strTrim "${opt_arg}" 2 )" | sed 's/[[:space:]]/,/g' )" - fi - fi - ;; - -h | -help | --h | --help ) - UsageBuild ${nm_func} - ;; - *) ;; # DEFAULT - esac - shift - opt_opt= - opt_arg= - done - unset __OPTION_LIST - # ----- - - if [ -z "${__MY_OS}" ]; then - case "$(uname -s)" in - Darwin ) __MY_OS="macosx" ;; - Linux ) __MY_OS="linux" ;; - *) __MY_OS="UNDEFINED";; # DEFAULT - esac - fi - - # Export the values of all __* variables. - for ival in ${all_evars} - do - ans0="$( eval "echo \${$(echo ${ival}):-}" )" - ans="$( eval "echo \${$(echo __${ival}):-}" )" - ans=${ans:-${ans0:-}} - - eval "${ival}=\${ans}" - export ${ival} - - unset __${ival} - done - - return 0 -} - -UsageBuild() -{ - local nm="$( basename ${0} )" - - echo - echo "Usage: \"${nm}\" [{-|--}option1{=|space}[option_value1]] [{-|--}option2{=|space}[option_value2]] ..." - echo - - echo " -h|-help|--h|--help" - echo " Show this help screen." - echo - #--- - echo " -c|--c|-clean|--clean [=|space] \"0|1|yes|no\" (OPTIONAL)." - echo " Only clean the already compiled CMake build system." - echo " Default: 0|no." - echo - #--- - echo " -compiler|--compiler [=|space] \"compiling_system\" (OPTIONAL)." - echo " The compiling system to use (${MY_COMPILING_SYTEMS})." - echo " Default: intel." - echo - #--- - echo " -component|--component [=|space] \"component_list\" (OPTIONAL)." - echo " The component(s) to use (${MY_COMPONENT_LIST})." - echo " Default: \"ADCIRC WW3DATA ATMESH\"." - echo - #--- - echo " -j|--j [=|space] \"N\" (OPTIONAL)." - echo " Define the number of make jobs to run simultaneously." - echo " Default: 1." - echo - #--- - echo " -os|--os [=|space] \"OS string\" (OPTIONAL)." - echo " The name of the Operating system." - echo " Supported OSes: linux macosx." - echo " Default: current OS." - echo - #--- - echo " -plat|--plat [=|space] \"platform\" (OPTIONAL)." - echo " The name of the compute HPC platform to consider." - echo " Selecting a platform, environment modules specific to that platform are loaded" - echo " and corresponding environment variables are set." - echo " Supported platforms: cheyenne gaea hera jet orion stampede wcoss." - echo " Default: none." - echo - #--- - echo " -v|--v|-verbose|--verbose [=|space] \"a,b,v,i,j,m,n\" (any combination, OPTIONAL)." - echo " Enable verbosity in the make files during compilation." - echo " a (all) : all types of debugging output are enabled" - echo " n (none) : disable all debugging currently enabled" - echo " b (basic) : basic debugging and whether the build was successful or not" - echo " v (verbose) : a level above basic" - echo " i (implicit) : prints messages describing the implicit rule searches for each target" - echo " j (jobs) : prints messages giving details on the invocation of specific sub-commands" - echo " m (makefile) : enables messages while rebuilding makefiles" - echo " Default:none." - echo - #--- - - exit 0 -} - -###======================================== -### checkFuncOpt() -### Usage: checkFuncOpt opt_name -### Parameters: -### opt_name: The name of the option to a function -### -### Returns : Exits on error -### -### Exports : __OPTION_LIST -### -### Echoes : NONE -### -### checkFuncOpt: Checks if an option to a function is already supplied. -###======================================== -checkFuncOpt() { - local opt_inp opt_list - - [ $# -eq 0 ] && return -1 - - opt_inp="$( strTrim "${1}" 2 )" - opt_inp="$( echo "${opt_inp}" | sed 's/^[-]*//' )" - - opt_list="$( strTrim "${__OPTION_LIST}" 2 )" - [ -n ${opt_list:+1} ] && \ - opt_list=":$( echo "${opt_list}" | sed 's/ /:/g' ):" - - [ "$( echo "${opt_list}" | egrep -o ":${opt_inp}:" )" ] && return 1 - - __OPTION_LIST="${__OPTION_LIST} ${opt_inp}" - export __OPTION_LIST - - return 0 -} - -###======================================== -### isInteger() -### Usage: isInteger var -### Parameters: var -### Returns: 1 if var is not an integer (0 is an integer as well) -### 0 in any other case -### Echoes: NONE -###======================================== -isInteger() -{ - local -i retval=1 - - [ $# -eq 0 ] && return ${retval} - - if [ "${1:-UNDEF}" -eq "${1}" ] 2>/dev/null - then - retval=0 - fi - - return ${retval} -} - -###======================================== -### getInteger() -### Usage: getInteger int -### Parameters: int (int >=0 or, int < 0) -### Returns: 1 if var is not an integer -### 0 in any other case -### Echoes: int, if it is a valid integer (including 0), -### in any other case echoes an empty string -###======================================== -getInteger() -{ - local -i retval=0 - local echoval= minus= - - # strip spaces, '+' signs and '-' signs - # if the first character of the string is '-', set the minus variable - echoval="$( echo "${1}" | sed 's/[[:space:]+]//g' )" - [ "X$( echo "${echoval:0:1}" )" = "X-" ] && minus="-" - echoval="${minus}$( echo "${echoval}" | sed 's/[[:space:]-]//g' )" - - if isInteger ${echoval}; then - echoval="$(echo "scale=0; ${echoval} + 0" | bc -ql 2>/dev/null)" - retval=$? - echoval="${echoval:-0}" - else - echoval= - retval=1 - fi - - echo -n ${echoval} - - return ${retval} -} - -###======================================== -### getPosInteger() -### Usage: getPosInteger posint -### Parameters: posint (posint >= 0) -### Returns: 1 if var is not a positive integer -### 0 in any other case -### Echoes: posint if it is a valid positive integer -### (including 0), in any other case echoes an -### empty string -###======================================== -getPosInteger() -{ - local -i retval=0 - local echoval= - - echoval=$( getInteger "${1}" ) - retval=$? - - if [ ${retval} -ne 0 ] ; then - echoval= - retval=1 - else - if [ ${echoval} -lt 0 ]; then - echoval= - retval=1 - fi - fi - - echo -n ${echoval} - - return ${retval} -} - -###======================================== -### getYesNo() -### Usage: getYesNo value -### Parameters: -### value : The input value (the value of a parameter) -### The value of a bash parameter that is checked -### against TRUE/FALSE. If the value is one of: -### ">=1|y|yes|yea|yeah|yep" -### then the value of parameter is TRUE (answer = yes). -### If the value is one of: -### "<=0|n|no|not|nop|nope" -### then the value of parameter is FALSE (answer = no). -### If the value is empty then the value of parameter -### is FALSE (answer = no) -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : A "yes" or "no" answer. -### -### getYesNo: Checks if a parameter is assigned a TRUE/FALSE value. -###======================================== -getYesNo() -{ - local param answer - - param="$( echo "${1}" | tr '[:upper:]' '[:lower:]' )" - - if [ "${param}" -eq "${param}" ] 2>/dev/null - then - [ ${param} -le 0 ] && param=0 - [ ${param} -gt 0 ] && param=1 - fi - - case "${param}" in - 1|y|yes|yea|yeah|yep) answer="yes" ;; - 0|n|no|not|nop|nope) answer="no" ;; - *) answer="" ;; # DEFAULT - esac - - echo -n "${answer}" -} - -###======================================== -### toUPPER() -### Usage: toUPPER string -### Parameters: -### string : The string in to convert -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The input string converted to an all upper case string -### -### toUPPER: Converts a string to an all upper case string -###======================================== -function toUPPER() -{ - echo "${1}" | tr '[:lower:]' '[:upper:]' -} - -###======================================== -### toLOWER() -### Usage: toLOWER string -### Parameters: -### string : The string in to convert -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The input string converted to an all lower case string -### -### toLOWER: Converts a string to an all lower case string -###======================================== -function toLOWER() -{ - echo "${1}" | tr '[:upper:]' '[:lower:]' -} - -###======================================== -### strESC() -### Usage: strESC string -### Parameters: -### string : The input string -### The input string on which this function is applied -### to escape special characters used in bash/sed ... -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The modified string with its special characters escaped -### -### strESC: Escapes special characters in a string: "'()/[]*. -###======================================== -strESC() -{ - echo -n "$( echo "${*}" | sed -e "s/[\"\'\(\)\/\*\!]/\\\&/g;s/\[/\\\&/g;s/\]/\\\&/g" )" -} - -strESC1() -{ - echo -n "$( echo "${*}" | sed -e "s/[\&\/\*\!]/\\\&/g;s/\[/\\\&/g;s/\]/\\\&/g" )" -} - -###======================================== -### strTrim() -### Usage: strTrim s1 flag -### Parameters: -### s1 : The input string -### flag : Integer -### A value that controls the action of strTrim. -### If flag is zero or not present, trailing blanks are removed. -### Leading blanks are removed if it is equal to 1. -### Both are removed if it is equal to 2. -### In any other case, trailing blanks are removed. -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : s1 with all leading and/or trailing -### white spaces removed. -### -### strTrim: Removes all leading and/or trailing white spaces -### from the input string -###======================================== -function strTrim () -{ - local trimFLG="${2:-0}" - local out_str= - - case ${trimFLG} in - 0) out_str="$(echo "${1}" | sed 's/[[:space:]]*$//')" ;; - 1) out_str="$(echo "${1}" | sed 's/^[[:space:]]*//')" ;; - 2) out_str="$(echo "${1}" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" ;; - *) out_str="$(echo "${1}" | sed 's/[[:space:]]*$//')" ;; - esac - - echo -n ${out_str} -} - -compileNems() { - local cmp_type cmp_make cmp_comp cmp_mjob - local err=0 - - [ $# -eq 0 ] && return ${err} - - cmp_type="$( toLOWER "${1}" )" - cmp_make=GNUmakefile - cmp_comp="${COMPONENT:+COMPONENTS=\"${COMPONENT}\"}" - cmp_mjob="${PARMAKE:+-j ${PARMAKE}}" - cmp_verb="${VERBOSE:+--debug=${VERBOSE}}" - - case "${cmp_type}" in - "clean"|"distclean" ) - if [ -f "${cmp_make}" ]; then - echo - echo "compileNems :: Cleaning: make -f ${cmp_make} ${cmp_type} ${cmp_comp}" - eval "make ${cmp_verb} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - err=$? - - if [ "${cmp_type}" == "distclean" ]; then - rm -f NEMS/exe/NEMS-*.x - fi - else - echo "compileNems :: Cleaning: no makefile found: makefile = ${cmp_make}" - err=1 - fi - ;; - "build"|"compile" ) - if [ -f "${cmp_make}" ]; then - echo - echo "compileNems :: Compiling: make ${cmp_mjob} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - eval "make ${cmp_verb} ${cmp_mjob} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - err=$? - else - echo "compileNems :: Compiling: no makefile found: makefile = ${cmp_make}" - err=1 - fi - ;; - * ) err=0 ;; # Do nothing - esac - - return ${err} -} - -installNems() { - local cmp_comp icmp - local instdir - local CPBIN="/bin/cp -fpv" - local RMBIN="/bin/rm -fv" - - instdir="ALLBIN_INSTALL" - - cmp_comp="${COMPONENT}" - - [ ! -d "${instdir}" ] && mkdir -p ${instdir} - - for icmp in ${cmp_comp} - do - indir="${icmp}_INSTALL" - - if [ -d ${indir} ]; then - echo - echo " --- Installing from: ${indir} to ${instdir} ---" - ${CPBIN} ${indir}/* ${instdir}/ - fi - - ###### Extra ADCIRC files - if [ "${icmp}" == "ADCIRC" ]; then - echo - echo " --- Installing from: ${icmp} to ${instdir} ---" - for iprog in adcprep - do - prog="$( find ${icmp} -type f -name ${iprog} | head -1 )" - if [ -n "${prog:+1}" ]; then - ${CPBIN} ${prog} ${instdir}/ - fi - done - fi - ###### - done - - ###### Install the NEMS/exe/NEMS* files - echo - echo " --- Installing from: NEMS/exe to ${instdir} ---" - for iprog in NEMS/exe/NEMS-*.x - do - if [ -f "${iprog}" ]; then - ${CPBIN} ${iprog} ${instdir}/ - fi - done - - ###### Remove un-needed files from instdir - echo - echo " --- Removing files that are not needed from: ${instdir} ---" - ${RMBIN} ${instdir}/*.mk ${instdir}/*.mod -} diff --git a/scripts/functions_build.del b/scripts/functions_build.del deleted file mode 100644 index ebb69270..00000000 --- a/scripts/functions_build.del +++ /dev/null @@ -1,617 +0,0 @@ -#!/bin/bash-*-Shell-script-functions*- - -########################################################################### -### Author: Panagiotis Velissariou -### -### Version - 1.0 Fri Dec 04 2020 -########################################################################### - -set +u - -MY_COMPILING_SYTEMS="gnu, intel, pgi" - -MY_ATM_MODS="ATMESH WRF HWRF PAHM" -MY_OCN_MODS="ADCIRC SCHISM FVCOM ROMS" -MY_HYD_MODS="NWM" -MY_WAV_MODS="WW3DATA WW3" - -MY_COMPONENT_LIST="${MY_ATM_MODS} ${MY_OCN_MODS} ${MY_HYD_MODS} ${MY_WAV_MODS} " - -################################################## -### MODELLING SYSTEM BUILD FUNCTIONS -################################################## - -###======================================== -### ParseArgs() -### Usage: ParseArgs args -### Parameters: args = the script options -### Returns: 0 -### Echoes: NONE -### -### Gets the supplied options to the script. -###======================================== -ParseArgs() -{ - local nm_func=$( basename ${BASH_SOURCE[${#BASH_SOURCE[@]}-1]} ) - - local opt_all opt_opt opt_arg opt_chk - - local t_VAR - local ans0 ans ival intN - local all_evars - - all_evars="MY_CLEAN MY_COMPILER MY_COMPONENT MY_OS MY_PARMAKE MY_PLATFORM MY_VERBOSE" - - for ival in ${all_evars}; do unset __${ival}; done - - - __MY_CLEAN=0 - __MY_COMPILER=intel - __MY_COMPONENT="ADCIRC WW3DATA ATMESH" - __MY_OS= - __MY_PARMAKE=1 - __MY_PLATFORM= - __MY_VERBOSE= - - - # ----- - # Process the function options - opt_all=( c clean compiler component j os plat v verbose h help ) - opt_all=":$( echo "${opt_all[@]/#/-} ${opt_all[@]/#/--}" | sed 's/ /:/g' ):" - - unset __OPTION_LIST - while test $# -gt 0; do - case "${1}" in - -[^-]*=* | --[^-]*=* ) - opt_opt="$( toLOWER "$( echo "${1}" | sed 's/=.*//' )" )" - len=$(( ${#opt_opt} + 1 )) - opt_arg="$( strTrim "$( echo "${1:${len}}" )" 2 )" - [ "$( echo "${opt_all}" | egrep -o ":${opt_arg}:" )" ] && \ - opt_arg= - ;; - -[^-]* | --[^-]* ) - opt_opt="$( toLOWER "${1}" )" - opt_chk="$( toLOWER "$( echo "${2}" | sed 's/=.*//' )" )" - if [ "$( echo "${opt_all}" | egrep -o ":${opt_chk}:" )" ]; then - opt_arg= - else - opt_arg="$( strTrim "$( echo "${2}" )" )" - fi - ;; - *) - opt_opt= - opt_arg= - ;; - esac - - case "${opt_opt}" in - -c | --c | -clean | --clean ) - checkFuncOpt "--clean" - if [ $? -eq 0 ]; then - __MY_CLEAN=1 - if [ "X${opt_arg}" != "X" ]; then - if `isInteger "${opt_arg}"` ; then - __MY_CLEAN=$( echo "${opt_arg}" ) - [ ${opt_arg} -le -3 ] && __MY_CLEAN=-3 - [ ${opt_arg} -ge 2 ] && __MY_CLEAN=2 - else - __MY_CLEAN=0 - [ "$( getYesNo "${opt_arg}" )" = "yes" ] && __MY_CLEAN=1 - fi - fi - fi - ;; - -compiler | --compiler ) - checkFuncOpt "--compiler" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_COMPILER="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -component | --component ) - checkFuncOpt "--component" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_COMPONENT="$( strTrim "${opt_arg}" )" - fi - fi - ;; - -j | --j ) - checkFuncOpt "--j" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_PARMAKE=1 - t_VAR="$( getPosInteger "${opt_arg}" )" - [ ! -z "${t_VAR}" ] && __MY_PARMAKE=${t_VAR} - fi - fi - ;; - -os | --os ) - checkFuncOpt "--os" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_OS="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -plat | --plat ) - checkFuncOpt "--plat" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_PLATFORM="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -v | --v | -verbose | --verbose ) - checkFuncOpt "--verbose" - if [ $? -eq 0 ]; then - __MY_VERBOSE=b - if [ "X${opt_arg}" != "X" ]; then - __MY_VERBOSE="$( echo "$( strTrim "${opt_arg}" 2 )" | sed 's/[[:space:]]/,/g' )" - fi - fi - ;; - -h | -help | --h | --help ) - UsageBuild ${nm_func} - ;; - *) ;; # DEFAULT - esac - shift - opt_opt= - opt_arg= - done - unset __OPTION_LIST - # ----- - - if [ -z "${__MY_OS}" ]; then - case "$(uname -s)" in - Darwin ) __MY_OS="macosx" ;; - Linux ) __MY_OS="linux" ;; - *) __MY_OS="UNDEFINED";; # DEFAULT - esac - fi - - # Export the values of all __* variables. - for ival in ${all_evars} - do - ans0="$( eval "echo \${$(echo ${ival}):-}" )" - ans="$( eval "echo \${$(echo __${ival}):-}" )" - ans=${ans:-${ans0:-}} - - eval "${ival}=\${ans}" - export ${ival} - - unset __${ival} - done - - return 0 -} - -UsageBuild() -{ - local nm="$( basename ${0} )" - - echo - echo "Usage: \"${nm}\" [{-|--}option1{=|space}[option_value1]] [{-|--}option2{=|space}[option_value2]] ..." - echo - - echo " -h|-help|--h|--help" - echo " Show this help screen." - echo - #--- - echo " -c|--c|-clean|--clean [=|space] \"0|1|yes|no\" (OPTIONAL)." - echo " Only clean the already compiled CMake build system." - echo " Default: 0|no." - echo - #--- - echo " -compiler|--compiler [=|space] \"compiling_system\" (OPTIONAL)." - echo " The compiling system to use (${MY_COMPILING_SYTEMS})." - echo " Default: intel." - echo - #--- - echo " -component|--component [=|space] \"component_list\" (OPTIONAL)." - echo " The component(s) to use (${MY_COMPONENT_LIST})." - echo " Default: \"ADCIRC WW3DATA ATMESH\"." - echo - #--- - echo " -j|--j [=|space] \"N\" (OPTIONAL)." - echo " Define the number of make jobs to run simultaneously." - echo " Default: 1." - echo - #--- - echo " -os|--os [=|space] \"OS string\" (OPTIONAL)." - echo " The name of the Operating system." - echo " Supported OSes: linux macosx." - echo " Default: current OS." - echo - #--- - echo " -plat|--plat [=|space] \"platform\" (OPTIONAL)." - echo " The name of the compute HPC platform to consider." - echo " Selecting a platform, environment modules specific to that platform are loaded" - echo " and corresponding environment variables are set." - echo " Supported platforms: cheyenne gaea hera jet orion stampede wcoss." - echo " Default: none." - echo - #--- - echo " -v|--v|-verbose|--verbose [=|space] \"a,b,v,i,j,m,n\" (any combination, OPTIONAL)." - echo " Enable verbosity in the make files during compilation." - echo " a (all) : all types of debugging output are enabled" - echo " n (none) : disable all debugging currently enabled" - echo " b (basic) : basic debugging and whether the build was successful or not" - echo " v (verbose) : a level above basic" - echo " i (implicit) : prints messages describing the implicit rule searches for each target" - echo " j (jobs) : prints messages giving details on the invocation of specific sub-commands" - echo " m (makefile) : enables messages while rebuilding makefiles" - echo " Default:none." - echo - #--- - - exit 0 -} - -###======================================== -### checkFuncOpt() -### Usage: checkFuncOpt opt_name -### Parameters: -### opt_name: The name of the option to a function -### -### Returns : Exits on error -### -### Exports : __OPTION_LIST -### -### Echoes : NONE -### -### checkFuncOpt: Checks if an option to a function is already supplied. -###======================================== -checkFuncOpt() { - local opt_inp opt_list - - [ $# -eq 0 ] && return -1 - - opt_inp="$( strTrim "${1}" 2 )" - opt_inp="$( echo "${opt_inp}" | sed 's/^[-]*//' )" - - opt_list="$( strTrim "${__OPTION_LIST}" 2 )" - [ -n ${opt_list:+1} ] && \ - opt_list=":$( echo "${opt_list}" | sed 's/ /:/g' ):" - - [ "$( echo "${opt_list}" | egrep -o ":${opt_inp}:" )" ] && return 1 - - __OPTION_LIST="${__OPTION_LIST} ${opt_inp}" - export __OPTION_LIST - - return 0 -} - -###======================================== -### isInteger() -### Usage: isInteger var -### Parameters: var -### Returns: 1 if var is not an integer (0 is an integer as well) -### 0 in any other case -### Echoes: NONE -###======================================== -isInteger() -{ - local -i retval=1 - - [ $# -eq 0 ] && return ${retval} - - if [ "${1:-UNDEF}" -eq "${1}" ] 2>/dev/null - then - retval=0 - fi - - return ${retval} -} - -###======================================== -### getInteger() -### Usage: getInteger int -### Parameters: int (int >=0 or, int < 0) -### Returns: 1 if var is not an integer -### 0 in any other case -### Echoes: int, if it is a valid integer (including 0), -### in any other case echoes an empty string -###======================================== -getInteger() -{ - local -i retval=0 - local echoval= minus= - - # strip spaces, '+' signs and '-' signs - # if the first character of the string is '-', set the minus variable - echoval="$( echo "${1}" | sed 's/[[:space:]+]//g' )" - [ "X$( echo "${echoval:0:1}" )" = "X-" ] && minus="-" - echoval="${minus}$( echo "${echoval}" | sed 's/[[:space:]-]//g' )" - - if isInteger ${echoval}; then - echoval="$(echo "scale=0; ${echoval} + 0" | bc -ql 2>/dev/null)" - retval=$? - echoval="${echoval:-0}" - else - echoval= - retval=1 - fi - - echo -n ${echoval} - - return ${retval} -} - -###======================================== -### getPosInteger() -### Usage: getPosInteger posint -### Parameters: posint (posint >= 0) -### Returns: 1 if var is not a positive integer -### 0 in any other case -### Echoes: posint if it is a valid positive integer -### (including 0), in any other case echoes an -### empty string -###======================================== -getPosInteger() -{ - local -i retval=0 - local echoval= - - echoval=$( getInteger "${1}" ) - retval=$? - - if [ ${retval} -ne 0 ] ; then - echoval= - retval=1 - else - if [ ${echoval} -lt 0 ]; then - echoval= - retval=1 - fi - fi - - echo -n ${echoval} - - return ${retval} -} - -###======================================== -### getYesNo() -### Usage: getYesNo value -### Parameters: -### value : The input value (the value of a parameter) -### The value of a bash parameter that is checked -### against TRUE/FALSE. If the value is one of: -### ">=1|y|yes|yea|yeah|yep" -### then the value of parameter is TRUE (answer = yes). -### If the value is one of: -### "<=0|n|no|not|nop|nope" -### then the value of parameter is FALSE (answer = no). -### If the value is empty then the value of parameter -### is FALSE (answer = no) -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : A "yes" or "no" answer. -### -### getYesNo: Checks if a parameter is assigned a TRUE/FALSE value. -###======================================== -getYesNo() -{ - local param answer - - param="$( echo "${1}" | tr '[:upper:]' '[:lower:]' )" - - if [ "${param}" -eq "${param}" ] 2>/dev/null - then - [ ${param} -le 0 ] && param=0 - [ ${param} -gt 0 ] && param=1 - fi - - case "${param}" in - 1|y|yes|yea|yeah|yep) answer="yes" ;; - 0|n|no|not|nop|nope) answer="no" ;; - *) answer="" ;; # DEFAULT - esac - - echo -n "${answer}" -} - -###======================================== -### toUPPER() -### Usage: toUPPER string -### Parameters: -### string : The string in to convert -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The input string converted to an all upper case string -### -### toUPPER: Converts a string to an all upper case string -###======================================== -function toUPPER() -{ - echo "${1}" | tr '[:lower:]' '[:upper:]' -} - -###======================================== -### toLOWER() -### Usage: toLOWER string -### Parameters: -### string : The string in to convert -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The input string converted to an all lower case string -### -### toLOWER: Converts a string to an all lower case string -###======================================== -function toLOWER() -{ - echo "${1}" | tr '[:upper:]' '[:lower:]' -} - -###======================================== -### strESC() -### Usage: strESC string -### Parameters: -### string : The input string -### The input string on which this function is applied -### to escape special characters used in bash/sed ... -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The modified string with its special characters escaped -### -### strESC: Escapes special characters in a string: "'()/[]*. -###======================================== -strESC() -{ - echo -n "$( echo "${*}" | sed -e "s/[\"\'\(\)\/\*\!]/\\\&/g;s/\[/\\\&/g;s/\]/\\\&/g" )" -} - -strESC1() -{ - echo -n "$( echo "${*}" | sed -e "s/[\&\/\*\!]/\\\&/g;s/\[/\\\&/g;s/\]/\\\&/g" )" -} - -###======================================== -### strTrim() -### Usage: strTrim s1 flag -### Parameters: -### s1 : The input string -### flag : Integer -### A value that controls the action of strTrim. -### If flag is zero or not present, trailing blanks are removed. -### Leading blanks are removed if it is equal to 1. -### Both are removed if it is equal to 2. -### In any other case, trailing blanks are removed. -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : s1 with all leading and/or trailing -### white spaces removed. -### -### strTrim: Removes all leading and/or trailing white spaces -### from the input string -###======================================== -function strTrim () -{ - local trimFLG="${2:-0}" - local out_str= - - case ${trimFLG} in - 0) out_str="$(echo "${1}" | sed 's/[[:space:]]*$//')" ;; - 1) out_str="$(echo "${1}" | sed 's/^[[:space:]]*//')" ;; - 2) out_str="$(echo "${1}" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" ;; - *) out_str="$(echo "${1}" | sed 's/[[:space:]]*$//')" ;; - esac - - echo -n ${out_str} -} - -compileNems() { - local cmp_type cmp_make cmp_comp cmp_mjob - local err=0 - - [ $# -eq 0 ] && return ${err} - - cmp_type="$( toLOWER "${1}" )" - cmp_make=GNUmakefile - cmp_comp="${COMPONENT:+COMPONENTS=\"${COMPONENT}\"}" - cmp_mjob="${PARMAKE:+-j ${PARMAKE}}" - cmp_verb="${VERBOSE:+--debug=${VERBOSE}}" - - case "${cmp_type}" in - "clean"|"distclean" ) - if [ -f "${cmp_make}" ]; then - echo - echo "compileNems :: Cleaning: make -f ${cmp_make} ${cmp_type} ${cmp_comp}" - eval "make ${cmp_verb} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - err=$? - - if [ "${cmp_type}" == "distclean" ]; then - rm -f NEMS/exe/NEMS-*.x - fi - else - echo "compileNems :: Cleaning: no makefile found: makefile = ${cmp_make}" - err=1 - fi - ;; - "build"|"compile" ) - if [ -f "${cmp_make}" ]; then - echo - echo "compileNems :: Compiling: make ${cmp_mjob} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - eval "make ${cmp_verb} ${cmp_mjob} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - err=$? - else - echo "compileNems :: Compiling: no makefile found: makefile = ${cmp_make}" - err=1 - fi - ;; - * ) err=0 ;; # Do nothing - esac - - return ${err} -} - -installNems() { - local cmp_comp icmp - local instdir - local CPBIN="/bin/cp -fpv" - local RMBIN="/bin/rm -fv" - - instdir="ALLBIN_INSTALL" - - cmp_comp="${COMPONENT}" - - [ ! -d "${instdir}" ] && mkdir -p ${instdir} - - for icmp in ${cmp_comp} - do - indir="${icmp}_INSTALL" - - if [ -d ${indir} ]; then - echo - echo " --- Installing from: ${indir} to ${instdir} ---" - ${CPBIN} ${indir}/* ${instdir}/ - fi - - ###### Extra ADCIRC files - if [ "${icmp}" == "ADCIRC" ]; then - echo - echo " --- Installing from: ${icmp} to ${instdir} ---" - for iprog in adcprep - do - prog="$( find ${icmp} -type f -name ${iprog} | head -1 )" - if [ -n "${prog:+1}" ]; then - ${CPBIN} ${prog} ${instdir}/ - fi - done - fi - ###### - done - - ###### Install the NEMS/exe/NEMS* files - echo - echo " --- Installing from: NEMS/exe to ${instdir} ---" - for iprog in NEMS/exe/NEMS-*.x - do - if [ -f "${iprog}" ]; then - ${CPBIN} ${iprog} ${instdir}/ - fi - done - - ###### Remove un-needed files from instdir - echo - echo " --- Removing files that are not needed from: ${instdir} ---" - ${RMBIN} ${instdir}/*.mk ${instdir}/*.mod -} From 46027d7a71ff052fc5ff0c1bb4c494fb3698d375 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Fri, 25 Jun 2021 14:26:44 -0500 Subject: [PATCH 07/96] added nuopc/Makefile.in and modified distclean.cmake to not delete the top level Makefiles --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 7a248b42..393b530f 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 7a248b42f91ee4540aa383371b5670b38bd5304f +Subproject commit 393b530f8b9a3049bab17bd9382b981827672e1c From b61a7e65dc1cc445ff1c4afa9088fbe0f4e676ac Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Fri, 25 Jun 2021 14:50:53 -0500 Subject: [PATCH 08/96] modified the work/cmprflags.mk file for intel --- ADCIRC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADCIRC b/ADCIRC index 74287374..21341677 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit 7428737428ff4fb72582526bc1cbcb200e6feb3d +Subproject commit 21341677cac14dece960623b5a5b74323339fae9 From 20ac0ba1cd529a7f7af59f8fb70cfda018eb854f Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sat, 26 Jun 2021 23:40:33 -0500 Subject: [PATCH 09/96] updated the modulefiles/* files to be more general and mofified the file scripts/functions_build to include the additional supported platforms --- modulefiles/PlatformFuncs | 163 ++++++++++++------ modulefiles/envmodules_gnu.cheyenne | 21 ++- modulefiles/envmodules_gnu.custom | 44 +++++ modulefiles/envmodules_gnu.gaea | 27 ++- modulefiles/envmodules_gnu.hera | 21 ++- modulefiles/envmodules_gnu.jet | 21 ++- modulefiles/envmodules_gnu.linux | 21 ++- modulefiles/envmodules_gnu.macosx | 37 +++- modulefiles/envmodules_gnu.mistral | 55 ++++++ modulefiles/envmodules_gnu.orion | 21 ++- modulefiles/envmodules_gnu.stampede | 27 ++- modulefiles/envmodules_gnu.strand | 51 ++++++ modulefiles/envmodules_gnu.wcoss | 37 +++- modulefiles/envmodules_intel.cheyenne | 21 ++- ...ules_gnu.local => envmodules_intel.custom} | 24 ++- modulefiles/envmodules_intel.gaea | 21 ++- modulefiles/envmodules_intel.hera | 47 +++-- modulefiles/envmodules_intel.hera.hpc-stack | 52 ++++++ modulefiles/envmodules_intel.hera.orig | 44 +++++ ..._intel.local => envmodules_intel.hera.sys} | 23 ++- modulefiles/envmodules_intel.jet | 21 ++- modulefiles/envmodules_intel.linux | 21 ++- modulefiles/envmodules_intel.macosx | 37 +++- modulefiles/envmodules_intel.mistral | 30 +++- modulefiles/envmodules_intel.orion | 39 ++++- modulefiles/envmodules_intel.orion.hpc-stack | 51 ++++++ modulefiles/envmodules_intel.orion.orig | 21 ++- modulefiles/envmodules_intel.orion.sys | 45 +++++ modulefiles/envmodules_intel.stampede | 20 ++- modulefiles/envmodules_intel.strand | 28 ++- modulefiles/envmodules_intel.wcoss | 37 +++- modulefiles/envmodules_pgi.cheyenne | 21 ++- ...odules_pgi.local => envmodules_pgi.custom} | 24 ++- modulefiles/envmodules_pgi.gaea | 24 ++- modulefiles/envmodules_pgi.hera | 23 ++- modulefiles/envmodules_pgi.jet | 21 ++- modulefiles/envmodules_pgi.linux | 21 ++- modulefiles/envmodules_pgi.macosx | 37 +++- modulefiles/envmodules_pgi.mistral | 55 ++++++ modulefiles/envmodules_pgi.orion | 20 ++- modulefiles/envmodules_pgi.stampede | 21 ++- modulefiles/envmodules_pgi.strand | 51 ++++++ modulefiles/envmodules_pgi.wcoss | 21 ++- scripts/functions_build | 7 +- 44 files changed, 1284 insertions(+), 190 deletions(-) create mode 100644 modulefiles/envmodules_gnu.custom create mode 100644 modulefiles/envmodules_gnu.mistral create mode 100644 modulefiles/envmodules_gnu.strand rename modulefiles/{envmodules_gnu.local => envmodules_intel.custom} (51%) create mode 100644 modulefiles/envmodules_intel.hera.hpc-stack create mode 100644 modulefiles/envmodules_intel.hera.orig rename modulefiles/{envmodules_intel.local => envmodules_intel.hera.sys} (56%) create mode 100644 modulefiles/envmodules_intel.orion.hpc-stack create mode 100644 modulefiles/envmodules_intel.orion.sys rename modulefiles/{envmodules_pgi.local => envmodules_pgi.custom} (58%) create mode 100644 modulefiles/envmodules_pgi.mistral create mode 100644 modulefiles/envmodules_pgi.strand diff --git a/modulefiles/PlatformFuncs b/modulefiles/PlatformFuncs index 32316f65..26759173 100644 --- a/modulefiles/PlatformFuncs +++ b/modulefiles/PlatformFuncs @@ -3,99 +3,148 @@ ### PlatformFuncs :: Utility functions ### ### Author: Panagiotis Velissariou +### Date: June 26 2021 ########################################################################### +function strTrim () +{ + local trimFLG="${2:-0}" + local out_str= + + case ${trimFLG} in + 0) out_str="$(echo "${1}" | sed 's/[[:space:]]*$//')" ;; + 1) out_str="$(echo "${1}" | sed 's/^[[:space:]]*//')" ;; + 2) out_str="$(echo "${1}" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" ;; + *) out_str="$(echo "${1}" | sed 's/[[:space:]]*$//')" ;; + esac + + echo -n ${out_str} +} + get_env_hdf5() { -# if [ "${_found_hdf5:-FALSE}" = "FALSE" ]; then - _found_hdf5=FALSE - if [ -n "${HDF5:+1}" ]; then - HDF5="${HDF5}" - export HDF5HOME="${HDF5}" - HDF5_DIR="${HDF5}" - HDF5_PATH="${HDF5}" - HDF5_ROOT="${HDF5}" - _found_hdf5=TRUE + local _DEFINED_HDF5 + local _hdf5_env_name + local _name _var _var_val + + _DEFINED_HDF5=FALSE + _hdf5_env_name="$( strTrim "$( echo "${1:-}" )" 2 )" + + if [ -n "${_hdf5_env_name:+1}" ]; then + _hdf5_env_name="$( eval echo "\$${_hdf5_env_name}" )" + if [ -n "${_hdf5_env_name:+1}" ]; then + export HDF5="${_hdf5_env_name}" + export HDF5HOME="${_hdf5_env_name}" + export HDF5_DIR="${_hdf5_env_name}" + export HDF5_PATH="${_hdf5_env_name}" + export HDF5_ROOT="${_hdf5_env_name}" + _DEFINED_HDF5=TRUE + fi + fi + + if [ "${_DEFINED_HDF5:-FALSE}" != "TRUE" ]; then + _hdf5_env_name="${HDF5}" + if [ -n "${_hdf5_env_name:+1}" ]; then + export HDF5HOME="${_hdf5_env_name}" + export HDF5_DIR="${_hdf5_env_name}" + export HDF5_PATH="${_hdf5_env_name}" + export HDF5_ROOT="${_hdf5_env_name}" + _DEFINED_HDF5=TRUE else for _var in DIR HOME PATH ROOT do - _var_val="$(eval "echo \"\$HDF5${_var}\"")" - if [ -n "${_var_val:+1}" ]; then - HDF5="${_var_val}" - export HDF5HOME="${_var_val}" - HDF5_DIR="${_var_val}" - HDF5_PATH="${_var_val}" - HDF5_ROOT="${_var_val}" - _found_hdf5=TRUE + _hdf5_env_name="$(eval "echo \"\$HDF5${_var}\"")" + if [ -n "${_hdf5_env_name:+1}" ]; then + export HDF5="${_hdf5_env_name}" + export HDF5HOME="${_hdf5_env_name}" + export HDF5_DIR="${_hdf5_env_name}" + export HDF5_PATH="${_hdf5_env_name}" + export HDF5_ROOT="${_hdf5_env_name}" + _DEFINED_HDF5=TRUE break else - _var_val="$(eval "echo \"\$HDF5_${_var}\"")" - if [ -n "${_var_val:+1}" ]; then - HDF5="${_var_val}" - export HDF5HOME="${_var_val}" - HDF5_DIR="${_var_val}" - HDF5_PATH="${_var_val}" - HDF5_ROOT="${_var_val}" - _found_hdf5=TRUE + _hdf5_env_name="$(eval "echo \"\$HDF5_${_var}\"")" + if [ -n "${_hdf5_env_name:+1}" ]; then + export HDF5="${_hdf5_env_name}" + export HDF5HOME="${_hdf5_env_name}" + export HDF5_DIR="${_hdf5_env_name}" + export HDF5_PATH="${_hdf5_env_name}" + export HDF5_ROOT="${_hdf5_env_name}" + _DEFINED_HDF5=TRUE break fi fi done fi - unset _name _var _var_val -# fi + fi return 0 } - get_env_netcdf() { -# if [ "${_found_netcdf:-FALSE}" = "FALSE" ]; then - export _found_netcdf=FALSE + local _DEFINED_NETCDF + local _netcdf_env_name + local _name _var _var_val + + _DEFINED_NETCDF=FALSE + _netcdf_env_name="$( strTrim "$( echo "${1:-}" )" 2 )" + + if [ -n "${_netcdf_env_name:+1}" ]; then + _netcdf_env_name="$( eval echo "\$${_netcdf_env_name}" )" + if [ -n "${_netcdf_env_name:+1}" ]; then + export netcdf="${_netcdf_env_name}" + export netcdfHOME="${_netcdf_env_name}" + export netcdf_DIR="${_netcdf_env_name}" + export netcdf_PATH="${_netcdf_env_name}" + export netcdf_ROOT="${_netcdf_env_name}" + _DEFINED_NETCDF=TRUE + fi + fi + + if [ "${_DEFINED_NETCDF:-FALSE}" != "TRUE" ]; then for _name in NETCDF NETCDF4 NetCDF NetCDF4 do - if [ "${_found_netcdf}" = "TRUE" ]; then + if [ "${_DEFINED_NETCDF:-FALSE}" = "TRUE" ]; then break fi - _var_val="$(eval "echo \"\$${_name}\"")" - if [ -n "${_var_val:+1}" ]; then - export NETCDF="${_var_val}" - export NETCDFHOME="${_var_val}" - export NETCDF_DIR="${_var_val}" - export NETCDF_PATH="${_var_val}" - export NETCDF_ROOT="${_var_val}" - export _found_netcdf=TRUE + _netcdf_env_name="$(eval "echo \"\$${_name}\"")" + if [ -n "${_netcdf_env_name:+1}" ]; then + export NETCDF="${_netcdf_env_name}" + export NETCDFHOME="${_netcdf_env_name}" + export NETCDF_DIR="${_netcdf_env_name}" + export NETCDF_PATH="${_netcdf_env_name}" + export NETCDF_ROOT="${_netcdf_env_name}" + _DEFINED_NETCDF=TRUE else for _var in DIR HOME PATH ROOT do - _var_val="$(eval "echo \"\$${_name}${_var}\"")" - if [ -n "${_var_val:+1}" ]; then - export NETCDF="${_var_val}" - export NETCDFHOME="${_var_val}" - export NETCDF_DIR="${_var_val}" - export NETCDF_PATH="${_var_val}" - export NETCDF_ROOT="${_var_val}" - export _found_netcdf=TRUE + _netcdf_env_name="$(eval "echo \"\$${_name}${_var}\"")" + if [ -n "${_netcdf_env_name:+1}" ]; then + export NETCDF="${_netcdf_env_name}" + export NETCDFHOME="${_netcdf_env_name}" + export NETCDF_DIR="${_netcdf_env_name}" + export NETCDF_PATH="${_netcdf_env_name}" + export NETCDF_ROOT="${_netcdf_env_name}" + _DEFINED_NETCDF=TRUE break else - _var_val="$(eval "echo \"\$${_name}_${_var}\"")" - if [ -n "${_var_val:+1}" ]; then - export NETCDF="${_var_val}" - export NETCDFHOME="${_var_val}" - export NETCDF_DIR="${_var_val}" - export NETCDF_PATH="${_var_val}" - export NETCDF_ROOT="${_var_val}" - export _found_netcdf=TRUE + _netcdf_env_name="$(eval "echo \"\$${_name}_${_var}\"")" + if [ -n "${_netcdf_env_name:+1}" ]; then + export NETCDF="${_netcdf_env_name}" + export NETCDFHOME="${_netcdf_env_name}" + export NETCDF_DIR="${_netcdf_env_name}" + export NETCDF_PATH="${_netcdf_env_name}" + export NETCDF_ROOT="${_netcdf_env_name}" + _DEFINED_NETCDF=TRUE break fi fi done fi done - unset _name _var _var_val -# fi + fi return 0 } diff --git a/modulefiles/envmodules_gnu.cheyenne b/modulefiles/envmodules_gnu.cheyenne index 23899380..ee2b0f72 100644 --- a/modulefiles/envmodules_gnu.cheyenne +++ b/modulefiles/envmodules_gnu.cheyenne @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,6 +17,7 @@ ${retv} 1 # 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 @@ -23,12 +32,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.custom b/modulefiles/envmodules_gnu.custom new file mode 100644 index 00000000..a3a3f9a0 --- /dev/null +++ b/modulefiles/envmodules_gnu.custom @@ -0,0 +1,44 @@ +#!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + +# 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 gcc openmpi +module load szip hdf5 +module load netcdf + +module load esmf + + +#################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs + + +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} +export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} +export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} + +export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.gaea b/modulefiles/envmodules_gnu.gaea index b7e83e4a..ee2b0f72 100644 --- a/modulefiles/envmodules_gnu.gaea +++ b/modulefiles/envmodules_gnu.gaea @@ -1,8 +1,23 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + +#---------- +[[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit +echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" +echo " Exiting ..." +${retv} 1 +#---------- + # 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 @@ -17,12 +32,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.hera b/modulefiles/envmodules_gnu.hera index 23899380..ee2b0f72 100644 --- a/modulefiles/envmodules_gnu.hera +++ b/modulefiles/envmodules_gnu.hera @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,6 +17,7 @@ ${retv} 1 # 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 @@ -23,12 +32,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.jet b/modulefiles/envmodules_gnu.jet index 23899380..ee2b0f72 100644 --- a/modulefiles/envmodules_gnu.jet +++ b/modulefiles/envmodules_gnu.jet @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,6 +17,7 @@ ${retv} 1 # 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 @@ -23,12 +32,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.linux b/modulefiles/envmodules_gnu.linux index d8646ca5..f9656175 100644 --- a/modulefiles/envmodules_gnu.linux +++ b/modulefiles/envmodules_gnu.linux @@ -1,8 +1,17 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # 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 @@ -17,15 +26,19 @@ module load esmf ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" -[ -f "${funcs}" ] && source "${funcs}" -unset funcs +if [ -f "${funcs}" ]; then + source "${funcs}" + get_env_hdf5 + get_env_netcdf +fi +unset funcs -get_env_hdf5 -get_env_netcdf +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.macosx b/modulefiles/envmodules_gnu.macosx index 5cb700e1..a0393d76 100644 --- a/modulefiles/envmodules_gnu.macosx +++ b/modulefiles/envmodules_gnu.macosx @@ -1,27 +1,50 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + +#---------- +[[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit +echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" +echo " Exiting ..." +${retv} 1 +#---------- + # 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 gcc impi -#module load szip hdf5 -#module load netcdf +module purge +module load gcc openmpi +module load szip hdf5 +module load netcdf -#module load esmf +module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.mistral b/modulefiles/envmodules_gnu.mistral new file mode 100644 index 00000000..6dc8afca --- /dev/null +++ b/modulefiles/envmodules_gnu.mistral @@ -0,0 +1,55 @@ +#!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + +#---------- +[[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit +echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" +echo " Exiting ..." +${retv} 1 +#---------- + +# 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/3.17.1-gcc-9.1.0 +module load gcc openmpi +module load netcdf-c +module load netcdf-fortran + +module load esmf + + +#################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs + + +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +# use this more complicated one to address ADCIRC demands +export NETCDFHOME="$(nf-config --prefix)/include $(nf-config --flibs) $(nc-config --prefix)" +export NETCDFPATH=$(nc-config --prefix) +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} + +export NETCDF_INCDIR="$(nc-config --includedir) -I$(nf-config --includedir)" +export NETCDF_LIBDIR="$(nc-config --prefix)/lib $(nf-config --flibs)" + +export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.orion b/modulefiles/envmodules_gnu.orion index d90402b3..dfe757e5 100644 --- a/modulefiles/envmodules_gnu.orion +++ b/modulefiles/envmodules_gnu.orion @@ -1,8 +1,17 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # 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 @@ -16,12 +25,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5_ROOT} -export NETCDFHOME=${NETCDF_ROOT} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.stampede b/modulefiles/envmodules_gnu.stampede index 2cc88d56..9608802e 100644 --- a/modulefiles/envmodules_gnu.stampede +++ b/modulefiles/envmodules_gnu.stampede @@ -1,8 +1,23 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + +#---------- +[[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit +echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" +echo " Exiting ..." +${retv} 1 +#---------- + # 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 @@ -17,12 +32,20 @@ module load impi-intel/esmf-8.0.1 #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 TACC_HDF5_DIR + get_env_netcdf TACC_NETCDF_DIR +fi +unset funcs -export HDF5HOME=${TACC_HDF5_DIR} -export NETCDFHOME=${TACC_NETCDF_DIR} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${TACC_NETCDF_BIN}/nc-config export NETCDF_INCDIR=${TACC_NETCDF_INC} export NETCDF_LIBDIR=${TACC_NETCDF_LIB} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.strand b/modulefiles/envmodules_gnu.strand new file mode 100644 index 00000000..28d6e31e --- /dev/null +++ b/modulefiles/envmodules_gnu.strand @@ -0,0 +1,51 @@ +#!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + +#---------- +[[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit +echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" +echo " Exiting ..." +${retv} 1 +#---------- + +# This script is responsible for loading modules that are +# compatible with the NUOPC Layer version used in NEMS. + + +#################### +### Load all needed environment modules. +module purge +module load applications/utils/cmake3-20.0 +module load gcc openmpi +module load hdf5/1.10.5 netcdf/4.7.0 + +module load esmf/8.1.0 + + +#################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs + + +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +export NETCDFHOME=$(nc-config --prefix) +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} +export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} +export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} + +export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.wcoss b/modulefiles/envmodules_gnu.wcoss index 55c30263..ee2b0f72 100644 --- a/modulefiles/envmodules_gnu.wcoss +++ b/modulefiles/envmodules_gnu.wcoss @@ -1,28 +1,51 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + +#---------- +[[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit +echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" +echo " Exiting ..." +${retv} 1 +#---------- + # 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 gcc impi -#module load szip hdf5 -#module load netcdf +module load gcc impi +module load szip hdf5 +module load netcdf -#module use /contrib/modulefiles -#module load esmf +module use /contrib/modulefiles +module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.cheyenne b/modulefiles/envmodules_intel.cheyenne index 4358bc8a..97f0a17b 100644 --- a/modulefiles/envmodules_intel.cheyenne +++ b/modulefiles/envmodules_intel.cheyenne @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,6 +17,7 @@ ${retv} 1 # 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 @@ -23,12 +32,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_gnu.local b/modulefiles/envmodules_intel.custom similarity index 51% rename from modulefiles/envmodules_gnu.local rename to modulefiles/envmodules_intel.custom index b7e83e4a..7093ecc8 100644 --- a/modulefiles/envmodules_gnu.local +++ b/modulefiles/envmodules_intel.custom @@ -1,28 +1,44 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # 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 gcc impi +module load intel impi module load szip hdf5 module load netcdf -module use /contrib/modulefiles module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.gaea b/modulefiles/envmodules_intel.gaea index 4358bc8a..97f0a17b 100644 --- a/modulefiles/envmodules_intel.gaea +++ b/modulefiles/envmodules_intel.gaea @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,6 +17,7 @@ ${retv} 1 # 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 @@ -23,12 +32,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.hera b/modulefiles/envmodules_intel.hera index 6f8b0aa5..d27e746b 100644 --- a/modulefiles/envmodules_intel.hera +++ b/modulefiles/envmodules_intel.hera @@ -1,29 +1,52 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # This script is responsible for loading modules that are # compatible with the NUOPC Layer version used in NEMS. + #################### ### (1) Load all needed environment modules. +use_defaults=0 module purge -module load intel/18.0.5.274 impi/2018.0.4 -module load szip - -module use /home/emc.nemspara/SOFT-hera/modulefiles -module load hdf5_parallel/1.10.6.release -module load netcdf_parallel/4.7.4.release -module load esmf/8.1.0bs36g - - -#################### +module use /scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack +module load hpc +module load cmake +if [ ${use_defaults:-0} -ge 1 ]; 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 + + +################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.hera.hpc-stack b/modulefiles/envmodules_intel.hera.hpc-stack new file mode 100644 index 00000000..d27e746b --- /dev/null +++ b/modulefiles/envmodules_intel.hera.hpc-stack @@ -0,0 +1,52 @@ +#!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + +# This script is responsible for loading modules that are +# compatible with the NUOPC Layer version used in NEMS. + + +#################### +### (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} -ge 1 ]; 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 + + +################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs + + +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} +export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} +export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} + +export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.hera.orig b/modulefiles/envmodules_intel.hera.orig new file mode 100644 index 00000000..ad0a4eb1 --- /dev/null +++ b/modulefiles/envmodules_intel.hera.orig @@ -0,0 +1,44 @@ +#!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + +# 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 intel impi +module load szip hdf5 +module load netcdf + +module load esmf + + +################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs + + +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} +export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} +export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} + +export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.local b/modulefiles/envmodules_intel.hera.sys similarity index 56% rename from modulefiles/envmodules_intel.local rename to modulefiles/envmodules_intel.hera.sys index 6f8b0aa5..01c8e036 100644 --- a/modulefiles/envmodules_intel.local +++ b/modulefiles/envmodules_intel.hera.sys @@ -1,8 +1,17 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # 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 @@ -15,15 +24,23 @@ module load netcdf_parallel/4.7.4.release module load esmf/8.1.0bs36g -#################### +################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.jet b/modulefiles/envmodules_intel.jet index 4358bc8a..97f0a17b 100644 --- a/modulefiles/envmodules_intel.jet +++ b/modulefiles/envmodules_intel.jet @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,6 +17,7 @@ ${retv} 1 # 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 @@ -23,12 +32,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.linux b/modulefiles/envmodules_intel.linux index d8646ca5..f9656175 100644 --- a/modulefiles/envmodules_intel.linux +++ b/modulefiles/envmodules_intel.linux @@ -1,8 +1,17 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # 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 @@ -17,15 +26,19 @@ module load esmf ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" -[ -f "${funcs}" ] && source "${funcs}" -unset funcs +if [ -f "${funcs}" ]; then + source "${funcs}" + get_env_hdf5 + get_env_netcdf +fi +unset funcs -get_env_hdf5 -get_env_netcdf +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.macosx b/modulefiles/envmodules_intel.macosx index 3b61d299..e4eb2d60 100644 --- a/modulefiles/envmodules_intel.macosx +++ b/modulefiles/envmodules_intel.macosx @@ -1,27 +1,50 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + +#---------- +[[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit +echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" +echo " Exiting ..." +${retv} 1 +#---------- + # 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 intel impi -#module load szip hdf5 -#module load netcdf +module purge +module load intel impi +module load szip hdf5 +module load netcdf -#module load esmf +module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.mistral b/modulefiles/envmodules_intel.mistral index bdafef0c..1bf9acd6 100644 --- a/modulefiles/envmodules_intel.mistral +++ b/modulefiles/envmodules_intel.mistral @@ -1,31 +1,44 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # This script is responsible for loading modules that are # compatible with the NUOPC Layer version used in NEMS. # # Adopted for DKRZ/mistral by Carsten Lemmen + #################### ### (1) Load all needed environment modules. module purge -module load intel -module load intelmpi -module load esmf +module load cmake/3.17.1-gcc-9.1.0 +module load intel intelmpi module load netcdf-c/4.7.4-intel-17.0.6 module load netcdf-fortran/4.5.3-intel-17.0.6 -module load cmake/3.17.1-gcc-9.1.0 + +module load esmf + #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" -[ -f "${funcs}" ] && source "${funcs}" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi unset funcs -get_env_hdf5 -get_env_netcdf -#export NETCDFHOME=$(nc-config --prefix) +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## # use this more complicated one to address ADCIRC demands export NETCDFHOME="$(nf-config --prefix)/include $(nf-config --flibs) $(nc-config --prefix)" export NETCDFPATH=$(nc-config --prefix) @@ -35,3 +48,4 @@ export NETCDF_INCDIR="$(nc-config --includedir) -I$(nf-config --includedir)" export NETCDF_LIBDIR="$(nc-config --prefix)/lib $(nf-config --flibs)" export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.orion b/modulefiles/envmodules_intel.orion index c50777f6..f847e797 100644 --- a/modulefiles/envmodules_intel.orion +++ b/modulefiles/envmodules_intel.orion @@ -1,28 +1,51 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # This script is responsible for loading modules that are # compatible with the NUOPC Layer version used in NEMS. + #################### ### (1) Load all needed environment modules. +use_defaults=0 module purge +module use /apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack +module load hpc module load cmake -module load intel/2019.5 impi -module load szip hdf5/1.10.5-parallel -module load netcdf/4.7.2-parallel - -module load esmf/7.1.0r - +if [ ${use_defaults:-0} -ge 1 ]; then + module load hpc-intel/2018.4 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 #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5_ROOT} -export NETCDFHOME=${NETCDF_ROOT} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.orion.hpc-stack b/modulefiles/envmodules_intel.orion.hpc-stack new file mode 100644 index 00000000..f847e797 --- /dev/null +++ b/modulefiles/envmodules_intel.orion.hpc-stack @@ -0,0 +1,51 @@ +#!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + +# This script is responsible for loading modules that are +# compatible with the NUOPC Layer version used in NEMS. + + +#################### +### (1) Load all needed environment modules. +use_defaults=0 +module purge +module use /apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack +module load hpc +module load cmake +if [ ${use_defaults:-0} -ge 1 ]; then + module load hpc-intel/2018.4 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 + +#################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs + + +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} +export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} +export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} + +export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.orion.orig b/modulefiles/envmodules_intel.orion.orig index 0e915c9f..54e200cd 100644 --- a/modulefiles/envmodules_intel.orion.orig +++ b/modulefiles/envmodules_intel.orion.orig @@ -1,8 +1,17 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # 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 @@ -16,12 +25,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5_ROOT} -export NETCDFHOME=${NETCDF_ROOT} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.orion.sys b/modulefiles/envmodules_intel.orion.sys new file mode 100644 index 00000000..f859873d --- /dev/null +++ b/modulefiles/envmodules_intel.orion.sys @@ -0,0 +1,45 @@ +#!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + +# 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 load intel/2019.5 impi +module load szip hdf5/1.10.5-parallel +module load netcdf/4.7.2-parallel + +module load esmf/7.1.0r + + +#################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs + + +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} +export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} +export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} + +export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.stampede b/modulefiles/envmodules_intel.stampede index e613292e..4d7baa8e 100644 --- a/modulefiles/envmodules_intel.stampede +++ b/modulefiles/envmodules_intel.stampede @@ -1,5 +1,13 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # This script is responsible for loading modules that are # compatible with the NUOPC Layer version used in NEMS. @@ -17,12 +25,20 @@ module load impi-intel/esmf-8.0.1 #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 TACC_HDF5_DIR + get_env_netcdf TACC_NETCDF_DIR +fi +unset funcs -export HDF5HOME=${TACC_HDF5_DIR} -export NETCDFHOME=${TACC_NETCDF_DIR} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${TACC_NETCDF_BIN}/nc-config export NETCDF_INCDIR=${TACC_NETCDF_INC} export NETCDF_LIBDIR=${TACC_NETCDF_LIB} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.strand b/modulefiles/envmodules_intel.strand index 1117d0ea..14c6383d 100644 --- a/modulefiles/envmodules_intel.strand +++ b/modulefiles/envmodules_intel.strand @@ -1,33 +1,49 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # This script is responsible for loading modules that are # compatible with the NUOPC Layer version used in NEMS. # # Adapted for hereon/strand by Carsten Lemmen -# Call with ./build.sh -plat strand from top directory # + + #################### ### Load all needed environment modules. module purge +module load applications/utils/cmake3-20.0 module load compilers/intel/2020.1.217 module load intelmpi/2020.1.217 -module load netcdf/4.7.0 hdf5/1.10.5 +module load hdf5/1.10.5 netcdf/4.7.0 + module load esmf/8.1.0 -module load applications/utils/cmake3-20.0 + #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" -[ -f "${funcs}" ] && source "${funcs}" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi unset funcs -get_env_hdf5 -get_env_netcdf +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDFHOME=$(nc-config --prefix) export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.wcoss b/modulefiles/envmodules_intel.wcoss index 9f0662ad..97f0a17b 100644 --- a/modulefiles/envmodules_intel.wcoss +++ b/modulefiles/envmodules_intel.wcoss @@ -1,28 +1,51 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + +#---------- +[[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit +echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" +echo " Exiting ..." +${retv} 1 +#---------- + # 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 intel impi -#module load szip hdf5 -#module load netcdf +module load intel impi +module load szip hdf5 +module load netcdf -#module use /contrib/modulefiles -#module load esmf +module use /contrib/modulefiles +module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.cheyenne b/modulefiles/envmodules_pgi.cheyenne index ecc1c9f0..6544a410 100644 --- a/modulefiles/envmodules_pgi.cheyenne +++ b/modulefiles/envmodules_pgi.cheyenne @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,6 +17,7 @@ ${retv} 1 # 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 @@ -23,12 +32,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.local b/modulefiles/envmodules_pgi.custom similarity index 58% rename from modulefiles/envmodules_pgi.local rename to modulefiles/envmodules_pgi.custom index ecc1c9f0..6ac6e01b 100644 --- a/modulefiles/envmodules_pgi.local +++ b/modulefiles/envmodules_pgi.custom @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,26 +17,34 @@ ${retv} 1 # 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 pgi impi +module load pgi openmpi module load szip hdf5 module load netcdf -module use /contrib/modulefiles module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.gaea b/modulefiles/envmodules_pgi.gaea index b3f09057..6544a410 100644 --- a/modulefiles/envmodules_pgi.gaea +++ b/modulefiles/envmodules_pgi.gaea @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -6,6 +14,10 @@ echo " Exiting ..." ${retv} 1 #---------- +# 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 @@ -20,12 +32,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.hera b/modulefiles/envmodules_pgi.hera index ecc1c9f0..0eda78c1 100644 --- a/modulefiles/envmodules_pgi.hera +++ b/modulefiles/envmodules_pgi.hera @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,6 +17,7 @@ ${retv} 1 # 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 @@ -20,15 +29,23 @@ module use /contrib/modulefiles module load esmf -#################### +################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.jet b/modulefiles/envmodules_pgi.jet index ecc1c9f0..6544a410 100644 --- a/modulefiles/envmodules_pgi.jet +++ b/modulefiles/envmodules_pgi.jet @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,6 +17,7 @@ ${retv} 1 # 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 @@ -23,12 +32,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.linux b/modulefiles/envmodules_pgi.linux index ca6adc62..62023864 100644 --- a/modulefiles/envmodules_pgi.linux +++ b/modulefiles/envmodules_pgi.linux @@ -1,5 +1,13 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # This script is responsible for loading modules that are # compatible with the NUOPC Layer version used in NEMS. @@ -17,16 +25,19 @@ module load esmf ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" -[ -f "${funcs}" ] && source "${funcs}" -unset funcs +if [ -f "${funcs}" ]; then + source "${funcs}" + get_env_hdf5 + get_env_netcdf +fi +unset funcs -get_env_hdf5 -get_env_netcdf +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} - +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.macosx b/modulefiles/envmodules_pgi.macosx index e0e25e47..79766403 100644 --- a/modulefiles/envmodules_pgi.macosx +++ b/modulefiles/envmodules_pgi.macosx @@ -1,27 +1,50 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + +#---------- +[[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit +echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" +echo " Exiting ..." +${retv} 1 +#---------- + # 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 pgi impi -#module load szip hdf5 -#module load netcdf +module purge +module load pgi impi +module load szip hdf5 +module load netcdf -#module load esmf +module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.mistral b/modulefiles/envmodules_pgi.mistral new file mode 100644 index 00000000..5509826e --- /dev/null +++ b/modulefiles/envmodules_pgi.mistral @@ -0,0 +1,55 @@ +#!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + +#---------- +[[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit +echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" +echo " Exiting ..." +${retv} 1 +#---------- + +# 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/3.17.1-gcc-9.1.0 +module load pgi openmpi +module load netcdf-c +module load netcdf-fortran + +module load esmf + + +#################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs + + +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +# use this more complicated one to address ADCIRC demands +export NETCDFHOME="$(nf-config --prefix)/include $(nf-config --flibs) $(nc-config --prefix)" +export NETCDFPATH=$(nc-config --prefix) +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} + +export NETCDF_INCDIR="$(nc-config --includedir) -I$(nf-config --includedir)" +export NETCDF_LIBDIR="$(nc-config --prefix)/lib $(nf-config --flibs)" + +export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.orion b/modulefiles/envmodules_pgi.orion index 437d2940..512a3995 100644 --- a/modulefiles/envmodules_pgi.orion +++ b/modulefiles/envmodules_pgi.orion @@ -1,5 +1,13 @@ #!/bin/bash-*-Shell-script-modules*- +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + # This script is responsible for loading modules that are # compatible with the NUOPC Layer version used in NEMS. @@ -16,12 +24,20 @@ module load esmf #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5_ROOT} -export NETCDFHOME=${NETCDF_ROOT} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.stampede b/modulefiles/envmodules_pgi.stampede index 1effcc1e..781dd1d0 100644 --- a/modulefiles/envmodules_pgi.stampede +++ b/modulefiles/envmodules_pgi.stampede @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,6 +17,7 @@ ${retv} 1 # 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 @@ -23,12 +32,20 @@ module load impi-intel/esmf-8.0.1 #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 TACC_HDF5_DIR + get_env_netcdf TACC_NETCDF_DIR +fi +unset funcs -export HDF5HOME=${TACC_HDF5_DIR} -export NETCDFHOME=${TACC_NETCDF_DIR} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${TACC_NETCDF_BIN}/nc-config export NETCDF_INCDIR=${TACC_NETCDF_INC} export NETCDF_LIBDIR=${TACC_NETCDF_LIB} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.strand b/modulefiles/envmodules_pgi.strand new file mode 100644 index 00000000..0e1f5aa9 --- /dev/null +++ b/modulefiles/envmodules_pgi.strand @@ -0,0 +1,51 @@ +#!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + +#---------- +[[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit +echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" +echo " Exiting ..." +${retv} 1 +#---------- + +# This script is responsible for loading modules that are +# compatible with the NUOPC Layer version used in NEMS. + + +#################### +### Load all needed environment modules. +module purge +module load applications/utils/cmake3-20.0 +module load pgi openmpi +module load hdf5/1.10.5 netcdf/4.7.0 + +module load esmf/8.1.0 + + +#################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs + + +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +export NETCDFHOME=$(nc-config --prefix) +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} +export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} +export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} + +export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_pgi.wcoss b/modulefiles/envmodules_pgi.wcoss index 93b0c6d4..6979e8e4 100644 --- a/modulefiles/envmodules_pgi.wcoss +++ b/modulefiles/envmodules_pgi.wcoss @@ -1,4 +1,12 @@ #!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + #---------- [[ "$0" == "bash" || "$0" == "-bash" ]] && retv=return || retv=exit echo "$(basename ${BASH_SOURCE[0]}) :: This environment is either not configured or not supported" @@ -9,6 +17,7 @@ ${retv} 1 # 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 @@ -23,12 +32,20 @@ module purge #################### ### (2) Set some environments varaiables related to the loaded ### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs -export HDF5HOME=${HDF5} -export NETCDFHOME=${NETCDF} +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/scripts/functions_build b/scripts/functions_build index e08a6460..aecfaa03 100644 --- a/scripts/functions_build +++ b/scripts/functions_build @@ -9,6 +9,7 @@ set +u MY_COMPILING_SYTEMS="gnu, intel, pgi" +MY_COMPILING_PLATFORMS="custom, linux, macosx, cheyenne, gaea, hera, jet, orion, stampede, wcoss mistral strand" MY_ATM_MODS="ATMESH WRF HWRF PAHM" MY_OCN_MODS="ADCIRC SCHISM FVCOM ROMS" @@ -51,7 +52,7 @@ ParseArgs() __MY_OS= __MY_PARALLEL=1 __MY_PARMAKE=1 - __MY_PLATFORM= + __MY_PLATFORM=linux __MY_VERBOSE= @@ -251,8 +252,8 @@ UsageBuild() echo " The name of the compute HPC platform to consider." echo " Selecting a platform, environment modules specific to that platform are loaded" echo " and corresponding environment variables are set." - echo " Supported platforms: cheyenne gaea hera jet orion stampede wcoss." - echo " Default: none." + echo " Supported platforms: ${MY_COMPILING_PLATFORMS}." + echo " Default: linux." echo #--- echo " -v|--v|-verbose|--verbose [=|space] \"a,b,v,i,j,m,n\" (any combination, OPTIONAL)." From 2fe527fcff7720d3fb1d454fa0a9de4f490235e6 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sun, 27 Jun 2021 00:12:30 -0500 Subject: [PATCH 10/96] fixed the bug for use_defaults --- modulefiles/envmodules_intel.hera | 2 +- modulefiles/envmodules_intel.hera.hpc-stack | 2 +- modulefiles/envmodules_intel.orion | 2 +- modulefiles/envmodules_intel.orion.hpc-stack | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modulefiles/envmodules_intel.hera b/modulefiles/envmodules_intel.hera index d27e746b..2ffa078d 100644 --- a/modulefiles/envmodules_intel.hera +++ b/modulefiles/envmodules_intel.hera @@ -19,7 +19,7 @@ module purge module use /scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack module load hpc module load cmake -if [ ${use_defaults:-0} -ge 1 ]; then +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 diff --git a/modulefiles/envmodules_intel.hera.hpc-stack b/modulefiles/envmodules_intel.hera.hpc-stack index d27e746b..2ffa078d 100644 --- a/modulefiles/envmodules_intel.hera.hpc-stack +++ b/modulefiles/envmodules_intel.hera.hpc-stack @@ -19,7 +19,7 @@ module purge module use /scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack module load hpc module load cmake -if [ ${use_defaults:-0} -ge 1 ]; then +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 diff --git a/modulefiles/envmodules_intel.orion b/modulefiles/envmodules_intel.orion index f847e797..cac58a28 100644 --- a/modulefiles/envmodules_intel.orion +++ b/modulefiles/envmodules_intel.orion @@ -19,7 +19,7 @@ module purge module use /apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack module load hpc module load cmake -if [ ${use_defaults:-0} -ge 1 ]; then +if [ ${use_defaults:-0} -le 0 ]; then module load hpc-intel/2018.4 hpc-impi module load szip hdf5 netcdf module load esmf/8_1_1 diff --git a/modulefiles/envmodules_intel.orion.hpc-stack b/modulefiles/envmodules_intel.orion.hpc-stack index f847e797..cac58a28 100644 --- a/modulefiles/envmodules_intel.orion.hpc-stack +++ b/modulefiles/envmodules_intel.orion.hpc-stack @@ -19,7 +19,7 @@ module purge module use /apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack module load hpc module load cmake -if [ ${use_defaults:-0} -ge 1 ]; then +if [ ${use_defaults:-0} -le 0 ]; then module load hpc-intel/2018.4 hpc-impi module load szip hdf5 netcdf module load esmf/8_1_1 From 7835b2437741fcda4911e965dffeff9470ba915f Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sun, 27 Jun 2021 04:51:41 -0500 Subject: [PATCH 11/96] fixed conf/configure.nems* files to set the NETCDF libraries properly --- conf/configure.nems.hera.intel | 6 ++-- conf/configure.nems.linux.gnu | 12 ++++--- conf/configure.nems.linux.intel | 12 ++++--- conf/configure.nems.linux.pgi | 12 ++++--- conf/configure.nems.ndcrc.intel | 6 ++-- conf/configure.nems.orion.gnu | 61 +++++++++++++++++++++++++++++++++ conf/configure.nems.orion.intel | 61 +++++++++++++++++++++++++++++++++ conf/configure.nems.orion.pgi | 61 +++++++++++++++++++++++++++++++++ 8 files changed, 215 insertions(+), 16 deletions(-) create mode 100644 conf/configure.nems.orion.gnu create mode 100644 conf/configure.nems.orion.intel create mode 100644 conf/configure.nems.orion.pgi diff --git a/conf/configure.nems.hera.intel b/conf/configure.nems.hera.intel index 66a3ab3d..99ccfe34 100644 --- a/conf/configure.nems.hera.intel +++ b/conf/configure.nems.hera.intel @@ -12,8 +12,10 @@ include $(TOP)/conf/configure.nems.NUOPC ################################################################################ ## Other settings -NETCDF_INC = -I$(NETCDF)/include -NETCDF_LIB = -L$(NETCDF)/lib -lnetcdf +LIBDIR ?= . + +NETCDF_INC = -I${NETCDF_INCDIR} +NETCDF_LIB = -L${NETCDF_LIBDIR} -lnetcdf NEMSIO_INC = -I${LIBDIR}/incmod/nemsio NEMSIO_LIB = -L${LIBDIR} -lnemsio diff --git a/conf/configure.nems.linux.gnu b/conf/configure.nems.linux.gnu index d1aee7e4..25736922 100644 --- a/conf/configure.nems.linux.gnu +++ b/conf/configure.nems.linux.gnu @@ -12,11 +12,15 @@ include $(TOP)/conf/configure.nems.NUOPC ################################################################################ ## Other settings -NETCDF_INC = -I$(NETCDF_INCDIR) -NETCDF_LIB = -L$(NETCDF_LIBDIR) -lnetcdf +LIBDIR ?= . -NEMSIO_INC = -I${LIBDIR}/incmod/nemsio -NEMSIO_LIB = -L${LIBDIR} -lnemsio +NETCDF_INC = -I${NETCDF_INCDIR} +NETCDF_LIB = -L${NETCDF_LIBDIR} -lnetcdf + +#NEMSIO_INC = -I${LIBDIR}/incmod/nemsio +#NEMSIO_LIB = -L${LIBDIR} -lnemsio +NEMSIO_INC = +NEMSIO_LIB = SYS_LIB = EXTLIBS = $(NEMSIO_LIB) \ diff --git a/conf/configure.nems.linux.intel b/conf/configure.nems.linux.intel index a3229932..f603e401 100644 --- a/conf/configure.nems.linux.intel +++ b/conf/configure.nems.linux.intel @@ -12,11 +12,15 @@ include $(TOP)/conf/configure.nems.NUOPC ################################################################################ ## Other settings -NETCDF_INC = -I$(NETCDF_INCDIR) -NETCDF_LIB = -L$(NETCDF_LIBDIR) -lnetcdf +LIBDIR ?= . -NEMSIO_INC = -I${LIBDIR}/incmod/nemsio -NEMSIO_LIB = -L${LIBDIR} -lnemsio +NETCDF_INC = -I${NETCDF_INCDIR} +NETCDF_LIB = -L${NETCDF_LIBDIR} -lnetcdf + +#NEMSIO_INC = -I${LIBDIR}/incmod/nemsio +#NEMSIO_LIB = -L${LIBDIR} -lnemsio +NEMSIO_INC = +NEMSIO_LIB = SYS_LIB = EXTLIBS = $(NEMSIO_LIB) \ diff --git a/conf/configure.nems.linux.pgi b/conf/configure.nems.linux.pgi index 81674d2d..30e35ca3 100644 --- a/conf/configure.nems.linux.pgi +++ b/conf/configure.nems.linux.pgi @@ -12,11 +12,15 @@ include $(TOP)/conf/configure.nems.NUOPC ################################################################################ ## Other settings -NETCDF_INC = -I$(NETCDF_INCDIR) -NETCDF_LIB = -L$(NETCDF_LIBDIR) -lnetcdf +LIBDIR ?= . -NEMSIO_INC = -I${LIBDIR}/incmod/nemsio -NEMSIO_LIB = -L${LIBDIR} -lnemsio +NETCDF_INC = -I${NETCDF_INCDIR} +NETCDF_LIB = -L${NETCDF_LIBDIR} -lnetcdf + +#NEMSIO_INC = -I${LIBDIR}/incmod/nemsio +#NEMSIO_LIB = -L${LIBDIR} -lnemsio +NEMSIO_INC = +NEMSIO_LIB = SYS_LIB = EXTLIBS = $(NEMSIO_LIB) \ diff --git a/conf/configure.nems.ndcrc.intel b/conf/configure.nems.ndcrc.intel index ce0df05b..d50c84b4 100644 --- a/conf/configure.nems.ndcrc.intel +++ b/conf/configure.nems.ndcrc.intel @@ -14,8 +14,10 @@ include $(TOP)/conf/configure.nems.NUOPC ################################################################################ ## Other settings -NETCDF_INC = -I$(NETCDF)/include -NETCDF_LIB = -L$(NETCDF)/lib -lnetcdff +LIBDIR ?= . + +NETCDF_INC = -I${NETCDF_INCDIR} +NETCDF_LIB = -L${NETCDF_LIBDIR} -lnetcdf NEMSIO_INC = -I${LIBDIR}/incmod/nemsio NEMSIO_LIB = -L${LIBDIR} -lnemsio diff --git a/conf/configure.nems.orion.gnu b/conf/configure.nems.orion.gnu new file mode 100644 index 00000000..8b2158ef --- /dev/null +++ b/conf/configure.nems.orion.gnu @@ -0,0 +1,61 @@ +## NEMS configuration file +## +## Platform: Generic/Linux +## Compiler: GNU with MPI --- needs fixing + +SHELL = /bin/sh + +################################################################################ +## Include the common configuration parts +include $(TOP)/conf/configure.nems.NUOPC + +################################################################################ +## Other settings + +LIBDIR ?= . + +NETCDF_INC = -I${NETCDF_INCDIR} +NETCDF_LIB = -L${NETCDF_LIBDIR} -lnetcdf + +#NEMSIO_INC = -I${LIBDIR}/incmod/nemsio +#NEMSIO_LIB = -L${LIBDIR} -lnemsio +NEMSIO_INC = +NEMSIO_LIB = +SYS_LIB = + +EXTLIBS = $(NEMSIO_LIB) \ + $(NETCDF_LIB) \ + $(ESMF_LIB) \ + $(SYS_LIB) -lm + +EXTLIBS_POST = $(NEMSIO_LIB) \ + $(ESMF_LIB) \ + $(NETCDF_LIB) \ + $(SYS_LIB) +### +FC = mpif90 -g -ffree-line-length-none -fno-range-check -fbacktrace +F77 = mpiifort -g -ffree-line-length-none -fno-range-check -fbacktrace +FREE = -free +FIXED = -fixed +R8 = -r8 + +FINCS = $(ESMF_INC) $(NEMSIO_INC) $(NETCDF_INC) +#TRAPS = ??? + +#FFLAGS = $(TRAPS) $(FINCS) -fp-model strict +FFLAGS = $(TRAPS) $(FINCS) + +OPTS_NMM = -g -ffree-line-length-none -fno-range-check -fbacktrace $(FREE) + +FFLAGM_DEBUG = + +FFLAGS_NMM = $(MACROS_NWM) $(OPTS_NMM) $(FFLAGS) + +FPP = -fpp +CPP = cpp -P -traditional +CPPFLAGS = -DENABLE_SMP -DCHNK_RRTM=8 + +AR = ar +ARFLAGS = -r + +RM = rm diff --git a/conf/configure.nems.orion.intel b/conf/configure.nems.orion.intel new file mode 100644 index 00000000..acaa296c --- /dev/null +++ b/conf/configure.nems.orion.intel @@ -0,0 +1,61 @@ +## NEMS configuration file +## +## Platform: Generic/Linux +## Compiler: Intel with IntelMPI + +SHELL = /bin/sh + +################################################################################ +## Include the common configuration parts +include $(TOP)/conf/configure.nems.NUOPC + +################################################################################ +## Other settings + +LIBDIR ?= . + +NETCDF_INC = -I${NETCDF_INCDIR} +NETCDF_LIB = -L${NETCDF_LIBDIR} -lnetcdf + +#NEMSIO_INC = -I${LIBDIR}/incmod/nemsio +#NEMSIO_LIB = -L${LIBDIR} -lnemsio +NEMSIO_INC = +NEMSIO_LIB = +SYS_LIB = + +EXTLIBS = $(NEMSIO_LIB) \ + $(NETCDF_LIB) \ + $(ESMF_LIB) \ + $(SYS_LIB) -lm + +EXTLIBS_POST = $(NEMSIO_LIB) \ + $(ESMF_LIB) \ + $(NETCDF_LIB) \ + $(SYS_LIB) +### +FC = mpiifort -g -qopenmp -mkl=sequential -align array32byte -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -qopenmp -convert big_endian -assume byterecl -mkl=sequential +F77 = mpiifort -g -qopenmp -mkl=sequential -align array32byte -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -qopenmp -convert big_endian -assume byterecl -mkl=sequential +FREE = -free +FIXED = -fixed +R8 = -r8 + +FINCS = $(ESMF_INC) $(NEMSIO_INC) $(NETCDF_INC) +#TRAPS = -g -fno-inline -no-ip -traceback -ftrapuv -fpe0 -ftz -check all -check noarg_temp_created -fp-stack-check + +#FFLAGS = $(TRAPS) $(FINCS) -fp-model strict +FFLAGS = $(TRAPS) $(FINCS) + +OPTS_NMM = -g -fno-inline -no-ip -traceback -ftrapuv -fpe0 -ftz -check all -check noarg_temp_created -fp-stack-check $(FREE) + +FFLAGM_DEBUG = + +FFLAGS_NMM = $(MACROS_NWM) $(OPTS_NMM) $(FFLAGS) + +FPP = -fpp +CPP = cpp -P -traditional +CPPFLAGS = -DENABLE_SMP -DCHNK_RRTM=8 + +AR = ar +ARFLAGS = -r + +RM = rm diff --git a/conf/configure.nems.orion.pgi b/conf/configure.nems.orion.pgi new file mode 100644 index 00000000..d07eff29 --- /dev/null +++ b/conf/configure.nems.orion.pgi @@ -0,0 +1,61 @@ +## NEMS configuration file +## +## Platform: Generic/Linux +## Compiler: PGI with MPI --- needs fixing + +SHELL = /bin/sh + +################################################################################ +## Include the common configuration parts +include $(TOP)/conf/configure.nems.NUOPC + +################################################################################ +## Other settings + +LIBDIR ?= . + +NETCDF_INC = -I${NETCDF_INCDIR} +NETCDF_LIB = -L${NETCDF_LIBDIR} -lnetcdf + +#NEMSIO_INC = -I${LIBDIR}/incmod/nemsio +#NEMSIO_LIB = -L${LIBDIR} -lnemsio +NEMSIO_INC = +NEMSIO_LIB = +SYS_LIB = + +EXTLIBS = $(NEMSIO_LIB) \ + $(NETCDF_LIB) \ + $(ESMF_LIB) \ + $(SYS_LIB) -lm + +EXTLIBS_POST = $(NEMSIO_LIB) \ + $(ESMF_LIB) \ + $(NETCDF_LIB) \ + $(SYS_LIB) +### +FC = mpif90 -g -Mextend -Minform,inform -Mbounds +F77 = mpif90 -g -Mextend -Minform,inform -Mbounds +FREE = -free +FIXED = +R8 = -r8 + +FINCS = $(ESMF_INC) $(NEMSIO_INC) $(NETCDF_INC) +#TRAPS = -g -fno-inline -no-ip -traceback -ftrapuv -fpe0 -ftz -check all -check noarg_temp_created -fp-stack-check + +#FFLAGS = $(TRAPS) $(FINCS) -fp-model strict +FFLAGS = $(TRAPS) $(FINCS) + +OPTS_NMM = -g -Mextend -Minform,inform -Mbounds $(FREE) + +FFLAGM_DEBUG = + +FFLAGS_NMM = $(MACROS_NWM) $(OPTS_NMM) $(FFLAGS) + +FPP = -fpp +CPP = cpp -P -traditional +CPPFLAGS = -DENABLE_SMP -DCHNK_RRTM=8 + +AR = ar +ARFLAGS = -r + +RM = rm From cf18918c1595917fe1544c5c8dbcaaae3ab41378 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sun, 27 Jun 2021 04:53:31 -0500 Subject: [PATCH 12/96] fixed orion compiling issues --- modulefiles/envmodules_intel.orion | 4 ++-- modulefiles/envmodules_intel.orion.hpc-stack | 4 ++-- scripts/build.sh | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modulefiles/envmodules_intel.orion b/modulefiles/envmodules_intel.orion index cac58a28..42fdca25 100644 --- a/modulefiles/envmodules_intel.orion +++ b/modulefiles/envmodules_intel.orion @@ -44,8 +44,8 @@ unset funcs ########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} -export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} -export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} +export NETCDF_INCDIR=${NETCDF_INCLUDES} +export NETCDF_LIBDIR=${NETCDF_LIBRARIES} export ESMFMKFILE=${ESMFMKFILE} ########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/modulefiles/envmodules_intel.orion.hpc-stack b/modulefiles/envmodules_intel.orion.hpc-stack index cac58a28..42fdca25 100644 --- a/modulefiles/envmodules_intel.orion.hpc-stack +++ b/modulefiles/envmodules_intel.orion.hpc-stack @@ -44,8 +44,8 @@ unset funcs ########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} -export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} -export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} +export NETCDF_INCDIR=${NETCDF_INCLUDES} +export NETCDF_LIBDIR=${NETCDF_LIBRARIES} export ESMFMKFILE=${ESMFMKFILE} ########## END:: PLATFORM CUSTOMIZED SETTINGS ########## diff --git a/scripts/build.sh b/scripts/build.sh index 798e1fbe..60c9b456 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -63,6 +63,7 @@ else fi export NEMS_PLATFORM=${PLATFORM} export MACHINE_ID=${PLATFORM} +export FULL_MACHINE_ID=${PLATFORM} [ "${MY_PARMAKE:0}" -gt 1 ] && PARMAKE=${MY_PARMAKE} From 1f2acab36f77a21043c2c448a6464eff00aee67c Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sun, 27 Jun 2021 05:07:51 -0500 Subject: [PATCH 13/96] fixed MACHINE_ID variables --- NEMS | 2 +- scripts/build.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEMS b/NEMS index 7cf93063..d429ae68 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit 7cf930637f6bc49d1974c354800eb1d25d3ba641 +Subproject commit d429ae683ca9b9549fb287dacc3a2d0b303b22de diff --git a/scripts/build.sh b/scripts/build.sh index 60c9b456..5f58661c 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -214,6 +214,8 @@ fi echo " COMPONENTS = ${COMPONENT:-Undefined, Supported values are: [${MY_COMPONENT_LIST}]}" echo " OS = ${OS}" echo " PLATFORM = ${PLATFORM}" +echo " MACHINE_ID = ${MACHINE_ID}" +echo " FULL_MACHINE_ID= ${FULL_MACHINE_ID}" echo " VERBOSE = ${VERBOSE}" echo echo " HDF5HOME = ${HDF5HOME}" From 0109000ddf55ffda58d60807da41cfc09a397bb2 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sun, 27 Jun 2021 13:56:38 -0500 Subject: [PATCH 14/96] switched the hera and orion environment modulefiles to theis sys state --- modulefiles/envmodules_intel.hera | 20 +++++++------------- modulefiles/envmodules_intel.orion | 22 ++++++++-------------- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/modulefiles/envmodules_intel.hera b/modulefiles/envmodules_intel.hera index 2ffa078d..01c8e036 100644 --- a/modulefiles/envmodules_intel.hera +++ b/modulefiles/envmodules_intel.hera @@ -14,20 +14,14 @@ #################### ### (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 intel/18.0.5.274 impi/2018.0.4 +module load szip + +module use /home/emc.nemspara/SOFT-hera/modulefiles +module load hdf5_parallel/1.10.6.release +module load netcdf_parallel/4.7.4.release +module load esmf/8.1.0bs36g ################### diff --git a/modulefiles/envmodules_intel.orion b/modulefiles/envmodules_intel.orion index 42fdca25..f859873d 100644 --- a/modulefiles/envmodules_intel.orion +++ b/modulefiles/envmodules_intel.orion @@ -14,20 +14,14 @@ #################### ### (1) Load all needed environment modules. -use_defaults=0 module purge -module use /apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack -module load hpc module load cmake -if [ ${use_defaults:-0} -le 0 ]; then - module load hpc-intel/2018.4 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 intel/2019.5 impi +module load szip hdf5/1.10.5-parallel +module load netcdf/4.7.2-parallel + +module load esmf/7.1.0r + #################### ### (2) Set some environments varaiables related to the loaded @@ -44,8 +38,8 @@ unset funcs ########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} -export NETCDF_INCDIR=${NETCDF_INCLUDES} -export NETCDF_LIBDIR=${NETCDF_LIBRARIES} +export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} +export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} export ESMFMKFILE=${ESMFMKFILE} ########## END:: PLATFORM CUSTOMIZED SETTINGS ########## From 023290349b13c024023189533428bea2022d15c7 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sun, 27 Jun 2021 13:58:29 -0500 Subject: [PATCH 15/96] commended out the LICENSE line in the orion cmake file --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 393b530f..1df019bd 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 393b530f8b9a3049bab17bd9382b981827672e1c +Subproject commit 1df019bde4a554a902e4cb1a87e33587726c323f From d5006be1a57b79fb11794873ac7d6946ca0555ce Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 28 Jun 2021 17:32:39 +0000 Subject: [PATCH 16/96] updated submodule --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index d429ae68..c6a1a7bd 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit d429ae683ca9b9549fb287dacc3a2d0b303b22de +Subproject commit c6a1a7bdd8c2fbdc2c7cb84163bbc81800fc6207 From dc59ca39a29cf48c1e613651d7e723d202b1516e Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 28 Jun 2021 18:01:41 +0000 Subject: [PATCH 17/96] update submodule --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index c6a1a7bd..6bcb2ce9 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit c6a1a7bdd8c2fbdc2c7cb84163bbc81800fc6207 +Subproject commit 6bcb2ce9abc8a90ae6a74130ebd4e2af6b83c4a9 From 4d03361b070f70ddb133ba9273a044c67c8b64f5 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 29 Jun 2021 10:57:20 -0500 Subject: [PATCH 18/96] fixed the missing nemsio issue --- NEMS | 2 +- conf/configure.nems.hera.intel | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEMS b/NEMS index 6bcb2ce9..c6a1a7bd 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit 6bcb2ce9abc8a90ae6a74130ebd4e2af6b83c4a9 +Subproject commit c6a1a7bdd8c2fbdc2c7cb84163bbc81800fc6207 diff --git a/conf/configure.nems.hera.intel b/conf/configure.nems.hera.intel index 99ccfe34..5cb63fba 100644 --- a/conf/configure.nems.hera.intel +++ b/conf/configure.nems.hera.intel @@ -17,8 +17,10 @@ LIBDIR ?= . NETCDF_INC = -I${NETCDF_INCDIR} NETCDF_LIB = -L${NETCDF_LIBDIR} -lnetcdf -NEMSIO_INC = -I${LIBDIR}/incmod/nemsio -NEMSIO_LIB = -L${LIBDIR} -lnemsio +#NEMSIO_INC = -I${LIBDIR}/incmod/nemsio +#NEMSIO_LIB = -L${LIBDIR} -lnemsio +NEMSIO_INC = +NEMSIO_LIB = SYS_LIB = EXTLIBS = $(NEMSIO_LIB) \ From ff5ee322ef7926cb96e5c421972a13ca10e2c322 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 29 Jun 2021 11:35:46 -0500 Subject: [PATCH 19/96] deleted the old build scripts --- scripts/build-v1.0.sh | 214 ------------ scripts/build-v1.1.sh | 230 ------------- scripts/functions_build-v1.0 | 611 ---------------------------------- scripts/functions_build.del | 617 ----------------------------------- 4 files changed, 1672 deletions(-) delete mode 100644 scripts/build-v1.0.sh delete mode 100644 scripts/build-v1.1.sh delete mode 100644 scripts/functions_build-v1.0 delete mode 100644 scripts/functions_build.del diff --git a/scripts/build-v1.0.sh b/scripts/build-v1.0.sh deleted file mode 100644 index ba6f6cb4..00000000 --- a/scripts/build-v1.0.sh +++ /dev/null @@ -1,214 +0,0 @@ -#!/bin/bash - -########################################################################### -### Author: Panagiotis Velissariou -### -### Version - 1.0 Fri Dec 04 2020 -########################################################################### - - -###==================== -# Make sure that the current working directory is in the PATH -[[ ! :$PATH: == *:".":* ]] && export PATH="${PATH}:." - - -# Get the directory where the script is located -scrNAME="${BASH_SOURCE[0]}" -if [[ $(uname -s) == Darwin ]]; then -# readonly scrDIR="$(cd "$(dirname "$(greadlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P)" - readonly scrDIR="$(cd "$(dirname "$(grealpath -s "${scrNAME}" )" )" && pwd -P)" -else -# readonly scrDIR="$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P)" - readonly scrDIR="$(cd "$(dirname "$(realpath -s "${scrNAME}")" )" && pwd -P)" -fi - -funcs="$( find ${scrDIR} -type f -name "functions_build" | head -n 1 )" -if [ -f "${funcs}" ]; then - source "${funcs}" -else - echo " ### ERROR :: in ${scrNAME}" - echo " Cannot load the required file: ${funcs}" - echo " Exiting now ..." - echo - exit 1 -fi - -unset funcs -###==================== - - -######### -# Call ParseArgs to get the user input. -ParseArgs "${@}" - - -########## -# Set the variables for this script -CLEAN=${MY_CLEAN:-0} - -[ -n "${MY_COMPILER:+1}" ] && COMPILER="$( toLOWER "${MY_COMPILER}" )" - -[ -n "${MY_COMPONENT:+1}" ] && COMPONENT="$( toUPPER "${MY_COMPONENT}" )" - -[ -n "${MY_OS:+1}" ] && OS="$( toLOWER "${MY_OS}" )" - -[ "${MY_PARMAKE:0}" -gt 1 ] && PARMAKE=${MY_PARMAKE} - -[ -n "${MY_PLATFORM:+1}" ] && PLATFORM="$( toLOWER "${MY_PLATFORM}" )" - -[ -n "${MY_VERBOSE:+1}" ] && VERBOSE="$( toLOWER "${MY_VERBOSE}" )" - -modFILE="envmodules${COMPILER:+_${COMPILER}}${PLATFORM:+.${PLATFORM}}" - -# Customize the NEMS.x filename to include the component names -if [ -n "${COMPONENT:+1}" ]; then - compFNAME="$( strTrim "$( toLOWER "${COMPONENT}" )" )" - compFNAME="$( echo "${compFNAME}" | sed 's/ /_/g' )" -fi - -# Export some environment variables for NEMS -export NEMS_COMPILER=${COMPILER} -########## - - -########## -# Get the project directories and perform a basic check on them -readonly nemsDIR="${NEMS_DIR:-${scrDIR}/NEMS}" -if [ ! -f "${nemsDIR}/NEMSAppBuilder" ]; then - echo "The project directory \"${nemsDIR}\" does not appear to contain NEMSAppBuilder." - echo "Is this the correct NEMS directory?" - echo "You might need to set the environment variable NEMS_DIR before running this script." - echo "Exiting ..." - exit 1 -fi - -readonly modDIR="${NEMSMODS_DIR:-${scrDIR}/modulefiles}" -if [ ! -f "${modDIR}/${modFILE}" ]; then - echo "The modulefiles directory \"${modDIR}\" does not appear to contain module: ${modFILE}." - echo "Is this the correct modulefiles directory?" - echo "You might need to set the environment variable NEMSMODS_DIR before running this script." - echo "Exiting ..." - exit 1 -fi -########## - - -########## -# If the user requested to clean the build folder, do the cleaning end exit -if [ ${CLEAN:-0} -ge 1 ]; then - echo "User requested to only clean the project. Cleaning ..." - - pushd ${nemsDIR} >/dev/null 2>&1 - [ ${CLEAN:-0} -eq 1 ] && compileNems clean - [ ${CLEAN:-0} -eq 2 ] && compileNems distclean - popd >/dev/null 2>&1 - - exit 0 -fi -########## - - -########## -# Source the environment module -source ${modDIR}/${modFILE} - -component_ww3="$( echo "${COMPONENT}" | sed 's/ /:/g' )" -if [[ :${component_ww3}: == *:"WW3":* ]]; then - export WW3_CONFOPT="${COMPILER}" - export WW3_COMP="${COMPILER}" - export WWATCH3_NETCDF=NC4 -fi -########## - - -########## -# Get a final user response for the variables -echo -echo "The following variables are defined:" -echo " CLEAN = ${CLEAN}" -echo " COMPILER = ${COMPILER:-Undefined, Supported values are: [${MY_COMPILING_SYTEMS}]}" -echo " NEMS_COMPILER = ${NEMS_COMPILER}" -if [[ :${component_ww3}: == *:"WW3":* ]]; then - echo " WW3_CONFOPT = ${WW3_CONFOPT}" - echo " WW3_COMP = ${WW3_COMP}" - echo " WWATCH3_NETCDF = ${WWATCH3_NETCDF}" -fi -echo " COMPONENTS = ${COMPONENT:-Undefined, Supported values are: [${MY_COMPONENT_LIST}]}" -echo " OS = ${OS}" -echo " PLATFORM = ${PLATFORM}" -echo " VERBOSE = ${VERBOSE}" -echo -echo " HDF5HOME = ${HDF5HOME}" -echo " NETCDFHOME = ${NETCDFHOME}" -echo " NETCDF_INCDIR = ${NETCDF_INCDIR}" -echo " NETCDF_LIBDIR = ${NETCDF_LIBDIR}" -echo -echo " ESMFMKFILE = ${ESMFMKFILE}" -echo - -module list - -echo_response= -while [ -z "${echo_response}" ] ; do - echo -n "Are these values correct? [y/n]: " - read echo_response - echo_response="$( getYesNo "${echo_response}" )" -done - -if [ "${echo_response:-no}" = "no" ]; then - echo - echo "User responded: ${echo_response}" - echo "Exiting now ..." - echo - exit 1 -fi - -unset echo_response -########## - - -############################################################ -### START THE CALCULATIONS -############################################################ - -########## -# Compile the project -compileERR=0 -pushd ${nemsDIR} >/dev/null 2>&1 - case ${CLEAN:-0} in - -1 ) - compileNems clean - compileERR=$? - ;; - -2 ) - compileNems distclean - compileERR=$? - ;; - -3 ) - compileNems noclean - compileERR=$? - ;; - * ) - compileNems clean - compileERR=$? - ;; - esac - - if [ ${compileERR} -eq 0 ]; then - compileNems build - compileERR=$? - fi - - if [ ${compileERR} -eq 0 ]; then - if [ -f exe/NEMS.x ]; then - cp -p exe/NEMS.x exe/NEMS${compFNAME:+-${compFNAME}}.x - fi - fi -popd >/dev/null 2>&1 - -########## -# Install all data, executables, libraries in a common directory -[ ${compileERR:-0} -eq 0 ] && installNems -########## - -exit 0 diff --git a/scripts/build-v1.1.sh b/scripts/build-v1.1.sh deleted file mode 100644 index 139aded0..00000000 --- a/scripts/build-v1.1.sh +++ /dev/null @@ -1,230 +0,0 @@ -#!/bin/bash - -########################################################################### -### Author: Panagiotis Velissariou -### -### Version - 1.1 -### -### 1.1 Wed Apr 14 2021 -### 1.0 Fri Dec 04 2020 -########################################################################### - - -###==================== -# Make sure that the current working directory is in the PATH -[[ ! :$PATH: == *:".":* ]] && export PATH="${PATH}:." - - -# Get the directory where the script is located -if [[ $(uname -s) == Darwin ]]; then - readonly scrNAME="$( grealpath -s "${BASH_SOURCE[0]}" )" - readonly scrDIR="$(cd "$(dirname "${scrNAME}" )" && pwd -P)" -else - readonly scrNAME="$( realpath -s "${BASH_SOURCE[0]}" )" - readonly scrDIR="$(cd "$(dirname "$(realpath -s "${BASH_SOURCE[0]}")" )" && pwd -P)" -fi - -funcs="$( find ${scrDIR} -type f -name "functions_build" | head -n 1 )" -if [ -f "${funcs}" ]; then - source "${funcs}" -else - echo " ### ERROR :: in ${scrNAME}" - echo " Cannot load the required file: ${funcs}" - echo " Exiting now ..." - echo - exit 1 -fi - -unset funcs -###==================== - - -######### -# Call ParseArgs to get the user input. -ParseArgs "${@}" - - -########## -# Set the variables for this script -CLEAN=${MY_CLEAN:-0} - -[ -n "${MY_COMPILER:+1}" ] && COMPILER="$( toLOWER "${MY_COMPILER}" )" - -[ -n "${MY_COMPONENT:+1}" ] && COMPONENT="$( toUPPER "${MY_COMPONENT}" )" - - -[ -n "${MY_OS:+1}" ] && OS="$( toLOWER "${MY_OS}" )" -if [ -n "${MY_PLATFORM:+1}" ]; then - PLATFORM="$( toLOWER "${MY_PLATFORM}" )" -else - PLATFORM="${OS}" -fi -export NEMS_PLATFORM=${PLATFORM} -export MACHINE_ID=${PLATFORM} -export FULL_MACHINE_ID=${PLATFORM} - - -[ "${MY_PARMAKE:0}" -gt 1 ] && PARMAKE=${MY_PARMAKE} - -[ -n "${MY_VERBOSE:+1}" ] && VERBOSE="$( toLOWER "${MY_VERBOSE}" )" - -modFILE="envmodules${COMPILER:+_${COMPILER}}${PLATFORM:+.${PLATFORM}}" - -# Customize the NEMS.x filename to include the component names -if [ -n "${COMPONENT:+1}" ]; then - compFNAME="$( strTrim "$( toLOWER "${COMPONENT}" )" )" - compFNAME="$( echo "${compFNAME}" | sed 's/ /_/g' )" -fi - -# Export some environment variables for NEMS -export NEMS_COMPILER=${COMPILER} -########## - - -########## -# Get the project directories and perform a basic check on them -readonly nemsDIR="${NEMS_DIR:-${scrDIR}/NEMS}" -if [ ! -f "${nemsDIR}/NEMSAppBuilder" ]; then - echo "The project directory \"${nemsDIR}\" does not appear to contain NEMSAppBuilder." - echo "Is this the correct NEMS directory?" - echo "You might need to set the environment variable NEMS_DIR before running this script." - echo "Exiting ..." - exit 1 -fi - -readonly modDIR="${NEMSMODS_DIR:-${scrDIR}/modulefiles}" -if [ ! -f "${modDIR}/${modFILE}" ]; then - echo - echo "The modulefiles directory \"${modDIR}\" does not appear to contain the module file: ${modFILE}." - echo "Is this the correct \"modulefiles\" directory?" - echo "You might need to set the environment variable \"NEMSMODS_DIR\" to point to a custom modulefiles directory before running this script." - echo "Exiting ..." - echo - exit 1 -fi -########## - - -########## -# If the user requested to clean the build folder, do the cleaning end exit -if [ ${CLEAN:-0} -ge 1 ]; then - echo "User requested to only clean the project. Cleaning ..." - - pushd ${nemsDIR} >/dev/null 2>&1 - [ ${CLEAN:-0} -eq 1 ] && compileNems clean - [ ${CLEAN:-0} -eq 2 ] && compileNems distclean - popd >/dev/null 2>&1 - - exit 0 -fi -########## - - -########## -# Source the environment module -source ${modDIR}/${modFILE} - -component_ww3="$( echo "${COMPONENT}" | sed 's/ /:/g' )" -if [[ :${component_ww3}: == *:"WW3":* ]]; then - export WW3_CONFOPT="${COMPILER}" - export WW3_COMP="${COMPILER}" - export WWATCH3_NETCDF=NC4 -fi -########## - - -########## -# Get a final user response for the variables -echo -echo "The following variables are defined:" -echo " CLEAN = ${CLEAN}" -echo " COMPILER = ${COMPILER:-Undefined, Supported values are: [${MY_COMPILING_SYTEMS}]}" -echo " NEMS_COMPILER = ${NEMS_COMPILER}" -echo " MODULES FILE = ${modFILE}" -if [[ :${component_ww3}: == *:"WW3":* ]]; then - echo " WW3_CONFOPT = ${WW3_CONFOPT}" - echo " WW3_COMP = ${WW3_COMP}" - echo " WWATCH3_NETCDF = ${WWATCH3_NETCDF}" -fi -echo " COMPONENTS = ${COMPONENT:-Undefined, Supported values are: [${MY_COMPONENT_LIST}]}" -echo " OS = ${OS}" -echo " PLATFORM = ${PLATFORM}" -echo " MACHINE_ID = ${MACHINE_ID}" -echo " FULL_MACHINE_ID= ${FULL_MACHINE_ID}" -echo " VERBOSE = ${VERBOSE}" -echo -echo " HDF5HOME = ${HDF5HOME}" -echo " NETCDFHOME = ${NETCDFHOME}" -echo " NETCDF_INCDIR = ${NETCDF_INCDIR}" -echo " NETCDF_LIBDIR = ${NETCDF_LIBDIR}" -echo -echo " ESMFMKFILE = ${ESMFMKFILE}" -echo - -module list - - -echo_response= -while [ -z "${echo_response}" ] ; do - echo -n "Are these values correct? [y/n]: " - read echo_response - echo_response="$( getYesNo "${echo_response}" )" -done - -if [ "${echo_response:-no}" = "no" ]; then - echo - echo "User responded: ${echo_response}" - echo "Exiting now ..." - echo - exit 1 -fi - -unset echo_response -########## - - -############################################################ -### START THE CALCULATIONS -############################################################ - -########## -# Compile the project -compileERR=0 -pushd ${nemsDIR} >/dev/null 2>&1 - case ${CLEAN:-0} in - -1 ) - compileNems clean - compileERR=$? - ;; - -2 ) - compileNems distclean - compileERR=$? - ;; - -3 ) - compileNems noclean - compileERR=$? - ;; - * ) - compileNems clean - compileERR=$? - ;; - esac - - if [ ${compileERR} -eq 0 ]; then - compileNems build - compileERR=$? - fi - - if [ ${compileERR} -eq 0 ]; then - if [ -f exe/NEMS.x ]; then - cp -p exe/NEMS.x exe/NEMS${compFNAME:+-${compFNAME}}.x - fi - fi -popd >/dev/null 2>&1 - -########## -# Install all data, executables, libraries in a common directory -[ ${compileERR:-0} -eq 0 ] && installNems -########## - -exit 0 diff --git a/scripts/functions_build-v1.0 b/scripts/functions_build-v1.0 deleted file mode 100644 index 05111ddc..00000000 --- a/scripts/functions_build-v1.0 +++ /dev/null @@ -1,611 +0,0 @@ -#!/bin/bash-*-Shell-script-functions*- - -########################################################################### -### Author: Panagiotis Velissariou -### -### Version - 1.0 Fri Dec 04 2020 -########################################################################### - -set +u - -MY_COMPILING_SYTEMS="gnu, intel, pgi" -MY_COMPONENT_LIST="ADCIRC WW3DATA WW3 NWM ATMESH" - -################################################## -### MODELLING SYSTEM BUILD FUNCTIONS -################################################## - -###======================================== -### ParseArgs() -### Usage: ParseArgs args -### Parameters: args = the script options -### Returns: 0 -### Echoes: NONE -### -### Gets the supplied options to the script. -###======================================== -ParseArgs() -{ - local nm_func=$( basename ${BASH_SOURCE[${#BASH_SOURCE[@]}-1]} ) - - local opt_all opt_opt opt_arg opt_chk - - local t_VAR - local ans0 ans ival intN - local all_evars - - all_evars="MY_CLEAN MY_COMPILER MY_COMPONENT MY_OS MY_PARMAKE MY_PLATFORM MY_VERBOSE" - - for ival in ${all_evars}; do unset __${ival}; done - - - __MY_CLEAN=0 - __MY_COMPILER=intel - __MY_COMPONENT="ADCIRC WW3DATA ATMESH" - __MY_OS= - __MY_PARMAKE=1 - __MY_PLATFORM= - __MY_VERBOSE= - - - # ----- - # Process the function options - opt_all=( c clean compiler component j os plat v verbose h help ) - opt_all=":$( echo "${opt_all[@]/#/-} ${opt_all[@]/#/--}" | sed 's/ /:/g' ):" - - unset __OPTION_LIST - while test $# -gt 0; do - case "${1}" in - -[^-]*=* | --[^-]*=* ) - opt_opt="$( toLOWER "$( echo "${1}" | sed 's/=.*//' )" )" - len=$(( ${#opt_opt} + 1 )) - opt_arg="$( strTrim "$( echo "${1:${len}}" )" 2 )" - [ "$( echo "${opt_all}" | egrep -o ":${opt_arg}:" )" ] && \ - opt_arg= - ;; - -[^-]* | --[^-]* ) - opt_opt="$( toLOWER "${1}" )" - opt_chk="$( toLOWER "$( echo "${2}" | sed 's/=.*//' )" )" - if [ "$( echo "${opt_all}" | egrep -o ":${opt_chk}:" )" ]; then - opt_arg= - else - opt_arg="$( strTrim "$( echo "${2}" )" )" - fi - ;; - *) - opt_opt= - opt_arg= - ;; - esac - - case "${opt_opt}" in - -c | --c | -clean | --clean ) - checkFuncOpt "--clean" - if [ $? -eq 0 ]; then - __MY_CLEAN=1 - if [ "X${opt_arg}" != "X" ]; then - if `isInteger "${opt_arg}"` ; then - __MY_CLEAN=$( echo "${opt_arg}" ) - [ ${opt_arg} -le -3 ] && __MY_CLEAN=-3 - [ ${opt_arg} -ge 2 ] && __MY_CLEAN=2 - else - __MY_CLEAN=0 - [ "$( getYesNo "${opt_arg}" )" = "yes" ] && __MY_CLEAN=1 - fi - fi - fi - ;; - -compiler | --compiler ) - checkFuncOpt "--compiler" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_COMPILER="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -component | --component ) - checkFuncOpt "--component" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_COMPONENT="$( strTrim "${opt_arg}" )" - fi - fi - ;; - -j | --j ) - checkFuncOpt "--j" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_PARMAKE=1 - t_VAR="$( getPosInteger "${opt_arg}" )" - [ ! -z "${t_VAR}" ] && __MY_PARMAKE=${t_VAR} - fi - fi - ;; - -os | --os ) - checkFuncOpt "--os" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_OS="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -plat | --plat ) - checkFuncOpt "--plat" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_PLATFORM="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -v | --v | -verbose | --verbose ) - checkFuncOpt "--verbose" - if [ $? -eq 0 ]; then - __MY_VERBOSE=b - if [ "X${opt_arg}" != "X" ]; then - __MY_VERBOSE="$( echo "$( strTrim "${opt_arg}" 2 )" | sed 's/[[:space:]]/,/g' )" - fi - fi - ;; - -h | -help | --h | --help ) - UsageBuild ${nm_func} - ;; - *) ;; # DEFAULT - esac - shift - opt_opt= - opt_arg= - done - unset __OPTION_LIST - # ----- - - if [ -z "${__MY_OS}" ]; then - case "$(uname -s)" in - Darwin ) __MY_OS="macosx" ;; - Linux ) __MY_OS="linux" ;; - *) __MY_OS="UNDEFINED";; # DEFAULT - esac - fi - - # Export the values of all __* variables. - for ival in ${all_evars} - do - ans0="$( eval "echo \${$(echo ${ival}):-}" )" - ans="$( eval "echo \${$(echo __${ival}):-}" )" - ans=${ans:-${ans0:-}} - - eval "${ival}=\${ans}" - export ${ival} - - unset __${ival} - done - - return 0 -} - -UsageBuild() -{ - local nm="$( basename ${0} )" - - echo - echo "Usage: \"${nm}\" [{-|--}option1{=|space}[option_value1]] [{-|--}option2{=|space}[option_value2]] ..." - echo - - echo " -h|-help|--h|--help" - echo " Show this help screen." - echo - #--- - echo " -c|--c|-clean|--clean [=|space] \"0|1|yes|no\" (OPTIONAL)." - echo " Only clean the already compiled CMake build system." - echo " Default: 0|no." - echo - #--- - echo " -compiler|--compiler [=|space] \"compiling_system\" (OPTIONAL)." - echo " The compiling system to use (${MY_COMPILING_SYTEMS})." - echo " Default: intel." - echo - #--- - echo " -component|--component [=|space] \"component_list\" (OPTIONAL)." - echo " The component(s) to use (${MY_COMPONENT_LIST})." - echo " Default: \"ADCIRC WW3DATA ATMESH\"." - echo - #--- - echo " -j|--j [=|space] \"N\" (OPTIONAL)." - echo " Define the number of make jobs to run simultaneously." - echo " Default: 1." - echo - #--- - echo " -os|--os [=|space] \"OS string\" (OPTIONAL)." - echo " The name of the Operating system." - echo " Supported OSes: linux macosx." - echo " Default: current OS." - echo - #--- - echo " -plat|--plat [=|space] \"platform\" (OPTIONAL)." - echo " The name of the compute HPC platform to consider." - echo " Selecting a platform, environment modules specific to that platform are loaded" - echo " and corresponding environment variables are set." - echo " Supported platforms: cheyenne gaea hera jet orion stampede wcoss." - echo " Default: none." - echo - #--- - echo " -v|--v|-verbose|--verbose [=|space] \"a,b,v,i,j,m,n\" (any combination, OPTIONAL)." - echo " Enable verbosity in the make files during compilation." - echo " a (all) : all types of debugging output are enabled" - echo " n (none) : disable all debugging currently enabled" - echo " b (basic) : basic debugging and whether the build was successful or not" - echo " v (verbose) : a level above basic" - echo " i (implicit) : prints messages describing the implicit rule searches for each target" - echo " j (jobs) : prints messages giving details on the invocation of specific sub-commands" - echo " m (makefile) : enables messages while rebuilding makefiles" - echo " Default:none." - echo - #--- - - exit 0 -} - -###======================================== -### checkFuncOpt() -### Usage: checkFuncOpt opt_name -### Parameters: -### opt_name: The name of the option to a function -### -### Returns : Exits on error -### -### Exports : __OPTION_LIST -### -### Echoes : NONE -### -### checkFuncOpt: Checks if an option to a function is already supplied. -###======================================== -checkFuncOpt() { - local opt_inp opt_list - - [ $# -eq 0 ] && return -1 - - opt_inp="$( strTrim "${1}" 2 )" - opt_inp="$( echo "${opt_inp}" | sed 's/^[-]*//' )" - - opt_list="$( strTrim "${__OPTION_LIST}" 2 )" - [ -n ${opt_list:+1} ] && \ - opt_list=":$( echo "${opt_list}" | sed 's/ /:/g' ):" - - [ "$( echo "${opt_list}" | egrep -o ":${opt_inp}:" )" ] && return 1 - - __OPTION_LIST="${__OPTION_LIST} ${opt_inp}" - export __OPTION_LIST - - return 0 -} - -###======================================== -### isInteger() -### Usage: isInteger var -### Parameters: var -### Returns: 1 if var is not an integer (0 is an integer as well) -### 0 in any other case -### Echoes: NONE -###======================================== -isInteger() -{ - local -i retval=1 - - [ $# -eq 0 ] && return ${retval} - - if [ "${1:-UNDEF}" -eq "${1}" ] 2>/dev/null - then - retval=0 - fi - - return ${retval} -} - -###======================================== -### getInteger() -### Usage: getInteger int -### Parameters: int (int >=0 or, int < 0) -### Returns: 1 if var is not an integer -### 0 in any other case -### Echoes: int, if it is a valid integer (including 0), -### in any other case echoes an empty string -###======================================== -getInteger() -{ - local -i retval=0 - local echoval= minus= - - # strip spaces, '+' signs and '-' signs - # if the first character of the string is '-', set the minus variable - echoval="$( echo "${1}" | sed 's/[[:space:]+]//g' )" - [ "X$( echo "${echoval:0:1}" )" = "X-" ] && minus="-" - echoval="${minus}$( echo "${echoval}" | sed 's/[[:space:]-]//g' )" - - if isInteger ${echoval}; then - echoval="$(echo "scale=0; ${echoval} + 0" | bc -ql 2>/dev/null)" - retval=$? - echoval="${echoval:-0}" - else - echoval= - retval=1 - fi - - echo -n ${echoval} - - return ${retval} -} - -###======================================== -### getPosInteger() -### Usage: getPosInteger posint -### Parameters: posint (posint >= 0) -### Returns: 1 if var is not a positive integer -### 0 in any other case -### Echoes: posint if it is a valid positive integer -### (including 0), in any other case echoes an -### empty string -###======================================== -getPosInteger() -{ - local -i retval=0 - local echoval= - - echoval=$( getInteger "${1}" ) - retval=$? - - if [ ${retval} -ne 0 ] ; then - echoval= - retval=1 - else - if [ ${echoval} -lt 0 ]; then - echoval= - retval=1 - fi - fi - - echo -n ${echoval} - - return ${retval} -} - -###======================================== -### getYesNo() -### Usage: getYesNo value -### Parameters: -### value : The input value (the value of a parameter) -### The value of a bash parameter that is checked -### against TRUE/FALSE. If the value is one of: -### ">=1|y|yes|yea|yeah|yep" -### then the value of parameter is TRUE (answer = yes). -### If the value is one of: -### "<=0|n|no|not|nop|nope" -### then the value of parameter is FALSE (answer = no). -### If the value is empty then the value of parameter -### is FALSE (answer = no) -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : A "yes" or "no" answer. -### -### getYesNo: Checks if a parameter is assigned a TRUE/FALSE value. -###======================================== -getYesNo() -{ - local param answer - - param="$( echo "${1}" | tr '[:upper:]' '[:lower:]' )" - - if [ "${param}" -eq "${param}" ] 2>/dev/null - then - [ ${param} -le 0 ] && param=0 - [ ${param} -gt 0 ] && param=1 - fi - - case "${param}" in - 1|y|yes|yea|yeah|yep) answer="yes" ;; - 0|n|no|not|nop|nope) answer="no" ;; - *) answer="" ;; # DEFAULT - esac - - echo -n "${answer}" -} - -###======================================== -### toUPPER() -### Usage: toUPPER string -### Parameters: -### string : The string in to convert -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The input string converted to an all upper case string -### -### toUPPER: Converts a string to an all upper case string -###======================================== -function toUPPER() -{ - echo "${1}" | tr '[:lower:]' '[:upper:]' -} - -###======================================== -### toLOWER() -### Usage: toLOWER string -### Parameters: -### string : The string in to convert -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The input string converted to an all lower case string -### -### toLOWER: Converts a string to an all lower case string -###======================================== -function toLOWER() -{ - echo "${1}" | tr '[:upper:]' '[:lower:]' -} - -###======================================== -### strESC() -### Usage: strESC string -### Parameters: -### string : The input string -### The input string on which this function is applied -### to escape special characters used in bash/sed ... -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The modified string with its special characters escaped -### -### strESC: Escapes special characters in a string: "'()/[]*. -###======================================== -strESC() -{ - echo -n "$( echo "${*}" | sed -e "s/[\"\'\(\)\/\*\!]/\\\&/g;s/\[/\\\&/g;s/\]/\\\&/g" )" -} - -strESC1() -{ - echo -n "$( echo "${*}" | sed -e "s/[\&\/\*\!]/\\\&/g;s/\[/\\\&/g;s/\]/\\\&/g" )" -} - -###======================================== -### strTrim() -### Usage: strTrim s1 flag -### Parameters: -### s1 : The input string -### flag : Integer -### A value that controls the action of strTrim. -### If flag is zero or not present, trailing blanks are removed. -### Leading blanks are removed if it is equal to 1. -### Both are removed if it is equal to 2. -### In any other case, trailing blanks are removed. -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : s1 with all leading and/or trailing -### white spaces removed. -### -### strTrim: Removes all leading and/or trailing white spaces -### from the input string -###======================================== -function strTrim () -{ - local trimFLG="${2:-0}" - local out_str= - - case ${trimFLG} in - 0) out_str="$(echo "${1}" | sed 's/[[:space:]]*$//')" ;; - 1) out_str="$(echo "${1}" | sed 's/^[[:space:]]*//')" ;; - 2) out_str="$(echo "${1}" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" ;; - *) out_str="$(echo "${1}" | sed 's/[[:space:]]*$//')" ;; - esac - - echo -n ${out_str} -} - -compileNems() { - local cmp_type cmp_make cmp_comp cmp_mjob - local err=0 - - [ $# -eq 0 ] && return ${err} - - cmp_type="$( toLOWER "${1}" )" - cmp_make=GNUmakefile - cmp_comp="${COMPONENT:+COMPONENTS=\"${COMPONENT}\"}" - cmp_mjob="${PARMAKE:+-j ${PARMAKE}}" - cmp_verb="${VERBOSE:+--debug=${VERBOSE}}" - - case "${cmp_type}" in - "clean"|"distclean" ) - if [ -f "${cmp_make}" ]; then - echo - echo "compileNems :: Cleaning: make -f ${cmp_make} ${cmp_type} ${cmp_comp}" - eval "make ${cmp_verb} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - err=$? - - if [ "${cmp_type}" == "distclean" ]; then - rm -f NEMS/exe/NEMS-*.x - fi - else - echo "compileNems :: Cleaning: no makefile found: makefile = ${cmp_make}" - err=1 - fi - ;; - "build"|"compile" ) - if [ -f "${cmp_make}" ]; then - echo - echo "compileNems :: Compiling: make ${cmp_mjob} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - eval "make ${cmp_verb} ${cmp_mjob} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - err=$? - else - echo "compileNems :: Compiling: no makefile found: makefile = ${cmp_make}" - err=1 - fi - ;; - * ) err=0 ;; # Do nothing - esac - - return ${err} -} - -installNems() { - local cmp_comp icmp - local instdir - local CPBIN="/bin/cp -fpv" - local RMBIN="/bin/rm -fv" - - instdir="ALLBIN_INSTALL" - - cmp_comp="${COMPONENT}" - - [ ! -d "${instdir}" ] && mkdir -p ${instdir} - - for icmp in ${cmp_comp} - do - indir="${icmp}_INSTALL" - - if [ -d ${indir} ]; then - echo - echo " --- Installing from: ${indir} to ${instdir} ---" - ${CPBIN} ${indir}/* ${instdir}/ - fi - - ###### Extra ADCIRC files - if [ "${icmp}" == "ADCIRC" ]; then - echo - echo " --- Installing from: ${icmp} to ${instdir} ---" - for iprog in adcprep - do - prog="$( find ${icmp} -type f -name ${iprog} | head -1 )" - if [ -n "${prog:+1}" ]; then - ${CPBIN} ${prog} ${instdir}/ - fi - done - fi - ###### - done - - ###### Install the NEMS/exe/NEMS* files - echo - echo " --- Installing from: NEMS/exe to ${instdir} ---" - for iprog in NEMS/exe/NEMS-*.x - do - if [ -f "${iprog}" ]; then - ${CPBIN} ${iprog} ${instdir}/ - fi - done - - ###### Remove un-needed files from instdir - echo - echo " --- Removing files that are not needed from: ${instdir} ---" - ${RMBIN} ${instdir}/*.mk ${instdir}/*.mod -} diff --git a/scripts/functions_build.del b/scripts/functions_build.del deleted file mode 100644 index ebb69270..00000000 --- a/scripts/functions_build.del +++ /dev/null @@ -1,617 +0,0 @@ -#!/bin/bash-*-Shell-script-functions*- - -########################################################################### -### Author: Panagiotis Velissariou -### -### Version - 1.0 Fri Dec 04 2020 -########################################################################### - -set +u - -MY_COMPILING_SYTEMS="gnu, intel, pgi" - -MY_ATM_MODS="ATMESH WRF HWRF PAHM" -MY_OCN_MODS="ADCIRC SCHISM FVCOM ROMS" -MY_HYD_MODS="NWM" -MY_WAV_MODS="WW3DATA WW3" - -MY_COMPONENT_LIST="${MY_ATM_MODS} ${MY_OCN_MODS} ${MY_HYD_MODS} ${MY_WAV_MODS} " - -################################################## -### MODELLING SYSTEM BUILD FUNCTIONS -################################################## - -###======================================== -### ParseArgs() -### Usage: ParseArgs args -### Parameters: args = the script options -### Returns: 0 -### Echoes: NONE -### -### Gets the supplied options to the script. -###======================================== -ParseArgs() -{ - local nm_func=$( basename ${BASH_SOURCE[${#BASH_SOURCE[@]}-1]} ) - - local opt_all opt_opt opt_arg opt_chk - - local t_VAR - local ans0 ans ival intN - local all_evars - - all_evars="MY_CLEAN MY_COMPILER MY_COMPONENT MY_OS MY_PARMAKE MY_PLATFORM MY_VERBOSE" - - for ival in ${all_evars}; do unset __${ival}; done - - - __MY_CLEAN=0 - __MY_COMPILER=intel - __MY_COMPONENT="ADCIRC WW3DATA ATMESH" - __MY_OS= - __MY_PARMAKE=1 - __MY_PLATFORM= - __MY_VERBOSE= - - - # ----- - # Process the function options - opt_all=( c clean compiler component j os plat v verbose h help ) - opt_all=":$( echo "${opt_all[@]/#/-} ${opt_all[@]/#/--}" | sed 's/ /:/g' ):" - - unset __OPTION_LIST - while test $# -gt 0; do - case "${1}" in - -[^-]*=* | --[^-]*=* ) - opt_opt="$( toLOWER "$( echo "${1}" | sed 's/=.*//' )" )" - len=$(( ${#opt_opt} + 1 )) - opt_arg="$( strTrim "$( echo "${1:${len}}" )" 2 )" - [ "$( echo "${opt_all}" | egrep -o ":${opt_arg}:" )" ] && \ - opt_arg= - ;; - -[^-]* | --[^-]* ) - opt_opt="$( toLOWER "${1}" )" - opt_chk="$( toLOWER "$( echo "${2}" | sed 's/=.*//' )" )" - if [ "$( echo "${opt_all}" | egrep -o ":${opt_chk}:" )" ]; then - opt_arg= - else - opt_arg="$( strTrim "$( echo "${2}" )" )" - fi - ;; - *) - opt_opt= - opt_arg= - ;; - esac - - case "${opt_opt}" in - -c | --c | -clean | --clean ) - checkFuncOpt "--clean" - if [ $? -eq 0 ]; then - __MY_CLEAN=1 - if [ "X${opt_arg}" != "X" ]; then - if `isInteger "${opt_arg}"` ; then - __MY_CLEAN=$( echo "${opt_arg}" ) - [ ${opt_arg} -le -3 ] && __MY_CLEAN=-3 - [ ${opt_arg} -ge 2 ] && __MY_CLEAN=2 - else - __MY_CLEAN=0 - [ "$( getYesNo "${opt_arg}" )" = "yes" ] && __MY_CLEAN=1 - fi - fi - fi - ;; - -compiler | --compiler ) - checkFuncOpt "--compiler" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_COMPILER="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -component | --component ) - checkFuncOpt "--component" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_COMPONENT="$( strTrim "${opt_arg}" )" - fi - fi - ;; - -j | --j ) - checkFuncOpt "--j" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_PARMAKE=1 - t_VAR="$( getPosInteger "${opt_arg}" )" - [ ! -z "${t_VAR}" ] && __MY_PARMAKE=${t_VAR} - fi - fi - ;; - -os | --os ) - checkFuncOpt "--os" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_OS="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -plat | --plat ) - checkFuncOpt "--plat" - if [ $? -eq 0 ]; then - if [ "X${opt_arg}" != "X" ]; then - __MY_PLATFORM="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" - fi - fi - ;; - -v | --v | -verbose | --verbose ) - checkFuncOpt "--verbose" - if [ $? -eq 0 ]; then - __MY_VERBOSE=b - if [ "X${opt_arg}" != "X" ]; then - __MY_VERBOSE="$( echo "$( strTrim "${opt_arg}" 2 )" | sed 's/[[:space:]]/,/g' )" - fi - fi - ;; - -h | -help | --h | --help ) - UsageBuild ${nm_func} - ;; - *) ;; # DEFAULT - esac - shift - opt_opt= - opt_arg= - done - unset __OPTION_LIST - # ----- - - if [ -z "${__MY_OS}" ]; then - case "$(uname -s)" in - Darwin ) __MY_OS="macosx" ;; - Linux ) __MY_OS="linux" ;; - *) __MY_OS="UNDEFINED";; # DEFAULT - esac - fi - - # Export the values of all __* variables. - for ival in ${all_evars} - do - ans0="$( eval "echo \${$(echo ${ival}):-}" )" - ans="$( eval "echo \${$(echo __${ival}):-}" )" - ans=${ans:-${ans0:-}} - - eval "${ival}=\${ans}" - export ${ival} - - unset __${ival} - done - - return 0 -} - -UsageBuild() -{ - local nm="$( basename ${0} )" - - echo - echo "Usage: \"${nm}\" [{-|--}option1{=|space}[option_value1]] [{-|--}option2{=|space}[option_value2]] ..." - echo - - echo " -h|-help|--h|--help" - echo " Show this help screen." - echo - #--- - echo " -c|--c|-clean|--clean [=|space] \"0|1|yes|no\" (OPTIONAL)." - echo " Only clean the already compiled CMake build system." - echo " Default: 0|no." - echo - #--- - echo " -compiler|--compiler [=|space] \"compiling_system\" (OPTIONAL)." - echo " The compiling system to use (${MY_COMPILING_SYTEMS})." - echo " Default: intel." - echo - #--- - echo " -component|--component [=|space] \"component_list\" (OPTIONAL)." - echo " The component(s) to use (${MY_COMPONENT_LIST})." - echo " Default: \"ADCIRC WW3DATA ATMESH\"." - echo - #--- - echo " -j|--j [=|space] \"N\" (OPTIONAL)." - echo " Define the number of make jobs to run simultaneously." - echo " Default: 1." - echo - #--- - echo " -os|--os [=|space] \"OS string\" (OPTIONAL)." - echo " The name of the Operating system." - echo " Supported OSes: linux macosx." - echo " Default: current OS." - echo - #--- - echo " -plat|--plat [=|space] \"platform\" (OPTIONAL)." - echo " The name of the compute HPC platform to consider." - echo " Selecting a platform, environment modules specific to that platform are loaded" - echo " and corresponding environment variables are set." - echo " Supported platforms: cheyenne gaea hera jet orion stampede wcoss." - echo " Default: none." - echo - #--- - echo " -v|--v|-verbose|--verbose [=|space] \"a,b,v,i,j,m,n\" (any combination, OPTIONAL)." - echo " Enable verbosity in the make files during compilation." - echo " a (all) : all types of debugging output are enabled" - echo " n (none) : disable all debugging currently enabled" - echo " b (basic) : basic debugging and whether the build was successful or not" - echo " v (verbose) : a level above basic" - echo " i (implicit) : prints messages describing the implicit rule searches for each target" - echo " j (jobs) : prints messages giving details on the invocation of specific sub-commands" - echo " m (makefile) : enables messages while rebuilding makefiles" - echo " Default:none." - echo - #--- - - exit 0 -} - -###======================================== -### checkFuncOpt() -### Usage: checkFuncOpt opt_name -### Parameters: -### opt_name: The name of the option to a function -### -### Returns : Exits on error -### -### Exports : __OPTION_LIST -### -### Echoes : NONE -### -### checkFuncOpt: Checks if an option to a function is already supplied. -###======================================== -checkFuncOpt() { - local opt_inp opt_list - - [ $# -eq 0 ] && return -1 - - opt_inp="$( strTrim "${1}" 2 )" - opt_inp="$( echo "${opt_inp}" | sed 's/^[-]*//' )" - - opt_list="$( strTrim "${__OPTION_LIST}" 2 )" - [ -n ${opt_list:+1} ] && \ - opt_list=":$( echo "${opt_list}" | sed 's/ /:/g' ):" - - [ "$( echo "${opt_list}" | egrep -o ":${opt_inp}:" )" ] && return 1 - - __OPTION_LIST="${__OPTION_LIST} ${opt_inp}" - export __OPTION_LIST - - return 0 -} - -###======================================== -### isInteger() -### Usage: isInteger var -### Parameters: var -### Returns: 1 if var is not an integer (0 is an integer as well) -### 0 in any other case -### Echoes: NONE -###======================================== -isInteger() -{ - local -i retval=1 - - [ $# -eq 0 ] && return ${retval} - - if [ "${1:-UNDEF}" -eq "${1}" ] 2>/dev/null - then - retval=0 - fi - - return ${retval} -} - -###======================================== -### getInteger() -### Usage: getInteger int -### Parameters: int (int >=0 or, int < 0) -### Returns: 1 if var is not an integer -### 0 in any other case -### Echoes: int, if it is a valid integer (including 0), -### in any other case echoes an empty string -###======================================== -getInteger() -{ - local -i retval=0 - local echoval= minus= - - # strip spaces, '+' signs and '-' signs - # if the first character of the string is '-', set the minus variable - echoval="$( echo "${1}" | sed 's/[[:space:]+]//g' )" - [ "X$( echo "${echoval:0:1}" )" = "X-" ] && minus="-" - echoval="${minus}$( echo "${echoval}" | sed 's/[[:space:]-]//g' )" - - if isInteger ${echoval}; then - echoval="$(echo "scale=0; ${echoval} + 0" | bc -ql 2>/dev/null)" - retval=$? - echoval="${echoval:-0}" - else - echoval= - retval=1 - fi - - echo -n ${echoval} - - return ${retval} -} - -###======================================== -### getPosInteger() -### Usage: getPosInteger posint -### Parameters: posint (posint >= 0) -### Returns: 1 if var is not a positive integer -### 0 in any other case -### Echoes: posint if it is a valid positive integer -### (including 0), in any other case echoes an -### empty string -###======================================== -getPosInteger() -{ - local -i retval=0 - local echoval= - - echoval=$( getInteger "${1}" ) - retval=$? - - if [ ${retval} -ne 0 ] ; then - echoval= - retval=1 - else - if [ ${echoval} -lt 0 ]; then - echoval= - retval=1 - fi - fi - - echo -n ${echoval} - - return ${retval} -} - -###======================================== -### getYesNo() -### Usage: getYesNo value -### Parameters: -### value : The input value (the value of a parameter) -### The value of a bash parameter that is checked -### against TRUE/FALSE. If the value is one of: -### ">=1|y|yes|yea|yeah|yep" -### then the value of parameter is TRUE (answer = yes). -### If the value is one of: -### "<=0|n|no|not|nop|nope" -### then the value of parameter is FALSE (answer = no). -### If the value is empty then the value of parameter -### is FALSE (answer = no) -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : A "yes" or "no" answer. -### -### getYesNo: Checks if a parameter is assigned a TRUE/FALSE value. -###======================================== -getYesNo() -{ - local param answer - - param="$( echo "${1}" | tr '[:upper:]' '[:lower:]' )" - - if [ "${param}" -eq "${param}" ] 2>/dev/null - then - [ ${param} -le 0 ] && param=0 - [ ${param} -gt 0 ] && param=1 - fi - - case "${param}" in - 1|y|yes|yea|yeah|yep) answer="yes" ;; - 0|n|no|not|nop|nope) answer="no" ;; - *) answer="" ;; # DEFAULT - esac - - echo -n "${answer}" -} - -###======================================== -### toUPPER() -### Usage: toUPPER string -### Parameters: -### string : The string in to convert -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The input string converted to an all upper case string -### -### toUPPER: Converts a string to an all upper case string -###======================================== -function toUPPER() -{ - echo "${1}" | tr '[:lower:]' '[:upper:]' -} - -###======================================== -### toLOWER() -### Usage: toLOWER string -### Parameters: -### string : The string in to convert -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The input string converted to an all lower case string -### -### toLOWER: Converts a string to an all lower case string -###======================================== -function toLOWER() -{ - echo "${1}" | tr '[:upper:]' '[:lower:]' -} - -###======================================== -### strESC() -### Usage: strESC string -### Parameters: -### string : The input string -### The input string on which this function is applied -### to escape special characters used in bash/sed ... -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : The modified string with its special characters escaped -### -### strESC: Escapes special characters in a string: "'()/[]*. -###======================================== -strESC() -{ - echo -n "$( echo "${*}" | sed -e "s/[\"\'\(\)\/\*\!]/\\\&/g;s/\[/\\\&/g;s/\]/\\\&/g" )" -} - -strESC1() -{ - echo -n "$( echo "${*}" | sed -e "s/[\&\/\*\!]/\\\&/g;s/\[/\\\&/g;s/\]/\\\&/g" )" -} - -###======================================== -### strTrim() -### Usage: strTrim s1 flag -### Parameters: -### s1 : The input string -### flag : Integer -### A value that controls the action of strTrim. -### If flag is zero or not present, trailing blanks are removed. -### Leading blanks are removed if it is equal to 1. -### Both are removed if it is equal to 2. -### In any other case, trailing blanks are removed. -### -### Returns : NONE -### -### Exports : NONE -### -### Echoes : s1 with all leading and/or trailing -### white spaces removed. -### -### strTrim: Removes all leading and/or trailing white spaces -### from the input string -###======================================== -function strTrim () -{ - local trimFLG="${2:-0}" - local out_str= - - case ${trimFLG} in - 0) out_str="$(echo "${1}" | sed 's/[[:space:]]*$//')" ;; - 1) out_str="$(echo "${1}" | sed 's/^[[:space:]]*//')" ;; - 2) out_str="$(echo "${1}" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" ;; - *) out_str="$(echo "${1}" | sed 's/[[:space:]]*$//')" ;; - esac - - echo -n ${out_str} -} - -compileNems() { - local cmp_type cmp_make cmp_comp cmp_mjob - local err=0 - - [ $# -eq 0 ] && return ${err} - - cmp_type="$( toLOWER "${1}" )" - cmp_make=GNUmakefile - cmp_comp="${COMPONENT:+COMPONENTS=\"${COMPONENT}\"}" - cmp_mjob="${PARMAKE:+-j ${PARMAKE}}" - cmp_verb="${VERBOSE:+--debug=${VERBOSE}}" - - case "${cmp_type}" in - "clean"|"distclean" ) - if [ -f "${cmp_make}" ]; then - echo - echo "compileNems :: Cleaning: make -f ${cmp_make} ${cmp_type} ${cmp_comp}" - eval "make ${cmp_verb} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - err=$? - - if [ "${cmp_type}" == "distclean" ]; then - rm -f NEMS/exe/NEMS-*.x - fi - else - echo "compileNems :: Cleaning: no makefile found: makefile = ${cmp_make}" - err=1 - fi - ;; - "build"|"compile" ) - if [ -f "${cmp_make}" ]; then - echo - echo "compileNems :: Compiling: make ${cmp_mjob} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - eval "make ${cmp_verb} ${cmp_mjob} -f ${cmp_make} ${cmp_type} ${cmp_comp}" - err=$? - else - echo "compileNems :: Compiling: no makefile found: makefile = ${cmp_make}" - err=1 - fi - ;; - * ) err=0 ;; # Do nothing - esac - - return ${err} -} - -installNems() { - local cmp_comp icmp - local instdir - local CPBIN="/bin/cp -fpv" - local RMBIN="/bin/rm -fv" - - instdir="ALLBIN_INSTALL" - - cmp_comp="${COMPONENT}" - - [ ! -d "${instdir}" ] && mkdir -p ${instdir} - - for icmp in ${cmp_comp} - do - indir="${icmp}_INSTALL" - - if [ -d ${indir} ]; then - echo - echo " --- Installing from: ${indir} to ${instdir} ---" - ${CPBIN} ${indir}/* ${instdir}/ - fi - - ###### Extra ADCIRC files - if [ "${icmp}" == "ADCIRC" ]; then - echo - echo " --- Installing from: ${icmp} to ${instdir} ---" - for iprog in adcprep - do - prog="$( find ${icmp} -type f -name ${iprog} | head -1 )" - if [ -n "${prog:+1}" ]; then - ${CPBIN} ${prog} ${instdir}/ - fi - done - fi - ###### - done - - ###### Install the NEMS/exe/NEMS* files - echo - echo " --- Installing from: NEMS/exe to ${instdir} ---" - for iprog in NEMS/exe/NEMS-*.x - do - if [ -f "${iprog}" ]; then - ${CPBIN} ${iprog} ${instdir}/ - fi - done - - ###### Remove un-needed files from instdir - echo - echo " --- Removing files that are not needed from: ${instdir} ---" - ${RMBIN} ${instdir}/*.mk ${instdir}/*.mod -} From a7b2ef0a138b8acf31a42559ed61732b1cf861fe Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 29 Jun 2021 11:37:12 -0500 Subject: [PATCH 20/96] updated the modulefile for intel in orion --- modulefiles/envmodules_intel.orion | 9 ++--- modulefiles/envmodules_intel.orion.orig | 44 +++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 modulefiles/envmodules_intel.orion.orig diff --git a/modulefiles/envmodules_intel.orion b/modulefiles/envmodules_intel.orion index 54e200cd..f859873d 100644 --- a/modulefiles/envmodules_intel.orion +++ b/modulefiles/envmodules_intel.orion @@ -15,11 +15,12 @@ #################### ### (1) Load all needed environment modules. module purge -module load intel impi -module load szip hdf5 -module load netcdf +module load cmake +module load intel/2019.5 impi +module load szip hdf5/1.10.5-parallel +module load netcdf/4.7.2-parallel -module load esmf +module load esmf/7.1.0r #################### diff --git a/modulefiles/envmodules_intel.orion.orig b/modulefiles/envmodules_intel.orion.orig new file mode 100644 index 00000000..54e200cd --- /dev/null +++ b/modulefiles/envmodules_intel.orion.orig @@ -0,0 +1,44 @@ +#!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + +# 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 intel impi +module load szip hdf5 +module load netcdf + +module load esmf + + +#################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs + + +########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} +export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} +export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} + +export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## From 6e051bc1e70a0bf4364a48ae1f265091e9751eda Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 29 Jun 2021 11:38:43 -0500 Subject: [PATCH 21/96] updated the build and function scripts --- build.sh | 2 +- scripts/build.sh | 295 ++++++++++++++++++++++++++++++++++++++++ scripts/functions_build | 25 +++- 3 files changed, 319 insertions(+), 3 deletions(-) create mode 100755 scripts/build.sh diff --git a/build.sh b/build.sh index 7def0452..8538245c 120000 --- a/build.sh +++ b/build.sh @@ -1 +1 @@ -scripts/build-v1.1.sh \ No newline at end of file +scripts/build.sh \ No newline at end of file diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 00000000..5f58661c --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,295 @@ +#!/bin/bash + +########################################################################### +### Author: Panagiotis Velissariou +### +### Version - 1.1 +### +### 1.1 Wed Apr 14 2021 +### 1.0 Fri Dec 04 2020 +########################################################################### + + +###==================== +# Make sure that the current working directory is in the PATH +[[ ! :$PATH: == *:".":* ]] && export PATH="${PATH}:." + + +# Get the directory where the script is located +if [[ $(uname -s) == Darwin ]]; then + readonly scrNAME="$( grealpath -s "${BASH_SOURCE[0]}" )" + readonly scrDIR="$(cd "$(dirname "${scrNAME}" )" && pwd -P)" +else + readonly scrNAME="$( realpath -s "${BASH_SOURCE[0]}" )" + readonly scrDIR="$(cd "$(dirname "$(realpath -s "${BASH_SOURCE[0]}")" )" && pwd -P)" +fi + +funcs="$( find ${scrDIR} -type f -name "functions_build" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" +else + echo " ### ERROR :: in ${scrNAME}" + echo " Cannot load the required file: ${funcs}" + echo " Exiting now ..." + echo + exit 1 +fi + +unset funcs +###==================== + + +######### +# Call ParseArgs to get the user input. +ParseArgs "${@}" + + +########## +# Set the variables for this script +CLEAN=${MY_CLEAN:-0} + +[ -n "${MY_COMPILER:+1}" ] && COMPILER="$( toLOWER "$( basename "${MY_COMPILER}" )" )" + +[ -n "${MY_COMPONENT:+1}" ] && COMPONENT="$( toUPPER "${MY_COMPONENT}" )" + +PARALLEL=${MY_PARALLEL:-1} +export NEMS_PARALLEL=${PARALLEL} + +[ -n "${MY_OS:+1}" ] && OS="$( toLOWER "${MY_OS}" )" +if [ -n "${MY_PLATFORM:+1}" ]; then + PLATFORM="$( toLOWER "${MY_PLATFORM}" )" +else + PLATFORM="${OS}" +fi +export NEMS_PLATFORM=${PLATFORM} +export MACHINE_ID=${PLATFORM} +export FULL_MACHINE_ID=${PLATFORM} + + +[ "${MY_PARMAKE:0}" -gt 1 ] && PARMAKE=${MY_PARMAKE} + +[ -n "${MY_VERBOSE:+1}" ] && VERBOSE="$( toLOWER "${MY_VERBOSE}" )" + +modFILE="envmodules${COMPILER:+_${COMPILER}}${PLATFORM:+.${PLATFORM}}" + +# Customize the NEMS.x filename to include the component names +if [ -n "${COMPONENT:+1}" ]; then + compFNAME="$( strTrim "$( toLOWER "${COMPONENT}" )" )" + compFNAME="$( echo "${compFNAME}" | sed 's/ /_/g' )" +fi + +# Export some environment variables for NEMS and for other models +export NEMS_COMPILER=${COMPILER} +########## + + +########## +# Get the project directories and perform a basic check on them +readonly nemsDIR="${NEMS_DIR:-${scrDIR}/NEMS}" +if [ ! -f "${nemsDIR}/NEMSAppBuilder" ]; then + echo "The project directory \"${nemsDIR}\" does not appear to contain NEMSAppBuilder." + echo "Is this the correct NEMS directory?" + echo "You might need to set the environment variable NEMS_DIR before running this script." + echo "Exiting ..." + exit 1 +fi + +readonly modDIR="${NEMSMODS_DIR:-${scrDIR}/modulefiles}" +if [ ! -f "${modDIR}/${modFILE}" ]; then + echo + echo "The modulefiles directory \"${modDIR}\" does not appear to contain the module file: ${modFILE}." + echo "Is this the correct \"modulefiles\" directory?" + echo "You might need to set the environment variable \"NEMSMODS_DIR\" to point to a custom modulefiles directory before running this script." + echo "Exiting ..." + echo + exit 1 +fi +########## + + +########## +# If the user requested to clean the build folder, do the cleaning end exit +if [ ${CLEAN:-0} -ge 1 ]; then + echo "User requested to only clean the project. Cleaning ..." + + pushd ${nemsDIR} >/dev/null 2>&1 + [ ${CLEAN:-0} -eq 1 ] && compileNems clean + [ ${CLEAN:-0} -eq 2 ] && compileNems distclean + popd >/dev/null 2>&1 + + exit 0 +fi +########## + + +########## +# Get the compilers to use for this project compilation +case "${COMPILER}" in + gnu) + CC=gcc + CXX=g++ + FC=gfortran + F90=gfortran + PCC=mpicc + PCXX=mpicxx + PFC=mpif90 + PF90=mpif90 + ;; + intel) + CC=icc + CXX=icpc + FC=ifort + F90=ifort + PCC=mpiicc + PCXX=mpiicpc + PFC=mpiifort + PF90=mpiifort + ;; + pgi) + CC=pgcc + CXX=pgc++ + FC=pgfortran + F90=pgfortran + PCC=pgcc + PCXX=pgc++ + PFC=pgfortran + PF90=pgfortran + ;; + *) # No defaults. Give the user the option to define the environment variables + # CC, CXX, FC, F90 before running this script. + #echo "WARNING: The supplied compiling system \"${COMPILER}\", is not suported." + #echo " Supported systems are anyone of: compiling_system=[${MY_COMPILING_SYTEMS}]" + #echo " Use: --compiler=compiling_system." + #echo " Will continue with OS defaults." + CC=${CC:-} + CXX=${CXX:-} + FC=${FC:-} + F90=${F90:-} + PCC=${CC:-} + PCXX=${CXX:-} + PFC=${FC:-} + PF90=${F90:-} + ;; +esac + +export CC CXX FC F90 PCC PCXX PFC PF90 +########## + + +########## +# Source the environment module +source ${modDIR}/${modFILE} + +component_ww3="$( echo "${COMPONENT}" | sed 's/ /:/g' )" +if [[ :${component_ww3}: == *:"WW3":* ]]; then + export WW3_CONFOPT="${COMPILER}" + export WW3_COMP="${COMPILER}" + export WWATCH3_NETCDF=NC4 +fi +########## + + +########## +# Get a final user response for the variables +echo +echo "The following variables are defined:" +echo " CLEAN = ${CLEAN}" +echo " COMPILER = ${COMPILER:-Undefined, Supported values are: [${MY_COMPILING_SYTEMS}]}" +echo " NEMS_COMPILER = ${NEMS_COMPILER}" +echo " NEMS_PARALLEL = ${PARALLEL:-0}" +echo " CC = ${CC:-UNDEF}" +echo " CXX = ${CXX:-UNDEF}" +echo " FC = ${FC:-UNDEF}" +echo " F90 = ${F90:-UNDEF}" +echo " PCC = ${PCC:-UNDEF}" +echo " PCXX = ${PCXX:-UNDEF}" +echo " PFC = ${PFC:-UNDEF}" +echo " PF90 = ${PF90:-UNDEF}" +echo " MODULES FILE = ${modFILE}" +if [[ :${component_ww3}: == *:"WW3":* ]]; then + echo " WW3_CONFOPT = ${WW3_CONFOPT}" + echo " WW3_COMP = ${WW3_COMP}" + echo " WWATCH3_NETCDF = ${WWATCH3_NETCDF}" +fi +echo " COMPONENTS = ${COMPONENT:-Undefined, Supported values are: [${MY_COMPONENT_LIST}]}" +echo " OS = ${OS}" +echo " PLATFORM = ${PLATFORM}" +echo " MACHINE_ID = ${MACHINE_ID}" +echo " FULL_MACHINE_ID= ${FULL_MACHINE_ID}" +echo " VERBOSE = ${VERBOSE}" +echo +echo " HDF5HOME = ${HDF5HOME}" +echo " NETCDFHOME = ${NETCDFHOME}" +echo " NETCDF_INCDIR = ${NETCDF_INCDIR}" +echo " NETCDF_LIBDIR = ${NETCDF_LIBDIR}" +echo +echo " ESMFMKFILE = ${ESMFMKFILE}" +echo + +module list + + +echo_response= +while [ -z "${echo_response}" ] ; do + echo -n "Are these values correct? [y/n]: " + read echo_response + echo_response="$( getYesNo "${echo_response}" )" +done + +if [ "${echo_response:-no}" = "no" ]; then + echo + echo "User responded: ${echo_response}" + echo "Exiting now ..." + echo + exit 1 +fi + +unset echo_response +########## + + +############################################################ +### START THE CALCULATIONS +############################################################ + +########## +# Compile the project +compileERR=0 +pushd ${nemsDIR} >/dev/null 2>&1 + case ${CLEAN:-0} in + -1 ) + compileNems clean + compileERR=$? + ;; + -2 ) + compileNems distclean + compileERR=$? + ;; + -3 ) + compileNems noclean + compileERR=$? + ;; + * ) + compileNems clean + compileERR=$? + ;; + esac + + if [ ${compileERR} -eq 0 ]; then + compileNems build + compileERR=$? + fi + + if [ ${compileERR} -eq 0 ]; then + if [ -f exe/NEMS.x ]; then + cp -p exe/NEMS.x exe/NEMS${compFNAME:+-${compFNAME}}.x + fi + fi +popd >/dev/null 2>&1 + +########## +# Install all data, executables, libraries in a common directory +[ ${compileERR:-0} -eq 0 ] && installNems +########## + +exit 0 diff --git a/scripts/functions_build b/scripts/functions_build index 80bf70c8..aecfaa03 100644 --- a/scripts/functions_build +++ b/scripts/functions_build @@ -41,7 +41,7 @@ ParseArgs() local ans0 ans ival intN local all_evars - all_evars="MY_CLEAN MY_COMPILER MY_COMPONENT MY_OS MY_PARMAKE MY_PLATFORM MY_VERBOSE" + all_evars="MY_CLEAN MY_COMPILER MY_COMPONENT MY_OS MY_PARALLEL MY_PARMAKE MY_PLATFORM MY_VERBOSE" for ival in ${all_evars}; do unset __${ival}; done @@ -50,6 +50,7 @@ ParseArgs() __MY_COMPILER=intel __MY_COMPONENT="ADCIRC WW3DATA ATMESH" __MY_OS= + __MY_PARALLEL=1 __MY_PARMAKE=1 __MY_PLATFORM=linux __MY_VERBOSE= @@ -57,7 +58,7 @@ ParseArgs() # ----- # Process the function options - opt_all=( c clean compiler component j os plat v verbose h help ) + opt_all=( c clean compiler component j par parallel os plat v verbose h help ) opt_all=":$( echo "${opt_all[@]/#/-} ${opt_all[@]/#/--}" | sed 's/ /:/g' ):" unset __OPTION_LIST @@ -128,6 +129,21 @@ ParseArgs() fi fi ;; + -par | --par | -parallel | --parallel ) + checkFuncOpt "--parallel" + if [ $? -eq 0 ]; then + __MY_PARALLEL=1 + if [ "X${opt_arg}" != "X" ]; then + if `isInteger "${opt_arg}"` ; then + __MY_PARALLEL=0 + [ ${opt_arg} -ge 1 ] && __MY_PARALLEL=1 + else + __MY_PARALLEL=0 + [ "$( getYesNo "${opt_arg}" )" = "yes" ] && __MY_PARALLEL=1 + fi + fi + fi + ;; -os | --os ) checkFuncOpt "--os" if [ $? -eq 0 ]; then @@ -221,6 +237,11 @@ UsageBuild() echo " Default: 1." echo #--- + echo " -par|--par|-parallel|--parallel [=|space] \"0|1|yes|no\" (OPTIONAL)." + echo " Activate the use of parallel compilers." + echo " Default: 1|yes." + echo + #--- echo " -os|--os [=|space] \"OS string\" (OPTIONAL)." echo " The name of the Operating system." echo " Supported OSes: linux macosx." From 753b95f9dcda50406fc36afd0c1169bb01ebf00b Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 29 Jun 2021 12:03:43 -0500 Subject: [PATCH 22/96] modified the build script to find the functions_build file; in some systems was failing to find it --- scripts/build.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 5f58661c..f8c77b8b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -24,18 +24,27 @@ else readonly scrDIR="$(cd "$(dirname "$(realpath -s "${BASH_SOURCE[0]}")" )" && pwd -P)" fi -funcs="$( find ${scrDIR} -type f -name "functions_build" | head -n 1 )" -if [ -f "${funcs}" ]; then +lst="${scrDIR}/functions_build ${scrDIR}/scripts/functions_build functions_build " +funcs= +for ilst in ${lst} +do + if [ -f "${ilst:-}" ]; then + funcs="${ilst}" + break + fi +done + +if [ -n "${funcs:+1}" ]; then source "${funcs}" else echo " ### ERROR :: in ${scrNAME}" - echo " Cannot load the required file: ${funcs}" + echo " Cannot load the required file: functions_build" echo " Exiting now ..." echo exit 1 fi -unset funcs +unset ilst funcs ###==================== From f15e3cf95c299d86104f71ce3a5f2b839e511d27 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 29 Jun 2021 12:30:41 -0500 Subject: [PATCH 23/96] modified PAHM build scripts --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 1df019bd..393b530f 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 1df019bde4a554a902e4cb1a87e33587726c323f +Subproject commit 393b530f8b9a3049bab17bd9382b981827672e1c From 5f9211ec80c7f9dd318b50da119f10fece7c8382 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 29 Jun 2021 13:05:49 -0500 Subject: [PATCH 24/96] updates PaHM build scripts --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 393b530f..0a786a54 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 393b530f8b9a3049bab17bd9382b981827672e1c +Subproject commit 0a786a54946da38c17d1dc83099a60edf4484ac8 From 0b8687d2587c5bb0abfabbe3b94ef460198fec51 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Tue, 29 Jun 2021 20:18:41 +0000 Subject: [PATCH 25/96] update modules --- modulefiles/envmodules_intel.hera | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modulefiles/envmodules_intel.hera b/modulefiles/envmodules_intel.hera index 01c8e036..bfe1f30c 100644 --- a/modulefiles/envmodules_intel.hera +++ b/modulefiles/envmodules_intel.hera @@ -21,7 +21,7 @@ module load szip module use /home/emc.nemspara/SOFT-hera/modulefiles module load hdf5_parallel/1.10.6.release module load netcdf_parallel/4.7.4.release -module load esmf/8.1.0bs36g +module load esmf/8.1.0bs25g_ParallelNetCDF.release ################### From 6182a705a58f486070858e685ad95db4bcdf7723 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Tue, 29 Jun 2021 20:19:52 +0000 Subject: [PATCH 26/96] updated submodules --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index c6a1a7bd..6bcb2ce9 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit c6a1a7bdd8c2fbdc2c7cb84163bbc81800fc6207 +Subproject commit 6bcb2ce9abc8a90ae6a74130ebd4e2af6b83c4a9 From 31d39ae46a24ed1f28d3d6fcd0a2ecdca94eeb98 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 29 Jun 2021 16:33:03 -0500 Subject: [PATCH 27/96] fixed the build script to allow the user to define customized names for the parallel compilers --- scripts/build.sh | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index f8c77b8b..26ed7c02 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -112,6 +112,9 @@ if [ ! -f "${modDIR}/${modFILE}" ]; then echo "Exiting ..." echo exit 1 +else + # Source the environment module + source ${modDIR}/${modFILE} fi ########## @@ -139,30 +142,30 @@ case "${COMPILER}" in CXX=g++ FC=gfortran F90=gfortran - PCC=mpicc - PCXX=mpicxx - PFC=mpif90 - PF90=mpif90 + PCC=${PCC:-mpicc} + PCXX=${PCXX:-mpicxx} + PFC=${PFC:-mpif90} + PF90=${PF90:-${PFC}} ;; intel) CC=icc CXX=icpc FC=ifort F90=ifort - PCC=mpiicc - PCXX=mpiicpc - PFC=mpiifort - PF90=mpiifort + PCC=${PCC:-mpiicc} + PCXX=${PCXX:-mpiicpc} + PFC=${PFC:-mpiifort} + PF90=${PF90:-${PFC}} ;; pgi) CC=pgcc CXX=pgc++ FC=pgfortran F90=pgfortran - PCC=pgcc - PCXX=pgc++ - PFC=pgfortran - PF90=pgfortran + PCC=${PCC:-pgcc} + PCXX=${PCXX:-pgc++} + PFC==${PFC:-pgfortran} + PF90=${PF90:-${PFC}} ;; *) # No defaults. Give the user the option to define the environment variables # CC, CXX, FC, F90 before running this script. @@ -186,9 +189,6 @@ export CC CXX FC F90 PCC PCXX PFC PF90 ########## -# Source the environment module -source ${modDIR}/${modFILE} - component_ww3="$( echo "${COMPONENT}" | sed 's/ /:/g' )" if [[ :${component_ww3}: == *:"WW3":* ]]; then export WW3_CONFOPT="${COMPILER}" @@ -234,6 +234,10 @@ echo " NETCDF_LIBDIR = ${NETCDF_LIBDIR}" echo echo " ESMFMKFILE = ${ESMFMKFILE}" echo +echo "NOTE: If the parallel compiler names are different in your platform, you may pass one or more" +echo " of the environment variables: PCC, PCXX, PFC, PF90 to $(basename ${scrNAME}) and run the script as:" +echo " PCC=yourPCC PCXX=yourPCXX PFC=yourPFC PF90=yourPF90 $(basename ${scrNAME}) [options]" +echo module list From 6eec4068a636462f000fb5f1fdd0721fe388e5b7 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 29 Jun 2021 23:00:02 -0500 Subject: [PATCH 28/96] fixed functions_build to remove NEMS/exe/NEMS*.x if requested --- NEMS | 2 +- scripts/functions_build | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/NEMS b/NEMS index 6bcb2ce9..c6a1a7bd 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit 6bcb2ce9abc8a90ae6a74130ebd4e2af6b83c4a9 +Subproject commit c6a1a7bdd8c2fbdc2c7cb84163bbc81800fc6207 diff --git a/scripts/functions_build b/scripts/functions_build index aecfaa03..4c425a21 100644 --- a/scripts/functions_build +++ b/scripts/functions_build @@ -559,9 +559,8 @@ compileNems() { echo "compileNems :: Cleaning: make -f ${cmp_make} ${cmp_type} ${cmp_comp}" eval "make ${cmp_verb} -f ${cmp_make} ${cmp_type} ${cmp_comp}" err=$? - - if [ "${cmp_type}" == "distclean" ]; then - rm -f NEMS/exe/NEMS-*.x + if [ "${cmp_type}" = "distclean" ]; then + rm -fv exe/NEMS*.x fi else echo "compileNems :: Cleaning: no makefile found: makefile = ${cmp_make}" From d4ab5ab7c06395c2e8dd1ec97cc082f9e0cc1e18 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 29 Jun 2021 23:39:10 -0500 Subject: [PATCH 29/96] modified component_ADCIRC.mk so distclean cleans properly the nuopc folder --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index c6a1a7bd..979726d1 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit c6a1a7bdd8c2fbdc2c7cb84163bbc81800fc6207 +Subproject commit 979726d17287496fe40277f9f474ef2ce5659a3d From 6cd4aac77c91fab5cab704985d87e6b527300eb3 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Wed, 30 Jun 2021 12:30:12 +0000 Subject: [PATCH 30/96] updated submodule --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index 979726d1..6bcb2ce9 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit 979726d17287496fe40277f9f474ef2ce5659a3d +Subproject commit 6bcb2ce9abc8a90ae6a74130ebd4e2af6b83c4a9 From 7be503f24f81f412fdfa3c850a38c9088a64799c Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Wed, 30 Jun 2021 19:58:21 +0000 Subject: [PATCH 31/96] updated ESMF to latest parallel build --- modulefiles/envmodules_intel.hera | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modulefiles/envmodules_intel.hera b/modulefiles/envmodules_intel.hera index 37e88778..fb958359 100644 --- a/modulefiles/envmodules_intel.hera +++ b/modulefiles/envmodules_intel.hera @@ -12,7 +12,7 @@ module load szip module use /home/emc.nemspara/SOFT-hera/modulefiles module load hdf5_parallel/1.10.6.release module load netcdf_parallel/4.7.4.release -module load esmf/8.0.1_ParallelNetCDF.release +module load esmf/8.1.0bs25g_ParallelNetCDF.release #################### From 1cd93e4677771a7c80947475d8296ed1663a534c Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 1 Jul 2021 00:04:15 -0500 Subject: [PATCH 32/96] updated the envmodules_*.linux files to load the proper modules --- modulefiles/envmodules_gnu.linux | 5 ++++- modulefiles/envmodules_intel.linux | 3 +++ modulefiles/envmodules_pgi.linux | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modulefiles/envmodules_gnu.linux b/modulefiles/envmodules_gnu.linux index f9656175..0e1e7a75 100644 --- a/modulefiles/envmodules_gnu.linux +++ b/modulefiles/envmodules_gnu.linux @@ -15,7 +15,7 @@ #################### ### (1) Load all needed environment modules. module purge -module load intel impi +module load gnu openmpi #module load szip hdf5 module load netcdf @@ -36,6 +36,9 @@ unset funcs ########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +# Is this needed in all systems? +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} diff --git a/modulefiles/envmodules_intel.linux b/modulefiles/envmodules_intel.linux index f9656175..1fd5d2e2 100644 --- a/modulefiles/envmodules_intel.linux +++ b/modulefiles/envmodules_intel.linux @@ -36,6 +36,9 @@ unset funcs ########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +# Is this needed in all systems? +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} diff --git a/modulefiles/envmodules_pgi.linux b/modulefiles/envmodules_pgi.linux index 62023864..ef274df9 100644 --- a/modulefiles/envmodules_pgi.linux +++ b/modulefiles/envmodules_pgi.linux @@ -14,7 +14,7 @@ #################### ### (1) Load all needed environment modules. module purge -module load intel impi +module load pgi openmpi #module load szip hdf5 module load netcdf @@ -35,6 +35,9 @@ unset funcs ########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## +# Is this needed in all systems? +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} From 33c172b0d62695fd68ac4aee4954a566ea52a269 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 1 Jul 2021 00:08:17 -0500 Subject: [PATCH 33/96] fixed the gnu configure file to include the correct compilers and compiler flags --- conf/configure.nems.linux.gnu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/configure.nems.linux.gnu b/conf/configure.nems.linux.gnu index 25736922..84c33b55 100644 --- a/conf/configure.nems.linux.gnu +++ b/conf/configure.nems.linux.gnu @@ -34,7 +34,7 @@ EXTLIBS_POST = $(NEMSIO_LIB) \ $(SYS_LIB) ### FC = mpif90 -g -ffree-line-length-none -fno-range-check -fbacktrace -F77 = mpiifort -g -ffree-line-length-none -fno-range-check -fbacktrace +F77 = mpifort -g -ffree-line-length-none -fno-range-check -fbacktrace FREE = -free FIXED = -fixed R8 = -r8 @@ -42,7 +42,7 @@ R8 = -r8 FINCS = $(ESMF_INC) $(NEMSIO_INC) $(NETCDF_INC) #TRAPS = ??? -FFLAGS = $(TRAPS) $(FINCS) -fp-model strict +FFLAGS = $(TRAPS) $(FINCS) OPTS_NMM = -g -ffree-line-length-none -fno-range-check -fbacktrace $(FREE) From a9e3b6a8b9c1439f967d14b34039b782a75fedb6 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 1 Jul 2021 00:13:57 -0500 Subject: [PATCH 34/96] fixed make_nuopc.sh to set the compiler variable correctly --- ADCIRC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADCIRC b/ADCIRC index 21341677..03a66705 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit 21341677cac14dece960623b5a5b74323339fae9 +Subproject commit 03a667052a2c79b6465017ef64adfd61543828c0 From 4b00454d8532e22a77eb430c53ac1667ff4f7649 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 1 Jul 2021 00:16:59 -0500 Subject: [PATCH 35/96] minor fix of module_EARTH_GRID_COMP.F90 line 2956 to comile with gfortran --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index 6bcb2ce9..979726d1 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit 6bcb2ce9abc8a90ae6a74130ebd4e2af6b83c4a9 +Subproject commit 979726d17287496fe40277f9f474ef2ce5659a3d From 8c065d8d3db94f9782c0f80b98f662f411589896 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 1 Jul 2021 00:20:21 -0500 Subject: [PATCH 36/96] fix module_EARTH_GRID_COMP.F90 to compile with gfortran --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index 979726d1..3a8ada49 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit 979726d17287496fe40277f9f474ef2ce5659a3d +Subproject commit 3a8ada492f27d9865babf0f13f0232a7e4b31b99 From 17d50cbb21833d23238d2065befd5cc0016f2589 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 1 Jul 2021 00:22:32 -0500 Subject: [PATCH 37/96] fix component_ADCIRC.mk to pass the correct compiler option to make_nuopc.sh script --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index 3a8ada49..d0a3fa8f 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit 3a8ada492f27d9865babf0f13f0232a7e4b31b99 +Subproject commit d0a3fa8fe755ae82433589b68aaf008decd3ab10 From 14478a4f9e9e8a1b548602e003864acd230065de Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 5 Jul 2021 14:16:56 -0500 Subject: [PATCH 38/96] fix the find command in functions_build --- scripts/functions_build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/functions_build b/scripts/functions_build index 4c425a21..36452210 100644 --- a/scripts/functions_build +++ b/scripts/functions_build @@ -612,7 +612,8 @@ installNems() { echo " --- Installing from: ${icmp} to ${instdir} ---" for iprog in adcprep do - prog="$( find ${icmp} -type f -name ${iprog} | head -1 )" + prog="$( find -L ${icmp} -type f -name ${iprog} | head -1 )" + if [ -n "${prog:+1}" ]; then ${CPBIN} ${prog} ${instdir}/ fi @@ -624,7 +625,7 @@ installNems() { ###### Install the NEMS/exe/NEMS* files echo echo " --- Installing from: NEMS/exe to ${instdir} ---" - for iprog in NEMS/exe/NEMS-*.x + for iprog in NEMS/exe/NEMS*.x do if [ -f "${iprog}" ]; then ${CPBIN} ${iprog} ${instdir}/ From 38726d6376334d855fe9338f1978cea38948cd31 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 5 Jul 2021 14:20:17 -0500 Subject: [PATCH 39/96] fixed the compiler option to user the NEM_COMPILER variable --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index d0a3fa8f..f865e662 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit d0a3fa8fe755ae82433589b68aaf008decd3ab10 +Subproject commit f865e66270a6bd1845781bd2a3da1267bd47b83c From c6d21dc60c44aacef8d6430af67d1f529c7ad97e Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 5 Jul 2021 14:24:34 -0500 Subject: [PATCH 40/96] fixed MPI_FINALIZE error in adc_cap.F90 and gnu/intel compile errors in makefile.adc_cap.nuopc --- ADCIRC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADCIRC b/ADCIRC index 03a66705..b86047f9 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit 03a667052a2c79b6465017ef64adfd61543828c0 +Subproject commit b86047f9eaf6147763b30aab8a6ae7193d67f8cc From 1c487bea72a750f266d2dcc1dae30e284771d7ed Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 5 Jul 2021 14:26:47 -0500 Subject: [PATCH 41/96] fix gnu/intel/pgi compilation options in estofs_tide_fac/makefile --- ADCIRC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADCIRC b/ADCIRC index b86047f9..b7c8232f 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit b86047f9eaf6147763b30aab8a6ae7193d67f8cc +Subproject commit b7c8232fb300d6e9bb831c72a2689c3c2a34e0de From 6da5f125f332af35b7a0fe3d03bb626a5870a3c3 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Tue, 6 Jul 2021 15:18:13 +0000 Subject: [PATCH 42/96] update submodule to point to merge commit for release/public-v2 on upstream NEMS --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index f865e662..ce60e685 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit f865e66270a6bd1845781bd2a3da1267bd47b83c +Subproject commit ce60e68530f71600017dd822412f02b77a17656c From 0ca4928918b96875757e9b8bf8c98b9e9902b191 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 6 Jul 2021 10:34:58 -0500 Subject: [PATCH 43/96] fixed work/makefile to delete the util directory on make clean --- ADCIRC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADCIRC b/ADCIRC index b7c8232f..ea23e395 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit b7c8232fb300d6e9bb831c72a2689c3c2a34e0de +Subproject commit ea23e395eac6f831950024e2b00d35038305c0e7 From 690f97bb68773a88c58d38edaa0cadc7b2ffb606 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 12 Jul 2021 11:43:17 -0500 Subject: [PATCH 44/96] updated the control files to include NetCDF file compression --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 0a786a54..99513867 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 0a786a54946da38c17d1dc83099a60edf4484ac8 +Subproject commit 99513867239349858841801d6f65279edf2ad8e4 From 3b15df8a62dd5bd7647fd438fffcf19e8b2abeea Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 12 Jul 2021 11:59:11 -0500 Subject: [PATCH 45/96] changed file permissions and made some minor format updates in atmesh.F90 --- ATMESH | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ATMESH b/ATMESH index da054839..7aab919a 160000 --- a/ATMESH +++ b/ATMESH @@ -1 +1 @@ -Subproject commit da054839ce8277049413bcdcd84a98952095952c +Subproject commit 7aab919a12b165cf9a65498d566575cd86659cbc From 05351dd1fd5eacbeaf1314c4f7129d97a8bbf3d2 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 12 Jul 2021 12:28:38 -0500 Subject: [PATCH 46/96] modified sources for NUOPC coupling (option NWS=17) --- ADCIRC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADCIRC b/ADCIRC index ea23e395..366e29fc 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit ea23e395eac6f831950024e2b00d35038305c0e7 +Subproject commit 366e29fc554833204ce0a7380ef3cbe30481dff1 From a853999b70db1923cdcb106ef50e619ff23bd027 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 12 Jul 2021 12:37:37 -0500 Subject: [PATCH 47/96] changed NWS.EQ.17 to ABS(NWS).EQ.17, there is no option NWS=-17 --- ADCIRC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADCIRC b/ADCIRC index 366e29fc..33cd652c 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit 366e29fc554833204ce0a7380ef3cbe30481dff1 +Subproject commit 33cd652c690e17d7b41a5436b31acecbb57f7f88 From f897d35cbd317cdb2ecad8387aad82417238c705 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 12 Jul 2021 12:44:51 -0500 Subject: [PATCH 48/96] modified the modulefiles to account for possible HDF5 access denied errors in READ/WRITE NetCDF files --- modulefiles/envmodules_gnu.cheyenne | 10 ++++++++++ modulefiles/envmodules_gnu.custom | 10 ++++++++++ modulefiles/envmodules_gnu.gaea | 10 ++++++++++ modulefiles/envmodules_gnu.hera | 10 ++++++++++ modulefiles/envmodules_gnu.jet | 10 ++++++++++ modulefiles/envmodules_gnu.linux | 9 ++++++++- modulefiles/envmodules_gnu.macosx | 10 ++++++++++ modulefiles/envmodules_gnu.mistral | 10 ++++++++++ modulefiles/envmodules_gnu.orion | 10 ++++++++++ modulefiles/envmodules_gnu.stampede | 10 ++++++++++ modulefiles/envmodules_gnu.strand | 10 ++++++++++ modulefiles/envmodules_gnu.wcoss | 10 ++++++++++ modulefiles/envmodules_intel.cheyenne | 10 ++++++++++ modulefiles/envmodules_intel.custom | 10 ++++++++++ modulefiles/envmodules_intel.gaea | 10 ++++++++++ modulefiles/envmodules_intel.hera | 10 ++++++++++ modulefiles/envmodules_intel.hera.hpc-stack | 10 ++++++++++ modulefiles/envmodules_intel.hera.orig | 10 ++++++++++ modulefiles/envmodules_intel.hera.sys | 12 +++++++++++- modulefiles/envmodules_intel.jet | 10 ++++++++++ modulefiles/envmodules_intel.linux | 9 ++++++++- modulefiles/envmodules_intel.macosx | 10 ++++++++++ modulefiles/envmodules_intel.mistral | 10 ++++++++++ modulefiles/envmodules_intel.orion | 10 ++++++++++ modulefiles/envmodules_intel.orion.hpc-stack | 10 ++++++++++ modulefiles/envmodules_intel.orion.orig | 10 ++++++++++ modulefiles/envmodules_intel.orion.sys | 10 ++++++++++ modulefiles/envmodules_intel.stampede | 10 ++++++++++ modulefiles/envmodules_intel.strand | 10 ++++++++++ modulefiles/envmodules_intel.wcoss | 10 ++++++++++ modulefiles/envmodules_pgi.cheyenne | 10 ++++++++++ modulefiles/envmodules_pgi.custom | 10 ++++++++++ modulefiles/envmodules_pgi.gaea | 10 ++++++++++ modulefiles/envmodules_pgi.hera | 10 ++++++++++ modulefiles/envmodules_pgi.jet | 10 ++++++++++ modulefiles/envmodules_pgi.linux | 9 ++++++++- modulefiles/envmodules_pgi.macosx | 10 ++++++++++ modulefiles/envmodules_pgi.mistral | 10 ++++++++++ modulefiles/envmodules_pgi.orion | 10 ++++++++++ modulefiles/envmodules_pgi.stampede | 10 ++++++++++ modulefiles/envmodules_pgi.strand | 10 ++++++++++ modulefiles/envmodules_pgi.wcoss | 10 ++++++++++ 42 files changed, 415 insertions(+), 4 deletions(-) diff --git a/modulefiles/envmodules_gnu.cheyenne b/modulefiles/envmodules_gnu.cheyenne index ee2b0f72..60bdd6c5 100644 --- a/modulefiles/envmodules_gnu.cheyenne +++ b/modulefiles/envmodules_gnu.cheyenne @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_gnu.custom b/modulefiles/envmodules_gnu.custom index a3a3f9a0..64f1582f 100644 --- a/modulefiles/envmodules_gnu.custom +++ b/modulefiles/envmodules_gnu.custom @@ -36,6 +36,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_gnu.gaea b/modulefiles/envmodules_gnu.gaea index ee2b0f72..60bdd6c5 100644 --- a/modulefiles/envmodules_gnu.gaea +++ b/modulefiles/envmodules_gnu.gaea @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_gnu.hera b/modulefiles/envmodules_gnu.hera index ee2b0f72..60bdd6c5 100644 --- a/modulefiles/envmodules_gnu.hera +++ b/modulefiles/envmodules_gnu.hera @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_gnu.jet b/modulefiles/envmodules_gnu.jet index ee2b0f72..60bdd6c5 100644 --- a/modulefiles/envmodules_gnu.jet +++ b/modulefiles/envmodules_gnu.jet @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_gnu.linux b/modulefiles/envmodules_gnu.linux index 0e1e7a75..c2152050 100644 --- a/modulefiles/envmodules_gnu.linux +++ b/modulefiles/envmodules_gnu.linux @@ -37,7 +37,14 @@ unset funcs ########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## # Is this needed in all systems? -export HDF5_USE_FILE_LOCKING=FALSE +# 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 export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} diff --git a/modulefiles/envmodules_gnu.macosx b/modulefiles/envmodules_gnu.macosx index a0393d76..82b1f8e1 100644 --- a/modulefiles/envmodules_gnu.macosx +++ b/modulefiles/envmodules_gnu.macosx @@ -42,6 +42,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_gnu.mistral b/modulefiles/envmodules_gnu.mistral index 6dc8afca..96fc8762 100644 --- a/modulefiles/envmodules_gnu.mistral +++ b/modulefiles/envmodules_gnu.mistral @@ -43,6 +43,16 @@ unset funcs ########## 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 + # use this more complicated one to address ADCIRC demands export NETCDFHOME="$(nf-config --prefix)/include $(nf-config --flibs) $(nc-config --prefix)" export NETCDFPATH=$(nc-config --prefix) diff --git a/modulefiles/envmodules_gnu.orion b/modulefiles/envmodules_gnu.orion index dfe757e5..9d2c6d4d 100644 --- a/modulefiles/envmodules_gnu.orion +++ b/modulefiles/envmodules_gnu.orion @@ -36,6 +36,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} diff --git a/modulefiles/envmodules_gnu.stampede b/modulefiles/envmodules_gnu.stampede index 9608802e..b9e1ea4a 100644 --- a/modulefiles/envmodules_gnu.stampede +++ b/modulefiles/envmodules_gnu.stampede @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${TACC_NETCDF_BIN}/nc-config export NETCDF_INCDIR=${TACC_NETCDF_INC} export NETCDF_LIBDIR=${TACC_NETCDF_LIB} diff --git a/modulefiles/envmodules_gnu.strand b/modulefiles/envmodules_gnu.strand index 28d6e31e..acbdd14a 100644 --- a/modulefiles/envmodules_gnu.strand +++ b/modulefiles/envmodules_gnu.strand @@ -42,6 +42,16 @@ unset funcs ########## 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 + export NETCDFHOME=$(nc-config --prefix) export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} diff --git a/modulefiles/envmodules_gnu.wcoss b/modulefiles/envmodules_gnu.wcoss index ee2b0f72..60bdd6c5 100644 --- a/modulefiles/envmodules_gnu.wcoss +++ b/modulefiles/envmodules_gnu.wcoss @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_intel.cheyenne b/modulefiles/envmodules_intel.cheyenne index 97f0a17b..88e3f49c 100644 --- a/modulefiles/envmodules_intel.cheyenne +++ b/modulefiles/envmodules_intel.cheyenne @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_intel.custom b/modulefiles/envmodules_intel.custom index 7093ecc8..53e8d963 100644 --- a/modulefiles/envmodules_intel.custom +++ b/modulefiles/envmodules_intel.custom @@ -36,6 +36,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_intel.gaea b/modulefiles/envmodules_intel.gaea index 97f0a17b..88e3f49c 100644 --- a/modulefiles/envmodules_intel.gaea +++ b/modulefiles/envmodules_intel.gaea @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_intel.hera b/modulefiles/envmodules_intel.hera index bfe1f30c..190e58ee 100644 --- a/modulefiles/envmodules_intel.hera +++ b/modulefiles/envmodules_intel.hera @@ -38,6 +38,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_intel.hera.hpc-stack b/modulefiles/envmodules_intel.hera.hpc-stack index 2ffa078d..fdce8062 100644 --- a/modulefiles/envmodules_intel.hera.hpc-stack +++ b/modulefiles/envmodules_intel.hera.hpc-stack @@ -44,6 +44,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_intel.hera.orig b/modulefiles/envmodules_intel.hera.orig index ad0a4eb1..92458e30 100644 --- a/modulefiles/envmodules_intel.hera.orig +++ b/modulefiles/envmodules_intel.hera.orig @@ -36,6 +36,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_intel.hera.sys b/modulefiles/envmodules_intel.hera.sys index 01c8e036..190e58ee 100644 --- a/modulefiles/envmodules_intel.hera.sys +++ b/modulefiles/envmodules_intel.hera.sys @@ -21,7 +21,7 @@ module load szip module use /home/emc.nemspara/SOFT-hera/modulefiles module load hdf5_parallel/1.10.6.release module load netcdf_parallel/4.7.4.release -module load esmf/8.1.0bs36g +module load esmf/8.1.0bs25g_ParallelNetCDF.release ################### @@ -38,6 +38,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_intel.jet b/modulefiles/envmodules_intel.jet index 97f0a17b..88e3f49c 100644 --- a/modulefiles/envmodules_intel.jet +++ b/modulefiles/envmodules_intel.jet @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_intel.linux b/modulefiles/envmodules_intel.linux index 1fd5d2e2..10a8cdb1 100644 --- a/modulefiles/envmodules_intel.linux +++ b/modulefiles/envmodules_intel.linux @@ -37,7 +37,14 @@ unset funcs ########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## # Is this needed in all systems? -export HDF5_USE_FILE_LOCKING=FALSE +# 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 export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} diff --git a/modulefiles/envmodules_intel.macosx b/modulefiles/envmodules_intel.macosx index e4eb2d60..181c01e8 100644 --- a/modulefiles/envmodules_intel.macosx +++ b/modulefiles/envmodules_intel.macosx @@ -42,6 +42,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_intel.mistral b/modulefiles/envmodules_intel.mistral index 1bf9acd6..dd148d62 100644 --- a/modulefiles/envmodules_intel.mistral +++ b/modulefiles/envmodules_intel.mistral @@ -39,6 +39,16 @@ unset funcs ########## 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 + # use this more complicated one to address ADCIRC demands export NETCDFHOME="$(nf-config --prefix)/include $(nf-config --flibs) $(nc-config --prefix)" export NETCDFPATH=$(nc-config --prefix) diff --git a/modulefiles/envmodules_intel.orion b/modulefiles/envmodules_intel.orion index f859873d..9b174692 100644 --- a/modulefiles/envmodules_intel.orion +++ b/modulefiles/envmodules_intel.orion @@ -37,6 +37,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} diff --git a/modulefiles/envmodules_intel.orion.hpc-stack b/modulefiles/envmodules_intel.orion.hpc-stack index 42fdca25..95b00e7e 100644 --- a/modulefiles/envmodules_intel.orion.hpc-stack +++ b/modulefiles/envmodules_intel.orion.hpc-stack @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDF_INCLUDES} export NETCDF_LIBDIR=${NETCDF_LIBRARIES} diff --git a/modulefiles/envmodules_intel.orion.orig b/modulefiles/envmodules_intel.orion.orig index 54e200cd..5e850d15 100644 --- a/modulefiles/envmodules_intel.orion.orig +++ b/modulefiles/envmodules_intel.orion.orig @@ -36,6 +36,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} diff --git a/modulefiles/envmodules_intel.orion.sys b/modulefiles/envmodules_intel.orion.sys index f859873d..9b174692 100644 --- a/modulefiles/envmodules_intel.orion.sys +++ b/modulefiles/envmodules_intel.orion.sys @@ -37,6 +37,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} diff --git a/modulefiles/envmodules_intel.stampede b/modulefiles/envmodules_intel.stampede index 4d7baa8e..d2d1cd48 100644 --- a/modulefiles/envmodules_intel.stampede +++ b/modulefiles/envmodules_intel.stampede @@ -36,6 +36,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${TACC_NETCDF_BIN}/nc-config export NETCDF_INCDIR=${TACC_NETCDF_INC} export NETCDF_LIBDIR=${TACC_NETCDF_LIB} diff --git a/modulefiles/envmodules_intel.strand b/modulefiles/envmodules_intel.strand index 14c6383d..d875ec7d 100644 --- a/modulefiles/envmodules_intel.strand +++ b/modulefiles/envmodules_intel.strand @@ -40,6 +40,16 @@ unset funcs ########## 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 + export NETCDFHOME=$(nc-config --prefix) export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} diff --git a/modulefiles/envmodules_intel.wcoss b/modulefiles/envmodules_intel.wcoss index 97f0a17b..88e3f49c 100644 --- a/modulefiles/envmodules_intel.wcoss +++ b/modulefiles/envmodules_intel.wcoss @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_pgi.cheyenne b/modulefiles/envmodules_pgi.cheyenne index 6544a410..9aee252b 100644 --- a/modulefiles/envmodules_pgi.cheyenne +++ b/modulefiles/envmodules_pgi.cheyenne @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_pgi.custom b/modulefiles/envmodules_pgi.custom index 6ac6e01b..a3d33bb8 100644 --- a/modulefiles/envmodules_pgi.custom +++ b/modulefiles/envmodules_pgi.custom @@ -42,6 +42,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_pgi.gaea b/modulefiles/envmodules_pgi.gaea index 6544a410..9aee252b 100644 --- a/modulefiles/envmodules_pgi.gaea +++ b/modulefiles/envmodules_pgi.gaea @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_pgi.hera b/modulefiles/envmodules_pgi.hera index 0eda78c1..4317ec8d 100644 --- a/modulefiles/envmodules_pgi.hera +++ b/modulefiles/envmodules_pgi.hera @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_pgi.jet b/modulefiles/envmodules_pgi.jet index 6544a410..9aee252b 100644 --- a/modulefiles/envmodules_pgi.jet +++ b/modulefiles/envmodules_pgi.jet @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_pgi.linux b/modulefiles/envmodules_pgi.linux index ef274df9..a055dab9 100644 --- a/modulefiles/envmodules_pgi.linux +++ b/modulefiles/envmodules_pgi.linux @@ -36,7 +36,14 @@ unset funcs ########## BEG:: PLATFORM CUSTOMIZED SETTINGS ########## # Is this needed in all systems? -export HDF5_USE_FILE_LOCKING=FALSE +# 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 export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} diff --git a/modulefiles/envmodules_pgi.macosx b/modulefiles/envmodules_pgi.macosx index 79766403..00603696 100644 --- a/modulefiles/envmodules_pgi.macosx +++ b/modulefiles/envmodules_pgi.macosx @@ -42,6 +42,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} diff --git a/modulefiles/envmodules_pgi.mistral b/modulefiles/envmodules_pgi.mistral index 5509826e..6980312d 100644 --- a/modulefiles/envmodules_pgi.mistral +++ b/modulefiles/envmodules_pgi.mistral @@ -43,6 +43,16 @@ unset funcs ########## 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 + # use this more complicated one to address ADCIRC demands export NETCDFHOME="$(nf-config --prefix)/include $(nf-config --flibs) $(nc-config --prefix)" export NETCDFPATH=$(nc-config --prefix) diff --git a/modulefiles/envmodules_pgi.orion b/modulefiles/envmodules_pgi.orion index 512a3995..d95bb5b0 100644 --- a/modulefiles/envmodules_pgi.orion +++ b/modulefiles/envmodules_pgi.orion @@ -35,6 +35,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDF_INCLUDE_DIRS} export NETCDF_LIBDIR=${NETCDF_LIBRARY_DIRS} diff --git a/modulefiles/envmodules_pgi.stampede b/modulefiles/envmodules_pgi.stampede index 781dd1d0..7f80ee3a 100644 --- a/modulefiles/envmodules_pgi.stampede +++ b/modulefiles/envmodules_pgi.stampede @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${TACC_NETCDF_BIN}/nc-config export NETCDF_INCDIR=${TACC_NETCDF_INC} export NETCDF_LIBDIR=${TACC_NETCDF_LIB} diff --git a/modulefiles/envmodules_pgi.strand b/modulefiles/envmodules_pgi.strand index 0e1f5aa9..20c233d9 100644 --- a/modulefiles/envmodules_pgi.strand +++ b/modulefiles/envmodules_pgi.strand @@ -42,6 +42,16 @@ unset funcs ########## 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 + export NETCDFHOME=$(nc-config --prefix) export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} diff --git a/modulefiles/envmodules_pgi.wcoss b/modulefiles/envmodules_pgi.wcoss index 6979e8e4..e679f347 100644 --- a/modulefiles/envmodules_pgi.wcoss +++ b/modulefiles/envmodules_pgi.wcoss @@ -43,6 +43,16 @@ unset funcs ########## 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 + export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} From 9883811105206dbb5dbad9a2913616f59bf0f3d4 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 12 Jul 2021 13:36:48 -0500 Subject: [PATCH 49/96] multiple environment modifications --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index ce60e685..ecf3935b 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit ce60e68530f71600017dd822412f02b77a17656c +Subproject commit ecf3935b4848b80c5ce096f7aa22a4316d45812f From d5412972d16d1ba3e4e573b9f977387c9c9c6e9d Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 12 Jul 2021 13:42:17 -0500 Subject: [PATCH 50/96] format modifications --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index ecf3935b..259d32f0 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit ecf3935b4848b80c5ce096f7aa22a4316d45812f +Subproject commit 259d32f02ad1075482babd124fae020d3b556c3a From 82d0d0b261ab6b26e28033da723ced2eb9dbb84c Mon Sep 17 00:00:00 2001 From: Zachary Burnett Date: Mon, 12 Jul 2021 14:56:54 -0500 Subject: [PATCH 51/96] updated pointer to point to new commits on remote --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index 259d32f0..ff9a9e61 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit 259d32f02ad1075482babd124fae020d3b556c3a +Subproject commit ff9a9e61e537c2873f68551090883435177c67ba From a4e3d2442d9717fd092a150bf46bdb43cfcf3ea6 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 12 Jul 2021 15:05:50 -0500 Subject: [PATCH 52/96] updated the pointers --- ADCIRC | 2 +- NEMS | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ADCIRC b/ADCIRC index 33cd652c..2a241de4 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit 33cd652c690e17d7b41a5436b31acecbb57f7f88 +Subproject commit 2a241de46be087c58e697654b2fb915b29ceea2f diff --git a/NEMS b/NEMS index ff9a9e61..d345b69b 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit ff9a9e61e537c2873f68551090883435177c67ba +Subproject commit d345b69beeb0ea6c226750095bc2b78357ccbc60 From ffd7c209997691695ed3612cc3ad1bec4135d892 Mon Sep 17 00:00:00 2001 From: Zachary Burnett Date: Tue, 13 Jul 2021 07:41:18 -0500 Subject: [PATCH 53/96] update NEMS pointer to latest in pahm branch --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index d345b69b..ff9a9e61 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit d345b69beeb0ea6c226750095bc2b78357ccbc60 +Subproject commit ff9a9e61e537c2873f68551090883435177c67ba From f9724c49368d47030d02e65d77981e4afbffb118 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Tue, 13 Jul 2021 14:11:37 +0000 Subject: [PATCH 54/96] update pointer with filename rename --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index ff9a9e61..3ce35af9 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit ff9a9e61e537c2873f68551090883435177c67ba +Subproject commit 3ce35af91375cf080f54f7f060cabe84a8cba6c2 From ab14b0005100711ae64034180ff636f14c6486cb Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 13 Jul 2021 14:07:18 -0500 Subject: [PATCH 55/96] renamed ENS_CplComp_ESMFMod_STUB.f90 to ENS_CplComp_ESMFMod_STUB.F90 --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index d345b69b..43d6a68c 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit d345b69beeb0ea6c226750095bc2b78357ccbc60 +Subproject commit 43d6a68c7604bce0aa91cf933e58aa6dffafef72 From b3b6abde55d754f9fe09619b8d376d89cce510b3 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Tue, 13 Jul 2021 14:19:10 -0500 Subject: [PATCH 56/96] renamed ENS_CplComp_ESMFMod_STUB.f90 to ENS_CplComp_ESMFMod_STUB.F90 --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index d345b69b..4c61cc4e 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit d345b69beeb0ea6c226750095bc2b78357ccbc60 +Subproject commit 4c61cc4ea73e407784ddbd6b8affc99d20474e1b From 242dcadb66375a5ba854ce74be380e30fbee946d Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 15 Jul 2021 00:10:51 -0500 Subject: [PATCH 57/96] updated PAHM --- .gitmodules | 1 + PAHM | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index ac933543..f9b6d62a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,3 +25,4 @@ [submodule "PAHM"] path = PAHM url = https://github.com/noaa-ocs-modeling/PaHM + branch = main diff --git a/PAHM b/PAHM index 99513867..550e9fef 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 99513867239349858841801d6f65279edf2ad8e4 +Subproject commit 550e9fef915593066e61f5a25f8a9b11b410e142 From a7a3a47e37e9e6f851ce4a1e29b815323454fc63 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 19 Jul 2021 15:43:58 +0000 Subject: [PATCH 58/96] updated submodule to point to merge commit --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index 4c61cc4e..017955d3 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit 4c61cc4ea73e407784ddbd6b8affc99d20474e1b +Subproject commit 017955d3d6f1f70c1b9104bd531392cc41a0f604 From 5e68d1529433c23d4d25937e83d312ce1fc7d2b3 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 19 Jul 2021 16:02:18 +0000 Subject: [PATCH 59/96] updated submodule to use LFS --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 550e9fef..3973f597 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 550e9fef915593066e61f5a25f8a9b11b410e142 +Subproject commit 3973f5970e52ebf995d49628c647a39d11bfd514 From 825fbeec04a6203adcdd3cd0bedc4f7a3135a453 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 19 Jul 2021 16:21:36 +0000 Subject: [PATCH 60/96] updated PAHM to use LFS --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 3973f597..2c148ca1 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 3973f5970e52ebf995d49628c647a39d11bfd514 +Subproject commit 2c148ca1ed6a6c6c2b2446f455a8745e5c1518e9 From 05767d5dbbae6d119f570ace66744962d98b444e Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Wed, 21 Jul 2021 14:09:13 +0000 Subject: [PATCH 61/96] updated submodule pointer --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 2c148ca1..9f448d04 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 2c148ca1ed6a6c6c2b2446f455a8745e5c1518e9 +Subproject commit 9f448d04ccee1acba644abce1b3f4b40e39539e6 From 86cdcd21758ccd7ea2c7bed03b6a8105dcbb7ac0 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Wed, 21 Jul 2021 09:32:30 -0500 Subject: [PATCH 62/96] added lfs tracked files --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 2c148ca1..b5aa53a7 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 2c148ca1ed6a6c6c2b2446f455a8745e5c1518e9 +Subproject commit b5aa53a7de25eac97eecc06d8dc5b6bf0968f9cd From 9dbc4ab9564c9ec7b1886c42bb5dcd95f8023320 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Wed, 21 Jul 2021 11:16:07 -0500 Subject: [PATCH 63/96] deleted very large data files --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index b5aa53a7..0554e8ba 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit b5aa53a7de25eac97eecc06d8dc5b6bf0968f9cd +Subproject commit 0554e8ba938f6577ec5b68b02150b35b64f4531a From 2d51cdc72031dff21b64fcdc5c943aea4723446c Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 2 Aug 2021 09:00:02 -0500 Subject: [PATCH 64/96] cleanup of ADCIRC/PAHM components --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index 017955d3..c3af5555 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit 017955d3d6f1f70c1b9104bd531392cc41a0f604 +Subproject commit c3af55552ea342f42fc2d2f59b6586dd17056981 From 63baf1b6532bf45451a7ca98ac5d34232afddeb5 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 2 Aug 2021 09:01:39 -0500 Subject: [PATCH 65/96] cleaned top level conf folder --- conf/configure.coastal_app.hera | 168 -------------------------------- conf/externals.nems.hera.rej | 8 -- 2 files changed, 176 deletions(-) delete mode 100755 conf/configure.coastal_app.hera delete mode 100644 conf/externals.nems.hera.rej diff --git a/conf/configure.coastal_app.hera b/conf/configure.coastal_app.hera deleted file mode 100755 index f18a4701..00000000 --- a/conf/configure.coastal_app.hera +++ /dev/null @@ -1,168 +0,0 @@ -## NEMS configuration file -## -## Platform: Theia -## Compiler: Intel with IntelMPI - -SHELL=/bin/sh - -################################################################################ -## Include the common configuration parts - -ifdef InNemsMakefile -include $(TOP)/conf/configure.nems.NUOPC -endif - -###################### PHYS_MODE ##### CHEM_MODE ############################### -# -# -# - -PHYS_MODE =compile -CHEM_MODE =compile -ifeq ($(PHYS_MODE),compile) - PHYS_LIB = $(TOP)/atmos/gsm/gsmphys - PHYS_INC = $(TOP)/atmos/gsm/gsmphys - PHYS_DIR = $(TOP)/atmos/gsm/gsmphys -endif -ifeq ($(CHEM_MODE),compile) - CHEM_LIB = $(TOP)/chem - CHEM_INC = $(TOP)/chem/gocart/src/Config/ - CHEM_DIR = $(TOP)/chem - CHEM_MOD = $(TOP)/chem/gocart/${ARCH}/include - ESMADIR = chem/gocart -endif - -############ -# commands # -############ -FC = mpiifort -CC = mpiicc -CXX = mpiicpc -LD = mpiifort -mkl=sequential - -######### -# flags # -######### -# default is 64-bit OpenMP non-hydrostatic build using AVX2 -DEBUG = -REPRO = -VERBOSE = -OPENMP = Y -AVX2 = Y -HYDRO = N - -include $(ESMFMKFILE) -ESMF_INC = $(ESMF_F90COMPILEPATHS) - -NCEPLIBS = $(BACIO_LIB4) $(SP_LIBd) $(W3EMC_LIBd) $(W3NCO_LIBd) - -############################################## -# Need to use at least GNU Make version 3.81 # -############################################## -need := 3.81 -ok := $(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need)))) -ifneq ($(need),$(ok)) -$(error Need at least make version $(need). Load module gmake/3.81) -endif - -NETCDF_ROOT = $(NETCDF) -INCLUDE = -I$(NETCDF_ROOT)/include -NETCDF_INC = -I$(NETCDF_ROOT)/include -ifneq ($(findstring netcdf/4,$(LOADEDMODULES)),) - NETCDF_LIB += -L$(NETCDF)/lib -lnetcdff -lnetcdf -else - NETCDF_LIB += -L$(NETCDF)/lib -lnetcdff -lnetcdf -endif - -FPPFLAGS := -fpp -Wp,-w $(INCLUDE) -CFLAGS := $(INCLUDE) - -FFLAGS := $(INCLUDE) -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -nowarn -sox -align array64byte - -ifeq ($(HYDRO),Y) -CPPDEFS += -Duse_libMPI -Duse_netCDF -DSPMD -DUSE_LOG_DIAG_FIELD_INFO -Duse_LARGEFILE -DUSE_GFSL63 -DGFS_PHYS -else -CPPDEFS += -Duse_libMPI -Duse_netCDF -DSPMD -DUSE_LOG_DIAG_FIELD_INFO -Duse_LARGEFILE -DUSE_GFSL63 -DGFS_PHYS -DMOIST_CAPPA -DUSE_COND -endif - -CPPDEFS += -DNEW_TAUCTMAX - -ifeq ($(32BIT),Y) -CPPDEFS += -DOVERLOAD_R4 -FFLAGS += -i4 -real-size 32 -else -FFLAGS += -i4 -real-size 64 -no-prec-div -no-prec-sqrt -endif - -ifeq ($(AVX2),Y) -FFLAGS += -xCORE-AVX2 -qno-opt-dynamic-align -CFLAGS += -xCORE-AVX2 -qno-opt-dynamic-align -else -FFLAGS += -xHOST -qno-opt-dynamic-align -CFLAGS += -xHOST -qno-opt-dynamic-align -endif - -FFLAGS_OPT = -O2 -debug minimal -fp-model source -qoverride-limits -qopt-prefetch=3 -FFLAGS_REPRO = -O2 -debug minimal -fp-model source -qoverride-limits -g -traceback -FFLAGS_DEBUG = -g -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -traceback -ftrapuv - -TRANSCENDENTALS := -fast-transcendentals -FFLAGS_OPENMP = -qopenmp -FFLAGS_VERBOSE = -v -V -what - -CFLAGS += -D__IFC -sox -fp-model source - -CFLAGS_OPT = -O2 -debug minimal -CFLAGS_REPRO = -O2 -debug minimal -CFLAGS_OPENMP = -qopenmp -CFLAGS_DEBUG = -O0 -g -ftrapuv -traceback - -# Optional Testing compile flags. Mutually exclusive from DEBUG, REPRO, and OPT -# *_TEST will match the production if no new option(s) is(are) to be tested. -FFLAGS_TEST = -O3 -debug minimal -fp-model source -qoverride-limits -CFLAGS_TEST = -O2 - -LDFLAGS := -LDFLAGS_OPENMP := -qopenmp -LDFLAGS_VERBOSE := -Wl,-V,--verbose,-cref,-M - -# start with blank LIBS -LIBS := - -ifneq ($(REPRO),) -CFLAGS += $(CFLAGS_REPRO) -FFLAGS += $(FFLAGS_REPRO) -FAST := -else ifneq ($(DEBUG),) -CFLAGS += $(CFLAGS_DEBUG) -FFLAGS += $(FFLAGS_DEBUG) -FAST := -else ifneq ($(TEST),) -CFLAGS += $(CFLAGS_TEST) -FFLAGS += $(FFLAGS_TEST) -FAST := -else -CFLAGS += $(CFLAGS_OPT) -FFLAGS += $(FFLAGS_OPT) -FAST := $(TRANSCENDENTALS) -endif - -ifneq ($(OPENMP),) -CFLAGS += $(CFLAGS_OPENMP) -FFLAGS += $(FFLAGS_OPENMP) -LDFLAGS += $(LDFLAGS_OPENMP) -endif - -ifneq ($(VERBOSE),) -CFLAGS += $(CFLAGS_VERBOSE) -FFLAGS += $(FFLAGS_VERBOSE) -LDFLAGS += $(LDFLAGS_VERBOSE) -endif - -LDFLAGS += $(LIBS) - -ifdef InNemsMakefile -FFLAGS += $(ESMF_INC) -CPPFLAGS += -traditional -EXTLIBS = $(NCEPLIBS) $(ESMF_LIB) $(LDFLAGS) $(NETCDF_LIB) -endif \ No newline at end of file diff --git a/conf/externals.nems.hera.rej b/conf/externals.nems.hera.rej deleted file mode 100644 index a8f60eee..00000000 --- a/conf/externals.nems.hera.rej +++ /dev/null @@ -1,8 +0,0 @@ ---- conf/externals.nems.hera 2020-12-04 14:36:35.000000000 -0600 -+++ conf/externals.nems.hera 2020-12-09 22:33:55.670362901 -0600 -@@ -1,4 +1,4 @@ --# Location of external components on Theia -+# Location of external components - - SATM_DIR= - XATM_DIR= From d11d2fb8a76b04f6090b794878389b94a42db4a9 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 2 Aug 2021 09:03:13 -0500 Subject: [PATCH 66/96] added new functionality to build other executables --- conf/externals.nems | 1 - conf/externals.nems.hera | 0 modulefiles/envmodules_gnu.custom | 5 ++- modulefiles/envmodules_intel.custom | 3 +- modulefiles/envmodules_pgi.custom | 3 +- scripts/build.sh | 49 +++++++++++++++++++++++------ scripts/functions_build | 42 +++++++++++++++++++------ 7 files changed, 76 insertions(+), 27 deletions(-) mode change 100755 => 100644 conf/externals.nems.hera diff --git a/conf/externals.nems b/conf/externals.nems index 7d3e85ad..ddd36b87 100644 --- a/conf/externals.nems +++ b/conf/externals.nems @@ -1,2 +1 @@ # Location of external components - diff --git a/conf/externals.nems.hera b/conf/externals.nems.hera old mode 100755 new mode 100644 diff --git a/modulefiles/envmodules_gnu.custom b/modulefiles/envmodules_gnu.custom index 64f1582f..c874cd5f 100644 --- a/modulefiles/envmodules_gnu.custom +++ b/modulefiles/envmodules_gnu.custom @@ -15,9 +15,8 @@ #################### ### (1) Load all needed environment modules. module purge -module load gcc openmpi -module load szip hdf5 -module load netcdf +module load gnu openmpi +module load hdf5 netcdf module load esmf diff --git a/modulefiles/envmodules_intel.custom b/modulefiles/envmodules_intel.custom index 53e8d963..884a8242 100644 --- a/modulefiles/envmodules_intel.custom +++ b/modulefiles/envmodules_intel.custom @@ -16,8 +16,7 @@ ### (1) Load all needed environment modules. module purge module load intel impi -module load szip hdf5 -module load netcdf +module load hdf5 netcdf module load esmf diff --git a/modulefiles/envmodules_pgi.custom b/modulefiles/envmodules_pgi.custom index a3d33bb8..841c3025 100644 --- a/modulefiles/envmodules_pgi.custom +++ b/modulefiles/envmodules_pgi.custom @@ -22,8 +22,7 @@ ${retv} 1 ### (1) Load all needed environment modules. module purge module load pgi openmpi -module load szip hdf5 -module load netcdf +module load hdf5 netcdf module load esmf diff --git a/scripts/build.sh b/scripts/build.sh index 26ed7c02..ba8c2a0e 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -62,24 +62,28 @@ CLEAN=${MY_CLEAN:-0} [ -n "${MY_COMPONENT:+1}" ] && COMPONENT="$( toUPPER "${MY_COMPONENT}" )" PARALLEL=${MY_PARALLEL:-1} -export NEMS_PARALLEL=${PARALLEL} + +BUILD_EXECS="${MY_EXECUTABLES}" [ -n "${MY_OS:+1}" ] && OS="$( toLOWER "${MY_OS}" )" + if [ -n "${MY_PLATFORM:+1}" ]; then PLATFORM="$( toLOWER "${MY_PLATFORM}" )" else PLATFORM="${OS}" fi -export NEMS_PLATFORM=${PLATFORM} -export MACHINE_ID=${PLATFORM} -export FULL_MACHINE_ID=${PLATFORM} - [ "${MY_PARMAKE:0}" -gt 1 ] && PARMAKE=${MY_PARMAKE} [ -n "${MY_VERBOSE:+1}" ] && VERBOSE="$( toLOWER "${MY_VERBOSE}" )" modFILE="envmodules${COMPILER:+_${COMPILER}}${PLATFORM:+.${PLATFORM}}" +########## + + +########## +# Customizations and environment variables for NEMS and other models +export BUILD_EXECS="${BUILD_EXECS}" # Customize the NEMS.x filename to include the component names if [ -n "${COMPONENT:+1}" ]; then @@ -87,8 +91,24 @@ if [ -n "${COMPONENT:+1}" ]; then compFNAME="$( echo "${compFNAME}" | sed 's/ /_/g' )" fi -# Export some environment variables for NEMS and for other models +# Export some important environment variables for NEMS and for other models export NEMS_COMPILER=${COMPILER} +export NEMS_PARALLEL=${PARALLEL} +export NEMS_PLATFORM=${PLATFORM} +export MACHINE_ID=${PLATFORM} +export FULL_MACHINE_ID=${PLATFORM} + +# This used in NEMS to get the configuration flags for the chosen compiler +# in the top level conf directory. Supported OSes are linux and macosx. +# Sometimes we might need to specify special flags not founf in the default +# files for s pecific platform +if [ ! -f "conf/configure.nems.${FULL_MACHINE_ID}.${NEMS_COMPILER}" ]; then + export BUILD_TARGET=${OS}.${NEMS_COMPILER} +fi + +if [ ! -f "conf/externals.nems.${FULL_MACHINE_ID}" ]; then + export EXTERNALS_NEMS="externals.nems" +fi ########## @@ -112,9 +132,9 @@ if [ ! -f "${modDIR}/${modFILE}" ]; then echo "Exiting ..." echo exit 1 -else - # Source the environment module - source ${modDIR}/${modFILE} +#else +# # Source the environment module +# source ${modDIR}/${modFILE} fi ########## @@ -134,6 +154,12 @@ fi ########## +########## +# Source the environment module +source ${modDIR}/${modFILE} +########## + + ########## # Get the compilers to use for this project compilation case "${COMPILER}" in @@ -206,6 +232,7 @@ echo " CLEAN = ${CLEAN}" echo " COMPILER = ${COMPILER:-Undefined, Supported values are: [${MY_COMPILING_SYTEMS}]}" echo " NEMS_COMPILER = ${NEMS_COMPILER}" echo " NEMS_PARALLEL = ${PARALLEL:-0}" +echo " NEMS_PLATFORM = ${NEMS_PLATFORM}" echo " CC = ${CC:-UNDEF}" echo " CXX = ${CXX:-UNDEF}" echo " FC = ${FC:-UNDEF}" @@ -221,10 +248,13 @@ if [[ :${component_ww3}: == *:"WW3":* ]]; then echo " WWATCH3_NETCDF = ${WWATCH3_NETCDF}" fi echo " COMPONENTS = ${COMPONENT:-Undefined, Supported values are: [${MY_COMPONENT_LIST}]}" +echo " BUILD_EXECS = ${BUILD_EXECS}" echo " OS = ${OS}" echo " PLATFORM = ${PLATFORM}" echo " MACHINE_ID = ${MACHINE_ID}" echo " FULL_MACHINE_ID= ${FULL_MACHINE_ID}" +echo " BUILD_TARGET = ${BUILD_TARGET:-${PLATFORM}.${NEMS_COMPILER}}" +echo " EXTERNALS_NEMS = ${EXTERNALS_NEMS}" echo " VERBOSE = ${VERBOSE}" echo echo " HDF5HOME = ${HDF5HOME}" @@ -241,7 +271,6 @@ echo module list - echo_response= while [ -z "${echo_response}" ] ; do echo -n "Are these values correct? [y/n]: " diff --git a/scripts/functions_build b/scripts/functions_build index 36452210..a78c897d 100644 --- a/scripts/functions_build +++ b/scripts/functions_build @@ -9,7 +9,7 @@ set +u MY_COMPILING_SYTEMS="gnu, intel, pgi" -MY_COMPILING_PLATFORMS="custom, linux, macosx, cheyenne, gaea, hera, jet, orion, stampede, wcoss mistral strand" +MY_COMPILING_PLATFORMS="custom, linux, macosx, cheyenne, gaea, hera, jet, orion, stampede, wcoss, mistral, strand" MY_ATM_MODS="ATMESH WRF HWRF PAHM" MY_OCN_MODS="ADCIRC SCHISM FVCOM ROMS" @@ -41,24 +41,25 @@ ParseArgs() local ans0 ans ival intN local all_evars - all_evars="MY_CLEAN MY_COMPILER MY_COMPONENT MY_OS MY_PARALLEL MY_PARMAKE MY_PLATFORM MY_VERBOSE" + all_evars="MY_CLEAN MY_COMPILER MY_COMPONENT MY_EXECUTABLES MY_OS MY_PARALLEL MY_PARMAKE MY_PLATFORM MY_VERBOSE" for ival in ${all_evars}; do unset __${ival}; done __MY_CLEAN=0 + __MY_EXECUTABLES= __MY_COMPILER=intel __MY_COMPONENT="ADCIRC WW3DATA ATMESH" __MY_OS= __MY_PARALLEL=1 __MY_PARMAKE=1 - __MY_PLATFORM=linux + __MY_PLATFORM= __MY_VERBOSE= # ----- # Process the function options - opt_all=( c clean compiler component j par parallel os plat v verbose h help ) + opt_all=( build_exec c clean compiler component j par parallel os plat platform v verbose h help ) opt_all=":$( echo "${opt_all[@]/#/-} ${opt_all[@]/#/--}" | sed 's/ /:/g' ):" unset __OPTION_LIST @@ -87,6 +88,14 @@ ParseArgs() esac case "${opt_opt}" in + -build_exec | --build_exec ) + checkFuncOpt "--build_exec" + if [ $? -eq 0 ]; then + if [ "X${opt_arg}" != "X" ]; then + __MY_EXECUTABLES="$( strTrim "${opt_arg}" )" + fi + fi + ;; -c | --c | -clean | --clean ) checkFuncOpt "--clean" if [ $? -eq 0 ]; then @@ -152,8 +161,8 @@ ParseArgs() fi fi ;; - -plat | --plat ) - checkFuncOpt "--plat" + -plat | --plat | -platform | --platform) + checkFuncOpt "--platform" if [ $? -eq 0 ]; then if [ "X${opt_arg}" != "X" ]; then __MY_PLATFORM="$( echo "${opt_arg}" | sed 's/[[:space:]]//g' )" @@ -189,6 +198,14 @@ ParseArgs() esac fi + if [ -z "${__MY_PLATFORM}" ]; then + case "$(uname -s)" in + Darwin ) __MY_PLATFORM="macosx" ;; + Linux ) __MY_PLATFORM="linux" ;; + *) __MY_PLATFORM="linux";; # DEFAULT + esac + fi + # Export the values of all __* variables. for ival in ${all_evars} do @@ -232,6 +249,11 @@ UsageBuild() echo " Default: \"ADCIRC WW3DATA ATMESH\"." echo #--- + echo " -build_exec|--build_exec [=|space] \"executable_list\" (OPTIONAL)." + echo " The executables(s) to build (e.g. --build_exec=\"padcirc pahm\")." + echo " Default: none." + echo + #--- echo " -j|--j [=|space] \"N\" (OPTIONAL)." echo " Define the number of make jobs to run simultaneously." echo " Default: 1." @@ -248,12 +270,12 @@ UsageBuild() echo " Default: current OS." echo #--- - echo " -plat|--plat [=|space] \"platform\" (OPTIONAL)." + echo " -plat|--plat|-platform|--platform [=|space] \"platform\" (OPTIONAL)." echo " The name of the compute HPC platform to consider." echo " Selecting a platform, environment modules specific to that platform are loaded" echo " and corresponding environment variables are set." echo " Supported platforms: ${MY_COMPILING_PLATFORMS}." - echo " Default: linux." + echo " Default: OS." echo #--- echo " -v|--v|-verbose|--verbose [=|space] \"a,b,v,i,j,m,n\" (any combination, OPTIONAL)." @@ -584,6 +606,8 @@ compileNems() { return ${err} } +# Need to have specific model components install functions +# TODO - Panagiotis Velissariou installNems() { local cmp_comp icmp local instdir @@ -610,7 +634,7 @@ installNems() { if [ "${icmp}" == "ADCIRC" ]; then echo echo " --- Installing from: ${icmp} to ${instdir} ---" - for iprog in adcprep + for iprog in adcprep adcirc padcirc tide_fac do prog="$( find -L ${icmp} -type f -name ${iprog} | head -1 )" From d341b62d8a96d0f79a43440b2979b9333cda8383 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 2 Aug 2021 09:12:49 -0500 Subject: [PATCH 67/96] cleaned the PAHM/inputs folder --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 0554e8ba..85bf2baf 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 0554e8ba938f6577ec5b68b02150b35b64f4531a +Subproject commit 85bf2baf9c62ba3e74b0a51d2e78b90bce36a652 From dc794d78641cfa826f2d81364ec7c5fe27a83729 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 2 Aug 2021 09:20:34 -0500 Subject: [PATCH 68/96] deleted *.rej files --- WW3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WW3 b/WW3 index 60610eb5..9726c8b6 160000 --- a/WW3 +++ b/WW3 @@ -1 +1 @@ -Subproject commit 60610eb5f7a79b8d8bf41a02f078a691bf0506c8 +Subproject commit 9726c8b6757b3578493b4ed1653abc90a76fcf0d From 786af1606c068f38689857c88d77eb5ab9746f30 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 2 Aug 2021 09:24:40 -0500 Subject: [PATCH 69/96] added functionality to build other executables as well --- ADCIRC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADCIRC b/ADCIRC index 2a241de4..9cbfb36a 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit 2a241de46be087c58e697654b2fb915b29ceea2f +Subproject commit 9cbfb36aca2ea0002a3a077826bb62b458abec53 From ce28ba9bb25cb057c3b708de8fe4587f4240b8a0 Mon Sep 17 00:00:00 2001 From: Zachary Burnett Date: Wed, 4 Aug 2021 07:31:49 -0500 Subject: [PATCH 70/96] add aswip to binaries --- ADCIRC | 2 +- scripts/functions_build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ADCIRC b/ADCIRC index 9cbfb36a..49debf8b 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit 9cbfb36aca2ea0002a3a077826bb62b458abec53 +Subproject commit 49debf8b84356256c72bb9b4e5501bfe4ac5234a diff --git a/scripts/functions_build b/scripts/functions_build index a78c897d..ab2270c4 100644 --- a/scripts/functions_build +++ b/scripts/functions_build @@ -634,7 +634,7 @@ installNems() { if [ "${icmp}" == "ADCIRC" ]; then echo echo " --- Installing from: ${icmp} to ${instdir} ---" - for iprog in adcprep adcirc padcirc tide_fac + for iprog in adcprep adcirc padcirc tide_fac aswip do prog="$( find -L ${icmp} -type f -name ${iprog} | head -1 )" From 6b192323eb66a5c52afc642e5c9784cc44e93ae2 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 5 Aug 2021 08:19:47 -0500 Subject: [PATCH 71/96] renamed the NUOPC_SRCDIR variables to {MODEL}_NUOPC_SRCDIR --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index c3af5555..dc8b2de4 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit c3af55552ea342f42fc2d2f59b6586dd17056981 +Subproject commit dc8b2de497031eb894d21712af9c139ef9c67c3f From 21faa6238ca8d274c1d1112e1a5f530fe6e1c5a0 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 5 Aug 2021 08:23:07 -0500 Subject: [PATCH 72/96] fixed loading the platform modulefile --- scripts/build.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index ba8c2a0e..df8eb709 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -132,9 +132,9 @@ if [ ! -f "${modDIR}/${modFILE}" ]; then echo "Exiting ..." echo exit 1 -#else -# # Source the environment module -# source ${modDIR}/${modFILE} +else + # Source the environment module + source ${modDIR}/${modFILE} fi ########## @@ -154,12 +154,6 @@ fi ########## -########## -# Source the environment module -source ${modDIR}/${modFILE} -########## - - ########## # Get the compilers to use for this project compilation case "${COMPILER}" in From 0154723783823b7786f3930be3787dc9757f5d53 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Fri, 6 Aug 2021 00:50:15 -0500 Subject: [PATCH 73/96] modified the pahm_from_file blocks --- ADCIRC | 2 +- PAHM | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ADCIRC b/ADCIRC index 49debf8b..9cbfb36a 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit 49debf8b84356256c72bb9b4e5501bfe4ac5234a +Subproject commit 9cbfb36aca2ea0002a3a077826bb62b458abec53 diff --git a/PAHM b/PAHM index 85bf2baf..84bb7295 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 85bf2baf9c62ba3e74b0a51d2e78b90bce36a652 +Subproject commit 84bb729550d8afbca6e471df9d192c1a63cabb62 From 216b06032ee47a10ebb7762817752843fc945fec Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 9 Aug 2021 12:36:59 +0000 Subject: [PATCH 74/96] added aswip --- ADCIRC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADCIRC b/ADCIRC index 9cbfb36a..49debf8b 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit 9cbfb36aca2ea0002a3a077826bb62b458abec53 +Subproject commit 49debf8b84356256c72bb9b4e5501bfe4ac5234a From aa36dd4558a45ebbff1212cf6ae5d9d09d5d1b61 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sun, 15 Aug 2021 13:59:36 -0500 Subject: [PATCH 75/96] updated submodule PAHM to commit 6212f2 --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 84bb7295..6212f2d1 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 84bb729550d8afbca6e471df9d192c1a63cabb62 +Subproject commit 6212f2d1905ff3c080f1358b82c43b83fface148 From d9b82cc32ded649984a8d1ca8d0f18d616d2d0c5 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 26 Aug 2021 01:55:30 -0500 Subject: [PATCH 76/96] updated sources --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 6212f2d1..ab75c639 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 6212f2d1905ff3c080f1358b82c43b83fface148 +Subproject commit ab75c639e3c6b8a22c13c282f2ac91cae369bef6 From dd3479be223f78324ee995d9be4e70bd06241099 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 26 Aug 2021 01:59:27 -0500 Subject: [PATCH 77/96] updated PaHM sources --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index ab75c639..719c7e16 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit ab75c639e3c6b8a22c13c282f2ac91cae369bef6 +Subproject commit 719c7e16664dadc0d96311386852651479d149f2 From fdfb7d256c839b80e43afbb7eeda653be5e8bc86 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 26 Aug 2021 02:23:28 -0500 Subject: [PATCH 78/96] updated pahm cmake file --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 719c7e16..3a59d278 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 719c7e16664dadc0d96311386852651479d149f2 +Subproject commit 3a59d27805f3b99191c00cf4c802600b3a5d63cc From 368a99ed6c46dda6ced3b20989262572480f75e2 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 26 Aug 2021 15:31:31 -0500 Subject: [PATCH 79/96] updated orion modulefile to point to the latest stable modules in orion --- modulefiles/envmodules_intel.orion | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modulefiles/envmodules_intel.orion b/modulefiles/envmodules_intel.orion index 9b174692..bef335de 100644 --- a/modulefiles/envmodules_intel.orion +++ b/modulefiles/envmodules_intel.orion @@ -16,11 +16,11 @@ ### (1) Load all needed environment modules. module purge module load cmake -module load intel/2019.5 impi +module load intel/2020 impi/2020 module load szip hdf5/1.10.5-parallel module load netcdf/4.7.2-parallel -module load esmf/7.1.0r +module load esmf/8.0.0 #################### From aa3b70b0ae04c5ff893076c76f17e2217856ade6 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 26 Aug 2021 15:38:17 -0500 Subject: [PATCH 80/96] updated component_PAHM.mk --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index dc8b2de4..dd377bcb 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit dc8b2de497031eb894d21712af9c139ef9c67c3f +Subproject commit dd377bcb9b7f31614eedfc95123bae214e2eb115 From b3f1c98d80418a1a69d5323fdb363390f4be8790 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 26 Aug 2021 15:44:01 -0500 Subject: [PATCH 81/96] modified the nuopc make files to include aswip --- ADCIRC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADCIRC b/ADCIRC index 49debf8b..3cbab0fe 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit 49debf8b84356256c72bb9b4e5501bfe4ac5234a +Subproject commit 3cbab0fea6e2ddde80ad114a9f6eadc3e1507e96 From db9593be486df60ad809d35ca769a8d310057ed3 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sat, 28 Aug 2021 22:04:00 -0500 Subject: [PATCH 82/96] updated PAHM sources and the PAHM pointer --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 3a59d278..d0ef5692 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 3a59d27805f3b99191c00cf4c802600b3a5d63cc +Subproject commit d0ef5692f52aa51de24334d13604c3637e75d4f1 From 36859a371bb6da16c3cd0034c21cf79e3ed41c31 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sat, 28 Aug 2021 22:46:04 -0500 Subject: [PATCH 83/96] added aswip program --- scripts/functions_build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/functions_build b/scripts/functions_build index ab2270c4..57d8acaf 100644 --- a/scripts/functions_build +++ b/scripts/functions_build @@ -634,7 +634,7 @@ installNems() { if [ "${icmp}" == "ADCIRC" ]; then echo echo " --- Installing from: ${icmp} to ${instdir} ---" - for iprog in adcprep adcirc padcirc tide_fac aswip + for iprog in adcprep aswip adcirc padcirc tide_fac do prog="$( find -L ${icmp} -type f -name ${iprog} | head -1 )" From d90afd183a00f786aac0d594897d7ae5a4608424 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sun, 29 Aug 2021 00:36:54 -0500 Subject: [PATCH 84/96] modified the ADCIRC/PAHM .mk files to use Makefile by default --- NEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEMS b/NEMS index dd377bcb..33bfd89e 160000 --- a/NEMS +++ b/NEMS @@ -1 +1 @@ -Subproject commit dd377bcb9b7f31614eedfc95123bae214e2eb115 +Subproject commit 33bfd89e15ae332e786fcb1677dd74dde8fe2eba From 13bec10826f607cbe8ca2fcc9c16cbeb08bbde57 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sun, 29 Aug 2021 01:04:29 -0500 Subject: [PATCH 85/96] removed the tmp data pointer from the PaHM cap --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index d0ef5692..aff92f97 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit d0ef5692f52aa51de24334d13604c3637e75d4f1 +Subproject commit aff92f97acf5e327f2c93f621b9c8727202ddb25 From 960b5671d8f6d6fca60a0005c461988d71f96313 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sun, 29 Aug 2021 01:05:51 -0500 Subject: [PATCH 86/96] removed the tmp data pointer --- ADCIRC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADCIRC b/ADCIRC index 3cbab0fe..ff63e07a 160000 --- a/ADCIRC +++ b/ADCIRC @@ -1 +1 @@ -Subproject commit 3cbab0fea6e2ddde80ad114a9f6eadc3e1507e96 +Subproject commit ff63e07a3563448582c7ca01c6ed19df96d23fc0 From b2e612091d716f0b487c00c74b56e3370c2d185e Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 23 Sep 2021 03:27:26 -0500 Subject: [PATCH 87/96] Fixed the tri, P, uwnd and vwnd variables for NetCDF output --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index aff92f97..a7fefb20 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit aff92f97acf5e327f2c93f621b9c8727202ddb25 +Subproject commit a7fefb206f55a6b200cecc7b25c9ef477fa9d77d From 6217a20edccf1acb63332ab7f19381b2c7db5d4a Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Sun, 26 Sep 2021 13:35:05 -0500 Subject: [PATCH 88/96] Removed the NetCDF atmospheric data inputs functionality --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index a7fefb20..41bd774e 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit a7fefb206f55a6b200cecc7b25c9ef477fa9d77d +Subproject commit 41bd774ef88ce65f4666119593c233f877b655e2 From 052408cd50ec5483d82c98301baf3f8493b6df08 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 8 Nov 2021 12:54:35 -0600 Subject: [PATCH 89/96] added doxygen modifications and files to PaHM --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 41bd774e..906ee8e3 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 41bd774ef88ce65f4666119593c233f877b655e2 +Subproject commit 906ee8e384f7c39abca12fc997810917e6397f7c From 30a1d6efacbae00d293be359f488e1b1609463ea Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 8 Nov 2021 13:41:56 -0600 Subject: [PATCH 90/96] added the doxygen layout file --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 906ee8e3..6a7005df 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 906ee8e384f7c39abca12fc997810917e6397f7c +Subproject commit 6a7005df12897596ac90d2c1c9e5614b774c3c3f From f461b97377899c42da121d469b714a35620bad8b Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 8 Nov 2021 14:15:05 -0600 Subject: [PATCH 91/96] updated the documentation html pages for PaHM --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 6a7005df..a2652f66 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 6a7005df12897596ac90d2c1c9e5614b774c3c3f +Subproject commit a2652f66745df48009744303e090cb3ed1c921b1 From 300d5b2601917bbd7d1c9bc410b1cb32695b9269 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Mon, 8 Nov 2021 14:22:06 -0600 Subject: [PATCH 92/96] added index.html link in PaHM/doc/ --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index a2652f66..669b44a3 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit a2652f66745df48009744303e090cb3ed1c921b1 +Subproject commit 669b44a3a3e44f4755a60c5df267b9cf449ac93e From d652fc6a6d61bf45fda136a33676da967d289941 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Thu, 11 Nov 2021 22:07:38 -0600 Subject: [PATCH 93/96] fixed bug in parwind.F90 lines 862 & 890 in converting forecast hours to seconds --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 669b44a3..b702c4fe 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 669b44a3a3e44f4755a60c5df267b9cf449ac93e +Subproject commit b702c4fe1c048a6a2916a7d077c794046c1df3ea From f49b37b1ecb62ca16906ad8b39c59b8758b08a1a Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Fri, 12 Nov 2021 01:06:35 -0600 Subject: [PATCH 94/96] set dump to FALSE to avoid MPI_OpenFile errors; will be checked later --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index b702c4fe..94a033f9 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit b702c4fe1c048a6a2916a7d077c794046c1df3ea +Subproject commit 94a033f917fb774850f6aac9ee62ad34ddfc9e0c From d143be69e0c4f70a847a7e711aee57c44dc40e34 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Fri, 3 Dec 2021 01:14:48 -0600 Subject: [PATCH 95/96] modified the module file for hera to adapt to the latest system configuration --- modulefiles/envmodules_intel.hera | 12 ++-- modulefiles/envmodules_intel.hera-pre10172021 | 56 +++++++++++++++++++ 2 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 modulefiles/envmodules_intel.hera-pre10172021 diff --git a/modulefiles/envmodules_intel.hera b/modulefiles/envmodules_intel.hera index 190e58ee..93055c25 100644 --- a/modulefiles/envmodules_intel.hera +++ b/modulefiles/envmodules_intel.hera @@ -15,13 +15,14 @@ #################### ### (1) Load all needed environment modules. module purge +module load cmake module load intel/18.0.5.274 impi/2018.0.4 -module load szip -module use /home/emc.nemspara/SOFT-hera/modulefiles -module load hdf5_parallel/1.10.6.release -module load netcdf_parallel/4.7.4.release -module load esmf/8.1.0bs25g_ParallelNetCDF.release +# Points always to the latest compiled version of ESMF. It uses the following +# HDF5/NetCDF libraries (not the system ones) +module use /scratch1/NCEPDEV/nems/emc.nemspara/soft/modulefiles +module load hdf5_parallel/1.10.6.release netcdf_parallel/4.7.4.release +module load esmf ################### @@ -54,3 +55,4 @@ export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} export ESMFMKFILE=${ESMFMKFILE} ########## END:: PLATFORM CUSTOMIZED SETTINGS ########## + diff --git a/modulefiles/envmodules_intel.hera-pre10172021 b/modulefiles/envmodules_intel.hera-pre10172021 new file mode 100644 index 00000000..190e58ee --- /dev/null +++ b/modulefiles/envmodules_intel.hera-pre10172021 @@ -0,0 +1,56 @@ +#!/bin/bash-*-Shell-script-modules*- + +########################################################################### +### Module File to load the required environment modules for the NEMS application +### +### Author: Panagiotis Velissariou +### Date: June 26 2021 +########################################################################### + + +# 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 intel/18.0.5.274 impi/2018.0.4 +module load szip + +module use /home/emc.nemspara/SOFT-hera/modulefiles +module load hdf5_parallel/1.10.6.release +module load netcdf_parallel/4.7.4.release +module load esmf/8.1.0bs25g_ParallelNetCDF.release + + +################### +### (2) Set some environments varaiables related to the loaded +### modules and required to compile the NEMS application properly. +funcs="$( find . -type f -name "PlatformFuncs" | head -n 1 )" +if [ -f "${funcs}" ]; then + source "${funcs}" + + get_env_hdf5 + get_env_netcdf +fi +unset funcs + + +########## 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 + +export NETCDF_CONFIG=${NETCDFHOME:+${NETCDFHOME}/bin/nc-config} +export NETCDF_INCDIR=${NETCDFHOME:+${NETCDFHOME}/include} +export NETCDF_LIBDIR=${NETCDFHOME:+${NETCDFHOME}/lib} + +export ESMFMKFILE=${ESMFMKFILE} +########## END:: PLATFORM CUSTOMIZED SETTINGS ########## From 0c98cb71f0667cceca45a853300ac131ec6166e4 Mon Sep 17 00:00:00 2001 From: pvelissariou1 Date: Fri, 3 Dec 2021 01:20:22 -0600 Subject: [PATCH 96/96] modified the cmake module for hera to print a warning when the env. variable INTEL_LICENSE_FILE is not set --- PAHM | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAHM b/PAHM index 94a033f9..7fe688fb 160000 --- a/PAHM +++ b/PAHM @@ -1 +1 @@ -Subproject commit 94a033f917fb774850f6aac9ee62ad34ddfc9e0c +Subproject commit 7fe688fbf3e12e1e3406935aa87a73ef24411e4f