@@ -14,50 +14,27 @@ device="$2"
1414interface=" $3 "
1515cluster=" $4 "
1616
17- # Get the directory where this script lives
18- SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
19-
2017echo " [$dir ] Submitting benchmark for $device -$interface on $cluster ..."
2118cd " $dir "
2219
23- # Submit job
24- submit_output=$( bash .github/workflows/$cluster /submit-bench.sh \
25- .github/workflows/$cluster /bench.sh " $device " " $interface " 2>&1 )
26-
27- job_id=$( echo " $submit_output " | sed -n ' s/.*Submitted batch job \([0-9][0-9]*\).*/\1/p' )
28- job_slug=" bench-$device -$interface "
29- output_file=" ${job_slug} .out"
30-
31- if [ -z " $job_id " ]; then
32- echo " [$dir ] ERROR: Failed to submit job"
33- echo " $submit_output "
34- exit 1
35- fi
36-
37- echo " [$dir ] Job ID: $job_id , monitoring output file: $output_file "
38-
39- # Use the monitoring script from PR (where this script lives)
40- monitor_exit=0
41- bash " ${SCRIPT_DIR} /monitor_slurm_job.sh" " $job_id " " $output_file " || monitor_exit=$?
42- if [ " $monitor_exit " -ne 0 ]; then
43- echo " [$dir ] WARNING: SLURM job exited with code $monitor_exit "
44- else
45- echo " [$dir ] Monitoring complete for job $job_id "
46- fi
20+ # Submit and monitor job (submit.sh auto-detects bench mode from script name)
21+ bash .github/workflows/$cluster /submit.sh \
22+ .github/workflows/$cluster /bench.sh " $device " " $interface "
4723
4824# Verify the YAML output file was created
25+ job_slug=" bench-$device -$interface "
4926yaml_file=" ${job_slug} .yaml"
5027if [ ! -f " $yaml_file " ]; then
51- echo " [$dir ] ERROR: Expected output file not found: $yaml_file "
52- echo " [$dir ] Directory contents:"
53- ls -la * .yaml 2> /dev/null || echo " No YAML files found"
54- echo " "
55- echo " [$dir ] Last 100 lines of job output ($output_file ):"
56- echo " ----------------------------------------"
57- tail -n 100 " $output_file " 2> /dev/null || echo " Could not read output file"
58- echo " ----------------------------------------"
59- exit 1
28+ echo " [$dir ] ERROR: Expected output file not found: $yaml_file "
29+ echo " [$dir ] Directory contents:"
30+ ls -la * .yaml 2> /dev/null || echo " No YAML files found"
31+ echo " "
32+ output_file=" ${job_slug} .out"
33+ echo " [$dir ] Last 100 lines of job output ($output_file ):"
34+ echo " ----------------------------------------"
35+ tail -n 100 " $output_file " 2> /dev/null || echo " Could not read output file"
36+ echo " ----------------------------------------"
37+ exit 1
6038fi
6139
6240echo " [$dir ] Verified output file exists: $yaml_file ($( stat -f%z " $yaml_file " 2> /dev/null || stat -c%s " $yaml_file " 2> /dev/null) bytes)"
63-
0 commit comments