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.
- Loading branch information
1 parent
f95a570
commit 7b4b81c
Showing
86 changed files
with
2,129 additions
and
21,459 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
#!/bin/ksh -x | ||
|
||
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 "anal fcst post vrfy" | ||
echo "eobs eupd ecen efcs epos" | ||
echo "postsnd awips gempak" | ||
exit 1 | ||
|
||
fi | ||
|
||
step=$1 | ||
|
||
export npe_node_max=40 | ||
export launcher="srun --export=ALL" | ||
|
||
# Configure MPI environment | ||
export I_MPI_ADJUST_ALLREDUCE=5 | ||
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 OMP_STACKSIZE=2048000 | ||
export NTHSTACK=1024000000 | ||
#export LD_BIND_NOW=1 | ||
export job=${PBS_JOBNAME:-$step} | ||
export jobid=${job}.${PBS_JOBID:-$$} | ||
|
||
if [ $step = "prep" -o $step = "prepbufr" ]; then | ||
|
||
nth_max=$(($npe_node_max / $npe_node_prep)) | ||
|
||
export POE="NO" | ||
export BACK=${BACK:-"YES"} | ||
export sys_tp="HERA" | ||
|
||
elif [ $step = "anal" ]; then | ||
|
||
export MKL_NUM_THREADS=4 | ||
export MKL_CBWR=AUTO | ||
|
||
nth_max=$(($npe_node_max / $npe_node_anal)) | ||
|
||
export NTHREADS_GSI=${nth_anal:-$nth_max} | ||
[[ $NTHREADS_GSI -gt $nth_max ]] && export NTHREADS_GSI=$nth_max | ||
export APRUN_GSI="$launcher" | ||
|
||
export NTHREADS_CALCINC=${nth_calcinc:-1} | ||
[[ $NTHREADS_CALCINC -gt $nth_max ]] && export NTHREADS_CALCINC=$nth_max | ||
export APRUN_CALCINC="$launcher" | ||
|
||
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 NTHREADS_GAUSFCANL=1 | ||
npe_gausfcanl=${npe_gausfcanl:-1} | ||
|
||
export APRUN_GAUSFCANL="$launcher -n $npe_gausfcanl" | ||
|
||
elif [ $step = "eobs" ]; then | ||
|
||
export MKL_NUM_THREADS=4 | ||
export MKL_CBWR=AUTO | ||
|
||
nth_max=$(($npe_node_max / $npe_node_eobs)) | ||
|
||
export NTHREADS_GSI=${nth_eobs:-$nth_max} | ||
[[ $NTHREADS_GSI -gt $nth_max ]] && export NTHREADS_GSI=$nth_max | ||
export APRUN_GSI="$launcher" | ||
|
||
elif [ $step = "eupd" ]; then | ||
|
||
nth_max=$(($npe_node_max / $npe_node_eupd)) | ||
|
||
export NTHREADS_ENKF=${nth_eupd:-$nth_max} | ||
[[ $NTHREADS_ENKF -gt $nth_max ]] && export NTHREADS_ENKF=$nth_max | ||
export APRUN_ENKF="$launcher" | ||
|
||
elif [ $step = "fcst" ]; then | ||
|
||
nth_max=$(($npe_node_max / $npe_node_fcst)) | ||
|
||
export NTHREADS_FV3=${nth_fv3:-$nth_max} | ||
[[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max | ||
export cores_per_node=$npe_node_max | ||
export APRUN_FV3="$launcher" | ||
|
||
export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} | ||
[[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max | ||
export APRUN_REGRID_NEMSIO="$launcher" | ||
|
||
export NTHREADS_REMAP=${nth_remap:-2} | ||
[[ $NTHREADS_REMAP -gt $nth_max ]] && export NTHREADS_REMAP=$nth_max | ||
export APRUN_REMAP="$launcher" | ||
|
||
elif [ $step = "efcs" ]; then | ||
|
||
nth_max=$(($npe_node_max / $npe_node_efcs)) | ||
|
||
export NTHREADS_FV3=${nth_efcs:-$nth_max} | ||
[[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max | ||
export cores_per_node=$npe_node_max | ||
export APRUN_FV3="$launcher" | ||
|
||
export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} | ||
[[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max | ||
export APRUN_REGRID_NEMSIO="$launcher $LEVS" | ||
|
||
elif [ $step = "post" ]; then | ||
|
||
nth_max=$(($npe_node_max / $npe_node_post)) | ||
|
||
export NTHREADS_NP=${nth_np:-1} | ||
[[ $NTHREADS_NP -gt $nth_max ]] && export NTHREADS_NP=$nth_max | ||
export APRUN_NP="$launcher" | ||
|
||
export NTHREADS_DWN=${nth_dwn:-1} | ||
[[ $NTHREADS_DWN -gt $nth_max ]] && export NTHREADS_DWN=$nth_max | ||
export APRUN_DWN="$launcher" | ||
|
||
elif [ $step = "ecen" ]; then | ||
|
||
nth_max=$(($npe_node_max / $npe_node_ecen)) | ||
|
||
export NTHREADS_ECEN=${nth_ecen:-$nth_max} | ||
[[ $NTHREADS_ECEN -gt $nth_max ]] && export NTHREADS_ECEN=$nth_max | ||
export APRUN_ECEN="$launcher" | ||
|
||
export NTHREADS_CHGRES=${nth_chgres:-12} | ||
[[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max | ||
export APRUN_CHGRES="time" | ||
|
||
export NTHREADS_CALCINC=${nth_calcinc:-1} | ||
[[ $NTHREADS_CALCINC -gt $nth_max ]] && export NTHREADS_CALCINC=$nth_max | ||
export APRUN_CALCINC="$launcher" | ||
|
||
elif [ $step = "epos" ]; then | ||
|
||
nth_max=$(($npe_node_max / $npe_node_epos)) | ||
|
||
export NTHREADS_EPOS=${nth_epos:-$nth_max} | ||
[[ $NTHREADS_EPOS -gt $nth_max ]] && export NTHREADS_EPOS=$nth_max | ||
export APRUN_EPOS="$launcher" | ||
|
||
elif [ $step = "fv3ic" ]; then | ||
|
||
export NTHREADS_CHGRES=${nth_chgres:-$npe_node_max} | ||
[[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max | ||
export APRUN_CHGRES="time" | ||
|
||
elif [ $step = "postsnd" ]; then | ||
|
||
nth_max=$(($npe_node_max / $npe_node_postsnd)) | ||
|
||
export NTHREADS_POSTSND=${nth_postsnd:-1} | ||
[[ $NTHREADS_POSTSND -gt $nth_max ]] && export NTHREADS_POSTSND=$nth_max | ||
export APRUN_POSTSND="$launcher" | ||
|
||
export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} | ||
[[ $NTHREADS_POSTSNDCFP -gt $nth_max ]] && export NTHREADS_POSTSNDCFP=$nth_max | ||
export APRUN_POSTSNDCFP="$launcher" | ||
|
||
elif [ $step = "awips" ]; then | ||
|
||
echo "WARNING: $step is not enabled on $machine!" | ||
|
||
elif [ $step = "gempak" ]; then | ||
|
||
echo "WARNING: $step is not enabled on $machine!" | ||
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
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.