@@ -41,9 +41,10 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4141# Detect job type from submitted script basename
4242script_basename=" $( basename " $script_path " .sh) "
4343case " $script_basename " in
44- bench* ) job_type=" bench" ;;
45- build-and-test* ) job_type=" buildtest" ;;
46- * ) job_type=" test" ;;
44+ bench* ) job_type=" bench" ;;
45+ build-and-test* ) job_type=" buildtest" ;;
46+ run_case_optimization* ) job_type=" caseopt" ;;
47+ * ) job_type=" test" ;;
4748esac
4849
4950# --- Cluster configuration ---
@@ -138,14 +139,26 @@ elif [ "$device" = "gpu" ]; then
138139 echo " Using GPU partition list: $gpu_partition "
139140 fi
140141
142+ # Case-optimization runs tiny single-GPU smoke cases (run_case_optimization.sh
143+ # calls `mfc.sh run -n $ngpus` with ngpus falling back to 1), so it needs only
144+ # ONE GPU. Requesting two forces SLURM onto a node with two *free* GPUs -- far
145+ # harder to find under queue contention -- and case-opt jobs were sitting
146+ # PENDING to the 8h GitHub timeout as a result. The test suite exercises
147+ # multi-GPU MPI and keeps two.
148+ if [ " $job_type " = " caseopt" ]; then
149+ gpu_count=1
150+ else
151+ gpu_count=2
152+ fi
153+
141154 case " $cluster " in
142155 phoenix)
143156 # --exclude is rendered separately (see $node_exclude) so the
144157 # preflight can add a node to it and resubmit.
145158 sbatch_device_opts=" \
146159#SBATCH -p $gpu_partition
147160#SBATCH --ntasks-per-node=4
148- #SBATCH -G2 "
161+ #SBATCH -G ${gpu_count} "
149162 node_exclude=" atl1-1-03-007-29-0,atl1-1-03-007-31-0"
150163 ;;
151164 frontier|frontier_amd)
0 commit comments