bulk commit
[LbmBenchmarkKernelsPublic.git] / doc / html / main.html
CommitLineData
ecf590ae
MW
1<?xml version="1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
7<title>LBM Benchmark Kernels Documentation</title>
8<style type="text/css">
9
10/*
11:Author: David Goodger (goodger@python.org)
12:Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
13:Copyright: This stylesheet has been placed in the public domain.
14
15Default cascading style sheet for the HTML output of Docutils.
16
17See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
18customize this style sheet.
19*/
20
21/* used to remove borders from tables and images */
22.borderless, table.borderless td, table.borderless th {
23 border: 0 }
24
25table.borderless td, table.borderless th {
26 /* Override padding for "table.docutils td" with "! important".
27 The right padding separates the table cells. */
28 padding: 0 0.5em 0 0 ! important }
29
30.first {
31 /* Override more specific margin styles with "! important". */
32 margin-top: 0 ! important }
33
34.last, .with-subtitle {
35 margin-bottom: 0 ! important }
36
37.hidden {
38 display: none }
39
40a.toc-backref {
41 text-decoration: none ;
42 color: black }
43
44blockquote.epigraph {
45 margin: 2em 5em ; }
46
47dl.docutils dd {
48 margin-bottom: 0.5em }
49
50object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
51 overflow: hidden;
52}
53
54/* Uncomment (and remove this text!) to get bold-faced definition list terms
55dl.docutils dt {
56 font-weight: bold }
57*/
58
59div.abstract {
60 margin: 2em 5em }
61
62div.abstract p.topic-title {
63 font-weight: bold ;
64 text-align: center }
65
66div.admonition, div.attention, div.caution, div.danger, div.error,
67div.hint, div.important, div.note, div.tip, div.warning {
68 margin: 2em ;
69 border: medium outset ;
70 padding: 1em }
71
72div.admonition p.admonition-title, div.hint p.admonition-title,
73div.important p.admonition-title, div.note p.admonition-title,
74div.tip p.admonition-title {
75 font-weight: bold ;
76 font-family: sans-serif }
77
78div.attention p.admonition-title, div.caution p.admonition-title,
79div.danger p.admonition-title, div.error p.admonition-title,
80div.warning p.admonition-title, .code .error {
81 color: red ;
82 font-weight: bold ;
83 font-family: sans-serif }
84
85/* Uncomment (and remove this text!) to get reduced vertical space in
86 compound paragraphs.
87div.compound .compound-first, div.compound .compound-middle {
88 margin-bottom: 0.5em }
89
90div.compound .compound-last, div.compound .compound-middle {
91 margin-top: 0.5em }
92*/
93
94div.dedication {
95 margin: 2em 5em ;
96 text-align: center ;
97 font-style: italic }
98
99div.dedication p.topic-title {
100 font-weight: bold ;
101 font-style: normal }
102
103div.figure {
104 margin-left: 2em ;
105 margin-right: 2em }
106
107div.footer, div.header {
108 clear: both;
109 font-size: smaller }
110
111div.line-block {
112 display: block ;
113 margin-top: 1em ;
114 margin-bottom: 1em }
115
116div.line-block div.line-block {
117 margin-top: 0 ;
118 margin-bottom: 0 ;
119 margin-left: 1.5em }
120
121div.sidebar {
122 margin: 0 0 0.5em 1em ;
123 border: medium outset ;
124 padding: 1em ;
125 background-color: #ffffee ;
126 width: 40% ;
127 float: right ;
128 clear: right }
129
130div.sidebar p.rubric {
131 font-family: sans-serif ;
132 font-size: medium }
133
134div.system-messages {
135 margin: 5em }
136
137div.system-messages h1 {
138 color: red }
139
140div.system-message {
141 border: medium outset ;
142 padding: 1em }
143
144div.system-message p.system-message-title {
145 color: red ;
146 font-weight: bold }
147
148div.topic {
149 margin: 2em }
150
151h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
152h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
153 margin-top: 0.4em }
154
155h1.title {
156 text-align: center }
157
158h2.subtitle {
159 text-align: center }
160
161hr.docutils {
162 width: 75% }
163
164img.align-left, .figure.align-left, object.align-left {
165 clear: left ;
166 float: left ;
167 margin-right: 1em }
168
169img.align-right, .figure.align-right, object.align-right {
170 clear: right ;
171 float: right ;
172 margin-left: 1em }
173
174img.align-center, .figure.align-center, object.align-center {
175 display: block;
176 margin-left: auto;
177 margin-right: auto;
178}
179
180.align-left {
181 text-align: left }
182
183.align-center {
184 clear: both ;
185 text-align: center }
186
187.align-right {
188 text-align: right }
189
190/* reset inner alignment in figures */
191div.align-right {
192 text-align: inherit }
193
194/* div.align-center * { */
195/* text-align: left } */
196
197ol.simple, ul.simple {
198 margin-bottom: 1em }
199
200ol.arabic {
201 list-style: decimal }
202
203ol.loweralpha {
204 list-style: lower-alpha }
205
206ol.upperalpha {
207 list-style: upper-alpha }
208
209ol.lowerroman {
210 list-style: lower-roman }
211
212ol.upperroman {
213 list-style: upper-roman }
214
215p.attribution {
216 text-align: right ;
217 margin-left: 50% }
218
219p.caption {
220 font-style: italic }
221
222p.credits {
223 font-style: italic ;
224 font-size: smaller }
225
226p.label {
227 white-space: nowrap }
228
229p.rubric {
230 font-weight: bold ;
231 font-size: larger ;
232 color: maroon ;
233 text-align: center }
234
235p.sidebar-title {
236 font-family: sans-serif ;
237 font-weight: bold ;
238 font-size: larger }
239
240p.sidebar-subtitle {
241 font-family: sans-serif ;
242 font-weight: bold }
243
244p.topic-title {
245 font-weight: bold }
246
247pre.address {
248 margin-bottom: 0 ;
249 margin-top: 0 ;
250 font: inherit }
251
252pre.literal-block, pre.doctest-block, pre.math, pre.code {
253 margin-left: 2em ;
254 margin-right: 2em }
255
256pre.code .ln { color: grey; } /* line numbers */
257pre.code, code { background-color: #eeeeee }
258pre.code .comment, code .comment { color: #5C6576 }
259pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
260pre.code .literal.string, code .literal.string { color: #0C5404 }
261pre.code .name.builtin, code .name.builtin { color: #352B84 }
262pre.code .deleted, code .deleted { background-color: #DEB0A1}
263pre.code .inserted, code .inserted { background-color: #A3D289}
264
265span.classifier {
266 font-family: sans-serif ;
267 font-style: oblique }
268
269span.classifier-delimiter {
270 font-family: sans-serif ;
271 font-weight: bold }
272
273span.interpreted {
274 font-family: sans-serif }
275
276span.option {
277 white-space: nowrap }
278
279span.pre {
280 white-space: pre }
281
282span.problematic {
283 color: red }
284
285span.section-subtitle {
286 /* font-size relative to parent (h1..h6 element) */
287 font-size: 80% }
288
289table.citation {
290 border-left: solid 1px gray;
291 margin-left: 1px }
292
293table.docinfo {
294 margin: 2em 4em }
295
296table.docutils {
297 margin-top: 0.5em ;
298 margin-bottom: 0.5em }
299
300table.footnote {
301 border-left: solid 1px black;
302 margin-left: 1px }
303
304table.docutils td, table.docutils th,
305table.docinfo td, table.docinfo th {
306 padding-left: 0.5em ;
307 padding-right: 0.5em ;
308 vertical-align: top }
309
310table.docutils th.field-name, table.docinfo th.docinfo-name {
311 font-weight: bold ;
312 text-align: left ;
313 white-space: nowrap ;
314 padding-left: 0 }
315
316/* "booktabs" style (no vertical lines) */
317table.docutils.booktabs {
318 border: 0px;
319 border-top: 2px solid;
320 border-bottom: 2px solid;
321 border-collapse: collapse;
322}
323table.docutils.booktabs * {
324 border: 0px;
325}
326table.docutils.booktabs th {
327 border-bottom: thin solid;
328 text-align: left;
329}
330
331h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
332h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
333 font-size: 100% }
334
335ul.auto-toc {
336 list-style-type: none }
337
e3f82424
MW
338</style>
339<style type="text/css">
340
341
342h1, h2, h3, h4, h5, h6 {
343 font-family: sans-serif;
344 font-size: 100%;
345 background-color: #dcdcdc;
346}
347
348h1.title {
349 background-color: gray;
350 color: white
351}
352
353table.footnote {
354 padding-left: 0.5ex;
355}
356
357table.citation {
358 padding-left: 0.5ex
359}
360
361td.label {
362 width: 10%;
363}
364
365table, table.docutils, td, th {
366 border: 0;
367}
368
369table.citation, table.footnote {
370 width: 100%;
371}
372
373th {
374 background-color: lavender ;
375}
376
377tr:nth-child(even) {
378 xxbackground-color: aliceblue;
379 background-color: white;
380}
381tr:nth-child(odd) {
382 xxbackground-color: lavender;
383 background-color: whitesmoke;
384}
385
386
387
ecf590ae
MW
388</style>
389</head>
390<body>
391<div class="document" id="lbm-benchmark-kernels-documentation">
392<h1 class="title">LBM Benchmark Kernels Documentation</h1>
393
394<!-- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
395#
396# Copyright
397# Markus Wittmann, 2016-2017
398# RRZE, University of Erlangen-Nuremberg, Germany
399# markus.wittmann -at- fau.de or hpc -at- rrze.fau.de
400#
401# Viktor Haag, 2016
402# LSS, University of Erlangen-Nuremberg, Germany
403#
404# This file is part of the Lattice Boltzmann Benchmark Kernels (LbmBenchKernels).
405#
406# LbmBenchKernels is free software: you can redistribute it and/or modify
407# it under the terms of the GNU General Public License as published by
408# the Free Software Foundation, either version 3 of the License, or
409# (at your option) any later version.
410#
411# LbmBenchKernels is distributed in the hope that it will be useful,
412# but WITHOUT ANY WARRANTY; without even the implied warranty of
413# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
414# GNU General Public License for more details.
415#
416# You should have received a copy of the GNU General Public License
417# along with LbmBenchKernels. If not, see <http://www.gnu.org/licenses/>.
418#
419# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
420<div class="contents topic" id="contents">
421<p class="topic-title first">Contents</p>
422<ul class="auto-toc simple">
423<li><a class="reference internal" href="#compilation" id="id2">1&nbsp;&nbsp;&nbsp;Compilation</a><ul class="auto-toc">
424<li><a class="reference internal" href="#debug-and-verification" id="id3">1.1&nbsp;&nbsp;&nbsp;Debug and Verification</a></li>
425<li><a class="reference internal" href="#benchmarking" id="id4">1.2&nbsp;&nbsp;&nbsp;Benchmarking</a></li>
426<li><a class="reference internal" href="#release-and-verification" id="id5">1.3&nbsp;&nbsp;&nbsp;Release and Verification</a></li>
427<li><a class="reference internal" href="#compilers" id="id6">1.4&nbsp;&nbsp;&nbsp;Compilers</a></li>
e3f82424
MW
428<li><a class="reference internal" href="#cleaning" id="id7">1.5&nbsp;&nbsp;&nbsp;Cleaning</a></li>
429<li><a class="reference internal" href="#options-summary" id="id8">1.6&nbsp;&nbsp;&nbsp;Options Summary</a></li>
ecf590ae
MW
430</ul>
431</li>
e3f82424
MW
432<li><a class="reference internal" href="#invocation" id="id9">2&nbsp;&nbsp;&nbsp;Invocation</a><ul class="auto-toc">
433<li><a class="reference internal" href="#command-line-parameters" id="id10">2.1&nbsp;&nbsp;&nbsp;Command Line Parameters</a></li>
434<li><a class="reference internal" href="#kernels" id="id11">2.2&nbsp;&nbsp;&nbsp;Kernels</a></li>
ecf590ae
MW
435</ul>
436</li>
e3f82424
MW
437<li><a class="reference internal" href="#id1" id="id12">3&nbsp;&nbsp;&nbsp;Benchmarking</a><ul class="auto-toc">
438<li><a class="reference internal" href="#padding" id="id13">3.1&nbsp;&nbsp;&nbsp;Padding</a></li>
439</ul>
440</li>
441<li><a class="reference internal" href="#geometries" id="id14">4&nbsp;&nbsp;&nbsp;Geometries</a></li>
442<li><a class="reference internal" href="#results" id="id15">5&nbsp;&nbsp;&nbsp;Results</a></li>
443<li><a class="reference internal" href="#licence" id="id16">6&nbsp;&nbsp;&nbsp;Licence</a></li>
444<li><a class="reference internal" href="#acknowledgements" id="id17">7&nbsp;&nbsp;&nbsp;Acknowledgements</a></li>
ecf590ae
MW
445</ul>
446</div>
447<div class="section" id="compilation">
448<h1><a class="toc-backref" href="#id2">1&nbsp;&nbsp;&nbsp;Compilation</a></h1>
449<p>The benchmark framework currently supports only Linux systems and the GCC and
450Intel compilers. Every other configuration probably requires adjustment inside
451the code and the makefiles. Further some code might be platform or at least
452POSIX specific.</p>
453<p>The benchmark can be build via <tt class="docutils literal">make</tt> from the <tt class="docutils literal">src</tt> subdirectory. This will
454generate one binary which hosts all implemented benchmark kernels.</p>
455<p>Binaries are located under the <tt class="docutils literal">bin</tt> subdirectory and will have different names
456depending on compiler and build configuration.</p>
457<div class="section" id="debug-and-verification">
458<h2><a class="toc-backref" href="#id3">1.1&nbsp;&nbsp;&nbsp;Debug and Verification</a></h2>
459<pre class="literal-block">
e3f82424 460make BUILD=debug BENCHMARK=off
ecf590ae 461</pre>
e3f82424 462<p>Running <tt class="docutils literal">make</tt> with <tt class="docutils literal">BUILD=debug</tt> builds the debug version of
ecf590ae
MW
463the benchmark kernels, where no optimizations are performed, line numbers and
464debug symbols are included as well as <tt class="docutils literal">DEBUG</tt> will be defined. The resulting
465binary will be found in the <tt class="docutils literal">bin</tt> subdirectory and named
466<tt class="docutils literal"><span class="pre">lbmbenchk-linux-&lt;compiler&gt;-debug</span></tt>.</p>
e3f82424
MW
467<p>Specifying <tt class="docutils literal">BENCHMARK=off</tt> turns on verification
468(<tt class="docutils literal">VERIFICATION=on</tt>), statistics (<tt class="docutils literal">STATISTICS=on</tt>), and VTK output
ecf590ae
MW
469(<tt class="docutils literal">VTK_OUTPUT=on</tt>) enabled.</p>
470<p>Please note that the generated binary will therefore
471exhibit a poor performance.</p>
472</div>
473<div class="section" id="benchmarking">
474<h2><a class="toc-backref" href="#id4">1.2&nbsp;&nbsp;&nbsp;Benchmarking</a></h2>
475<p>To generate a binary for benchmarking run make with</p>
476<pre class="literal-block">
e3f82424 477make
ecf590ae 478</pre>
e3f82424
MW
479<p>As default <tt class="docutils literal">BENCHMARK=on</tt> and <tt class="docutils literal">BUILD=release</tt> is set, where
480BUILD=release turns optimizations on and <tt class="docutils literal">BENCHMARK=on</tt> disables
ecf590ae
MW
481verfification, statistics, and VTK output.</p>
482</div>
483<div class="section" id="release-and-verification">
484<h2><a class="toc-backref" href="#id5">1.3&nbsp;&nbsp;&nbsp;Release and Verification</a></h2>
485<p>Verification with the debug builds can be extremely slow. Hence verification
486capabilities can be build with release builds:</p>
487<pre class="literal-block">
e3f82424 488make BENCHMARK=off
ecf590ae
MW
489</pre>
490</div>
491<div class="section" id="compilers">
492<h2><a class="toc-backref" href="#id6">1.4&nbsp;&nbsp;&nbsp;Compilers</a></h2>
493<p>Currently only the GCC and Intel compiler under Linux are supported. Between
494both configuration can be chosen via <tt class="docutils literal"><span class="pre">CONFIG=linux-gcc</span></tt> or
495<tt class="docutils literal"><span class="pre">CONFIG=linux-intel</span></tt>.</p>
496</div>
e3f82424
MW
497<div class="section" id="cleaning">
498<h2><a class="toc-backref" href="#id7">1.5&nbsp;&nbsp;&nbsp;Cleaning</a></h2>
499<p>For each configuration and build (debug/release) a subdirectory under the
500<tt class="docutils literal">src/obj</tt> directory is created where the dependency and object files are
501stored.
502With</p>
503<pre class="literal-block">
504make CONFIG=... BUILD=... clean
505</pre>
506<p>a specific combination is select and cleaned, whereas with</p>
507<pre class="literal-block">
508make clean-all
509</pre>
510<p>all object and dependency files are deleted.</p>
511</div>
ecf590ae 512<div class="section" id="options-summary">
e3f82424 513<h2><a class="toc-backref" href="#id8">1.6&nbsp;&nbsp;&nbsp;Options Summary</a></h2>
ecf590ae
MW
514<p>Options that can be specified when building the framework with make:</p>
515<table border="1" class="docutils">
516<colgroup>
517<col width="8%" />
518<col width="13%" />
519<col width="7%" />
520<col width="72%" />
521</colgroup>
522<tbody valign="top">
523<tr><td>name</td>
524<td>values</td>
525<td>default</td>
526<td>description</td>
527</tr>
ecf590ae
MW
528<tr><td>BENCHMARK</td>
529<td>on, off</td>
e3f82424
MW
530<td>on</td>
531<td>If enabled, disables VERIFICATION, STATISTICS, VTK_OUTPUT. If disabled enables the three former options.</td>
ecf590ae
MW
532</tr>
533<tr><td>BUILD</td>
534<td>debug, release</td>
e3f82424 535<td>release</td>
ecf590ae
MW
536<td>No optimization, debug symbols, DEBUG defined.</td>
537</tr>
538<tr><td>CONFIG</td>
539<td>linux-gcc, linux-intel</td>
540<td>linux-intel</td>
541<td>Select GCC or Intel compiler.</td>
542</tr>
543<tr><td>ISA</td>
544<td>avx, sse</td>
545<td>avx</td>
546<td>Determines which ISA extension is used for macro definitions. This is <em>not</em> the architecture the compiler generates code for.</td>
547</tr>
548<tr><td>OPENMP</td>
549<td>on, off</td>
550<td>on</td>
551<td>OpenMP, i.,e.. threading support.</td>
552</tr>
553<tr><td>STATISTICS</td>
554<td>on, off</td>
555<td>off</td>
556<td>View statistics, like density etc, during simulation.</td>
557</tr>
e3f82424
MW
558<tr><td>TARCH</td>
559<td>--</td>
560<td>--</td>
561<td>Via TARCH the architecture the compiler generates code for can be overridden. The value depends on the chosen compiler.</td>
562</tr>
ecf590ae
MW
563<tr><td>VERIFICATION</td>
564<td>on, off</td>
565<td>off</td>
566<td>Turn verification on/off.</td>
567</tr>
568<tr><td>VTK_OUTPUT</td>
569<td>on, off</td>
570<td>off</td>
571<td>Enable/Disable VTK file output.</td>
572</tr>
573</tbody>
574</table>
575</div>
576</div>
577<div class="section" id="invocation">
e3f82424 578<h1><a class="toc-backref" href="#id9">2&nbsp;&nbsp;&nbsp;Invocation</a></h1>
ecf590ae 579<p>Running the binary will print among the GPL licence header a line like the following:</p>
e3f82424
MW
580<pre class="literal-block">
581LBM Benchmark Kernels 0.1, compiled Jul 5 2017 21:59:22, type: verification
582</pre>
ecf590ae 583<p>if verfication was enabled during compilation or</p>
e3f82424
MW
584<pre class="literal-block">
585LBM Benchmark Kernels 0.1, compiled Jul 5 2017 21:59:22, type: benchmark
586</pre>
ecf590ae
MW
587<p>if verfication was disabled during compilation.</p>
588<div class="section" id="command-line-parameters">
e3f82424 589<h2><a class="toc-backref" href="#id10">2.1&nbsp;&nbsp;&nbsp;Command Line Parameters</a></h2>
ecf590ae
MW
590<p>Running the binary with <tt class="docutils literal"><span class="pre">-h</span></tt> list all available parameters:</p>
591<pre class="literal-block">
592Usage:
593./lbmbenchk -list
594./lbmbenchk
595 [-dims XxYyZ] [-geometry box|channel|pipe|blocks[-&lt;block size&gt;]] [-iterations &lt;iterations&gt;] [-lattice-dump-ascii]
596 [-rho-in &lt;density&gt;] [-rho-out &lt;density] [-omega &lt;omega&gt;] [-kernel &lt;kernel&gt;]
597 [-periodic-x]
598 [-t &lt;number of threads&gt;]
599 [-pin core{,core}*]
600 [-verify]
601 -- &lt;kernel specific parameters&gt;
602
603-list List available kernels.
604
605-dims XxYxZ Specify geometry dimensions.
606
607-geometry blocks-&lt;block size&gt;
608 Geometetry with blocks of size &lt;block size&gt; regularily layout out.
609</pre>
610<p>If an option is specified multiple times the last one overrides previous ones.
611This holds also true for <tt class="docutils literal"><span class="pre">-verify</span></tt> which sets geometry dimensions,
612iterations, etc, which can afterward be override, e.g.:</p>
613<pre class="literal-block">
614$ bin/lbmbenchk-linux-intel-release -verfiy -dims 32x32x32
615</pre>
616<p>Kernel specific parameters can be opatained via selecting the specific kernel
617and passing <tt class="docutils literal"><span class="pre">-h</span></tt> as parameter:</p>
618<pre class="literal-block">
e3f82424 619$ bin/lbmbenchk-linux-intel-release -kernel kernel-name -- -h
ecf590ae
MW
620...
621Kernel parameters:
622[-blk &lt;n&gt;] [-blk-[xyz] &lt;n&gt;]
623</pre>
624<p>A list of all available kernels can be obtained via <tt class="docutils literal"><span class="pre">-list</span></tt>:</p>
625<pre class="literal-block">
626$ ../bin/lbmbenchk-linux-gcc-debug -list
627Lattice Boltzmann Benchmark Kernels (LbmBenchKernels) Copyright (C) 2016, 2017 LSS, RRZE
628This program comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.
629This is free software, and you are welcome to redistribute it under certain conditions.
630
631LBM Benchmark Kernels 0.1, compiled Jul 5 2017 21:59:22, type: verification
632Available kernels to benchmark:
633 list-aa-pv-soa
634 list-aa-ria-soa
635 list-aa-soa
636 list-aa-aos
637 list-pull-split-nt-1s-soa
638 list-pull-split-nt-2s-soa
639 list-push-soa
640 list-push-aos
641 list-pull-soa
642 list-pull-aos
643 push-soa
644 push-aos
645 pull-soa
646 pull-aos
647 blk-push-soa
648 blk-push-aos
649 blk-pull-soa
650 blk-pull-aos
651</pre>
652</div>
e3f82424
MW
653<div class="section" id="kernels">
654<h2><a class="toc-backref" href="#id11">2.2&nbsp;&nbsp;&nbsp;Kernels</a></h2>
655<p>The following list shortly describes available kernels:</p>
656<ul class="simple">
657<li>push-soa/push-aos/pull-soa/pull-aos:
658Unoptimized kernels (but stream/collide are already fused) using two grids as
659source and destination. Implement push/pull semantics as well structure of
660arrays (soa) or array of structures (aos) layout.</li>
661<li>blk-push-soa/blk-push-aos/blk-pull-soa/blk-pull-aos:
662The same as the unoptimized kernels without the blk prefix, except that they support
663spatial blocking, i.e. loop blocking of the three loops used to iterate over
664the lattice. Here manual work sharing for OpenMP is used.</li>
665<li>list-push-soa/list-push-aos/list-pull-soa/list-pull-aos:
666The same as the unoptimized kernels without the list prefix, but for indirect addressing.
667Here only a 1D vector of is used to store the fluid nodes, omitting the
668obstacles. An adjacency list is used to recover the neighborhood associations.</li>
669<li>list-pull-split-nt-1s-soa/list-pull-split-nt-2s-soa:
670Optimized variant of list-pull-soa. Chunks of the lattice are processed as
671once. Postcollision values are written back via nontemporal stores in 18 (1s)
672or 9 (2s) loops.</li>
673<li>list-aa-aos/list-aa-soa:
674Unoptimized implementation of the AA pattern for the 1D vector with adjacency
675list. Supported are array of structures (aos) and structure of arrays (soa)
676data layout is supported.</li>
677<li>list-aa-ria-soa:
678Implementation of AA pattern with intrinsics for the 1D vector with adjacency
679list. Furthermore it contains a vectorized even time step and run length
680coding to reduce the loop balance of the odd time step.</li>
681<li>list-aa-pv-soa:
682All optimizations of list-aa-ria-soa. Additional with partial vectorization
683of the odd time step.</li>
684</ul>
685<p>Note that all array of structures (aos) kernels might require blocking
686(depending on the domain size) to reach the performance of their structure of
687arrays (soa) counter parts.</p>
688<p>The following table summarizes the properties of the kernels. Here <strong>D</strong> means
689direct addressing, i.e. full array, <strong>I</strong> means indirect addressing, i.e. 1D
690vector with adjacency list, <strong>x</strong> means supported, whereas <strong>--</strong> means unsupported.
691The loop balance B_l is computed for D3Q19 model with double precision floating
692point for PDFs (8 byte) and 4 byte integers for the index (adjacency list).
693As list-aa-ria-soa and list-aa-pv-soa support run length coding their effective
694loop balance depends on the geometry. The effective loop balance is printed
695during each run.</p>
696<table border="1" class="docutils">
697<colgroup>
698<col width="29%" />
699<col width="14%" />
700<col width="14%" />
701<col width="6%" />
702<col width="10%" />
703<col width="10%" />
704<col width="16%" />
705</colgroup>
706<thead valign="bottom">
707<tr><th class="head">kernel name</th>
708<th class="head">prop. step</th>
709<th class="head">data layout</th>
710<th class="head">addr.</th>
711<th class="head">parallel</th>
712<th class="head">blocking</th>
713<th class="head">B_l [B/FLUP]</th>
714</tr>
715</thead>
716<tbody valign="top">
717<tr><td>push-soa</td>
718<td>OS</td>
719<td>SoA</td>
720<td>D</td>
721<td>x</td>
722<td>--</td>
723<td>456</td>
724</tr>
725<tr><td>push-aos</td>
726<td>OS</td>
727<td>AoS</td>
728<td>D</td>
729<td>x</td>
730<td>--</td>
731<td>456</td>
732</tr>
733<tr><td>pull-soa</td>
734<td>OS</td>
735<td>SoA</td>
736<td>D</td>
737<td>x</td>
738<td>--</td>
739<td>456</td>
740</tr>
741<tr><td>pull-aos</td>
742<td>OS</td>
743<td>AoS</td>
744<td>D</td>
745<td>x</td>
746<td>--</td>
747<td>456</td>
748</tr>
749<tr><td>blk-push-soa</td>
750<td>OS</td>
751<td>SoA</td>
752<td>D</td>
753<td>x</td>
754<td>x</td>
755<td>456</td>
756</tr>
757<tr><td>blk-push-aos</td>
758<td>OS</td>
759<td>AoS</td>
760<td>D</td>
761<td>x</td>
762<td>x</td>
763<td>456</td>
764</tr>
765<tr><td>blk-pull-soa</td>
766<td>OS</td>
767<td>SoA</td>
768<td>D</td>
769<td>x</td>
770<td>x</td>
771<td>456</td>
772</tr>
773<tr><td>blk-pull-aos</td>
774<td>OS</td>
775<td>AoS</td>
776<td>D</td>
777<td>x</td>
778<td>x</td>
779<td>456</td>
780</tr>
781<tr><td>list-push-soa</td>
782<td>OS</td>
783<td>SoA</td>
784<td>I</td>
785<td>x</td>
786<td>x</td>
787<td>528</td>
788</tr>
789<tr><td>list-push-aos</td>
790<td>OS</td>
791<td>AoS</td>
792<td>I</td>
793<td>x</td>
794<td>x</td>
795<td>528</td>
796</tr>
797<tr><td>list-pull-soa</td>
798<td>OS</td>
799<td>SoA</td>
800<td>I</td>
801<td>x</td>
802<td>x</td>
803<td>528</td>
804</tr>
805<tr><td>list-pull-aos</td>
806<td>OS</td>
807<td>AoS</td>
808<td>I</td>
809<td>x</td>
810<td>x</td>
811<td>528</td>
812</tr>
813<tr><td>list-pull-split-nt-1s</td>
814<td>OS</td>
815<td>SoA</td>
816<td>I</td>
817<td>x</td>
818<td>x</td>
819<td>376</td>
820</tr>
821<tr><td>list-pull-split-nt-2s</td>
822<td>OS</td>
823<td>SoA</td>
824<td>I</td>
825<td>x</td>
826<td>x</td>
827<td>376</td>
828</tr>
829<tr><td>list-aa-soa</td>
830<td>AA</td>
831<td>SoA</td>
832<td>I</td>
833<td>x</td>
834<td>x</td>
835<td>340</td>
836</tr>
837<tr><td>list-aa-aos</td>
838<td>AA</td>
839<td>AoS</td>
840<td>I</td>
841<td>x</td>
842<td>x</td>
843<td>340</td>
844</tr>
845<tr><td>list-aa-ria-soa</td>
846<td>AA</td>
847<td>SoA</td>
848<td>I</td>
849<td>x</td>
850<td>x</td>
851<td>304-342</td>
852</tr>
853<tr><td>list-aa-pv-soa</td>
854<td>AA</td>
855<td>SoA</td>
856<td>I</td>
857<td>x</td>
858<td>x</td>
859<td>304-342</td>
860</tr>
861</tbody>
862</table>
863</div>
ecf590ae
MW
864</div>
865<div class="section" id="id1">
e3f82424 866<h1><a class="toc-backref" href="#id12">3&nbsp;&nbsp;&nbsp;Benchmarking</a></h1>
ecf590ae
MW
867<p>Correct benchmarking is a nontrivial task. Whenever benchmark results should be
868created make sure the binary was compiled with:</p>
869<ul class="simple">
e3f82424
MW
870<li><tt class="docutils literal">BENCHMARK=on</tt> (default if not overriden) and</li>
871<li><tt class="docutils literal">BUILD=release</tt> (default if not overriden) and</li>
ecf590ae
MW
872<li>the correct ISA for macros is used, selected via <tt class="docutils literal">ISA</tt> and</li>
873<li>use <tt class="docutils literal">TARCH</tt> to specify the architecture the compiler generates code for.</li>
874</ul>
875<p>During benchmarking pinning should be used via the <tt class="docutils literal"><span class="pre">-pin</span></tt> parameter. Running
876a benchmark with 10 threads an pin them to the first 10 cores works like</p>
877<pre class="literal-block">
878$ bin/lbmbenchk-linux-intel-release ... -t 10 -pin $(seq -s , 0 9)
879</pre>
880<p>Things the binary does nor check or controll:</p>
881<ul class="simple">
882<li>transparent huge pages: when allocating memory small 4 KiB pages might be
883replaced with larger ones. This is in general a good thing, but if this is
e3f82424
MW
884really the case, depends on the system settings (check e.g. the status of
885<tt class="docutils literal">/sys/kernel/mm/transparent_hugepage/enabled</tt>).
886Currently <tt class="docutils literal">madvise(MADV_HUGEPAGE)</tt> is used for allocations which are aligned to
887a 4 KiB page, which should be the case for the lattices.
888This should result in huge pages except THP is disabled on the machine.
889(NOTE: madvise() is used if <tt class="docutils literal">HAVE_HUGE_PAGES</tt> is defined, which is currently
890hard coded defined in <tt class="docutils literal">Memory.c</tt>).</li>
ecf590ae
MW
891<li>CPU/core frequency: For reproducible results the frequency of all cores
892should be fixed.</li>
893<li>NUMA placement policy: The benchmark assumes a first touch policy, which
894means the memory will be placed at the NUMA domain the touching core is
895associated with. If a different policy is in place or the NUMA domain to be
896used is already full memory might be allocated in a remote domain. Accesses
897to remote domains typically have a higher latency and lower bandwidth.</li>
898<li>System load: interference with other application, espcially on desktop
899systems should be avoided.</li>
e3f82424
MW
900<li>Padding: For SoA based kernels the number of (fluid) nodes is automatically
901adjusted so that no cache or TLB thrashing should occur. The parameters are
902optimized for current Intel based systems. For more details look into the
903padding section.</li>
ecf590ae
MW
904<li>CPU dispatcher function: the compiler might add different versions of a
905function for different ISA extensions. Make sure the code you might think is
906executed is actually the code which is executed.</li>
907</ul>
e3f82424
MW
908<div class="section" id="padding">
909<h2><a class="toc-backref" href="#id13">3.1&nbsp;&nbsp;&nbsp;Padding</a></h2>
910<p>With correct padding cache and TLB thrashing can be avoided. Therefore the
911number of (fluid) nodes used in the data layout is artificially increased.</p>
912<p>Currently automatic padding is active for kernels which support it. It can be
913controlled via the kernel parameter (i.e. parameter after the <tt class="docutils literal"><span class="pre">--</span></tt>)
914<tt class="docutils literal"><span class="pre">-pad</span></tt>. Supported values are <tt class="docutils literal">auto</tt> (default), <tt class="docutils literal">no</tt> (to disable padding),
915or a manual padding.</p>
916<p>Automatic padding tries to avoid cache and TLB thrashing and pads for a 32
917entry (huge pages) TLB with 8 sets and a 512 set (L2) cache. This reflects the
918parameters of current Intel based processors.</p>
919<p>Manual padding is done via a padding string and has the format
920<tt class="docutils literal"><span class="pre">mod_1+offset_1(,mod_n+offset_n)</span></tt>, which specifies numbers of bytes.
921SoA data layouts can exhibit TLB thrashing. Therefore we want to distribute the
92219 pages with one lattice (36 with two lattices) we are concurrently accessing
923over as much sets in the TLB as possible.
924This is controlled by the distance between the accessed pages, which is the
925number of (fluid) nodes in between them and can be adjusted by adding further
926(fluid) nodes.
927We want the distance d (in bytes) between two accessed pages to be e.g.
928<strong>d % (PAGE_SIZE * TLB_SETS) = PAGE_SIZE</strong>.
929This would distribute the pages evenly over the sets. Hereby <strong>PAGE_SIZE * TLB_SETS</strong>
930would be our <tt class="docutils literal">mod_1</tt> and <strong>PAGE_SIZE</strong> (after the =) our <tt class="docutils literal">offset_1</tt>.
931Measurements show that with only a quarter of half of a page size as offset
932higher performance is achieved, which is done by automatic padding.
933On top of this padding more paddings can be added. They are just added to the
934padding string and are separated by commas.</p>
935<p>A zero modulus in the padding string has a special meaning. Here the
936corresponding offset is just added to the number of nodes. A padding string
937like <tt class="docutils literal"><span class="pre">-pad</span> 0+16</tt> would at a static padding of two nodes (one node = 8 b).</p>
938</div>
939</div>
940<div class="section" id="geometries">
941<h1><a class="toc-backref" href="#id14">4&nbsp;&nbsp;&nbsp;Geometries</a></h1>
942<p>TODO: supported geometries: channel, pipe, blocks</p>
943</div>
944<div class="section" id="results">
945<h1><a class="toc-backref" href="#id15">5&nbsp;&nbsp;&nbsp;Results</a></h1>
946<p>TODO</p>
947</div>
948<div class="section" id="licence">
949<h1><a class="toc-backref" href="#id16">6&nbsp;&nbsp;&nbsp;Licence</a></h1>
950<p>The Lattice Boltzmann Benchmark Kernels are licensed under GPLv3.</p>
ecf590ae
MW
951</div>
952<div class="section" id="acknowledgements">
e3f82424 953<h1><a class="toc-backref" href="#id17">7&nbsp;&nbsp;&nbsp;Acknowledgements</a></h1>
ecf590ae
MW
954<p>This work was funded by BMBF, grant no. 01IH15003A (project SKAMPY).</p>
955<p>This work was funded by KONWHIR project OMI4PAPS.</p>
e3f82424 956<p>Document was generated at 2017-11-02 15:33.</p>
ecf590ae
MW
957</div>
958</div>
959</body>
960</html>
This page took 0.11292 seconds and 5 git commands to generate.