forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable forecast-only experiments on Hercules (NOAA-EMC#2128)
This add forecast-only support for Hercules to the global workflow. Partially satisfies NOAA-EMC#1588. Co-authored-by: Walter Kolczynski - NOAA <Walter.Kolczynski@noaa.gov>
- Loading branch information
1 parent
a29f751
commit e2664c0
Showing
27 changed files
with
273 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#! /usr/bin/env bash | ||
|
||
if [[ $# -ne 1 ]]; then | ||
|
||
echo "Must specify an input argument to set runtime environment variables!" | ||
echo "argument can be any one of the following:" | ||
echo "fcst post" | ||
echo "Note: Hercules is only set up to run in forecast-only mode" | ||
exit 1 | ||
|
||
fi | ||
|
||
step=$1 | ||
|
||
export npe_node_max=40 | ||
export launcher="srun -l --export=ALL" | ||
export mpmd_opt="--multi-prog --output=mpmd.%j.%t.out" | ||
|
||
# Configure MPI environment | ||
export MPI_BUFS_PER_PROC=2048 | ||
export MPI_BUFS_PER_HOST=2048 | ||
export MPI_GROUP_MAX=256 | ||
export MPI_MEMMAP_OFF=1 | ||
export MP_STDOUTMODE="ORDERED" | ||
export KMP_AFFINITY=scatter | ||
export OMP_STACKSIZE=2048000 | ||
export NTHSTACK=1024000000 | ||
#export LD_BIND_NOW=1 | ||
|
||
ulimit -s unlimited | ||
ulimit -a | ||
|
||
if [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || \ | ||
[[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostpnt" ]] || [[ "${step}" == "wavepostbndpntbll" ]]; then | ||
|
||
export CFP_MP="YES" | ||
if [[ "${step}" = "waveprep" ]]; then export MP_PULSE=0 ; fi | ||
export wavempexec=${launcher} | ||
export wave_mpmd=${mpmd_opt} | ||
|
||
elif [[ "${step}" = "fcst" ]]; then | ||
|
||
export OMP_STACKSIZE=512M | ||
if [[ "${CDUMP}" =~ "gfs" ]]; then | ||
nprocs="npe_${step}_gfs" | ||
ppn="npe_node_${step}_gfs" || ppn="npe_node_${step}" | ||
else | ||
nprocs="npe_${step}" | ||
ppn="npe_node_${step}" | ||
fi | ||
(( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) | ||
(( ntasks = nnodes*${!ppn} )) | ||
# With ESMF threading, the model wants to use the full node | ||
export APRUN_UFS="${launcher} -n ${ntasks}" | ||
unset nprocs ppn nnodes ntasks | ||
|
||
elif [[ "${step}" = "upp" ]]; then | ||
|
||
nth_max=$((npe_node_max / npe_node_upp)) | ||
|
||
export NTHREADS_UPP=${nth_upp:-1} | ||
[[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} | ||
export APRUN_UPP="${launcher} -n ${npe_upp} --cpus-per-task=${NTHREADS_UPP}" | ||
|
||
elif [[ "${step}" = "atmos_products" ]]; then | ||
|
||
export USE_CFP="YES" # Use MPMD for downstream product generation | ||
|
||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
help([[ | ||
Load environment to run GFS on Hercules | ||
]]) | ||
|
||
spack_stack_ver=(os.getenv("spack_stack_ver") or "None") | ||
spack_env=(os.getenv("spack_env") or "None") | ||
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-" .. spack_stack_ver .. "/envs/" .. spack_env .. "/install/modulefiles/Core") | ||
|
||
load(pathJoin("stack-intel", os.getenv("stack_intel_ver"))) | ||
load(pathJoin("stack-intel-oneapi-mpi", os.getenv("stack_impi_ver"))) | ||
load(pathJoin("python", os.getenv("python_ver"))) | ||
|
||
-- TODO load NCL once the SAs remove the 'depends_on' statements within it | ||
-- NCL is a static installation and does not depend on any libraries | ||
-- but as is will load, among others, the system netcdf-c/4.9.0 module | ||
--load(pathJoin("ncl", os.getenv("ncl_ver"))) | ||
load(pathJoin("jasper", os.getenv("jasper_ver"))) | ||
load(pathJoin("libpng", os.getenv("libpng_ver"))) | ||
load(pathJoin("cdo", os.getenv("cdo_ver"))) | ||
|
||
load(pathJoin("hdf5", os.getenv("hdf5_ver"))) | ||
load(pathJoin("netcdf-c", os.getenv("netcdf_c_ver"))) | ||
load(pathJoin("netcdf-fortran", os.getenv("netcdf_fortran_ver"))) | ||
|
||
load(pathJoin("nco", os.getenv("nco_ver"))) | ||
load(pathJoin("prod_util", os.getenv("prod_util_ver"))) | ||
load(pathJoin("grib-util", os.getenv("grib_util_ver"))) | ||
load(pathJoin("g2tmpl", os.getenv("g2tmpl_ver"))) | ||
load(pathJoin("gsi-ncdiag", os.getenv("gsi_ncdiag_ver"))) | ||
load(pathJoin("crtm", os.getenv("crtm_ver"))) | ||
load(pathJoin("bufr", os.getenv("bufr_ver"))) | ||
load(pathJoin("wgrib2", os.getenv("wgrib2_ver"))) | ||
load(pathJoin("py-netcdf4", os.getenv("py_netcdf4_ver"))) | ||
load(pathJoin("py-pyyaml", os.getenv("py_pyyaml_ver"))) | ||
load(pathJoin("py-jinja2", os.getenv("py_jinja2_ver"))) | ||
|
||
setenv("WGRIB2","wgrib2") | ||
setenv("UTILROOT",(os.getenv("prod_util_ROOT") or "None")) | ||
|
||
prepend_path("MODULEPATH", pathJoin("/work/noaa/global/glopara/git/prepobs/feature-GFSv17_com_reorg_log_update/modulefiles")) | ||
load(pathJoin("prepobs", os.getenv("prepobs_run_ver"))) | ||
|
||
prepend_path("MODULEPATH", pathJoin("/work/noaa/global/glopara/git/Fit2Obs/v" .. (os.getenv("fit2obs_ver") or "None"), "modulefiles")) | ||
load(pathJoin("fit2obs", os.getenv("fit2obs_ver"))) | ||
|
||
whatis("Description: GFS run environment") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
help([[ | ||
Load environment to run GFS workflow ci scripts on Hercules | ||
]]) | ||
|
||
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") | ||
|
||
load(pathJoin("stack-intel", os.getenv("2021.9.0"))) | ||
load(pathJoin("stack-intel-oneapi-mpi", os.getenv("2021.9.0"))) | ||
|
||
load(pathJoin("netcdf-c", os.getenv("4.9.2"))) | ||
load(pathJoin("netcdf-fortran", os.getenv("4.6.0"))) | ||
load(pathJoin("nccmp","1.9.0.1")) | ||
load(pathJoin("wgrib2", "3.1.1")) | ||
|
||
whatis("Description: GFS run ci top-level sripts environment") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
help([[ | ||
Load environment to run GFS workflow ci scripts on Hercules | ||
]]) | ||
|
||
load(pathJoin("contrib","0.1")) | ||
load(pathJoin("rocoto","1.3.5")) | ||
|
||
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") | ||
|
||
local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.9.0" | ||
local python_ver=os.getenv("python_ver") or "3.10.8" | ||
|
||
load(pathJoin("stack-intel", stack_intel_ver)) | ||
load(pathJoin("python", python_ver)) | ||
load("py-jinja2") | ||
load("py-pyyaml") | ||
load("py-numpy") | ||
|
||
whatis("Description: GFS run setup environment") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.