diff --git a/env/ORION.env b/env/ORION.env index 400963d3c8..e20945bc07 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -132,20 +132,20 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export NTHREADS_GSI=${nth_anal:-${nth_max}} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_anal}}" + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_anal}} --cpus-per-task=${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} \$ncmd" + export APRUN_CALCINC="${launcher} \$ncmd --cpus-per-task=${NTHREADS_CALCINC}" export NTHREADS_CYCLE=${nth_cycle:-12} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_cycle=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_cycle}" + export APRUN_CYCLE="${launcher} -n ${npe_cycle} --cpus-per-task=${NTHREADS_CYCLE}" export NTHREADS_GAUSFCANL=1 npe_gausfcanl=${npe_gausfcanl:-1} - export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" + export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" elif [[ "${step}" = "sfcanl" ]]; then nth_max=$((npe_node_max / npe_node_sfcanl)) diff --git a/jobs/rocoto/post.sh b/jobs/rocoto/post.sh index c91b9d4679..ca8bd7aa24 100755 --- a/jobs/rocoto/post.sh +++ b/jobs/rocoto/post.sh @@ -8,9 +8,26 @@ source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. ${HOMEgfs}/ush/load_fv3gfs_modules.sh -status=$? -[[ ${status} -ne 0 ]] && exit ${status} +# . ${HOMEgfs}/ush/load_fv3gfs_modules.sh +# status=$? +# [[ ${status} -ne 0 ]] && exit ${status} +# Temporarily load modules from UPP +source "${HOMEgfs}/ush/detect_machine.sh" +source "${HOMEgfs}/ush/module-setup.sh" +module use "${HOMEgfs}/sorc/ufs_model.fd/FV3/upp/modulefiles" +module load "${MACHINE_ID}" +module load prod_util +if [[ "${MACHINE_ID}" = "wcoss2" ]]; then + module load cray-pals + module load cfp +else + # shellcheck disable=SC2154 + export UTILROOT="${prod_util_ROOT}" +fi +module load grib-util +module load wgrib2 +export WGRIB2=wgrib2 +# End hack export job="post" export jobid="${job}.$$" diff --git a/ush/module-setup.sh b/ush/module-setup.sh index 4279a99dd4..3f2dd9dcf9 100755 --- a/ush/module-setup.sh +++ b/ush/module-setup.sh @@ -117,3 +117,11 @@ elif [[ ${MACHINE_ID} = "noaacloud" ]]; then else echo WARNING: UNKNOWN PLATFORM 1>&2 fi + +# If this function exists in the environment, run it; else do not +ftype=$(type -t set_strict) +if [[ "${ftype}" == "function" ]]; then + set_strict +else + set +u +fi