-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clone, build, and run C48_ATM and C48_S2SW on Gaea C5 and C6 (#3106)
What: Correct build/run for C48_ATM and C48_S2SW on Gaea C5. Add build and run capability for C48_ATM, C48_S2SW, and C96_atm3DVar on Gaea C6. Why: After the C5 OS upgrade, submodules no longer built in the global-workflow. This PR correct that and adds build/run capability to C6. Resolves #3011
- Loading branch information
1 parent
4ab8cf8
commit 01f9c35
Showing
20 changed files
with
274 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
#! /usr/bin/env bash | ||
|
||
if [[ $# -ne 1 ]]; then | ||
|
||
echo "Must specify an input argument to set runtime environment variables!" | ||
exit 1 | ||
|
||
fi | ||
|
||
step=$1 | ||
|
||
export launcher="srun -l --export=ALL" | ||
export mpmd_opt="--multi-prog --output=mpmd.%j.%t.out" | ||
|
||
export OMP_STACKSIZE=2048000 | ||
export NTHSTACK=1024000000 | ||
|
||
ulimit -s unlimited | ||
ulimit -a | ||
|
||
# Calculate common variables | ||
# Check first if the dependent variables are set | ||
if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then | ||
max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) | ||
NTHREADSmax=${threads_per_task:-${max_threads_per_task}} | ||
NTHREADS1=${threads_per_task:-1} | ||
[[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} | ||
[[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} | ||
# This may be useful when GaeaC6 is fully ported, so ignore SC warning | ||
# shellcheck disable=SC2034 | ||
APRUN_default="${launcher} -n ${ntasks}" | ||
else | ||
echo "ERROR config.resources must be sourced before sourcing GAEAC6.env" | ||
exit 2 | ||
fi | ||
|
||
if [[ "${step}" = "prep" ]]; then | ||
|
||
export POE="NO" | ||
export BACK="NO" | ||
export sys_tp="GAEAC6" | ||
export launcher_PREP="srun" | ||
|
||
elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then | ||
|
||
export MKL_NUM_THREADS=4 | ||
export MKL_CBWR=AUTO | ||
|
||
export CFP_MP=${CFP_MP:-"YES"} | ||
export USE_CFP=${USE_CFP:-"YES"} | ||
export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" | ||
|
||
export NTHREADS_GSI=${NTHREADSmax} | ||
export APRUN_GSI="${APRUN_default} --cpus-per-task=${NTHREADS_GSI}" | ||
|
||
export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} | ||
[[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} | ||
export APRUN_CALCINC="${launcher} \$ncmd --cpus-per-task=${NTHREADS_CALCINC}" | ||
|
||
export NTHREADS_CYCLE=${threads_per_task_cycle:-12} | ||
[[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} | ||
ntasks_cycle=${ntiles:-6} | ||
export APRUN_CYCLE="${launcher} -n ${ntasks_cycle} --cpus-per-task=${NTHREADS_CYCLE}" | ||
|
||
export NTHREADS_GAUSFCANL=1 | ||
ntasks_gausfcanl=${ntasks_gausfcanl:-1} | ||
export APRUN_GAUSFCANL="${launcher} -n ${ntasks_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" | ||
|
||
elif [[ "${step}" = "sfcanl" ]]; then | ||
|
||
export NTHREADS_CYCLE=${threads_per_task:-14} | ||
export APRUN_CYCLE="${APRUN_default} --cpus-per-task=${NTHREADS_CYCLE}" | ||
|
||
elif [[ "${step}" = "fcst" ]]; then | ||
|
||
(( nnodes = (ntasks+tasks_per_node-1)/tasks_per_node )) | ||
(( ufs_ntasks = nnodes*tasks_per_node )) | ||
# With ESMF threading, the model wants to use the full node | ||
export APRUN_UFS="${launcher} -n ${ufs_ntasks}" | ||
unset nnodes ufs_ntasks | ||
|
||
elif [[ "${step}" = "upp" ]]; then | ||
|
||
export NTHREADS_UPP=${NTHREADS1} | ||
export APRUN_UPP="${APRUN_default} --cpus-per-task=${NTHREADS_UPP}" | ||
|
||
elif [[ "${step}" = "atmos_products" ]]; then | ||
|
||
export USE_CFP="YES" # Use MPMD for downstream product generation on GaeaC6 | ||
|
||
elif [[ "${step}" = "oceanice_products" ]]; then | ||
|
||
export NTHREADS_OCNICEPOST=${NTHREADS1} | ||
export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}" | ||
|
||
elif [[ "${step}" = "fit2obs" ]]; then | ||
|
||
export NTHREADS_FIT2OBS=${NTHREADS1} | ||
export MPIRUN="${APRUN_default} --cpus-per-task=${NTHREADS_FIT2OBS}" | ||
|
||
elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || [[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostbndpntbll" ]] || [[ "${step}" = "wavepostpnt" ]]; then | ||
|
||
export CFP_MP="YES" | ||
if [[ "${step}" = "waveprep" ]]; then export MP_PULSE=0 ; fi | ||
export wavempexec=${launcher} | ||
export wave_mpmd=${mpmd_opt} | ||
|
||
fi |
2 changes: 1 addition & 1 deletion
2
modulefiles/module_base.gaea.lua → modulefiles/module_base.gaeac5.lua
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,47 @@ | ||
help([[ | ||
Load environment to run GFS on Gaea C6 | ||
]]) | ||
|
||
local spack_mod_path=(os.getenv("spack_mod_path") or "None") | ||
prepend_path("MODULEPATH", spack_mod_path) | ||
|
||
load(pathJoin("stack-intel", (os.getenv("stack_intel_ver") or "None"))) | ||
load(pathJoin("stack-cray-mpich", (os.getenv("stack_cray_mpich_ver") or "None"))) | ||
load(pathJoin("python", (os.getenv("python_ver") or "None"))) | ||
|
||
load(pathJoin("jasper", (os.getenv("jasper_ver") or "None"))) | ||
load(pathJoin("libpng", (os.getenv("libpng_ver") or "None"))) | ||
load(pathJoin("cdo", (os.getenv("cdo_ver") or "None"))) | ||
load(pathJoin("hdf5", (os.getenv("hdf5_ver") or "None"))) | ||
load(pathJoin("netcdf-c", (os.getenv("netcdf_c_ver") or "None"))) | ||
load(pathJoin("netcdf-fortran", (os.getenv("netcdf_fortran_ver") or "None"))) | ||
load(pathJoin("perlbrew", (os.getenv("perl_ver") or "None"))) | ||
|
||
load(pathJoin("nco", (os.getenv("nco_ver") or "None"))) | ||
load(pathJoin("prod_util", (os.getenv("prod_util_ver") or "None"))) | ||
load(pathJoin("grib-util", (os.getenv("grib_util_ver") or "None"))) | ||
load(pathJoin("g2tmpl", (os.getenv("g2tmpl_ver") or "None"))) | ||
load(pathJoin("gsi-ncdiag", (os.getenv("gsi_ncdiag_ver") or "None"))) | ||
load(pathJoin("crtm", (os.getenv("crtm_ver") or "None"))) | ||
load(pathJoin("bufr", (os.getenv("bufr_ver") or "None"))) | ||
load(pathJoin("wgrib2", (os.getenv("wgrib2_ver") or "None"))) | ||
load(pathJoin("py-netcdf4", (os.getenv("py_netcdf4_ver") or "None"))) | ||
load(pathJoin("py-f90nml", (os.getenv("py_f90nml_ver") or "None"))) | ||
load(pathJoin("py-pyyaml", (os.getenv("py_pyyaml_ver") or "None"))) | ||
load(pathJoin("py-jinja2", (os.getenv("py_jinja2_ver") or "None"))) | ||
load(pathJoin("py-pandas", (os.getenv("py_pandas_ver") or "None"))) | ||
load(pathJoin("py-python-dateutil", (os.getenv("py_python_dateutil_ver") or "None"))) | ||
load(pathJoin("met", (os.getenv("met_ver") or "None"))) | ||
load(pathJoin("metplus", (os.getenv("metplus_ver") or "None"))) | ||
load(pathJoin("py-xarray", (os.getenv("py_xarray_ver") or "None"))) | ||
|
||
setenv("WGRIB2","wgrib2") | ||
setenv("UTILROOT",(os.getenv("prod_util_ROOT") or "None")) | ||
|
||
prepend_path("MODULEPATH", pathJoin("/gpfs/f6/bil-fire8/world-shared/global/glopara/git/prepobs/v" .. (os.getenv("prepobs_run_ver") or "None"), "modulefiles")) | ||
load(pathJoin("prepobs", (os.getenv("prepobs_run_ver") or "None"))) | ||
|
||
prepend_path("MODULEPATH", pathJoin("/gpfs/f6/bil-fire8/world-shared/global/glopara/git/Fit2Obs/v" .. (os.getenv("fit2obs_ver") or "None"), "modulefiles")) | ||
load(pathJoin("fit2obs", (os.getenv("fit2obs_ver") or "None"))) | ||
|
||
whatis("Description: GFS run setup environment") |
4 changes: 2 additions & 2 deletions
4
modulefiles/module_gwsetup.gaea.lua → modulefiles/module_gwsetup.gaeac5.lua
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,20 @@ | ||
help([[ | ||
Load environment to run GFS workflow setup scripts on Gaea C6 | ||
]]) | ||
|
||
prepend_path("MODULEPATH", "/ncrc/proj/epic/rocoto/modulefiles") | ||
load(pathJoin("rocoto")) | ||
|
||
prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/c6/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core") | ||
|
||
local stack_intel_ver=os.getenv("stack_intel_ver") or "2023.2.0" | ||
local python_ver=os.getenv("python_ver") or "3.10.13" | ||
|
||
load(pathJoin("stack-intel", stack_intel_ver)) | ||
load(pathJoin("python", python_ver)) | ||
load("py-jinja2") | ||
load("py-pyyaml") | ||
load("py-numpy") | ||
load("git-lfs") | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /usr/bin/env bash | ||
|
||
# GaeaC6-specific job resources | ||
|
||
unset memory | ||
# shellcheck disable=SC2312 | ||
for mem_var in $(env | grep '^memory_' | cut -d= -f1); do | ||
unset "${mem_var}" | ||
done |
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
File renamed without changes.
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 |
---|---|---|
@@ -1,8 +1,5 @@ | ||
export stack_intel_ver=2023.1.0 | ||
export stack_cray_mpich_ver=8.1.25 | ||
export spack_env=gsi-addon-dev | ||
|
||
export perl_ver=5.38.2 | ||
|
||
source "${HOMEgfs:-}/versions/spack.ver" | ||
export spack_mod_path="/ncrc/proj/epic/spack-stack/spack-stack-${spack_stack_ver}/envs/${spack_env}/install/modulefiles/Core" |
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,8 @@ | ||
export stack_intel_ver=2023.2.0 | ||
export stack_cray_mpich_ver=8.1.28 | ||
export spack_env=gsi-addon-dev | ||
|
||
export perl_ver=5.38.2 | ||
|
||
source "${HOMEgfs:-}/versions/spack.ver" | ||
export spack_mod_path="/ncrc/proj/epic/spack-stack/spack-stack-${spack_stack_ver}/envs/${spack_env}/install/modulefiles/Core" |
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,8 @@ | ||
export stack_intel_ver=2023.2.0 | ||
export stack_cray_mpich_ver=8.1.29 | ||
export spack_env=gsi-addon | ||
|
||
export perl_ver=5.38.2 | ||
|
||
source "${HOMEgfs:-}/versions/spack.ver" | ||
export spack_mod_path="/ncrc/proj/epic/spack-stack/c6/spack-stack-${spack_stack_ver}/envs/${spack_env}/install/modulefiles/Core" |
Oops, something went wrong.