@@ -6,6 +6,14 @@ numproc_node="$3"
66nthreads=" $4 "
77export OMP_NUM_THREADS=$nthreads
88
9+ REPO_URL=" https://github.com/RIKEN-LQCD/qws.git"
10+ REPO_DIR=" qws"
11+ BRANCH=" ${QWS_BRANCH:- master} "
12+ SOURCE_COMMIT=" ${QWS_SOURCE_COMMIT:- } "
13+ qws_case0_args=(32 6 4 3 1 1 1 1 -1 -1 6 50)
14+ qws_case1_args=(32 6 4 3 1 1 1 2 -1 -1 6 50)
15+ qws_case7_args=(32 6 4 3 1 2 2 2 -1 -1 6 50)
16+
917source " ${PWD} /scripts/bk_functions.sh"
1018qws_profiler_tool=$( bk_resolve_profiler_tool fapp QWS_PROFILER_TOOL)
1119qws_profiler_level=$( bk_resolve_profiler_level detailed QWS_PROFILER_LEVEL)
@@ -14,7 +22,32 @@ qws_profiler_level=$(bk_resolve_profiler_level detailed QWS_PROFILER_LEVEL)
1422# app-side section timings and artifacts.
1523# source "${PWD}/programs/qws/estimate.sh"
1624
17- mkdir -p results && > results/result
25+ mkdir -p results && : > results/result
26+
27+ record_qws_runtime_parameter_inputs () {
28+ rm -f results/.input_info_items.jsonl
29+ bk_record_runtime_parameter_input \
30+ --dataset-id qws-case0-parameters \
31+ --dataset-version " ${BK_SOURCE_REF_NAME:- $BRANCH } " \
32+ --parameter-set-id CASE0 \
33+ --result-exp CASE0 \
34+ --command ./main \
35+ -- " ${qws_case0_args[@]} "
36+ bk_record_runtime_parameter_input \
37+ --dataset-id qws-case1-parameters \
38+ --dataset-version " ${BK_SOURCE_REF_NAME:- $BRANCH } " \
39+ --parameter-set-id CASE1 \
40+ --result-exp CASE1 \
41+ --command ./main \
42+ -- " ${qws_case1_args[@]} "
43+ bk_record_runtime_parameter_input \
44+ --dataset-id qws-case7-parameters \
45+ --dataset-version " ${BK_SOURCE_REF_NAME:- $BRANCH } " \
46+ --parameter-set-id CASE7 \
47+ --result-exp CASE7 \
48+ --command ./main \
49+ -- " ${qws_case7_args[@]} "
50+ }
1851
1952# print_results: extract FOM from the benchmark output and append a result line.
2053print_results () {
@@ -41,36 +74,37 @@ print_results() {
4174# tar -czf "$1" ./pa
4275# }
4376
44- [[ -d qws ]] || git clone https://github.com/RIKEN-LQCD/qws.git
77+ bk_fetch_recorded_source " ${REPO_URL} " " ${REPO_DIR} " " ${BRANCH} " " ${SOURCE_COMMIT} "
78+ record_qws_runtime_parameter_inputs
4579
4680if [[ -f artifacts/main ]]; then
47- cp artifacts/main qws
81+ cp artifacts/main " ${REPO_DIR} "
4882else
4983 echo " ERROR: artifacts/main not found"
5084 exit 1
5185fi
5286
53- cd qws
87+ cd " ${REPO_DIR} "
5488
5589case " $system " in
5690 Fugaku|FugakuCN)
5791 case " $nodes " in
5892 1)
59- mpiexec -n 1 ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
93+ mpiexec -n 1 ./main " ${qws_case0_args[@]} " > CASE0
6094 print_results output.${PJM_JOBID} /0/1/stdout.1.0 CASE0 1 >> ../results/result
61- mpiexec -n 2 ./main 32 6 4 3 1 1 1 2 -1 -1 6 50 > CASE1
95+ mpiexec -n 2 ./main " ${qws_case1_args[@]} " > CASE1
6296 print_results output.${PJM_JOBID} /0/2/stdout.2.0 CASE1 2 >> ../results/result
6397 if bk_profiler_enabled " $qws_profiler_tool " ; then
64- bk_profiler " $qws_profiler_tool " --level " $qws_profiler_level " --archive ../results/padata0.tgz --raw-dir pa -- mpiexec -n 1 ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0.profile
98+ bk_profiler " $qws_profiler_tool " --level " $qws_profiler_level " --archive ../results/padata0.tgz --raw-dir pa -- mpiexec -n 1 ./main " ${qws_case0_args[@]} " > CASE0.profile
6599 # else
66100 # emit_qws_dummy_padata ../results/padata0.tgz
67101 fi
68102 ;;
69103 2)
70- mpiexec -n 8 ./main 32 6 4 3 1 2 2 2 -1 -1 6 50 > CASE7
104+ mpiexec -n 8 ./main " ${qws_case7_args[@]} " > CASE7
71105 print_results output.${PJM_JOBID} /0/1/stdout.1.0 CASE7 4 >> ../results/result
72106 if bk_profiler_enabled " $qws_profiler_tool " ; then
73- bk_profiler " $qws_profiler_tool " --level " $qws_profiler_level " --archive ../results/padata0.tgz --raw-dir pa -- mpiexec -n 8 ./main 32 6 4 3 1 2 2 2 -1 -1 6 50 > CASE7.profile
107+ bk_profiler " $qws_profiler_tool " --level " $qws_profiler_level " --archive ../results/padata0.tgz --raw-dir pa -- mpiexec -n 8 ./main " ${qws_case7_args[@]} " > CASE7.profile
74108 # else
75109 # emit_qws_dummy_padata ../results/padata0.tgz
76110 fi
@@ -92,38 +126,38 @@ case "$system" in
92126 export OMP_NUM_THREADS=" $nthreads "
93127 export OMP_PLACES=cores
94128 export OMP_PROC_BIND=close
95- mpirun --bind-to none -n 1 ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
129+ mpirun --bind-to none -n 1 ./main " ${qws_case0_args[@]} " > CASE0
96130 print_results CASE0 CASE0 1 >> ../results/result
97131 ;;
98132 RC_GH200)
99133 module load system/qc-gh200 nvhpc-hpcx/25.9
100- mpirun -n 1 --bind-to core --map-by ppr:1:node:PE=72 ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
134+ mpirun -n 1 --bind-to core --map-by ppr:1:node:PE=72 ./main " ${qws_case0_args[@]} " > CASE0
101135 print_results CASE0 CASE0 1 >> ../results/result
102136 ;;
103137 RC_GENOA)
104138 module load system/genoa mpi/openmpi-x86_64
105- mpirun -n 1 --bind-to core --map-by ppr:1:node:PE=96 ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
139+ mpirun -n 1 --bind-to core --map-by ppr:1:node:PE=96 ./main " ${qws_case0_args[@]} " > CASE0
106140 print_results CASE0 CASE0 1 >> ../results/result
107141 ;;
108142 RC_DGXSP)
109143 source /etc/profile.d/modules.sh
110144 module load system/ng-dgx nvhpc-hpcx/26.3
111- mpirun -n 1 --bind-to core --map-by ppr:1:node:PE=20 ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
145+ mpirun -n 1 --bind-to core --map-by ppr:1:node:PE=20 ./main " ${qws_case0_args[@]} " > CASE0
112146 print_results CASE0 CASE0 1 >> ../results/result
113147 ;;
114148 RC_FX700)
115149 module load system/fx700 FJSVstclanga
116- mpirun -n 1 --bind-to core --map-by ppr:1:node:PE=12 ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
150+ mpirun -n 1 --bind-to core --map-by ppr:1:node:PE=12 ./main " ${qws_case0_args[@]} " > CASE0
117151 print_results CASE0 CASE0 1 >> ../results/result
118152 ;;
119153 MiyabiG|MiyabiC)
120- mpirun -n 1 ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
154+ mpirun -n 1 ./main " ${qws_case0_args[@]} " > CASE0
121155 print_results CASE0 CASE0 1 >> ../results/result
122156 ;;
123157 GenkaiA|GenkaiB|GenkaiC)
124158 qws_numproc=$(( nodes * numproc_node))
125159 module load intel/2023.2 mvapich/3.0-intel2023.2
126- mpirun -n ${qws_numproc} ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
160+ mpirun -n ${qws_numproc} ./main " ${qws_case0_args[@]} " > CASE0
127161 print_results CASE0 CASE0 ${numproc_node} >> ../results/result
128162 ;;
129163 Grand_C|Grand_G)
@@ -144,12 +178,12 @@ case "$system" in
144178 env | sort >&2
145179 exit 1
146180 fi
147- " $qws_mpi_launcher " -n ${qws_numproc} ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
181+ " $qws_mpi_launcher " -n ${qws_numproc} ./main " ${qws_case0_args[@]} " > CASE0
148182 print_results CASE0 CASE0 ${numproc_node} >> ../results/result
149183 ;;
150184 AOBA_A|AOBA_B|AOBA_S)
151185 qws_numproc=$(( nodes * numproc_node))
152- mpirun -np ${qws_numproc} ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
186+ mpirun -np ${qws_numproc} ./main " ${qws_case0_args[@]} " > CASE0
153187 print_results CASE0 CASE0 ${numproc_node} >> ../results/result
154188 ;;
155189 SQUID_CPU)
@@ -160,7 +194,7 @@ case "$system" in
160194 fi
161195 module load BaseCPU
162196 export OMP_NUM_THREADS=" ${nthreads} "
163- mpirun " ${qws_mpi_opts[@]} " -np ${qws_numproc} ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
197+ mpirun " ${qws_mpi_opts[@]} " -np ${qws_numproc} ./main " ${qws_case0_args[@]} " > CASE0
164198 print_results CASE0 CASE0 ${numproc_node} >> ../results/result
165199 ;;
166200 SQUID_GPU)
@@ -171,7 +205,7 @@ case "$system" in
171205 fi
172206 module load BaseGPU
173207 export OMP_NUM_THREADS=" ${nthreads} "
174- mpirun " ${qws_mpi_opts[@]} " -np ${qws_numproc} --bind-to none ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
208+ mpirun " ${qws_mpi_opts[@]} " -np ${qws_numproc} --bind-to none ./main " ${qws_case0_args[@]} " > CASE0
175209 print_results CASE0 CASE0 ${numproc_node} >> ../results/result
176210 ;;
177211 SQUID_VECTOR)
@@ -182,7 +216,7 @@ case "$system" in
182216 fi
183217 module load BaseVEC
184218 export OMP_NUM_THREADS=" ${nthreads} "
185- mpirun " ${qws_mpi_opts[@]} " -np ${qws_numproc} ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
219+ mpirun " ${qws_mpi_opts[@]} " -np ${qws_numproc} ./main " ${qws_case0_args[@]} " > CASE0
186220 print_results CASE0 CASE0 ${numproc_node} >> ../results/result
187221 ;;
188222 Odyssey)
@@ -195,7 +229,7 @@ case "$system" in
195229 module load odyssey fj fjmpi
196230 export OMP_NUM_THREADS=12
197231 export PLE_MPI_STD_EMPTYFILE=off
198- mpiexec -n 1 -ofout CASE0 ./main 32 6 4 3 1 1 1 1 -1 -1 6 50
232+ mpiexec -n 1 -ofout CASE0 ./main " ${qws_case0_args[@]} "
199233 print_results CASE0 CASE0 1 >> ../results/result
200234 ;;
201235 Aquarius)
@@ -204,26 +238,26 @@ case "$system" in
204238 source /work/opt/local/x86_64/cores/intel/2023.0.0/mpi/latest/env/vars.sh
205239 export OMP_NUM_THREADS=8
206240 export I_MPI_PIN=1
207- mpiexec -n 1 ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
241+ mpiexec -n 1 ./main " ${qws_case0_args[@]} " > CASE0
208242 print_results CASE0 CASE0 1 >> ../results/result
209243 ;;
210244 Pegasus)
211245 qws_numproc=$(( nodes * numproc_node))
212246 module load intel/2025.3.1 intmpi/2025.3.1
213- mpirun -n ${qws_numproc} ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
247+ mpirun -n ${qws_numproc} ./main " ${qws_case0_args[@]} " > CASE0
214248 print_results CASE0 CASE0 ${numproc_node} >> ../results/result
215249 ;;
216250 Sirius)
217251 qws_numproc=$(( nodes * numproc_node))
218252 module load aocc/5.0.0 openmpi/5.0.10/aocc5.0.0
219- mpirun -n ${qws_numproc} ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
253+ mpirun -n ${qws_numproc} ./main " ${qws_case0_args[@]} " > CASE0
220254 print_results CASE0 CASE0 ${numproc_node} >> ../results/result
221255 ;;
222256 TSUBAME4)
223257 qws_numproc=$(( nodes * numproc_node))
224258 module load openmpi/5.0.10-gcc aocc/4.1.0
225259 export OMPI_CC=clang OMPI_CXX=clang++ OMPI_FC=flang
226- mpirun -n ${qws_numproc} ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
260+ mpirun -n ${qws_numproc} ./main " ${qws_case0_args[@]} " > CASE0
227261 print_results CASE0 CASE0 ${numproc_node} >> ../results/result
228262 ;;
229263 OCTOPUS)
@@ -232,7 +266,7 @@ case "$system" in
232266 export OMP_NUM_THREADS=" ${nthreads} "
233267 export OMP_PROC_BIND=close
234268 export OMP_PLACES=cores
235- mpirun -n ${qws_numproc} ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
269+ mpirun -n ${qws_numproc} ./main " ${qws_case0_args[@]} " > CASE0
236270 print_results CASE0 CASE0 ${numproc_node} >> ../results/result
237271 ;;
238272 Camphor3)
@@ -257,7 +291,7 @@ case "$system" in
257291 if [[ " ${SLURM_CONF:- } " == /etc/slurm/sysA/* ]]; then
258292 unset SLURM_CONF
259293 fi
260- srun -n 1 -c " ${nthreads} " ./main 32 6 4 3 1 1 1 1 -1 -1 6 50 > CASE0
294+ srun -n 1 -c " ${nthreads} " ./main " ${qws_case0_args[@]} " > CASE0
261295 print_results CASE0 CASE0 1 >> ../results/result
262296 ;;
263297 * )
0 commit comments