Skip to content

Commit

Permalink
make AWS use different partitions for fcst and others
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuang-jedi committed Nov 21, 2024
1 parent 0502044 commit b078484
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 6 deletions.
2 changes: 1 addition & 1 deletion parm/config/gefs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ case ${machine} in
;;
"AWSPW")
export PARTITION_BATCH="compute"
max_tasks_per_node=36
max_tasks_per_node=48
;;
"AZUREPW")
export PARTITION_BATCH="compute"
Expand Down
60 changes: 60 additions & 0 deletions parm/config/gefs/config.resources.AWSPW
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,63 @@ unset memory
for mem_var in $(env | grep '^memory_' | cut -d= -f1); do
unset "${mem_var}"
done

step=$1

echo "step: $step"

case ${step} in
"fcst" | "efcs")
export PARTITION_BATCH="compute"
max_tasks_per_node=48
;;

"arch")
export PARTITION_BATCH="process"
max_tasks_per_node=24
;;

"prep_emissions")
export PARTITION_BATCH="process"
max_tasks_per_node=24
export ntasks=1
export threads_per_task=1
export tasks_per_node=$(( max_tasks_per_node / threads_per_task ))
;;

"waveinit")
export PARTITION_BATCH="process"
max_tasks_per_node=24
export ntasks=12
export threads_per_task=1
export tasks_per_node=$(( max_tasks_per_node / threads_per_task ))
export NTASKS=${ntasks}
;;

"wavepostpnt")
export PARTITION_BATCH="compute"
max_tasks_per_node=48
export ntasks=240
export threads_per_task=1
export tasks_per_node=$(( max_tasks_per_node / threads_per_task ))
export NTASKS=${ntasks}
;;

"wavepostsbs" | "wavepostbndpnt" | "wavepostbndpntbll")
export PARTITION_BATCH="process"
max_tasks_per_node=24
export ntasks=24
export threads_per_task=1
export tasks_per_node=$(( max_tasks_per_node / threads_per_task ))
export NTASKS=${ntasks}
;;

*)
export PARTITION_BATCH="process"
max_tasks_per_node=24
;;

esac

export max_tasks_per_node

16 changes: 16 additions & 0 deletions parm/config/gfs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -483,4 +483,20 @@ export OFFSET_START_HOUR=0
# Number of regional collectives to create soundings for
export NUM_SND_COLLECTIVES=${NUM_SND_COLLECTIVES:-9}

# The tracker, genesis, and METplus jobs are not supported on CSPs yet
# TODO: we should place these in workflow/hosts/awspw.yaml as part of AWS/AZURE setup, not for general.
if [[ "${machine}" =~ "PW" ]]; then
export DO_TRACKER="NO"
export DO_GENESIS="NO"
export DO_METP="NO"
export DO_WAVE="NO"
fi

# The tracker and genesis are not installed on Orion/Hercules yet; this requires spack-stack builds of the package.
# TODO: we should place these in workflow/hosts/[orion|hercules].yaml.
if [[ "${machine}" == "ORION" || "${machine}" == "HERCULES" ]]; then
export DO_TRACKER="NO"
export DO_GENESIS="NO"
fi

echo "END: config.base"
4 changes: 2 additions & 2 deletions parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ case ${machine} in
;;
"AWSPW")
export PARTITION_BATCH="compute"
npe_node_max=36
max_tasks_per_node=36
npe_node_max=48
max_tasks_per_node=48
# TODO Supply a max mem/node value for AWS
# shellcheck disable=SC2034
mem_node_max=""
Expand Down
24 changes: 24 additions & 0 deletions parm/config/gfs/config.resources.AWSPW
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,27 @@ unset memory
for mem_var in $(env | grep '^memory_' | cut -d= -f1); do
unset "${mem_var}"
done

step=$1

case ${step} in
"fcst" | "efcs")
export PARTITION_BATCH="compute"
max_tasks_per_node=48
;;

"arch")
export PARTITION_BATCH="process"
max_tasks_per_node=24
;;


*)
export PARTITION_BATCH="process"
max_tasks_per_node=24
;;

esac

export max_tasks_per_node

2 changes: 1 addition & 1 deletion sorc/gfs_utils.fd
2 changes: 1 addition & 1 deletion sorc/ufs_model.fd
Submodule ufs_model.fd updated 165 files

0 comments on commit b078484

Please sign in to comment.