Skip to content

Commit

Permalink
Cleaned up forecast_predet.sh, added threading info to WCOSS envs.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Jan 31, 2022
1 parent 4a6cb70 commit f1b9393
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
12 changes: 7 additions & 5 deletions env/WCOSS_C.env
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,19 @@ elif [ $step = "eupd" ]; then

elif [ $step = "fcst" ]; then

#PEs and PEs/node can differ for GFS and GDAS forecasts if threading differs
if [[ $CDUMP == "gfs" ]]; then
npe_fcst=$npe_fcst_gfs
npe_node_fcst=$npe_node_fcst_gfs
fi

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 -j 1 -n ${npe_fv3:-$npe_fcst} -N $npe_node_fcst -d $NTHREADS_FV3 -cc depth"
if [ $CDUMP = "gdas" ]; then
export APRUN_FV3="$launcher -j 1 -n ${npe_fcst} -N $npe_node_fcst -d $NTHREADS_FV3 -cc depth"
else
export APRUN_FV3="$launcher -j 1 -n ${npe_fcst_gfs} -N $npe_node_fcst -d $NTHREADS_FV3 -cc depth"
fi
export APRUN_FV3="$launcher -j 1 -n ${npe_fcst} -N $npe_node_fcst -d $NTHREADS_FV3 -cc depth"

export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1}
[[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max
Expand Down
14 changes: 8 additions & 6 deletions env/WCOSS_DELL_P3.env
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,19 @@ elif [ $step = "eupd" ]; then

elif [ $step = "fcst" ]; then

#PEs and PEs/node can differ for GFS and GDAS forecasts if threading differs
if [[ $CDUMP == "gfs" ]]; then
npe_fcst=$npe_fcst_gfs
npe_node_fcst=$npe_node_fcst_gfs
fi

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
if [ $CDUMP = "gdas" ]; then
#export APRUN_FV3="$launcher ${npe_fv3:-${npe_fcst:-$PBS_NP}}"
export APRUN_FV3="$launcher ${npe_fcst:-$PBS_NP}"
else
export APRUN_FV3="$launcher ${npe_fcst_gfs:-$PBS_NP}"
fi
#export APRUN_FV3="$launcher ${npe_fv3:-${npe_fcst:-$PBS_NP}}"
export APRUN_FV3="$launcher ${npe_fcst:-$PBS_NP}"
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"
Expand Down
6 changes: 0 additions & 6 deletions ush/forecast_predet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,6 @@ FV3_GFS_predet(){
#file and the value of npe_node_fcst is not correctly defined when using more than
#one thread and sets NTHREADS_FV3=1 even when the number of threads is appropraitely >1
#NTHREADS_FV3=${NTHREADS_FV3:-${NTHREADS_FCST:-${nth_fv3:-1}}}
#Threading can be different for GFS and GDAS forecasts
if [[ $CDUMP == "gdas" ]]; then
NTHREADS_FV3=${nth_fv3:-1}
else
NTHREADS_FV3=${nth_fv3_gfs:-1}
fi
cores_per_node=${cores_per_node:-${npe_node_fcst:-24}}
ntiles=${ntiles:-6}
if [ $MEMBER -lt 0 ]; then
Expand Down

0 comments on commit f1b9393

Please sign in to comment.