Newer
Older
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
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
<!DOCTYPE html>
<html>
<head><meta charset="utf-8">
<title></title>
</head>
<body>
<p>###<br />
### README - QCD Accelerator Benchmarksuite Part 2 <br />
###<br />
### 2017 - Jacob Finkenrath - CaSToRC - The Cyprus Institute (j.finkenrath@cyi.ac.cy)<br />
###</p>
<p>The QCD Accelerator Benchmark suite Part 2 consists of two kernels,<br />
the QUDA and the QPhix library. The QUDA library is based on CUDA and<br />
optimized for running on NVIDIA GPUs. The QPhix library consists of<br />
routines which are optimize to use INTEL intrinsic functions of<br />
multiple vector length, including optimized routines for KNC and<br />
KNL. In both QUDA and QPhix, this benchmark uses the Conjugate<br />
Gradient solvers implemented within the libraries.</p>
<p>[1] R. Babbich, M. Clark and B. Joo, “Parallelizing the QUDA Library for Multi-GPU Calculations<br />
in Lattice Quantum Chromodynamics” SC 10 (Supercomputing 2010)</p>
<p>[2] B. Joo, D. D. Kalamkar, K. Vaidyanathan, M. Smelyanskiy, K. Pamnany, V. W. Lee, P. Dubey,<br />
W. Watson III, “Lattice QCD on Intel Xeon Phi”, International Supercomputing Conference (ISC’13), 2013</p>
<p>###<br />
### Table of Contents<br />
###</p>
<p><br />
GPU - BENCHMARK SUITE (QUDA)<br />
1. Compile and Run the GPU-Benchmark Suite<br />
1.1 Compile<br />
1.2 Run<br />
1.2.1 Main-script: "run_ana.sh"<br />
1.2.2 Main-script: "prepare_submit_job.sh"<br />
1.2.3 Main-script: "submit_job.sh.template"<br />
1.3 Example Benchmark results</p>
<p>XEONPHI - BENCHMARK SUITE (QPHIX)<br />
2. Compile and Run the XeonPhi-Benchmark Suite<br />
2.1 Compile<br />
2.1.1 Example compilation on PRACE machines<br />
2.1.1.1 BSC - Marenostrum III Hybrid partitions<br />
2.1.1.2 CINES - Frioul<br />
2.2 Run<br />
2.2.1 Main-script: "run_ana.sh"<br />
2.2.2 Main-script: "prepare_submit_job.sh"<br />
2.2.3 Main-script: "submit_job.sh.template"<br />
2.3 Example Benchmark Results</p>
<p><br />
###<br />
###<br />
### GPU - BENCHMARK SUITE<br />
###<br />
###<br />
##<br />
## 1. Compile and Run the GPU-Benchmark Suite<br />
##</p>
<p>##<br />
## 1.1 Compile<br />
##</p>
<p>Download Cmake and Quda</p>
<p>General information how to build QUDA with cmake can be found under:<br />
"https://github.com/lattice/quda/wiki/Building-QUDA-with-cmake". Here<br />
we just give a short overview:</p>
<p>Build Cmake: (./QCD_Accelerator_Benchmarksuite_Part2/GPUs/src/cmake-3.7.0.tar.gz)</p>
<p>Cmake can be downloaded from source at URL:<br />
https://cmake.org/download/. This guide uses version 3.7.0. The build<br />
instruction can be found in the main directory under "README.rst". Use<br />
the configure file "./configure" . Then run "gmake" to compile.</p>
<p>Build Quda: (./QCD_Accelerator_Benchmarksuite_Part2/GPUs/src/quda.tar.gz)</p>
<p>Download quda for example by using "git clone<br />
https://github.com/lattice/quda.git". Create a build-folder. Use<br />
"cmake" in the build-folder, which should be under cmake/bin if you<br />
compiled cmake from source. Execute:</p>
<p>./$PATH2CMAKE/cmake $PATH2QUDA -DQUDA_GPU_ARCH=sm_XX -DQUDA_DIRAC_WILSON=ON -DQUDA_DIRAC_TWISTED_MASS=OFF<br />
-DQUDA_DIRACR_DOMAIN_WALL=OFF -DQUDA_HISQ_LINK=OFF -DQUDA_GAUGE_FORCE=OFF -DQUDA_HISQ_FORCE=OFF -DQUDA_MPI=ON</p>
<p>with</p>
<p> PATH2CMAKE=<path to the cmake-executable><br />
PAT2QUDA=<path to the home dir of QUDA></p>
<p>Set -DQUDA_GPU_ARCH=sm_XX to the GPU Architecture (sm_60 for Pascal, sm_35 for Kepler)</p>
<p>If cmake or the compilation fails, library paths and options can be<br />
set via the text user interface of cmake by using "ccmake". Use<br />
"./PATH2CMAKE/ccmake PATH2BUILD_DIR" to see and edit the available<br />
options. After successfully configuring the buil, run "make". Now in<br />
the folder test/ one can find the needed Quda executables which begin<br />
with "invert_".</p>
<p>##<br />
## 1.2 Run<br />
##</p>
<p><br />
The Accelerator QCD-Benchmarksuite Part 2 provides bash-scripts<br />
located in the folder<br />
./QCD_Accelerator_Benchmarksuite_Part2/GPUs/scripts" to setup the<br />
benchmark runs on the target machines. This bash-scripts are:</p>
<p>run_ana.sh : Main-script, sets up the benchmark mode and submits the jobs (analyse the results)<br />
prepare_submit_job.sh : Generates the job-scripts<br />
submit_job.sh.template : Template for submit script</p>
<p>##<br />
## 1.2.1 Main-script: "run_ana.sh"<br />
##</p>
<p>The path to the executable has to be set by $PATH2EXE . Upon first<br />
run, QUDA automatically tunes the GPU-kernels by sweeping the number<br />
of threads per block. The optimal setup will be saved in the folder<br />
which pointed to in the environment variable "QUDA_RESOURCE_PATH". You<br />
must set this variable, otherwise the tune data will be lost and<br />
performance will be sub-optimal. Set it to the folder where the tuning<br />
data should be saved. Strong scaling or Weak scaling can be chosen by<br />
using the variable sca_mode (="Strong" or ="Weak"). The lattice sizes<br />
can be set by "gx" and "gt". Choose mode="Run" for run mode or<br />
mode="Analysis" for extracting the GFLOPS. Note that the script<br />
assumes Slurm is used as the job scheduler. If not, change the line<br />
which includes the "sbatch" command accordingly.</p>
<p>##<br />
## 1.2.2 Main-script: "prepare_submit_job.sh"<br />
##</p>
<p>Add additional options if necessary.</p>
<p>##<br />
## 1.2.3 Main-script: "submit_job.sh.template"<br />
##</p>
<p>The submit-template will be edited by "prepare_submit_job.sh" to<br />
generate the final submit-script. The first lines (beginning with<br />
"#SBATCH") depend on the queuing system of the target machine, which in<br />
this case is assumed to be Slurm. These should be changed in case of a<br />
different queuing system.</p>
<p>The Accelerator QCD-Benchmarksuite Part 2 provides bash-scripts to<br />
setup the benchmark runs on the target machines. These bash-scripts<br />
are:</p>
<p>##<br />
## 1.3 Example Benchmark results<br />
##</p>
<p>Here are shown the benchmark results on PizDaint located in Switzerland at CSCS<br />
and the GPGPU-partition of Cartesius at Surfsara based in Netherland, Amsterdam. The runs are performed by using the provided bash-scripts. PizDaint has one Pascal-GPU per node and two different testcases are shown,<br />
the "Strong-Scaling mode with a random lattice configuration of size 32^3x96 and<br />
a "Weak-Scaling" mode with a configuration of local lattice size 48^3x24.<br />
The GPGPU nodes of Cartesius has two Kepler-GPU per node and the "Strong-Scaling" test is shown for the case<br />
that one card per node and two cards per node are used.<br />
The benchmark are done by using the Conjugated Gradient solver which<br />
solve a linear equation, D * x = b, for the unknown solution "x" based on the clover improved Wilson Dirac operator<br />
"D" and a known right hand side "b".</p>
<p>---------------------<br />
PizDaint - Pascal P100<br />
---------------------<br />
Strong - Scaling:<br />
global lattice size (32x32x32x96)</p>
<p>sloppy-precision: single<br />
precision: single</p>
<p>GPUs GFLOPS sec<br />
1 786.520000 4.569600<br />
2 1522.410000 3.086040<br />
4 2476.900000 2.447180<br />
8 3426.020000 2.117580<br />
16 5091.330000 1.895790<br />
32 8234.310000 1.860760<br />
64 8276.480000 1.869230</p>
<p>sloppy-precision: double<br />
precision: double</p>
<p>GPUs GFLOPS sec<br />
1 385.965000 6.126730<br />
2 751.227000 3.846940<br />
4 1431.570000 2.774470<br />
8 1368.000000 2.367040<br />
16 2304.900000 2.071160<br />
32 4965.480000 2.095180<br />
64 2308.850000 2.005110</p>
<p><br />
Weak - Scaling:<br />
local lattice size (48x48x48x24)</p>
<p>sloppy-precision: single<br />
precision: single</p>
<p>GPUs GFLOPS sec<br />
1 765.967000 3.940280<br />
2 1472.980000 4.004630<br />
4 2865.600000 4.044360<br />
8 5421.270000 4.056410<br />
16 9373.760000 7.396590<br />
32 17995.100000 4.243390<br />
64 27219.800000 4.535410</p>
<p>sloppy-precision: double<br />
precision: double</p>
<p>GPUs GFLOPS sec<br />
1 376.611000 5.108900<br />
2 728.973000 5.190880<br />
4 1453.500000 5.144160<br />
8 2884.390000 5.207090<br />
16 5004.520000 5.362020<br />
32 8744.090000 5.623290<br />
64 14053.00000 5.910520</p>
<p><br />
---------------------<br />
SurfSara - Kepler K20m<br />
---------------------<br />
##<br />
## 1 GPU per Node<br />
##</p>
<p>Strong - Scaling:<br />
global lattice size (32x32x32x96)</p>
<p>sloppy-precision: single<br />
precision: single<br />
GPUs GFLOPS sec<br />
1 243.084000 4.030000<br />
2 478.179000 2.630000<br />
4 939.953000 2.250000<br />
8 1798.240000 1.570000<br />
16 3072.440000 1.730000<br />
32 4365.320000 1.310000</p>
<p>sloppy-precision: double<br />
precision: double</p>
<p>GPUs GFLOPS sec<br />
1 119.786000 6.060000<br />
2 234.179000 3.290000<br />
4 463.594000 2.250000<br />
8 898.090000 1.960000<br />
16 1604.210000 1.480000<br />
32 2420.130000 1.630000</p>
<p>##<br />
## 2 GPU per Node<br />
##</p>
<p>Strong - Scaling:<br />
global lattice size (32x32x32x96)</p>
<p>sloppy-precision: single<br />
precision: single</p>
<p>GPUs GFLOPS sec<br />
2 463.041000 2.720000<br />
4 896.707000 1.940000<br />
8 1672.080000 1.680000<br />
16 2518.240000 1.420000<br />
32 3800.970000 1.460000<br />
64 4505.440000 1.430000</p>
<p>sloppy-precision: double<br />
precision: double</p>
<p>GPUs GFLOPS sec<br />
2 229.579000 3.380000<br />
4 450.425000 2.280000<br />
8 863.117000 1.830000<br />
16 1348.760000 1.510000<br />
32 1842.560000 1.550000<br />
64 2645.590000 1.480000</p>
<p>###<br />
###<br />
### XEONPHI - BENCHMARK SUITE<br />
###<br />
###</p>
<p>##<br />
## 2. Compile and Run the XeonPhi-Benchmark Suite<br />
##</p>
<p>Unpack the provided source tar-file located in<br />
"./QCD_Accelerator_Benchmarksuite_Part2/XeonPhi/src" or clone the<br />
actual git-hub branches of the code packages QMP:</p>
<p>"git clone https://github.com/usqcd-software/qmp"</p>
<p>and for QPhix</p>
<p>"git clone https://github.com/JeffersonLab/qphix"</p>
<p>Note that the AVX512 instructions, which are needed for an optimal run<br />
on KNLs, are not yet part of the main branch. The AVX512 instructions<br />
are available in the avx512-branch ("git checkout avx512). The<br />
provided source file is using the avx512-branch (Status as of 01/2017).</p>
<p>##<br />
## 2.1 Compile<br />
##</p>
<p>The QPhix library must be built upon QMP, a thin communication layer<br />
on top of MPI. Compile QMP first:</p>
<p>./configure --prefix=$QMP_INSTALL_DIR CC=mpiicc CFLAGS=" -mmic/-xAVX512 -std=c99" --with-qmp-comms-type=MPI --host=x86_64-linux-gnu --build=none-none-none</p>
<p>Create the install folder and link with $QMP_INSTALL_DIR to it. Use<br />
the compiler flag "-mmic" for the compilation for KNC while use<br />
"-xAVX512" for the compilation for KNL. Then use "make" to compile<br />
and "make install" to copy the necessary source files in<br />
$QMP_INSTALL_DIR.</p>
<p>The QPhix executable can be compiled by using, for KNC:</p>
<p>./configure --enable-parallel-arch=parscalar --enable-proc=MIC --enable-soalen=8 --enable-clover --enable-openmp --enable-cean --enable-mm-malloc CXXFLAGS="-openmp -mmic -vec-report -restrict -mGLOB_default_function_attrs=\"use_gather_scatter_hint=off\" -g -O2 -finline-functions -fno-alias -std=c++0x" CFLAGS="-mmic -vec-report -restrict -mGLOB_default_function_attrs=\"use_gather_scatter_hint=off\" -openmp -g -O2 -fno-alias -std=c9l9" CXX=mpiicpc CC=mpiicc --host=x86_64-linux-gnu --build=none-none-none --with-qmp=$QMP_INSTALL_DIR</p>
<p>or for KNL:</p>
<p>./configure --enable-parallel-arch=parscalar --enable-proc=AVX512 --enable-soalen=8 --enable-clover --enable-openmp --enable-cean --enable-mm-malloc CXXFLAGS="-qopenmp -xMIC-AVX512 -g -O3 -std=c++14" CFLAGS="-xMIC-AVX512 -qopenmp -O3 -std=c99" CXX=mpiicpc CC=mpiicc --host=x86_64-linux-gnu --build=none-none-none --with-qmp=$QMP_INSTALL_DIR</p>
<p>by using the previously set variable QMP_INSTALL_DIR which links to<br />
the folder in which the QMP library was copied. The executable<br />
"time_clov_noqdp" should appear in the "./qphix/test" folder. Note<br />
that the avx512-branch will compile an additional executable which has<br />
dependencies on the package QDP (which will generate an error at the<br />
end of the compilation process).</p>
<p>##<br />
## 2.1.1 Example compilation on PRACE machines<br />
##</p>
<p>In the subsection we provide some example compilation on PRACE machines<br />
which where used to develop the QCD Benchmarksuite 2.</p>
<p>##<br />
## 2.1.1.1 BSC - Marenostrum III Hybrid partitions<br />
##</p>
<p>The nodes of the hybrid partition of Marenostrum are equipped with KNC<br />
cards. First load the following modules:</p>
<p>module unload openmpi<br />
module load impi</p>
<p>and then setup the appropriate environment with:</p>
<p>source /opt/intel/impi/4.1.1.036/bin64/mpivars.sh<br />
source /opt/intel/2013.5.192/composer_xe_2013.5.192/bin/compilervars.sh intel64<br />
export I_MPI_MIC=enable<br />
export I_MPI_HYDRA_BOOTSTRAP=ssh</p>
<p>Configure and compile the QMP-library with:</p>
<p>./configure --prefix=$QMP_INSTALL_DIR CC=mpiicc CFLAGS="-mmic -std=c99" --with-qmp-comms-type=MPI --host=x86_64-linux-gnu --build=none-none-none</p>
<p>make<br />
make install</p>
<p>Configure and compile QPhix with:</p>
<p>./configure --enable-parallel-arch=parscalar --enable-proc=MIC --enable-soalen=8 --enable-clover --enable-openmp --enable-cean --enable-mm-malloc CXXFLAGS="-openmp -mmic -vec-report -restrict -mGLOB_default_function_attrs=\"use_gather_scatter_hint=off\" -g -O2 -finline-functions -fno-alias -std=c++0x" CFLAGS="-mmic -vec-report -restrict -mGLOB_default_function_attrs=\"use_gather_scatter_hint=off\" -openmp -g -O2 -fno-alias -std=c9l9" CXX=mpiicpc CC=mpiicc --host=x86_64-linux-gnu --build=none-none-none --with-qmp=$QMP_INSTALL_DIR<br />
make</p>
<p>##<br />
## 2.1.1.2 CINES - Frioul<br />
##</p>
<p>On a test cluster at CINES the Benchmarksuite was tested on KNL cards.<br />
The steps are similar to Marenostrum above. First setup the appropriate environment with:</p>
<p>source /opt/software/intel/composer_xe_2015/bin/compilervars.sh intel64<br />
source /opt/software/intel/impi_5.0.3/bin64/mpivars.sh</p>
<p>Configure and compile QMP with:<br />
<br />
./configure --prefix=$QMP_INSTALL_DIR CC=mpiicc CFLAGS="-xMIC-AVX512 -mGLOB_default_function_attrs="use_gather_scatter_hint=off" -openmp -g -O2 -fno-alias -std=c99" --with-qmp-comms-type=MPI --host=x86_64-linux-gnu --build=none-none-none<br />
make<br />
make install<br />
<br />
Configure and compile QPhix with:<br />
<br />
./configure --enable-parallel-arch=parscalar --enable-proc=AVX512 --enable-soalen=8 --enable-clover --enable-openmp --enable-cean --enable-mm-malloc CXXFLAGS="-qopenmp -xMIC-AVX512 -g -O3 -std=c++14" CFLAGS="-xMIC-AVX512 -qopenmp -O3 -std=c99" CXX=mpiicpc CC=mpiicc --host=x86_64-linux-gnu --build=none-none-none --with-qmp=/home/finkenrath/benchmark/qmp/install</p>
<p>and</p>
<p>make</p>
<p>##<br />
## 2.2 Run<br />
##</p>
<p><br />
The Accelerator QCD-Benchmarksuite Part 2 provides bash-scripts to<br />
setup the benchmark runs on the target machines. These are:</p>
<p>run_ana.sh : Main-script, set up the bechmark mode and submit the jobs (analyse the results)<br />
prepare_submit_job.sh : Generate the job-scripts<br />
submit_job.sh.template : Template for submit script</p>
<p>##<br />
## 2.2.1 Main-script: "run_ana.sh"<br />
##</p>
<p>The path to the executable has to be set by $PATH2EXE . Choose a<br />
scaling mode between Strong scaling or Weak scaling by setting the<br />
variable sca_mode (="Strong" or ="Weak"). The lattice sizes can be set<br />
by "gx" and "gt". Choose between mode="Run" for run mode or<br />
mode="Analysis" for extracting the GFLOPS. Note that the script<br />
assumes Slurm is used as the job scheduler. If not, change the line<br />
which includes the "sbatch" command accordingly.</p>
<p>##<br />
## 2.2.2 Main-script: "prepare_submit_job.sh"<br />
##</p>
<p>Add additional options if necessary.</p>
<p>##<br />
## 2.2.3 Main-script: "submit_job.sh.template"<br />
##</p>
<p>The submit-template will be edited by "prepare_submit_job.sh" to<br />
generate the final submit-script. The first lines (beginning with<br />
"#SBATCH") depend on the queuing system of the target machine, which<br />
in this case is assumed to be Slurm. These should be changed in case<br />
of a different queuing system.</p>
<p>##<br />
## 2.3 Example Benchmark Results<br />
##</p>
<p><br />
The benchmark results for the XeonPhi benchmark suite are performed on<br />
Frioul, a test cluster at CINES, and the hybrid partion on MareNostrum III at BSC.<br />
Frioul has one KNL-card per node while the hybrid partion of MareNostrum III is<br />
equiped with two KNCs per node. The data on Frioul are generated by using<br />
the bash-scripts provided by the QCD-Accelerator Benchmarksute Part 2<br />
and are done for the two test cases "Strong-Scaling" with a lattice size<br />
of 32^3x96 and "Weak-scaling" with a local lattice size of 48^3x24 per<br />
card. In case of the data generated at MareNostrum, data for the "Strong-Scaling"<br />
mode on a 32^3x96 lattice are shown. The Benchmark is using a random gauge configuration and uses the<br />
Conjugated Gradient solver to solve a linear equation involving the clover Wilson Dirac operator.</p>
<p>---------------------<br />
Frioul - KNLs<br />
---------------------<br />
Strong - Scaling:<br />
global lattice size (32x32x32x96)</p>
<p>precision: single</p>
<p>KNLs GFLOPS <br />
1 340.75<br />
2 627.612<br />
4 1111.13<br />
8 1779.34<br />
16 2410.8</p>
<p>precision: double</p>
<p>KNLs GFLOPS <br />
1 328.149<br />
2 616.467<br />
4 1047.79<br />
8 1616.37</p>
<p><br />
Weak - Scaling:<br />
local lattice size (48x48x48x24)</p>
<p>precision: single</p>
<p>KNLs GFLOPS <br />
1 348.304<br />
2 616.697<br />
4 1214.82<br />
8 2425.45<br />
16 4404.63<br />
<br />
precision: double</p>
<p>KNLs GFLOPS <br />
1 172.303<br />
2 320.761<br />
4 629.79<br />
8 1228.77<br />
16 2310.63</p>
<p>---------------------<br />
MareNostrum III - KNC's<br />
---------------------</p>
<p>Strong - Scaling:<br />
global lattice size (32x32x32x96)</p>
<p>precision: single - 1 Cards per Node</p>
<p>KNCs GFLOPS<br />
2 103.561<br />
4 200.159<br />
8 338.276<br />
16 534.369<br />
32 815.896</p>
<p>precision: single - 2 Cards per Node</p>
<p>KNCs GFLOPS<br />
4 118.995<br />
8 212.558<br />
16 368.196<br />
32 605.882<br />
64 847.566</p>
<p> </p>
</body>
</html>