Skip to content

Commit

Permalink
Update multi-prog in HERA.env
Browse files Browse the repository at this point in the history
- Create mpmd_opt variable and set it to "--multi-prog".
- Replace instances of "--multi-prog" in launcher commands
with new mpmd_opt variable.

Refs NOAA-EMC#1060
  • Loading branch information
KateFriedman-NOAA committed Nov 7, 2022
1 parent 51488b4 commit d7994fa
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ step=$1

export npe_node_max=40
export launcher="srun -l --export=ALL"
export mpmd_opt="--multi-prog"

# Configure MPI environment
#export I_MPI_ADJUST_ALLREDUCE=5
Expand Down Expand Up @@ -47,17 +48,16 @@ if [ $step = "prep" -o $step = "prepbufr" ]; then

elif [ $step = "waveinit" -o $step = "waveprep" -o $step = "wavepostsbs" -o $step = "wavepostbndpnt" -o $step = "wavepostbndpntbll" -o $step = "wavepostpnt" ]; then

export mpmd="--multi-prog"
export CFP_MP="YES"
if [ $step = "waveprep" ]; then export MP_PULSE=0 ; fi
export wavempexec=${launcher}
export wave_mpmd=${mpmd}
export wave_mpmd=${mpmd_opt}

elif [ $step = "atmanalrun" ]; then

export CFP_MP=${CFP_MP:-"YES"}
export USE_CFP=${USE_CFP:-"YES"}
export APRUNCFP="$launcher -n \$ncmd --multi-prog"
export APRUNCFP="$launcher -n \$ncmd ${mpmd_opt}"

nth_max=$(($npe_node_max / $npe_node_atmanalrun))

Expand All @@ -69,7 +69,7 @@ elif [ $step = "atmensanalrun" ]; then

export CFP_MP=${CFP_MP:-"YES"}
export USE_CFP=${USE_CFP:-"YES"}
export APRUNCFP="$launcher -n \$ncmd --multi-prog"
export APRUNCFP="$launcher -n \$ncmd ${mpmd_opt}"

nth_max=$(($npe_node_max / $npe_node_atmensanalrun))

Expand All @@ -79,7 +79,7 @@ elif [ $step = "atmensanalrun" ]; then

elif [ $step = "aeroanlrun" ]; then

export APRUNCFP="$launcher -n \$ncmd --multi-prog"
export APRUNCFP="$launcher -n \$ncmd ${mpmd_opt}"

nth_max=$(($npe_node_max / $npe_node_aeroanlrun))

Expand All @@ -94,7 +94,7 @@ elif [ $step = "anal" -o $step = "analcalc" ]; then

export CFP_MP=${CFP_MP:-"YES"}
export USE_CFP=${USE_CFP:-"YES"}
export APRUNCFP="$launcher -n \$ncmd --multi-prog"
export APRUNCFP="$launcher -n \$ncmd ${mpmd_opt}"

nth_max=$(($npe_node_max / $npe_node_anal))

Expand Down Expand Up @@ -143,7 +143,7 @@ elif [ $step = "gldas" ]; then
# periods being processed.

npe_gldas_data_proc=$(($gldas_spinup_hours + 12))
export APRUN_GLDAS_DATA_PROC="$launcher -n $npe_gldas_data_proc --multi-prog"
export APRUN_GLDAS_DATA_PROC="$launcher -n $npe_gldas_data_proc ${mpmd_opt}"

elif [ $step = "eobs" ]; then

Expand All @@ -158,7 +158,7 @@ elif [ $step = "eobs" ]; then

export CFP_MP=${CFP_MP:-"YES"}
export USE_CFP=${USE_CFP:-"YES"}
export APRUNCFP="$launcher -n \$ncmd --multi-prog"
export APRUNCFP="$launcher -n \$ncmd ${mpmd_opt}"

elif [ $step = "eupd" ]; then

Expand All @@ -170,7 +170,7 @@ elif [ $step = "eupd" ]; then

export CFP_MP=${CFP_MP:-"YES"}
export USE_CFP=${USE_CFP:-"YES"}
export APRUNCFP="$launcher -n \$ncmd --multi-prog"
export APRUNCFP="$launcher -n \$ncmd ${mpmd_opt}"

elif [ $step = "fcst" ]; then

Expand Down Expand Up @@ -280,13 +280,13 @@ elif [ $step = "awips" ]; then

export NTHREADS_AWIPS=${nth_awips:-2}
[[ $NTHREADS_AWIPS -gt $nth_max ]] && export NTHREADS_AWIPS=$nth_max
export APRUN_AWIPSCFP="$launcher -n $npe_awips --multi-prog"
export APRUN_AWIPSCFP="$launcher -n $npe_awips ${mpmd_opt}"

elif [ $step = "gempak" ]; then

nth_max=$(($npe_node_max / $npe_node_gempak))

export NTHREADS_GEMPAK=${nth_gempak:-1}
[[ $NTHREADS_GEMPAK -gt $nth_max ]] && export NTHREADS_GEMPAK=$nth_max
export APRUN="$launcher -n $npe_gempak --multi-prog"
export APRUN="$launcher -n $npe_gempak ${mpmd_opt}"
fi

0 comments on commit d7994fa

Please sign in to comment.