-
Notifications
You must be signed in to change notification settings - Fork 2
/
node_level_test_kokkos.sh
executable file
·408 lines (378 loc) · 24.6 KB
/
node_level_test_kokkos.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
#!/bin/bash
max_cpu_threads=10
max_gpu_executors=128
max_level=4
stop_step=20
# Get base dir
basedir=`pwd`
# Get current date
today=`date +%Y-%m-%d_%H:%M:%S`
# Create Test folder
result_folder="Testrun-$today"
mkdir "$result_folder"
# Log configuration
echo "Using scenarion file: $1" | tee "$result_folder/LOG.txt"
# Create input files files
octotiger_args_gen="--problem=solid_sphere --max_level=${max_level} --hydro=off --xscale=1.0 --disable_diagnostics=on --disable_output=off --stop_step=1 --theta=0.34 "
eval "./build/octotiger/build/octotiger -t${max_cpu_threads} $octotiger_args_gen"
cd "$result_folder"
cp ../final.silo final.silo
cp -r ../final.silo.data final.silo.data
# 0. Testing with Vc kernels (baseline
# ---------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd without-hpx-backend-multipole without-hpx-backend-monopole with-hpx-cuda-polling kokkos octotiger"
octotiger_args="--problem=solid_sphere --max_level=${max_level} --hydro=off --xscale=1.0 --restart_file=../final.silo --disable_diagnostics=on --disable_output=on --stop_step=${stop_step} --theta=0.34 "
gpu_args=" --cuda_streams_per_gpu=0 --cuda_buffer_capacity=1 "
kernel_args=" --multipole_device_kernel_type=CUDA --monopole_device_kernel_type=CUDA --multipole_host_kernel_type=Vc --monopole_host_kernel_type=Vc "
# Running tests
echo "# Date of run $today" > test0_cpuonly_vc_results.txt
echo "# Measuring computation time using only vc host kokkos kernels" >> test0_cpuonly_vc_results.txt
echo "# threads, runtime" >> test0_cpuonly_vc_results.txt
pushd ..
rm -rf "./build/kokkos"
rm -rf "./build/hpx-kokkos"
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 1 1 ${max_cpu_threads}`; do
output1="$(./../build/octotiger/build/octotiger -t$i $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test0_cpuonly_vc_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 1. Testing without simd (serial backend)
# ---------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos without-simd without-hpx-backend-multipole without-hpx-backend-monopole with-hpx-cuda-polling octotiger"
gpu_args=" --cuda_streams_per_gpu=0 --cuda_buffer_capacity=1 "
kernel_args=" --multipole_device_kernel_type=KOKKOS_CUDA --monopole_device_kernel_type=KOKKOS_CUDA --multipole_host_kernel_type=KOKKOS --monopole_host_kernel_type=KOKKOS "
pushd ..
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
# Running tests
echo "# Date of run $today" > test1_cpuonly_scalar_results.txt
echo "# Measuring computation time using only scalar host kokkos kernels" >> test1_cpuonly_scalar_results.txt
echo "# threads, runtime" >> test1_cpuonly_scalar_results.txt
for i in `seq 1 1 ${max_cpu_threads}`; do
output1="$(./../build/octotiger/build/octotiger -t$i $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test1_cpuonly_scalar_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 2. Testing with simd (serial backend)
# ---------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd without-hpx-backend-multipole without-hpx-backend-monopole with-hpx-cuda-polling octotiger"
# Running tests
echo "# Date of run $today" > test2_simd_cpuonly_results.txt
echo "# Measuring computation time using only host kokkos kernels (with simd)" >> test2_simd_cpuonly_results.txt
echo "# threads, runtime" >> test2_simd_cpuonly_results.txt
pushd ..
echo "building configuration..."
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 1 1 ${max_cpu_threads}`; do
output1="$(./../build/octotiger/build/octotiger -t$i $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test2_simd_cpuonly_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 3. Testing with multipoles using the hpx backend
# ------------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole without-hpx-backend-monopole with-hpx-cuda-polling octotiger"
# Running tests
echo "# Date of run $today" > test3_multipolehpx_results.txt
echo "# Date of run $today" > test3_multipolehpx_log.txt
echo "# Measuring computation time using multipole kernels with hpx backend" >> test3_multipolehpx_results.txt
echo "# threads, runtime" >> test3_multipolehpx_results.txt
pushd ..
echo "building configuration..."
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 1 1 ${max_cpu_threads}`; do
output1="$(./../build/octotiger/build/octotiger -t$i $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test3_multipolehpx_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 4. Testing with all kernels using the hpx backend
# ------------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole with-hpx-backend-monopole with-hpx-cuda-polling octotiger"
# Running tests
echo "# Date of run $today" > test4_allhpx_results.txt
echo "# Measuring computation time using all kernels with hpx backend" >> test4_allhpx_results.txt
echo "# threads, runtime" >> test4_allhpx_results.txt
pushd ..
echo "building configuration..."
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 1 1 ${max_cpu_threads}`; do
output1="$(./../build/octotiger/build/octotiger -t$i $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test4_allhpx_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# ===============================================
# ===============================================
# GPU Testing
gpu_args=" --cuda_streams_per_gpu=${max_gpu_executors} --cuda_buffer_capacity=1 "
octotiger_args="--problem=solid_sphere --max_level=${max_level} --hydro=off --xscale=1.0 --restart_file=../final.silo --disable_diagnostics=on --disable_output=on --stop_step=${stop_step} --theta=0.34 "
# 5. Testing for Vc + CUDA Baseline
# ------------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole with-hpx-backend-monopole with-hpx-cuda-polling kokkos octotiger"
kernel_args=" --multipole_device_kernel_type=CUDA --monopole_device_kernel_type=CUDA --multipole_host_kernel_type=Vc --monopole_host_kernel_type=Vc "
echo "# Date of run $today" > test5_gpu_baseline_results.txt
echo "# Measuring computation time using Vc + CUDA kernels (GPU args: $gpu_args " >> test5_gpu_baseline_results.txt
echo "# threads, runtime" >> test5_gpu_baseline_results.txt
pushd ..
rm -rf "./build/octotiger/build"
rm -rf "./build/kokkos"
rm -rf "./build/hpx-kokkos"
eval "${build_command}"
popd
for i in `seq 1 1 ${max_cpu_threads}`; do
output1="$(./../build/octotiger/build/octotiger -t$i $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test5_gpu_baseline_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 55 Testing for Vc + CUDA Baseline
#-------------------------------------------
echo "# Date of run $today" > test55_cuda_gpu_executor_results.txt
echo "# Measuring computation time using a varying number of CUDA +vc device executors / polling " >> test55_cuda_gpu_executor_results.txt
echo "# executors, runtime" >> test55_cuda_gpu_executor_results.txt
kernel_args=" --multipole_device_kernel_type=CUDA --monopole_device_kernel_type=CUDA --multipole_host_kernel_type=Vc --monopole_host_kernel_type=Vc "
for i in `seq 0 2 128`; do
gpu_args=" --cuda_streams_per_gpu=${i} --cuda_buffer_capacity=1 "
output1="$(./../build/octotiger/build/octotiger -t${max_cpu_threads} $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test55_cuda_gpu_executor_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 6. Same build but with KOKKOS GPU (+ CPU) Kernels
# -------------------------------------------------
kernel_args=" --multipole_device_kernel_type=KOKKOS_CUDA --monopole_device_kernel_type=KOKKOS_CUDA --multipole_host_kernel_type=KOKKOS --monopole_host_kernel_type=KOKKOS "
echo "# Date of run $today" > test6_kokkos_gpu_results.txt
echo "# Measuring computation time using Kokkos CPU+GPU kernels (GPU args: $gpu_args " >> test6_kokkos_gpu_results.txt
echo "# threads, runtime" >> test6_kokkos_gpu_results.txt
for i in `seq 1 1 ${max_cpu_threads}`; do
output1="$(./../build/octotiger/build/octotiger -t$i $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test6_kokkos_gpu_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 7. Same build but with KOKKOS GPU (+ CPU) Kernels and HPX backend for multipoles
# --------------------------------------------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole without-hpx-backend-monopole with-hpx-cuda-polling octotiger"
echo "# Date of run $today" > test7_kokkos_gpu_multipole_hpx_backend_results.txt
echo "# Measuring computation time using Kokkos CPU+GPU kernels and the multipole HPX backend (GPU args: $gpu_args " >> test7_kokkos_gpu_multipole_hpx_backend_results.txt
echo "# threads, runtime" >> test7_kokkos_gpu_multipole_hpx_backend_results.txt
pushd ..
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 1 1 ${max_cpu_threads}`; do
output1="$(./../build/octotiger/build/octotiger -t$i $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test7_kokkos_gpu_multipole_hpx_backend_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 8. Same build but with KOKKOS GPU (+ CPU) Kernels and HPX backend for all kernels
# --------------------------------------------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole with-hpx-backend-monopole with-hpx-cuda-polling octotiger"
echo "# Date of run $today" > test8_kokkos_gpu_allkernel_hpx_backend_results.txt
echo "# Measuring computation time using Kokkos CPU+GPU kernels and the allkernel HPX backend (GPU args: $gpu_args " >> test8_kokkos_gpu_allkernel_hpx_backend_results.txt
echo "# threads, runtime" >> test8_kokkos_gpu_allkernel_hpx_backend_results.txt
pushd ..
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 1 1 ${max_cpu_threads}`; do
output1="$(./../build/octotiger/build/octotiger -t$i $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test8_kokkos_gpu_allkernel_hpx_backend_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 9. Testing increasing numbers of executors
#-------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole with-hpx-backend-monopole with-hpx-cuda-polling octotiger"
echo "# Date of run $today" > test9_kokkos_gpu_executor_results.txt
echo "# Measuring computation time using a varying number of device executors " >> test9_kokkos_gpu_executor_results.txt
echo "# executors, runtime" >> test9_kokkos_gpu_executor_results.txt
pushd ..
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 0 2 128`; do
gpu_args=" --cuda_streams_per_gpu=${i} --cuda_buffer_capacity=1 "
output1="$(./../build/octotiger/build/octotiger -t${max_cpu_threads} $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test9_kokkos_gpu_executor_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 10. Testing increasing numbers of executors with larger queues
#--------------------------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole with-hpx-backend-monopole with-hpx-cuda-polling octotiger"
echo "# Date of run $today" > test10_kokkos_gpu_executor_results.txt
echo "# Measuring computation time using a varying number of device executors (queue length 4) " >> test10_kokkos_gpu_executor_results.txt
echo "# threads, runtime" >> test10_kokkos_gpu_executor_results.txt
pushd ..
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 0 2 128`; do
gpu_args=" --cuda_streams_per_gpu=${i} --cuda_buffer_capacity=4 "
output1="$(./../build/octotiger/build/octotiger -t${max_cpu_threads} $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test10_kokkos_gpu_executor_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 11. Testing increasing numbers of executors
#-------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd without-hpx-backend-multipole without-hpx-backend-monopole with-hpx-cuda-polling octotiger"
echo "# Date of run $today" > test11_kokkos_gpu_executor_results.txt
echo "# Measuring computation time using a varying number of device executors (pure serial) " >> test11_kokkos_gpu_executor_results.txt
echo "# executors, runtime" >> test11_kokkos_gpu_executor_results.txt
pushd ..
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 0 2 128`; do
gpu_args=" --cuda_streams_per_gpu=${i} --cuda_buffer_capacity=1 "
output1="$(./../build/octotiger/build/octotiger -t${max_cpu_threads} $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test11_kokkos_gpu_executor_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 12. Testing increasing numbers of executors with larger queues
#--------------------------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole without-hpx-backend-monopole with-hpx-cuda-polling octotiger"
echo "# Date of run $today" > test12_kokkos_gpu_executor_results.txt
echo "# Measuring computation time using a varying number of device executors (queue length 4 / pure serial) " >> test12_kokkos_gpu_executor_results.txt
echo "# threads, runtime" >> test12_kokkos_gpu_executor_results.txt
pushd ..
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 0 2 128`; do
gpu_args=" --cuda_streams_per_gpu=${i} --cuda_buffer_capacity=4 "
output1="$(./../build/octotiger/build/octotiger -t${max_cpu_threads} $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test12_kokkos_gpu_executor_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 13. Testing for Vc + CUDA Baseline with callback
# ------------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole with-hpx-backend-monopole without-hpx-cuda-polling kokkos octotiger"
kernel_args=" --multipole_device_kernel_type=CUDA --monopole_device_kernel_type=CUDA --multipole_host_kernel_type=Vc --monopole_host_kernel_type=Vc "
echo "# Date of run $today" > test13_callback_baseline_results.txt
echo "# Measuring computation time using Vc + CUDA kernels with callbacks (GPU args: $gpu_args " >> test13_callback_baseline_results.txt
echo "# threads, runtime" >> test13_callback_baseline_results.txt
pushd ..
rm -rf "./build/octotiger/build"
rm -rf "./build/kokkos"
rm -rf "./build/hpx-kokkos"
eval "${build_command}"
popd
for i in `seq 1 1 ${max_cpu_threads}`; do
output1="$(./../build/octotiger/build/octotiger -t$i $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test13_callback_baseline_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 13.5 Testing for Vc + CUDA Baseline with callback
#-------------------------------------------
echo "# Date of run $today" > test135_cuda_gpu_executor_results.txt
echo "# Measuring computation time using a varying number of CUDA +vc device executors / callback " >> test135_cuda_gpu_executor_results.txt
echo "# executors, runtime" >> test135_cuda_gpu_executor_results.txt
kernel_args=" --multipole_device_kernel_type=CUDA --monopole_device_kernel_type=CUDA --multipole_host_kernel_type=Vc --monopole_host_kernel_type=Vc "
for i in `seq 0 2 128`; do
gpu_args=" --cuda_streams_per_gpu=${i} --cuda_buffer_capacity=1 "
output1="$(./../build/octotiger/build/octotiger -t${max_cpu_threads} $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test135_cuda_gpu_executor_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 14. Same build but with KOKKOS GPU (+ CPU) Kernes with callback
# -------------------------------------------------
kernel_args=" --multipole_device_kernel_type=KOKKOS_CUDA --monopole_device_kernel_type=KOKKOS_CUDA --multipole_host_kernel_type=KOKKOS --monopole_host_kernel_type=KOKKOS "
echo "# Date of run $today" > test14_callback_kokkos_gpu_results.txt
echo "# Measuring computation time using Kokkos CPU+GPU kernels / callback (GPU args: $gpu_args " >> test14_callback_kokkos_gpu_results.txt
echo "# threads, runtime" >> test14_callback_kokkos_gpu_results.txt
for i in `seq 1 1 ${max_cpu_threads}`; do
output1="$(./../build/octotiger/build/octotiger -t$i $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test14_callback_kokkos_gpu_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 15. Testing increasing numbers of executors callback
#-------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole with-hpx-backend-monopole without-hpx-cuda-polling octotiger"
echo "# Date of run $today" > test15_kokkos_gpu_executor_results.txt
echo "# Measuring computation time using a varying number of device executors / callback " >> test15_kokkos_gpu_executor_results.txt
echo "# executors, runtime" >> test15_kokkos_gpu_executor_results.txt
pushd ..
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 0 2 128`; do
gpu_args=" --cuda_streams_per_gpu=${i} --cuda_buffer_capacity=1 "
output1="$(./../build/octotiger/build/octotiger -t${max_cpu_threads} $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test15_kokkos_gpu_executor_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 17. Testing increasing numbers of executors with larger queues
#--------------------------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole with-hpx-backend-monopole without-hpx-cuda-polling octotiger"
echo "# Date of run $today" > test17_kokkos_gpu_executor_results.txt
echo "# Measuring computation time using a varying number of device executors (queue length 4 / callback) " >> test17_kokkos_gpu_executor_results.txt
echo "# threads, runtime" >> test17_kokkos_gpu_executor_results.txt
pushd ..
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 0 2 128`; do
gpu_args=" --cuda_streams_per_gpu=${i} --cuda_buffer_capacity=4 "
output1="$(./../build/octotiger/build/octotiger -t${max_cpu_threads} $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test17_kokkos_gpu_executor_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 18. Testing increasing numbers of executors
#-------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd without-hpx-backend-multipole without-hpx-backend-monopole without-hpx-cuda-polling octotiger"
echo "# Date of run $today" > test18_kokkos_gpu_executor_results.txt
echo "# Measuring computation time using a varying number of device executors (pure serial / callback) " >> test18_kokkos_gpu_executor_results.txt
echo "# executors, runtime" >> test18_kokkos_gpu_executor_results.txt
pushd ..
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 0 2 128`; do
gpu_args=" --cuda_streams_per_gpu=${i} --cuda_buffer_capacity=1 "
output1="$(./../build/octotiger/build/octotiger -t${max_cpu_threads} $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test18_kokkos_gpu_executor_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
# 19. Testing increasing numbers of executors with larger queues
#--------------------------------------------------------------
build_command="./build-all.sh Release with-CC with-cuda without-mpi without-papi without-apex with-kokkos with-simd with-hpx-backend-multipole without-hpx-backend-monopole without-hpx-cuda-polling octotiger"
echo "# Date of run $today" > test19_kokkos_gpu_executor_results.txt
echo "# Measuring computation time using a varying number of device executors (queue length 4 / pure serial / callback) " >> test19_kokkos_gpu_executor_results.txt
echo "# threads, runtime" >> test19_kokkos_gpu_executor_results.txt
pushd ..
rm -rf "./build/octotiger/build"
eval "${build_command}"
popd
for i in `seq 0 2 128`; do
gpu_args=" --cuda_streams_per_gpu=${i} --cuda_buffer_capacity=4 "
output1="$(./../build/octotiger/build/octotiger -t${max_cpu_threads} $octotiger_args $gpu_args $kernel_args | tee -a LOG.txt )"
compute_time="$i, $(echo "$output1" | grep '==> Average iteration execution time:' | sed 's/==> Average iteration execution time://g' | sed 's/ms//g')"
echo "$compute_time" >> "test19_kokkos_gpu_executor_results.txt"
echo "$compute_time" | tee -a LOG.txt
done
echo "All done!" | tee -a LOG.txt