From a73a624426e8523196cfa7bfcc01b2bc6660e518 Mon Sep 17 00:00:00 2001 From: Dusan Jovic Date: Tue, 26 Nov 2024 16:26:02 +0000 Subject: [PATCH] Limit mediator (CMEPS) to 300 mpi tasks, at most --- tests/rt_utils.sh | 10 ++++++---- tests/run_test.sh | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/rt_utils.sh b/tests/rt_utils.sh index 66b493d592..80ae17bcb6 100755 --- a/tests/rt_utils.sh +++ b/tests/rt_utils.sh @@ -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))" @@ -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))" diff --git a/tests/run_test.sh b/tests/run_test.sh index 8af3e1668f..1bb68111e9 100755 --- a/tests/run_test.sh +++ b/tests/run_test.sh @@ -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 @@ -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