Skip to content

Commit

Permalink
Limit mediator (CMEPS) to 300 mpi tasks, at most
Browse files Browse the repository at this point in the history
  • Loading branch information
DusanJovic-NOAA committed Nov 26, 2024
1 parent 184df06 commit a73a624
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions tests/rt_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ function compute_petbounds_and_tasks_traditional_threading() {
# CHM
chm_petlist_bounds="0 $((ATM_compute_tasks - 1))"

# MED
med_petlist_bounds="0 $((ATM_compute_tasks - 1))"
# MED - mediator (CMEPS) runs on at most 300 tasks.
MED_compute_tasks=$((ATM_compute_tasks<=300 ? ATM_compute_tasks : 300))
med_petlist_bounds="0 $((MED_compute_tasks - 1))"

# AQM
aqm_petlist_bounds="0 $((ATM_compute_tasks - 1))"
Expand Down Expand Up @@ -192,8 +193,9 @@ function compute_petbounds_and_tasks_esmf_threading() {
# CHM
chm_petlist_bounds="0 $((ATM_compute_tasks * atm_omp_num_threads - 1))"

# MED
med_petlist_bounds="0 $((ATM_compute_tasks * atm_omp_num_threads - 1))"
# MED - mediator (CMEPS) runs on at most 300 tasks.
MED_compute_tasks=$((ATM_compute_tasks<=300 ? ATM_compute_tasks : 300))
med_petlist_bounds="0 $((MED_compute_tasks * atm_omp_num_threads - 1))"

# AQM
aqm_petlist_bounds="0 $((ATM_compute_tasks * atm_omp_num_threads - 1))"
Expand Down
4 changes: 2 additions & 2 deletions tests/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ if [[ ${SCHEDULER} = 'pbs' ]]; then
mpiexec_cmd+="-n ${TASKS} -ppn ${TPN} --cpu-bind core --depth ${THRD} ./fv3.exe"
fi

echo "mpiexec_cmd = ${mpiexec_cmd}"
MPIEXEC_CMD_ARGS=${mpiexec_cmd}
echo "MPIEXEC_CMD_ARGS = ${MPIEXEC_CMD_ARGS}"

if [[ -e ${PATHRT}/fv3_conf/fv3_qsub.IN_${MACHINE_ID} ]]; then
atparse < "${PATHRT}/fv3_conf/fv3_qsub.IN_${MACHINE_ID}" > job_card
Expand Down Expand Up @@ -466,8 +466,8 @@ elif [[ ${SCHEDULER} = 'slurm' ]]; then
srun_cmd+=" --ntasks=${TASKS} --ntasks-per-node=${TPN} --cpus-per-task=${THRD} ./fv3.exe"
fi

echo "srun_cmd = ${srun_cmd}"
SRUN_CMD_ARGS=${srun_cmd}
echo "SRUN_CMD_ARGS = ${SRUN_CMD_ARGS}"

if [[ -e ${PATHRT}/fv3_conf/fv3_slurm.IN_${MACHINE_ID} ]]; then
atparse < "${PATHRT}/fv3_conf/fv3_slurm.IN_${MACHINE_ID}" > job_card
Expand Down

0 comments on commit a73a624

Please sign in to comment.