From 636c2172ae32179e2a9bff894afd89c3c1f731b3 Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Mon, 11 Mar 2019 11:11:35 +0100 Subject: [PATCH 1/8] Create README.md --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..70190f1 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# The Bandwidth Benchmark + +This is a collection of simple streaming kernels for teaching purposes. +It is heavily inspired by John McCalpin's [https://www.cs.virginia.edu/stream/ stream benchmark]. + +## Build + +1. Configure the toolchain to use in the `Makefile`: +``` +TAG = GCC # Supported GCC, CLANG, ICC +``` + +2. Review the flags for toolchain in the corresponding included file, e.g. `include_GCC.mk`. OpenMP is disabled per default, you can enable it by uncommenting the OpenMP flag: +``` +OPENMP = -fopenmp +``` + +3. Build with: +``` +make +``` + +You can build multiple toolchains in the same directory, but notice that the Makefile is only acting on the one currently set. +Intermediate build results are located in the `` directory. + +4. Clean up with: +``` +make clean +``` +to clean intermediate build results. + +``` +make distclean +``` +to clean intermediate build results and binary. + +5. (Optional) Generate assembler files: +``` +make asm +``` +The assembler files will also be located in the `` directory. + + From 4f8493b56f338d7f766defdbaf7090f4d7669a06 Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Mon, 11 Mar 2019 11:12:07 +0100 Subject: [PATCH 2/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 70190f1..ff12b01 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # The Bandwidth Benchmark This is a collection of simple streaming kernels for teaching purposes. -It is heavily inspired by John McCalpin's [https://www.cs.virginia.edu/stream/ stream benchmark]. +It is heavily inspired by John McCalpin's https://www.cs.virginia.edu/stream/. ## Build From 58834fd2da3438742148506752f8ed493e16429a Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Mon, 11 Mar 2019 11:23:25 +0100 Subject: [PATCH 3/8] Update README.md --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ff12b01..0c8daed 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,18 @@ This is a collection of simple streaming kernels for teaching purposes. It is heavily inspired by John McCalpin's https://www.cs.virginia.edu/stream/. +It contains the following streaming kernels and the corrsponding data access pattern (Notation: S - store, L - load, WA - write allocate): + +* init: S1 +* sum: L1 +* copy: L1, S1, WA +* update: L1, S1 +* triad: L2, S1, WA +* daxpy: L2, S1 +* striad: L3, S1, WA +* sdaxpy: L3, S1 + + ## Build 1. Configure the toolchain to use in the `Makefile`: @@ -34,10 +46,10 @@ make distclean ``` to clean intermediate build results and binary. -5. (Optional) Generate assembler files: +5. (Optional) Generate assembler: ``` make asm ``` The assembler files will also be located in the `` directory. - +## Usage From c384273d4aa930188991239dc9b5d1b9277fef2e Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Mon, 11 Mar 2019 11:24:00 +0100 Subject: [PATCH 4/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c8daed..0482cac 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This is a collection of simple streaming kernels for teaching purposes. It is heavily inspired by John McCalpin's https://www.cs.virginia.edu/stream/. -It contains the following streaming kernels and the corrsponding data access pattern (Notation: S - store, L - load, WA - write allocate): +It contains the following streaming kernels with corresponding data access pattern (Notation: S - store, L - load, WA - write allocate): * init: S1 * sum: L1 From 107b85f140385085e42ceacf5a8453cc60aaee55 Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Mon, 11 Mar 2019 11:29:18 +0100 Subject: [PATCH 5/8] Update README.md --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 0482cac..66236dc 100644 --- a/README.md +++ b/README.md @@ -53,3 +53,41 @@ make asm The assembler files will also be located in the `` directory. ## Usage + +To run just call: +``` +./bwBench- +``` + +The benchmark will output the results similar to the stream benchmark. Results are validated. +For threaded execution it is recommended to control thread affinity. + +We recommend to use likwid-pin for benchmarking: +``` +likwid-pin -c 0-3 ./bwbench-GCC +``` + +Example output for threaded version: +``` +------------------------------------------------------------- +[pthread wrapper] +[pthread wrapper] MAIN -> 0 +[pthread wrapper] PIN_MASK: 0->1 1->2 2->3 +[pthread wrapper] SKIP MASK: 0x0 + threadid 140271463495424 -> core 1 - OK + threadid 140271455102720 -> core 2 - OK + threadid 140271446710016 -> core 3 - OK +OpenMP enabled, running with 4 threads +------------------------------------------------------------- +Function Rate (MB/s) Avg time Min time Max time +Init: 14681.5000 0.0110 0.0109 0.0111 +Sum: 20634.9290 0.0079 0.0078 0.0082 +Copy: 18822.2827 0.0172 0.0170 0.0176 +Update: 28135.9717 0.0115 0.0114 0.0117 +Triad: 19263.0634 0.0253 0.0249 0.0268 +Daxpy: 26718.1377 0.0182 0.0180 0.0187 +STriad: 21229.4470 0.0305 0.0301 0.0313 +SDaxpy: 26714.3897 0.0243 0.0240 0.0253 +------------------------------------------------------------- +Solution Validates +``` From f08cb5e5381b4071e1f1007be2ff79b4b5da404e Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Mon, 11 Mar 2019 11:34:39 +0100 Subject: [PATCH 6/8] Update README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 66236dc..342dfcd 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ It is heavily inspired by John McCalpin's https://www.cs.virginia.edu/stream/. It contains the following streaming kernels with corresponding data access pattern (Notation: S - store, L - load, WA - write allocate): -* init: S1 -* sum: L1 -* copy: L1, S1, WA -* update: L1, S1 -* triad: L2, S1, WA -* daxpy: L2, S1 -* striad: L3, S1, WA -* sdaxpy: L3, S1 +* init (S1, WA): Initilize an array. Store only. +* sum (L1): Vector reduction. Load only. +* copy (L1, S1, WA): Classic memcopy. +* update (L1, S1): Update a vector. Also load + store but without write allocate. +* triad (L2, S1, WA): Stream triad - `a = b + b * scalar`. +* daxpy (L2, S1): Daxpy - `a = a + b * scalar`. +* striad (L3, S1, WA): Schoenauer triad - `a = b + c * d`. +* sdaxpy (L3, S1): Schoenauer triad without write allocate - `a = a + b * c`. ## Build From b4b98941aaaecac45d9fe5f7d6c88496076936f1 Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Mon, 11 Mar 2019 11:39:51 +0100 Subject: [PATCH 7/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 342dfcd..70a54af 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ We recommend to use likwid-pin for benchmarking: likwid-pin -c 0-3 ./bwbench-GCC ``` -Example output for threaded version: +Example output for threaded execution: ``` ------------------------------------------------------------- [pthread wrapper] From e917766460da27f582be57019eefe590a7e0d07b Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Mon, 11 Mar 2019 11:44:42 +0100 Subject: [PATCH 8/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 70a54af..2003abe 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ The assembler files will also be located in the `` directory. ## Usage -To run just call: +To run the benchmark call: ``` ./bwBench- ```