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">
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">
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.
15 Default cascading style sheet for the HTML output of Docutils.
17 See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
18 customize this style sheet.
21 /* used to remove borders from tables and images */
22 .borderless, table.borderless td, table.borderless th {
25 table.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 }
31 /* Override more specific margin styles with "! important". */
32 margin-top: 0 ! important }
34 .last, .with-subtitle {
35 margin-bottom: 0 ! important }
41 text-decoration: none ;
48 margin-bottom: 0.5em }
50 object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
54 /* Uncomment (and remove this text!) to get bold-faced definition list terms
62 div.abstract p.topic-title {
66 div.admonition, div.attention, div.caution, div.danger, div.error,
67 div.hint, div.important, div.note, div.tip, div.warning {
69 border: medium outset ;
72 div.admonition p.admonition-title, div.hint p.admonition-title,
73 div.important p.admonition-title, div.note p.admonition-title,
74 div.tip p.admonition-title {
76 font-family: sans-serif }
78 div.attention p.admonition-title, div.caution p.admonition-title,
79 div.danger p.admonition-title, div.error p.admonition-title,
80 div.warning p.admonition-title, .code .error {
83 font-family: sans-serif }
85 /* Uncomment (and remove this text!) to get reduced vertical space in
87 div.compound .compound-first, div.compound .compound-middle {
88 margin-bottom: 0.5em }
90 div.compound .compound-last, div.compound .compound-middle {
99 div.dedication p.topic-title {
107 div.footer, div.header {
116 div.line-block div.line-block {
122 margin: 0 0 0.5em 1em ;
123 border: medium outset ;
125 background-color: #ffffee ;
130 div.sidebar p.rubric {
131 font-family: sans-serif ;
134 div.system-messages {
137 div.system-messages h1 {
141 border: medium outset ;
144 div.system-message p.system-message-title {
151 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
152 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
164 img.align-left, .figure.align-left, object.align-left {
169 img.align-right, .figure.align-right, object.align-right {
174 img.align-center, .figure.align-center, object.align-center {
190 /* reset inner alignment in figures */
192 text-align: inherit }
194 /* div.align-center * { */
195 /* text-align: left } */
197 ol.simple, ul.simple {
201 list-style: decimal }
204 list-style: lower-alpha }
207 list-style: upper-alpha }
210 list-style: lower-roman }
213 list-style: upper-roman }
227 white-space: nowrap }
236 font-family: sans-serif ;
241 font-family: sans-serif ;
252 pre.literal-block, pre.doctest-block, pre.math, pre.code {
256 pre.code .ln { color: grey; } /* line numbers */
257 pre.code, code { background-color: #eeeeee }
258 pre.code .comment, code .comment { color: #5C6576 }
259 pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
260 pre.code .literal.string, code .literal.string { color: #0C5404 }
261 pre.code .name.builtin, code .name.builtin { color: #352B84 }
262 pre.code .deleted, code .deleted { background-color: #DEB0A1}
263 pre.code .inserted, code .inserted { background-color: #A3D289}
266 font-family: sans-serif ;
267 font-style: oblique }
269 span.classifier-delimiter {
270 font-family: sans-serif ;
274 font-family: sans-serif }
277 white-space: nowrap }
285 span.section-subtitle {
286 /* font-size relative to parent (h1..h6 element) */
290 border-left: solid 1px gray;
298 margin-bottom: 0.5em }
301 border-left: solid 1px black;
304 table.docutils td, table.docutils th,
305 table.docinfo td, table.docinfo th {
306 padding-left: 0.5em ;
307 padding-right: 0.5em ;
308 vertical-align: top }
310 table.docutils th.field-name, table.docinfo th.docinfo-name {
313 white-space: nowrap ;
316 /* "booktabs" style (no vertical lines) */
317 table.docutils.booktabs {
319 border-top: 2px solid;
320 border-bottom: 2px solid;
321 border-collapse: collapse;
323 table.docutils.booktabs * {
326 table.docutils.booktabs th {
327 border-bottom: thin solid;
331 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
332 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
336 list-style-type: none }
341 <div class="document" id="lbm-benchmark-kernels-documentation">
342 <h1 class="title">LBM Benchmark Kernels Documentation</h1>
344 <!-- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
347 # Markus Wittmann, 2016-2017
348 # RRZE, University of Erlangen-Nuremberg, Germany
349 # markus.wittmann -at- fau.de or hpc -at- rrze.fau.de
352 # LSS, University of Erlangen-Nuremberg, Germany
354 # This file is part of the Lattice Boltzmann Benchmark Kernels (LbmBenchKernels).
356 # LbmBenchKernels is free software: you can redistribute it and/or modify
357 # it under the terms of the GNU General Public License as published by
358 # the Free Software Foundation, either version 3 of the License, or
359 # (at your option) any later version.
361 # LbmBenchKernels is distributed in the hope that it will be useful,
362 # but WITHOUT ANY WARRANTY; without even the implied warranty of
363 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
364 # GNU General Public License for more details.
366 # You should have received a copy of the GNU General Public License
367 # along with LbmBenchKernels. If not, see <http://www.gnu.org/licenses/>.
369 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
370 <div class="contents topic" id="contents">
371 <p class="topic-title first">Contents</p>
372 <ul class="auto-toc simple">
373 <li><a class="reference internal" href="#compilation" id="id2">1 Compilation</a><ul class="auto-toc">
374 <li><a class="reference internal" href="#debug-and-verification" id="id3">1.1 Debug and Verification</a></li>
375 <li><a class="reference internal" href="#benchmarking" id="id4">1.2 Benchmarking</a></li>
376 <li><a class="reference internal" href="#release-and-verification" id="id5">1.3 Release and Verification</a></li>
377 <li><a class="reference internal" href="#compilers" id="id6">1.4 Compilers</a></li>
378 <li><a class="reference internal" href="#options-summary" id="id7">1.5 Options Summary</a></li>
381 <li><a class="reference internal" href="#invocation" id="id8">2 Invocation</a><ul class="auto-toc">
382 <li><a class="reference internal" href="#command-line-parameters" id="id9">2.1 Command Line Parameters</a></li>
385 <li><a class="reference internal" href="#id1" id="id10">3 Benchmarking</a></li>
386 <li><a class="reference internal" href="#acknowledgements" id="id11">4 Acknowledgements</a></li>
389 <div class="section" id="compilation">
390 <h1><a class="toc-backref" href="#id2">1 Compilation</a></h1>
391 <p>The benchmark framework currently supports only Linux systems and the GCC and
392 Intel compilers. Every other configuration probably requires adjustment inside
393 the code and the makefiles. Further some code might be platform or at least
395 <p>The benchmark can be build via <tt class="docutils literal">make</tt> from the <tt class="docutils literal">src</tt> subdirectory. This will
396 generate one binary which hosts all implemented benchmark kernels.</p>
397 <p>Binaries are located under the <tt class="docutils literal">bin</tt> subdirectory and will have different names
398 depending on compiler and build configuration.</p>
399 <div class="section" id="debug-and-verification">
400 <h2><a class="toc-backref" href="#id3">1.1 Debug and Verification</a></h2>
401 <pre class="literal-block">
404 <p>Running <tt class="docutils literal">make</tt> without any arguments builds the debug version (BUILD=debug) of
405 the benchmark kernels, where no optimizations are performed, line numbers and
406 debug symbols are included as well as <tt class="docutils literal">DEBUG</tt> will be defined. The resulting
407 binary will be found in the <tt class="docutils literal">bin</tt> subdirectory and named
408 <tt class="docutils literal"><span class="pre">lbmbenchk-linux-<compiler>-debug</span></tt>.</p>
409 <p>Without any further specification the binary includes verification
410 (<tt class="docutils literal">VERIFICATION=on</tt>), statistics (<tt class="docutils literal">STATISTICS</tt>), and VTK output
411 (<tt class="docutils literal">VTK_OUTPUT=on</tt>) enabled.</p>
412 <p>Please note that the generated binary will therefore
413 exhibit a poor performance.</p>
415 <div class="section" id="benchmarking">
416 <h2><a class="toc-backref" href="#id4">1.2 Benchmarking</a></h2>
417 <p>To generate a binary for benchmarking run make with</p>
418 <pre class="literal-block">
419 make BENCHMARK=on BUILD=release
421 <p>Here BUILD=release turns optimizations on and BENCHMARK=on disables
422 verfification, statistics, and VTK output.</p>
424 <div class="section" id="release-and-verification">
425 <h2><a class="toc-backref" href="#id5">1.3 Release and Verification</a></h2>
426 <p>Verification with the debug builds can be extremely slow. Hence verification
427 capabilities can be build with release builds:</p>
428 <pre class="literal-block">
432 <div class="section" id="compilers">
433 <h2><a class="toc-backref" href="#id6">1.4 Compilers</a></h2>
434 <p>Currently only the GCC and Intel compiler under Linux are supported. Between
435 both configuration can be chosen via <tt class="docutils literal"><span class="pre">CONFIG=linux-gcc</span></tt> or
436 <tt class="docutils literal"><span class="pre">CONFIG=linux-intel</span></tt>.</p>
438 <div class="section" id="options-summary">
439 <h2><a class="toc-backref" href="#id7">1.5 Options Summary</a></h2>
440 <p>Options that can be specified when building the framework with make:</p>
441 <table border="1" class="docutils">
457 <td>Via TARCH the architecture the compiler generates code for can be overriden. The value depends on the chose compiler.</td>
459 <tr><td>BENCHMARK</td>
462 <td>If enabled, disables VERIFICATION, STATISTICS, VTK_OUTPUT.</td>
465 <td>debug, release</td>
467 <td>No optimization, debug symbols, DEBUG defined.</td>
470 <td>linux-gcc, linux-intel</td>
472 <td>Select GCC or Intel compiler.</td>
477 <td>Determines which ISA extension is used for macro definitions. This is <em>not</em> the architecture the compiler generates code for.</td>
482 <td>OpenMP, i.,e.. threading support.</td>
484 <tr><td>STATISTICS</td>
487 <td>View statistics, like density etc, during simulation.</td>
489 <tr><td>VERIFICATION</td>
492 <td>Turn verification on/off.</td>
494 <tr><td>VTK_OUTPUT</td>
497 <td>Enable/Disable VTK file output.</td>
503 <div class="section" id="invocation">
504 <h1><a class="toc-backref" href="#id8">2 Invocation</a></h1>
505 <p>Running the binary will print among the GPL licence header a line like the following:</p>
507 LBM Benchmark Kernels 0.1, compiled Jul 5 2017 21:59:22, type: verification</blockquote>
508 <p>if verfication was enabled during compilation or</p>
510 LBM Benchmark Kernels 0.1, compiled Jul 5 2017 21:59:22, type: benchmark</blockquote>
511 <p>if verfication was disabled during compilation.</p>
512 <div class="section" id="command-line-parameters">
513 <h2><a class="toc-backref" href="#id9">2.1 Command Line Parameters</a></h2>
514 <p>Running the binary with <tt class="docutils literal"><span class="pre">-h</span></tt> list all available parameters:</p>
515 <pre class="literal-block">
519 [-dims XxYyZ] [-geometry box|channel|pipe|blocks[-<block size>]] [-iterations <iterations>] [-lattice-dump-ascii]
520 [-rho-in <density>] [-rho-out <density] [-omega <omega>] [-kernel <kernel>]
522 [-t <number of threads>]
525 -- <kernel specific parameters>
527 -list List available kernels.
529 -dims XxYxZ Specify geometry dimensions.
531 -geometry blocks-<block size>
532 Geometetry with blocks of size <block size> regularily layout out.
534 <p>If an option is specified multiple times the last one overrides previous ones.
535 This holds also true for <tt class="docutils literal"><span class="pre">-verify</span></tt> which sets geometry dimensions,
536 iterations, etc, which can afterward be override, e.g.:</p>
537 <pre class="literal-block">
538 $ bin/lbmbenchk-linux-intel-release -verfiy -dims 32x32x32
540 <p>Kernel specific parameters can be opatained via selecting the specific kernel
541 and passing <tt class="docutils literal"><span class="pre">-h</span></tt> as parameter:</p>
542 <pre class="literal-block">
543 $ bin/lbmbenchk-linux-intel-release -kernel -- -h
546 [-blk <n>] [-blk-[xyz] <n>]
548 <p>A list of all available kernels can be obtained via <tt class="docutils literal"><span class="pre">-list</span></tt>:</p>
549 <pre class="literal-block">
550 $ ../bin/lbmbenchk-linux-gcc-debug -list
551 Lattice Boltzmann Benchmark Kernels (LbmBenchKernels) Copyright (C) 2016, 2017 LSS, RRZE
552 This program comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.
553 This is free software, and you are welcome to redistribute it under certain conditions.
555 LBM Benchmark Kernels 0.1, compiled Jul 5 2017 21:59:22, type: verification
556 Available kernels to benchmark:
561 list-pull-split-nt-1s-soa
562 list-pull-split-nt-2s-soa
578 <div class="section" id="id1">
579 <h1><a class="toc-backref" href="#id10">3 Benchmarking</a></h1>
580 <p>Correct benchmarking is a nontrivial task. Whenever benchmark results should be
581 created make sure the binary was compiled with:</p>
583 <li><tt class="docutils literal">BENCHMARK=on</tt> and</li>
584 <li><tt class="docutils literal">BUILD=release</tt> and</li>
585 <li>the correct ISA for macros is used, selected via <tt class="docutils literal">ISA</tt> and</li>
586 <li>use <tt class="docutils literal">TARCH</tt> to specify the architecture the compiler generates code for.</li>
588 <p>During benchmarking pinning should be used via the <tt class="docutils literal"><span class="pre">-pin</span></tt> parameter. Running
589 a benchmark with 10 threads an pin them to the first 10 cores works like</p>
590 <pre class="literal-block">
591 $ bin/lbmbenchk-linux-intel-release ... -t 10 -pin $(seq -s , 0 9)
593 <p>Things the binary does nor check or controll:</p>
595 <li>transparent huge pages: when allocating memory small 4 KiB pages might be
596 replaced with larger ones. This is in general a good thing, but if this is
597 really the case, depends on the system settings.</li>
598 <li>CPU/core frequency: For reproducible results the frequency of all cores
599 should be fixed.</li>
600 <li>NUMA placement policy: The benchmark assumes a first touch policy, which
601 means the memory will be placed at the NUMA domain the touching core is
602 associated with. If a different policy is in place or the NUMA domain to be
603 used is already full memory might be allocated in a remote domain. Accesses
604 to remote domains typically have a higher latency and lower bandwidth.</li>
605 <li>System load: interference with other application, espcially on desktop
606 systems should be avoided.</li>
607 <li>Padding: most kernels do not care about padding against cache or TLB
608 thrashing. Even if the number of (fluid) nodes suggest everything is fine,
609 through parallelization still problems might occur.</li>
610 <li>CPU dispatcher function: the compiler might add different versions of a
611 function for different ISA extensions. Make sure the code you might think is
612 executed is actually the code which is executed.</li>
615 <div class="section" id="acknowledgements">
616 <h1><a class="toc-backref" href="#id11">4 Acknowledgements</a></h1>
617 <p>This work was funded by BMBF, grant no. 01IH15003A (project SKAMPY).</p>
618 <p>This work was funded by KONWHIR project OMI4PAPS.</p>
619 <p>Document was generated at 2017-10-26 09:43.</p>