From 7bf6790a47b63c49968867d9ecd65c8a8d4b71d0 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Wed, 9 Dec 2020 08:44:50 +0100 Subject: [PATCH 01/14] Change clang openmp flags. Formatting. --- include_CLANG.mk | 4 ++-- src/daxpy.c | 6 +++--- src/main.c | 16 +++++++--------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/include_CLANG.mk b/include_CLANG.mk index 30945f6..60eaef0 100644 --- a/include_CLANG.mk +++ b/include_CLANG.mk @@ -3,11 +3,11 @@ GCC = gcc LINKER = $(CC) ifeq ($(ENABLE_OPENMP),true) -OPENMP = -fopenmp +OPENMP = -Xpreprocessor -fopenmp +LIBS = -lomp endif CFLAGS = -Ofast -ffreestanding -std=c99 $(OPENMP) LFLAGS = $(OPENMP) DEFINES = -D_GNU_SOURCE INCLUDES = -LIBS = diff --git a/src/daxpy.c b/src/daxpy.c index b42e279..2e2ebe5 100644 --- a/src/daxpy.c +++ b/src/daxpy.c @@ -38,9 +38,9 @@ double daxpy( S = getTimeStamp(); #pragma omp parallel for schedule(static) - for (int i=0; i Date: Wed, 9 Dec 2020 08:57:49 +0100 Subject: [PATCH 02/14] Port changes to single file C versions. Formatting. --- src/main.c | 10 ++-- util/bwBench-likwid.c | 107 ++++++++++++++++-------------------------- util/bwBench.c | 18 +++---- 3 files changed, 53 insertions(+), 82 deletions(-) diff --git a/src/main.c b/src/main.c index 4ebe0b1..475cb24 100644 --- a/src/main.c +++ b/src/main.c @@ -54,11 +54,10 @@ #define LIKWID_PROFILE(tag,call) \ _Pragma ("omp parallel") \ -{LIKWID_MARKER_START(#tag);} \ -times[tag][k] = call; \ -_Pragma ("omp parallel") \ -{LIKWID_MARKER_STOP(#tag);} - + {LIKWID_MARKER_START(#tag);} \ + times[tag][k] = call; \ + _Pragma ("omp parallel") \ + {LIKWID_MARKER_STOP(#tag);} typedef enum benchmark { INIT = 0, @@ -177,7 +176,6 @@ int main (int argc, char** argv) scalar = 3.0; for ( int k=0; k < NTIMES; k++) { - LIKWID_PROFILE(INIT,init(b, scalar, N)); tmp = a[10]; LIKWID_PROFILE(SUM,sum(a, N)); diff --git a/util/bwBench-likwid.c b/util/bwBench-likwid.c index 06b015a..f043aad 100644 --- a/util/bwBench-likwid.c +++ b/util/bwBench-likwid.c @@ -2,7 +2,7 @@ * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de - * Copyright (c) 2019 RRZE, University Erlangen-Nuremberg + * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -25,6 +25,7 @@ * ======================================================================================= */ +#define _GNU_SOURCE #include #include #include @@ -53,6 +54,13 @@ #define ABS(a) ((a) >= 0 ? (a) : -(a)) #endif +#define LIKWID_PROFILE(tag,call) \ + _Pragma ("omp parallel") \ + {LIKWID_MARKER_START(#tag);} \ + times[tag][k] = call; \ + _Pragma ("omp parallel") \ + {LIKWID_MARKER_STOP(#tag);} + typedef enum benchmark { INIT = 0, COPY, @@ -89,8 +97,8 @@ int main (int argc, char** argv) double E, S; double avgtime[NUMBENCH], - maxtime[NUMBENCH], - mintime[NUMBENCH]; + maxtime[NUMBENCH], + mintime[NUMBENCH]; double times[NUMBENCH][NTIMES]; @@ -139,7 +147,7 @@ int main (int argc, char** argv) } #endif -#pragma omp parallel for +#pragma omp parallel for schedule(static) for (int i=0; i Date: Thu, 10 Dec 2020 06:37:42 +0100 Subject: [PATCH 03/14] Update copyright year. Formatting. --- src/affinity.c | 15 +++++---------- src/allocate.c | 3 +-- src/copy.c | 1 - src/daxpy.c | 1 - src/includes/affinity.h | 3 +-- src/includes/allocate.h | 3 +-- src/includes/likwid-marker.h | 3 +-- src/includes/timing.h | 3 +-- src/init.c | 1 - src/main.c | 1 - src/sdaxpy.c | 1 - src/striad.c | 1 - src/sum.c | 1 - src/timing.c | 3 +-- src/triad.c | 1 - src/update.c | 1 - util/bwBench-likwid.c | 1 - util/bwBench.c | 1 - 18 files changed, 11 insertions(+), 33 deletions(-) diff --git a/src/affinity.c b/src/affinity.c index 19f4358..630afc3 100644 --- a/src/affinity.c +++ b/src/affinity.c @@ -2,7 +2,7 @@ * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de - * Copyright (c) 2019 RRZE, University Erlangen-Nuremberg + * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #ifdef __linux__ #ifdef _OPENMP #include @@ -38,8 +37,7 @@ #define MAX_NUM_THREADS 128 #define gettid() syscall(SYS_gettid) -static int -getProcessorID(cpu_set_t* cpu_set) +static int getProcessorID(cpu_set_t* cpu_set) { int processorId; @@ -53,8 +51,7 @@ getProcessorID(cpu_set_t* cpu_set) return processorId; } -int -affinity_getProcessorId() +int affinity_getProcessorId() { cpu_set_t cpu_set; CPU_ZERO(&cpu_set); @@ -63,8 +60,7 @@ affinity_getProcessorId() return getProcessorID(&cpu_set); } -void -affinity_pinThread(int processorId) +void affinity_pinThread(int processorId) { cpu_set_t cpuset; pthread_t thread; @@ -75,8 +71,7 @@ affinity_pinThread(int processorId) pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset); } -void -affinity_pinProcess(int processorId) +void affinity_pinProcess(int processorId) { cpu_set_t cpuset; diff --git a/src/allocate.c b/src/allocate.c index 2ad9236..c5781f9 100644 --- a/src/allocate.c +++ b/src/allocate.c @@ -2,7 +2,7 @@ * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de - * Copyright (c) 2019 RRZE, University Erlangen-Nuremberg + * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #include #include #include diff --git a/src/copy.c b/src/copy.c index b5f20f8..b9dd9fe 100644 --- a/src/copy.c +++ b/src/copy.c @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #include double copy( diff --git a/src/daxpy.c b/src/daxpy.c index 2e2ebe5..d8ef22a 100644 --- a/src/daxpy.c +++ b/src/daxpy.c @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #include double daxpy( diff --git a/src/includes/affinity.h b/src/includes/affinity.h index 80f531e..3ca87cf 100644 --- a/src/includes/affinity.h +++ b/src/includes/affinity.h @@ -2,7 +2,7 @@ * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de - * Copyright (c) 2019 RRZE, University Erlangen-Nuremberg + * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #ifndef AFFINITY_H #define AFFINITY_H diff --git a/src/includes/allocate.h b/src/includes/allocate.h index 1e83fe0..1732898 100644 --- a/src/includes/allocate.h +++ b/src/includes/allocate.h @@ -2,7 +2,7 @@ * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de - * Copyright (c) 2019 RRZE, University Erlangen-Nuremberg + * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #ifndef __ALLOCATE_H_ #define __ALLOCATE_H_ diff --git a/src/includes/likwid-marker.h b/src/includes/likwid-marker.h index 13d72eb..a35b495 100644 --- a/src/includes/likwid-marker.h +++ b/src/includes/likwid-marker.h @@ -2,7 +2,7 @@ * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de - * Copyright (c) 2019 RRZE, University Erlangen-Nuremberg + * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #ifndef LIKWID_MARKERS_H #define LIKWID_MARKERS_H diff --git a/src/includes/timing.h b/src/includes/timing.h index b7260cb..6d9fb93 100644 --- a/src/includes/timing.h +++ b/src/includes/timing.h @@ -2,7 +2,7 @@ * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de - * Copyright (c) 2019 RRZE, University Erlangen-Nuremberg + * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #ifndef __TIMING_H_ #define __TIMING_H_ diff --git a/src/init.c b/src/init.c index fe7e20c..81a1b3d 100644 --- a/src/init.c +++ b/src/init.c @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #include double init( diff --git a/src/main.c b/src/main.c index 475cb24..7839ce9 100644 --- a/src/main.c +++ b/src/main.c @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #include #include #include diff --git a/src/sdaxpy.c b/src/sdaxpy.c index 730d5d2..8e292f1 100644 --- a/src/sdaxpy.c +++ b/src/sdaxpy.c @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #include double sdaxpy( diff --git a/src/striad.c b/src/striad.c index 1c8a041..3c4bfa2 100644 --- a/src/striad.c +++ b/src/striad.c @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #include double striad( diff --git a/src/sum.c b/src/sum.c index b91ee68..8075718 100644 --- a/src/sum.c +++ b/src/sum.c @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #include double sum( diff --git a/src/timing.c b/src/timing.c index 2daf260..aad74cb 100644 --- a/src/timing.c +++ b/src/timing.c @@ -2,7 +2,7 @@ * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de - * Copyright (c) 2019 RRZE, University Erlangen-Nuremberg + * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #include #include diff --git a/src/triad.c b/src/triad.c index a46c192..d25db3b 100644 --- a/src/triad.c +++ b/src/triad.c @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #include double triad( diff --git a/src/update.c b/src/update.c index f74c020..70009e5 100644 --- a/src/update.c +++ b/src/update.c @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #include double update( diff --git a/util/bwBench-likwid.c b/util/bwBench-likwid.c index f043aad..efae340 100644 --- a/util/bwBench-likwid.c +++ b/util/bwBench-likwid.c @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #define _GNU_SOURCE #include #include diff --git a/util/bwBench.c b/util/bwBench.c index e269bca..0a3078b 100644 --- a/util/bwBench.c +++ b/util/bwBench.c @@ -24,7 +24,6 @@ * * ======================================================================================= */ - #define _GNU_SOURCE #include #include From dce72b45e8e5b0c6e72aec4016296035a7529b71 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Thu, 10 Dec 2020 06:50:20 +0100 Subject: [PATCH 04/14] Add script for extracting scaling results. --- util/extractResults.pl | 74 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100755 util/extractResults.pl diff --git a/util/extractResults.pl b/util/extractResults.pl new file mode 100755 index 0000000..5ac2978 --- /dev/null +++ b/util/extractResults.pl @@ -0,0 +1,74 @@ +#!/usr/bin/env perl +# ======================================================================================= +# +# Author: Jan Eitzinger (je), jan.eitzinger@fau.de +# Copyright (c) 2020 RRZE, University Erlangen-Nuremberg +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# ======================================================================================= +use strict; +use warnings; +use utf8; + +my $DIR = $ARGV[0]; +my %RES; + +my @testcases = ('Init', 'Sum', 'Copy', 'Update', 'Triad', 'Daxpy', 'STriad', 'SDaxpy'); + +while( defined( my $file = glob($DIR . '/*' ) ) ) { + + my $nt = 1; + open(my $fh, "<","$file"); + if ($file =~ /.*-([0-9]+)\.txt/) { + $nt = $1; + } + $RES{$nt} = {}; + + while ( <$fh> ) { + my $cnt = split(/[ ]+/, $_); + + if ( $cnt == 6 ) { + my @fields = split(/[ ]+/, $_); + + if ( $fields[1] =~ /[0-9]+/ ) { + $fields[0] =~ s/://; + $RES{$nt}->{$fields[0]} = $fields[1]; + } + } + + } + + close $fh or die "can't close file $!"; +} + +printf "#nt"; +foreach my $test ( @testcases ) { + printf "\t%s", $test; +} +printf "\n"; + +foreach my $key (sort {$a <=> $b} keys %RES) { + printf "%d", $key; + + foreach my $test ( @testcases ) { + printf "\t%.0f", $RES{$key}->{$test}; + } + printf "\n"; +} From 45a6fa6d0dd792900658d4e2658e874bcd97bffa Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Thu, 10 Dec 2020 07:18:32 +0100 Subject: [PATCH 05/14] Update README.md --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c2b5e19..fb12539 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,9 @@ To run the benchmark call: 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: +We recommend to use likwid-pin for setting the number of threads used and to control thread affinity: ``` -likwid-pin -c 0-3 ./bwbench-GCC +likwid-pin -C 0-3 ./bwbench-GCC ``` Example output for threaded execution: @@ -118,3 +118,42 @@ SDaxpy: 46822.63 23411.32 0.0281 0.0273 0.0325 Solution Validates ``` +## Scaling runs + +Apart from the highest sustained memory bandwidth often also the scaling behavior within memory domains is a important system property. + +There is a helper script included in util (```extractResults.pl```) that creates a text result file from multiple runs that can be used as input to plotting applications as gnuplot and xmgrace. +This involves two steps: Executing the benchmark runs and then creating the data file. + +To run the benchmark for different thread counts within a memory domain execute (this assumes bash or zsh): +``` +$ for nt in 1 2 4 6 8 10; do likwid-pin -q -C E:M0:$nt:1:2 ./bwbench-ICC > dat/emmy-$nt.txt; done +``` + +It is recommended to just use one thread per core in case the processor support hyperthreading. +Use whatever stepping you like, here a stepping of two was used. +The ```-q``` option suppresses output from ```likwid-pin```. +Above line uses the expression based syntax, on systems with hyperthreading enabled (check with, e.g., ```likwid-topology```) you have to skip the other hardware threads on each core. +For above system with 2 hardware threads per core this results in ```-C E:M0:$nt:1:2```, on a system with 4 hardware threads per core you would need ```-C E:M0:$nt:1:4```. +The string before the dash (here emmy) can be arbitrary, but the after the dash the extraction script expects the thread count. +Also the file ending has to be ```.txt```. +Please check with a text editor on some result files if everything worked fine. + +To extract the results and output in a plotable format execute: +``` +./extractResults.pl ./dat +``` + +The script will pick up all result files in the directory specified and create a column format output file. +In this case: +``` +#nt Init Sum Copy Update Triad Daxpy STriad SDaxpy +1 4109 11900 5637 8025 7407 9874 8981 11288 +2 8057 22696 11011 15174 14821 18786 17599 21475 +4 15602 39327 21020 28197 27287 33633 31939 37146 +6 22592 45877 29618 37155 36664 40259 39911 41546 +8 28641 46878 35763 40111 40106 41293 41022 41950 +10 33151 46741 38187 40269 39960 40922 40567 41606 +``` + +Please be aware the the single core memory bandwidth as well as the scaling behavior depends on the frequency settings. From 0cc0c1f00f744522a8672a37f4a2cd1e58bdb189 Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Thu, 10 Dec 2020 07:20:41 +0100 Subject: [PATCH 06/14] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fb12539..79e0d93 100644 --- a/README.md +++ b/README.md @@ -120,17 +120,17 @@ Solution Validates ## Scaling runs -Apart from the highest sustained memory bandwidth often also the scaling behavior within memory domains is a important system property. +Apart from the highest sustained memory bandwidth also the scaling behavior within memory domains is a important system property. There is a helper script included in util (```extractResults.pl```) that creates a text result file from multiple runs that can be used as input to plotting applications as gnuplot and xmgrace. -This involves two steps: Executing the benchmark runs and then creating the data file. +This involves two steps: Executing the benchmark runs and creating the data file. To run the benchmark for different thread counts within a memory domain execute (this assumes bash or zsh): ``` $ for nt in 1 2 4 6 8 10; do likwid-pin -q -C E:M0:$nt:1:2 ./bwbench-ICC > dat/emmy-$nt.txt; done ``` -It is recommended to just use one thread per core in case the processor support hyperthreading. +It is recommended to just use one thread per core in case the processor supports hyperthreading. Use whatever stepping you like, here a stepping of two was used. The ```-q``` option suppresses output from ```likwid-pin```. Above line uses the expression based syntax, on systems with hyperthreading enabled (check with, e.g., ```likwid-topology```) you have to skip the other hardware threads on each core. From a6c44ece065d02f305daa72e2e7e349e3270d03c Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Thu, 10 Dec 2020 07:22:34 +0100 Subject: [PATCH 07/14] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 79e0d93..58bf1c8 100644 --- a/README.md +++ b/README.md @@ -135,11 +135,11 @@ Use whatever stepping you like, here a stepping of two was used. The ```-q``` option suppresses output from ```likwid-pin```. Above line uses the expression based syntax, on systems with hyperthreading enabled (check with, e.g., ```likwid-topology```) you have to skip the other hardware threads on each core. For above system with 2 hardware threads per core this results in ```-C E:M0:$nt:1:2```, on a system with 4 hardware threads per core you would need ```-C E:M0:$nt:1:4```. -The string before the dash (here emmy) can be arbitrary, but the after the dash the extraction script expects the thread count. +The string before the dash (here emmy) can be arbitrary, but the the extraction script expects the thread count after the dash. Also the file ending has to be ```.txt```. -Please check with a text editor on some result files if everything worked fine. +Please check with a text editor on some result files if everything worked as expected. -To extract the results and output in a plotable format execute: +To extract the results and output in a plottable format execute: ``` ./extractResults.pl ./dat ``` From de0e6153bc5ef453321053c6b629de808cbcc11e Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Thu, 10 Dec 2020 07:31:47 +0100 Subject: [PATCH 08/14] Update README.md --- util/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util/README.md b/util/README.md index acfe608..aaadfc9 100644 --- a/util/README.md +++ b/util/README.md @@ -4,7 +4,9 @@ bwBench.c contains a single file version of The Bandwidth Benchmark that is tail It should compile with any C99 compiler. -# Benchmarking skript +# Benchmarking skripts + +## bench.pl to determine the absolute highest main memory bandwidth A wrapper scripts in perl (bench.pl) and python (bench.py) are also provided to scan ranges of thread counts and determine the absolute highest sustained main memory bandwidth. In order to use it `likwid-pin` has to be in your path. The script has three required and one optional command line arguments: ``` @@ -18,3 +20,7 @@ The script will always use physical cores only, where two SMT threads is the def ``` $./bench.pl ./bwbench-GCC 14-24 10 1 ``` + +## extractResults.pl to generate a plottable output files from multiple scaling runs + +Please see how to use it in the toplevel [README](https://github.com/RRZE-HPC/TheBandwidthBenchmark#scaling-runs). From 987fdbf99c51e252b6c0c7e6a86efce234a372e9 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Thu, 24 Dec 2020 08:49:26 +0100 Subject: [PATCH 09/14] Cleanup. Move golang implementation to BenchmarkGame. --- util/bench.py | 73 ----------- util/golang/README.md | 9 -- util/golang/bwBench.go | 266 ----------------------------------------- 3 files changed, 348 deletions(-) delete mode 100755 util/bench.py delete mode 100644 util/golang/README.md delete mode 100644 util/golang/bwBench.go diff --git a/util/bench.py b/util/bench.py deleted file mode 100755 index f8a7711..0000000 --- a/util/bench.py +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python3 - -# ======================================================================================= -# -# Author: Thomas Gruber (tg), thomas.gruber@googlemail.com -# Copyright (c) 2019 RRZE, University Erlangen-Nuremberg -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# -# ======================================================================================= - -import sys, subprocess, re - -default_regex = "^(\w+):\s+([\d\.]+)" -default_smt = 2 - -if len(sys.argv) < 4 or len(sys.argv) > 5: - print("{} - ()".format(sys.argv[0])) - print("Default value is {}".format(default_smt)) - sys.exit(1) - -cmd = str(sys.argv[1]) -minthreads = maxthreads = 0 -try: - minthreads, maxthreads = sys.argv[2].split("-") - minthreads = int(minthreads) - maxthreads = int(maxthreads) - if (minthreads == 0 or minthreads > maxthreads): - print("Cannot use threads range values: {} {}".format(minthreads, maxthreads)) - sys.exit(1) -except: - print("- option not readable: {}".format(sys.argv[2])) - sys.exit(1) -repeats = int(sys.argv[3]) -smt = int(sys.argv[4]) if len(sys.argv) == 5 else default_smt - -maximum = bestthreads = 0 -bestkernel = "None" -for numthreads in range(int(minthreads), int(maxthreads)+1): - runcmd = "likwid-pin -c E:S0:{}:1:{} {}".format(numthreads, smt, cmd) - for rep in range(repeats): - p = subprocess.Popen(runcmd, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - shell=True) - p.wait() - if p.returncode == 0: - lines = [ l for l in p.stdout.read().decode('utf-8').split("\n") ] - for l in lines: - m = re.search(default_regex, l) - if m and maximum < float(m.group(2)): - maximum = float(m.group(2)) - bestthreads = numthreads - bestkernel = m.group(1) - else: - print("Execution failed: {}".format(runcmd)) - -print("{} was best using {} threads: {}".format(bestkernel, bestthreads, maximum)) diff --git a/util/golang/README.md b/util/golang/README.md deleted file mode 100644 index 8f53afe..0000000 --- a/util/golang/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Initialize Go module - -`go mod init github.com/RRZE-HPC/TheBandwidthBenchmark/tree/master/util/golang` - -# Run - -Choose nt option to set number of threads used. - -`go run bwBench.go -nt 4` diff --git a/util/golang/bwBench.go b/util/golang/bwBench.go deleted file mode 100644 index 9bd8608..0000000 --- a/util/golang/bwBench.go +++ /dev/null @@ -1,266 +0,0 @@ -/* - * ======================================================================================= - * - * Author: Jan Eitzinger (je), jan.eitzinger@fau.de - * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * ======================================================================================= - */ -package main - -import ( - "flag" - "fmt" - "math" - "sync" - "time" -) - -type bench func(int, *sync.WaitGroup) - -type benchmark struct { - label string - words float64 - flops float64 - fct bench -} - -func Min(x, y int) int { - if x < y { - return x - } - return y -} - -func getChunk(N int, tid int, numThreads int) (is, ie int) { - cs := N / numThreads - is = tid * cs - ie = Min(N, is+cs) - return -} - -func main() { - const NTIMES int = 4 - var N int = 40000000 - var scalar float64 = 3.0 - a := make([]float64, N) - b := make([]float64, N) - c := make([]float64, N) - d := make([]float64, N) - - numThreads := flag.Int("nt", 4, "Number of threads") - flag.Parse() - - for i := 0; i < N; i++ { - a[i] = 2.0 - b[i] = 2.0 - c[i] = 0.5 - d[i] = 1.0 - } - - benchmarks := [...]benchmark{ - {label: "Init", words: 1, flops: 0, - fct: func(threadId int, wg *sync.WaitGroup) { - defer wg.Done() - is, ie := getChunk(N, threadId, *numThreads) - for i := is; i < ie; i++ { - b[i] = scalar - } - }}, - {label: "Copy", words: 2, flops: 0, - fct: func(threadId int, wg *sync.WaitGroup) { - defer wg.Done() - is, ie := getChunk(N, threadId, *numThreads) - for i := is; i < ie; i++ { - c[i] = a[i] - } - }}, - {label: "Update", words: 2, flops: 1, - fct: func(threadId int, wg *sync.WaitGroup) { - defer wg.Done() - is, ie := getChunk(N, threadId, *numThreads) - for i := is; i < ie; i++ { - a[i] = a[i] * scalar - } - }}, - {label: "Triad", words: 3, flops: 2, - fct: func(threadId int, wg *sync.WaitGroup) { - defer wg.Done() - is, ie := getChunk(N, threadId, *numThreads) - for i := is; i < ie; i++ { - a[i] = b[i] + scalar*c[i] - } - }}, - {label: "Daxpy", words: 3, flops: 2, - fct: func(threadId int, wg *sync.WaitGroup) { - defer wg.Done() - is, ie := getChunk(N, threadId, *numThreads) - for i := is; i < ie; i++ { - a[i] = a[i] + scalar*b[i] - } - }}, - {label: "STriad", words: 4, flops: 2, - fct: func(threadId int, wg *sync.WaitGroup) { - defer wg.Done() - is, ie := getChunk(N, threadId, *numThreads) - for i := is; i < ie; i++ { - a[i] = b[i] + d[i]*c[i] - } - }}, - {label: "SDaxpy", words: 4, flops: 2, - fct: func(threadId int, wg *sync.WaitGroup) { - defer wg.Done() - is, ie := getChunk(N, threadId, *numThreads) - for i := is; i < ie; i++ { - a[i] = a[i] + b[i]*c[i] - } - }}} - - var min, max, avg [len(benchmarks)]float64 - var times [len(benchmarks)][NTIMES]float64 - - for i := 0; i < len(benchmarks); i++ { - avg[i], max[i] = 0.0, 0.0 - min[i] = math.MaxFloat64 - } - - for k := 0; k < NTIMES; k++ { - for j := 0; j < len(benchmarks); j++ { - times[j][k] = execBench(*numThreads, benchmarks[j].fct) - } - } - - for j := 0; j < len(benchmarks); j++ { - for k := 0; k < NTIMES; k++ { - avg[j] = avg[j] + times[j][k] - min[j] = math.Min(min[j], times[j][k]) - max[j] = math.Max(max[j], times[j][k]) - } - } - - fmt.Println("----------------------------------------------------------------------------") - fmt.Printf("Function Rate(MB/s) Rate(MFlop/s) Avg time Min time Max time\n") - for j := 0; j < len(benchmarks); j++ { - avg[j] = avg[j] / float64(NTIMES-1) - bytes := benchmarks[j].words * 8.0 * float64(N) - flops := benchmarks[j].flops * float64(N) - - if flops > 0 { - fmt.Printf("%s%11.2f %11.2f %11.4f %11.4f %11.4f\n", benchmarks[j].label, - 1.0E-06*bytes/min[j], 1.0E-06*flops/min[j], - avg[j], min[j], max[j]) - } else { - fmt.Printf("%s%11.2f - %11.4f %11.4f %11.4f\n", benchmarks[j].label, - 1.0E-06*bytes/min[j], avg[j], min[j], max[j]) - } - } - fmt.Println("----------------------------------------------------------------------------") - - check(a, b, c, d, N, NTIMES) -} - -func check( - a []float64, - b []float64, - c []float64, - d []float64, - N int, NTIMES int) { - var aj, bj, cj, dj, scalar float64 - var asum, bsum, csum, dsum float64 - var epsilon float64 - - /* reproduce initialization */ - aj = 2.0 - bj = 2.0 - cj = 0.5 - dj = 1.0 - - /* now execute timing loop */ - scalar = 3.0 - - for k := 0; k < NTIMES; k++ { - bj = scalar - cj = aj - aj = aj * scalar - aj = bj + scalar*cj - aj = aj + scalar*bj - aj = bj + cj*dj - aj = aj + bj*cj - } - - aj = aj * float64(N) - bj = bj * float64(N) - cj = cj * float64(N) - dj = dj * float64(N) - - asum = 0.0 - bsum = 0.0 - csum = 0.0 - dsum = 0.0 - - for i := 0; i < N; i++ { - asum += a[i] - bsum += b[i] - csum += c[i] - dsum += d[i] - } - - epsilon = 1.e-8 - - if math.Abs(aj-asum)/asum > epsilon { - fmt.Printf("Failed Validation on array a[]\n") - fmt.Printf(" Expected : %f \n", aj) - fmt.Printf(" Observed : %f \n", asum) - } else if math.Abs(bj-bsum)/bsum > epsilon { - fmt.Printf("Failed Validation on array b[]\n") - fmt.Printf(" Expected : %f \n", bj) - fmt.Printf(" Observed : %f \n", bsum) - } else if math.Abs(cj-csum)/csum > epsilon { - fmt.Printf("Failed Validation on array c[]\n") - fmt.Printf(" Expected : %f \n", cj) - fmt.Printf(" Observed : %f \n", csum) - } else if math.Abs(dj-dsum)/dsum > epsilon { - fmt.Printf("Failed Validation on array d[]\n") - fmt.Printf(" Expected : %f \n", dj) - fmt.Printf(" Observed : %f \n", dsum) - } else { - fmt.Printf("Solution Validates\n") - } - -} - -func execBench( - numThreads int, - fnc bench) float64 { - - var wg sync.WaitGroup - wg.Add(numThreads) - - S := time.Now() - - for id := 0; id < numThreads; id++ { - go fnc(id, &wg) - } - wg.Wait() - - E := time.Now() - return E.Sub(S).Seconds() -} From 6be2df982845c6920e269a53ea9cc92966224215 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Sat, 16 Jan 2021 07:15:07 +0100 Subject: [PATCH 10/14] Add system benchmark script. Add GB unit in extract Results --- util/benchmarkSystem.pl | 1486 +++++++++++++++++++++++++++++++++++++++ util/extractResults.pl | 23 +- 2 files changed, 1506 insertions(+), 3 deletions(-) create mode 100755 util/benchmarkSystem.pl diff --git a/util/benchmarkSystem.pl b/util/benchmarkSystem.pl new file mode 100755 index 0000000..741aed1 --- /dev/null +++ b/util/benchmarkSystem.pl @@ -0,0 +1,1486 @@ +#!/usr/bin/env perl +# ======================================================================================= +# +# Author: Jan Eitzinger (je), jan.eitzinger@fau.de +# Copyright (c) 2021 RRZE, University Erlangen-Nuremberg +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# ======================================================================================= +use strict; +use warnings; +use utf8; + +use Data::Dumper qw(Dumper); + +my ($DIR, $CMD, $PREFIX) = @ARGV; + +if (not defined $DIR) { + die "Usage: $0 \n"; +} + +my %RES; +my %INFO; +my %RESULT; +my %PLOT; +my %DPLOT; + +my @testcases = ('Init', 'Sum', 'Copy', 'Update', 'Triad', 'Daxpy', 'STriad', 'SDaxpy'); + +my $numDomainsPerSocket; +my $numDomainsPerNode; +my $numCoresPerMemoryDomain; +my $coresPerSocket; +my $SMT; + +# Step 0 : Build benchmark +`rm $DIR/raw/*`; +`rm $DIR/*`; +`mkdir $DIR/raw`; +`make distclean`; +`make > $DIR/buildoutput.txt`; + +# Step 1 : Extract system information +`likwid-topology -g > $DIR/topology.txt`; +my $topo = `likwid-topology -O`; + +#my $topo = do { +# local $/ = undef; +# open my $fh, "<", './topo.txt' +# or die "could not open tile: $!"; +# <$fh>; +#}; + +foreach my $ln (split("\n", $topo)) { + if ( $ln =~ /^CPU name:/ ) { + my @fields = split(",", $ln); + $INFO{processor} = $fields[1]; + } + if ( $ln =~ /^CPU type/ ) { + my @fields = split(",", $ln); + $INFO{family} = $fields[1]; + $INFO{family} =~ s/[\(\)]//g; + } + if ( $ln =~ /^Sockets:/ ) { + my @fields = split(",", $ln); + $INFO{numSockets} = $fields[1]; + } + if ( $ln =~ /^Cores per socket:/ ) { + my @fields = split(",", $ln); + $INFO{numCoresPerSocket} = $fields[1]; + } + if ( $ln =~ /^Threads per core:/ ) { + my @fields = split(",", $ln); + $SMT = $fields[1]; + $INFO{numThreadsPerCore} = $SMT; + } + if ( $ln =~ /^NUMA domains:/ ) { + my @fields = split(",", $ln); + $numDomainsPerNode = $fields[1]; + } +} + +$INFO{family} =~ s/[ ]//g; + +my $cinfo = `make info`; +# my $cinfo = do { +# local $/ = undef; +# open my $fh, "<", './toolchain.txt' +# or die "could not open tile: $!"; +# <$fh>; +# }; + +my @tmp = split("\n", $cinfo); +$INFO{flags} = $tmp[0]; +my @tools = split(" ", $tmp[1]); +$INFO{toolchain} = $tools[0]. ' ' . $tools[1]; +$INFO{version} = $tmp[1]; + +$numDomainsPerSocket = $numDomainsPerNode / $INFO{numSockets}; +$numDomainsPerNode = 2 * $numDomainsPerSocket; +$numCoresPerMemoryDomain = $INFO{numCoresPerSocket} / $numDomainsPerSocket; +my $TAG = $PREFIX."-S$INFO{numSockets}-M$numDomainsPerSocket-C$INFO{numCoresPerSocket}"; +$INFO{numDomainsPerSocket} = $numDomainsPerSocket; + +# Step 2 : Execute benchmark + +foreach my $numdomains ( 1 ... $numDomainsPerNode ) { + foreach my $numcores ( 1 ... $numCoresPerMemoryDomain ) { + my $exp = join('@',map("E:M$_:$numcores:1:$SMT", 0 ... $numdomains-1)); + print "node-M$numdomains-$numcores\n"; + `likwid-pin -q -C $exp $CMD > $DIR/raw/node-M$numdomains-$numcores.txt`; + } +} + +# Step 3 : Generate output + +extractResults(); +$RESULT{core} = findMaxResult(1,1); +$RESULT{domain} = findMaxResult(1, $numCoresPerMemoryDomain); +$RESULT{socket} = findMaxResult($numDomainsPerSocket, $numCoresPerMemoryDomain); +$RESULT{node} = findMaxResult($numDomainsPerNode, $numCoresPerMemoryDomain); + + +$RESULT{scaling} = sprintf "#nt"; +foreach my $test ( @testcases ) { +$RESULT{scaling} .= sprintf "\t%s", $test; +$PLOT{$test} = ''; +} +$RESULT{scaling} .= sprintf "\n"; + +foreach my $key (sort {$a <=> $b} keys %{$RES{1}}) { + $RESULT{scaling} .= sprintf "%d", $key; + + foreach my $test ( @testcases ) { + $RESULT{scaling} .= sprintf "\t%.2f", $RES{1}{$key}{$test}; + $PLOT{$test} .= "$key $RES{1}{$key}{$test}\n"; + } + $RESULT{scaling} .= sprintf "\n"; +} + +foreach my $nm ( 1 ... $numDomainsPerNode ) { + my $tag = "s$nm"; + $DPLOT{meta} .=<<"END"; +\@ $tag hidden false +\@ $tag type xy +\@ $tag symbol 1 +\@ $tag symbol size 1.000000 +\@ $tag symbol color $nm +\@ $tag symbol pattern 1 +\@ $tag symbol fill color $nm +\@ $tag symbol fill pattern 1 +\@ $tag symbol linewidth 1.0 +\@ $tag symbol linestyle 1 +\@ $tag symbol char 65 +\@ $tag symbol char font 0 +\@ $tag symbol skip 0 +\@ $tag line type 1 +\@ $tag line linestyle 1 +\@ $tag line linewidth 4.0 +\@ $tag line color $nm +\@ $tag line pattern 1 +\@ $tag baseline type 0 +\@ $tag baseline off +\@ $tag dropline off +\@ $tag fill type 0 +\@ $tag fill rule 0 +\@ $tag fill color 1 +\@ $tag fill pattern 1 +\@ $tag avalue off +\@ $tag avalue type 2 +\@ $tag avalue char size 1.000000 +\@ $tag avalue font 0 +\@ $tag avalue color 1 +\@ $tag avalue rot 0 +\@ $tag avalue format general +\@ $tag avalue prec 3 +\@ $tag avalue prepend "" +\@ $tag avalue append "" +\@ $tag avalue offset 0.000000 , 0.000000 +\@ $tag errorbar on +\@ $tag errorbar place both +\@ $tag errorbar color $nm +\@ $tag errorbar pattern 1 +\@ $tag errorbar size 1.000000 +\@ $tag errorbar linewidth 1.0 +\@ $tag errorbar linestyle 1 +\@ $tag errorbar riser linewidth 1.0 +\@ $tag errorbar riser linestyle 1 +\@ $tag errorbar riser clip off +\@ $tag errorbar riser clip length 0.100000 +\@ $tag legend "$nm" +END + +} + +$RESULT{node} =~ /([0-9.]+)/; +my $ymax = $1 * 1.2; +$DPLOT{world} = "1, 0, $numCoresPerMemoryDomain, $ymax"; + +foreach my $test ( @testcases ) { + my %dplottmp; + $RESULT{'domain'.$test} = sprintf "#nm"; + foreach my $nm ( 1 ... $numDomainsPerNode ) { + $RESULT{'domain'.$test} .= sprintf "\t%d", $nm; + $dplottmp{$nm} = ''; + } + $RESULT{'domain'.$test} .= sprintf "\n"; + foreach my $nt ( 1 ... $numCoresPerMemoryDomain ) { + $RESULT{'domain'.$test} .= sprintf "%d", $nt; + foreach my $nm ( 1 ... $numDomainsPerNode ) { + $RESULT{'domain'.$test} .= sprintf "\t%.2f", $RES{$nm}{$nt}{$test}; + $dplottmp{$nm} .= "$nt $RES{$nm}{$nt}{$test}\n"; + } + $RESULT{'domain'.$test} .= sprintf "\n"; + } + + $DPLOT{series} = ''; + foreach my $nm ( 1 ... $numDomainsPerNode ) { + $DPLOT{series} .= "\@target G0.S$nm\n\@type xy\n"; + $DPLOT{series} .= $dplottmp{$nm}; + $DPLOT{series} .= "&\n"; + } + generateDomainScalingPlot("$DIR/$TAG-domains$test.agr"); +} + +$RESULT{domain} =~ /([0-9]+\.)/; +$ymax = $1 * 1.2; + +$RESULT{scalingPlot} = "figures/$TAG-scaling.png"; +$RESULT{domainInitPlot} = "figures/$TAG-domainsInit.png"; +$RESULT{domainSumPlot} = "figures/$TAG-domainsSum.png"; +$RESULT{domainCopyPlot} = "figures/$TAG-domainsCopy.png"; +$RESULT{domainTriadPlot} = "figures/$TAG-domainsTriad.png"; +$PLOT{world} = "1, 0, $numCoresPerMemoryDomain, $ymax"; + +generateMarkdown("$DIR/$TAG.md"); +generateScalingPlot("$DIR/$TAG-scaling.agr"); + +open(my $fh, '>', "$DIR/max.dat") or die "Could not open file $!"; +$RESULT{core} =~ /([0-9.]+)/; +print $fh "CORE $1\n"; +$RESULT{socket} =~ /([0-9.]+)/; +print $fh "SOCKET $1\n"; +$RESULT{node} =~ /([0-9.]+)/; +print $fh "NODE $1\n"; +close $fh; + +`tar -czf $TAG.tgz $DIR`; + +# Helper routines +sub findMaxResult { +my $maxDomains = shift; +my $maxCores = shift; +my %param; +my $max = 0; + +foreach my $numDomains ( 1 ... $maxDomains ) { + foreach my $numCoresPerDomain ( 1 ... $maxCores ) { + foreach my $testcase (keys %{$RES{$numDomains}{$numCoresPerDomain}}) { + if ( $RES{$numDomains}{$numCoresPerDomain}{$testcase} > $max ){ + $max = sprintf "\t%.2f",$RES{$numDomains}{$numCoresPerDomain}{$testcase}; + $param{testcase} = $testcase; + $param{cores} = $numCoresPerDomain; + } + } + } +} + +if ($maxCores == 1) { +return "$max ($param{testcase})"; +} else { +return "$max ($param{testcase} with $param{cores} cores)"; +} +} + +sub extractResults { + +while( defined( my $file = glob($DIR . '/raw/*' ) ) ) { + + print "Process $file\n"; + my $nt = 1; + my $nm = 1; + + open(my $fh, "<","$file"); + if ($file =~ /.*-M([0-9]+)-([0-9]+)\.txt/) { + $nm = $1; + $nt = $2; + } + # $RES{$nm}{$nt} = {}; + + while ( <$fh> ) { + my $cnt = split(/[ ]+/, $_); + + if ( $cnt == 6 ) { + my @fields = split(/[ ]+/, $_); + + if ( $fields[1] =~ /[0-9]+/ ) { + $fields[0] =~ s/://; + $RES{$nm}{$nt}{$fields[0]} = $fields[1] * 0.001; + } + } + + } + + close $fh or die "can't close file $!"; +} + +} + +sub generateScalingPlot { +my $filename = shift; +open(my $fh, '>', $filename) or die "Could not open file '$filename' $!"; + +print $fh <<"END"; +# Grace project file +# +\@version 50122 +\@page size 792, 612 +\@page scroll 5% +\@page inout 5% +\@link page off +\@map font 0 to "Times-Roman", "Times-Roman" +\@map font 1 to "Times-Italic", "Times-Italic" +\@map font 2 to "Times-Bold", "Times-Bold" +\@map font 3 to "Times-BoldItalic", "Times-BoldItalic" +\@map font 4 to "Helvetica", "Helvetica" +\@map font 5 to "Helvetica-Oblique", "Helvetica-Oblique" +\@map font 6 to "Helvetica-Bold", "Helvetica-Bold" +\@map font 7 to "Helvetica-BoldOblique", "Helvetica-BoldOblique" +\@map font 8 to "Courier", "Courier" +\@map font 9 to "Courier-Oblique", "Courier-Oblique" +\@map font 10 to "Courier-Bold", "Courier-Bold" +\@map font 11 to "Courier-BoldOblique", "Courier-BoldOblique" +\@map font 12 to "Symbol", "Symbol" +\@map font 13 to "ZapfDingbats", "ZapfDingbats" +\@map color 0 to (255, 255, 255), "white" +\@map color 1 to (0, 0, 0), "black" +\@map color 2 to (255, 0, 0), "red" +\@map color 3 to (0, 255, 0), "green" +\@map color 4 to (0, 0, 255), "blue" +\@map color 5 to (255, 255, 0), "yellow" +\@map color 6 to (188, 143, 143), "brown" +\@map color 7 to (220, 220, 220), "grey" +\@map color 8 to (148, 0, 211), "violet" +\@map color 9 to (0, 255, 255), "cyan" +\@map color 10 to (255, 0, 255), "magenta" +\@map color 11 to (255, 165, 0), "orange" +\@map color 12 to (114, 33, 188), "indigo" +\@map color 13 to (103, 7, 72), "maroon" +\@map color 14 to (64, 224, 208), "turquoise" +\@map color 15 to (0, 139, 0), "green4" +\@reference date 0 +\@date wrap off +\@date wrap year 1950 +\@default linewidth 1.0 +\@default linestyle 1 +\@default color 1 +\@default pattern 1 +\@default font 0 +\@default char size 1.000000 +\@default symbol size 1.000000 +\@default sformat "%.8g" +\@background color 0 +\@page background fill on +\@timestamp off +\@timestamp 0.03, 0.03 +\@timestamp color 1 +\@timestamp rot 0 +\@timestamp font 0 +\@timestamp char size 1.000000 +\@timestamp def "Tue Dec 15 13:24:48 2020" +\@r0 off +\@link r0 to g0 +\@r0 type above +\@r0 linestyle 1 +\@r0 linewidth 1.0 +\@r0 color 1 +\@r0 line 0, 0, 0, 0 +\@r1 off +\@link r1 to g0 +\@r1 type above +\@r1 linestyle 1 +\@r1 linewidth 1.0 +\@r1 color 1 +\@r1 line 0, 0, 0, 0 +\@r2 off +\@link r2 to g0 +\@r2 type above +\@r2 linestyle 1 +\@r2 linewidth 1.0 +\@r2 color 1 +\@r2 line 0, 0, 0, 0 +\@r3 off +\@link r3 to g0 +\@r3 type above +\@r3 linestyle 1 +\@r3 linewidth 1.0 +\@r3 color 1 +\@r3 line 0, 0, 0, 0 +\@r4 off +\@link r4 to g0 +\@r4 type above +\@r4 linestyle 1 +\@r4 linewidth 1.0 +\@r4 color 1 +\@r4 line 0, 0, 0, 0 +\@g0 on +\@g0 hidden false +\@g0 type XY +\@g0 stacked false +\@g0 bar hgap 0.000000 +\@g0 fixedpoint off +\@g0 fixedpoint type 0 +\@g0 fixedpoint xy 0.000000, 0.000000 +\@g0 fixedpoint format general general +\@g0 fixedpoint prec 6, 6 +\@with g0 +\@ world $PLOT{world} +\@ stack world 0, 1, 0, 1 +\@ znorm 1 +\@ view 0.150000, 0.150000, 1.150000, 0.850000 +\@ title "" +\@ title font 0 +\@ title size 1.500000 +\@ title color 1 +\@ subtitle "" +\@ subtitle font 0 +\@ subtitle size 1.000000 +\@ subtitle color 1 +\@ xaxes scale Normal +\@ yaxes scale Normal +\@ xaxes invert off +\@ yaxes invert off +\@ xaxis on +\@ xaxis type zero false +\@ xaxis offset 0.000000 , 0.000000 +\@ xaxis bar on +\@ xaxis bar color 1 +\@ xaxis bar linestyle 1 +\@ xaxis bar linewidth 1.0 +\@ xaxis label "number of cores" +\@ xaxis label layout para +\@ xaxis label place auto +\@ xaxis label char size 1.500000 +\@ xaxis label font 0 +\@ xaxis label color 1 +\@ xaxis label place normal +\@ xaxis tick on +\@ xaxis tick major 1 +\@ xaxis tick minor ticks 0 +\@ xaxis tick default 6 +\@ xaxis tick place rounded true +\@ xaxis tick in +\@ xaxis tick major size 1.000000 +\@ xaxis tick major color 1 +\@ xaxis tick major linewidth 1.0 +\@ xaxis tick major linestyle 1 +\@ xaxis tick major grid off +\@ xaxis tick minor color 1 +\@ xaxis tick minor linewidth 1.0 +\@ xaxis tick minor linestyle 1 +\@ xaxis tick minor grid off +\@ xaxis tick minor size 0.500000 +\@ xaxis ticklabel on +\@ xaxis ticklabel format general +\@ xaxis ticklabel prec 5 +\@ xaxis ticklabel formula "" +\@ xaxis ticklabel append "" +\@ xaxis ticklabel prepend "" +\@ xaxis ticklabel angle 0 +\@ xaxis ticklabel skip 0 +\@ xaxis ticklabel stagger 0 +\@ xaxis ticklabel place normal +\@ xaxis ticklabel offset auto +\@ xaxis ticklabel offset 0.000000 , 0.010000 +\@ xaxis ticklabel start type auto +\@ xaxis ticklabel start 0.000000 +\@ xaxis ticklabel stop type auto +\@ xaxis ticklabel stop 0.000000 +\@ xaxis ticklabel char size 1.250000 +\@ xaxis ticklabel font 0 +\@ xaxis ticklabel color 1 +\@ xaxis tick place normal +\@ xaxis tick spec type none +\@ yaxis on +\@ yaxis type zero false +\@ yaxis offset 0.000000 , 0.000000 +\@ yaxis bar on +\@ yaxis bar color 1 +\@ yaxis bar linestyle 1 +\@ yaxis bar linewidth 1.0 +\@ yaxis label "Memory bandwidth [GB/s]" +\@ yaxis label layout para +\@ yaxis label place auto +\@ yaxis label char size 1.500000 +\@ yaxis label font 0 +\@ yaxis label color 1 +\@ yaxis label place normal +\@ yaxis tick on +\@ yaxis tick major 10 +\@ yaxis tick minor ticks 1 +\@ yaxis tick default 6 +\@ yaxis tick place rounded true +\@ yaxis tick in +\@ yaxis tick major size 1.000000 +\@ yaxis tick major color 1 +\@ yaxis tick major linewidth 1.0 +\@ yaxis tick major linestyle 1 +\@ yaxis tick major grid on +\@ yaxis tick minor color 7 +\@ yaxis tick minor linewidth 1.0 +\@ yaxis tick minor linestyle 1 +\@ yaxis tick minor grid on +\@ yaxis tick minor size 0.500000 +\@ yaxis ticklabel on +\@ yaxis ticklabel format general +\@ yaxis ticklabel prec 5 +\@ yaxis ticklabel formula "" +\@ yaxis ticklabel append "" +\@ yaxis ticklabel prepend "" +\@ yaxis ticklabel angle 0 +\@ yaxis ticklabel skip 0 +\@ yaxis ticklabel stagger 0 +\@ yaxis ticklabel place normal +\@ yaxis ticklabel offset auto +\@ yaxis ticklabel offset 0.000000 , 0.010000 +\@ yaxis ticklabel start type auto +\@ yaxis ticklabel start 0.000000 +\@ yaxis ticklabel stop type auto +\@ yaxis ticklabel stop 0.000000 +\@ yaxis ticklabel char size 1.250000 +\@ yaxis ticklabel font 0 +\@ yaxis ticklabel color 1 +\@ yaxis tick place both +\@ yaxis tick spec type none +\@ altxaxis off +\@ altyaxis off +\@ legend on +\@ legend loctype view +\@ legend 0.93, 0.45 +\@ legend box color 1 +\@ legend box pattern 1 +\@ legend box linewidth 1.0 +\@ legend box linestyle 1 +\@ legend box fill color 0 +\@ legend box fill pattern 1 +\@ legend font 0 +\@ legend char size 1.000000 +\@ legend color 1 +\@ legend length 4 +\@ legend vgap 1 +\@ legend hgap 1 +\@ legend invert false +\@ frame type 0 +\@ frame linestyle 1 +\@ frame linewidth 1.0 +\@ frame color 1 +\@ frame pattern 1 +\@ frame background color 0 +\@ frame background pattern 0 +\@ s0 hidden false +\@ s0 type xy +\@ s0 symbol 1 +\@ s0 symbol size 1.000000 +\@ s0 symbol color 1 +\@ s0 symbol pattern 1 +\@ s0 symbol fill color 1 +\@ s0 symbol fill pattern 1 +\@ s0 symbol linewidth 1.0 +\@ s0 symbol linestyle 1 +\@ s0 symbol char 65 +\@ s0 symbol char font 0 +\@ s0 symbol skip 0 +\@ s0 line type 1 +\@ s0 line linestyle 1 +\@ s0 line linewidth 4.0 +\@ s0 line color 1 +\@ s0 line pattern 1 +\@ s0 baseline type 0 +\@ s0 baseline off +\@ s0 dropline off +\@ s0 fill type 0 +\@ s0 fill rule 0 +\@ s0 fill color 1 +\@ s0 fill pattern 1 +\@ s0 avalue off +\@ s0 avalue type 2 +\@ s0 avalue char size 1.000000 +\@ s0 avalue font 0 +\@ s0 avalue color 1 +\@ s0 avalue rot 0 +\@ s0 avalue format general +\@ s0 avalue prec 3 +\@ s0 avalue prepend "" +\@ s0 avalue append "" +\@ s0 avalue offset 0.000000 , 0.000000 +\@ s0 errorbar on +\@ s0 errorbar place both +\@ s0 errorbar color 1 +\@ s0 errorbar pattern 1 +\@ s0 errorbar size 1.000000 +\@ s0 errorbar linewidth 1.0 +\@ s0 errorbar linestyle 1 +\@ s0 errorbar riser linewidth 1.0 +\@ s0 errorbar riser linestyle 1 +\@ s0 errorbar riser clip off +\@ s0 errorbar riser clip length 0.100000 +\@ s0 legend "Init" +\@ s1 hidden false +\@ s1 type xy +\@ s1 symbol 1 +\@ s1 symbol size 1.000000 +\@ s1 symbol color 2 +\@ s1 symbol pattern 1 +\@ s1 symbol fill color 2 +\@ s1 symbol fill pattern 1 +\@ s1 symbol linewidth 1.0 +\@ s1 symbol linestyle 1 +\@ s1 symbol char 65 +\@ s1 symbol char font 0 +\@ s1 symbol skip 0 +\@ s1 line type 1 +\@ s1 line linestyle 1 +\@ s1 line linewidth 4.0 +\@ s1 line color 2 +\@ s1 line pattern 1 +\@ s1 baseline type 0 +\@ s1 baseline off +\@ s1 dropline off +\@ s1 fill type 0 +\@ s1 fill rule 0 +\@ s1 fill color 1 +\@ s1 fill pattern 1 +\@ s1 avalue off +\@ s1 avalue type 2 +\@ s1 avalue char size 1.000000 +\@ s1 avalue font 0 +\@ s1 avalue color 1 +\@ s1 avalue rot 0 +\@ s1 avalue format general +\@ s1 avalue prec 3 +\@ s1 avalue prepend "" +\@ s1 avalue append "" +\@ s1 avalue offset 0.000000 , 0.000000 +\@ s1 errorbar on +\@ s1 errorbar place both +\@ s1 errorbar color 2 +\@ s1 errorbar pattern 1 +\@ s1 errorbar size 1.000000 +\@ s1 errorbar linewidth 1.0 +\@ s1 errorbar linestyle 1 +\@ s1 errorbar riser linewidth 1.0 +\@ s1 errorbar riser linestyle 1 +\@ s1 errorbar riser clip off +\@ s1 errorbar riser clip length 0.100000 +\@ s1 legend "Sum" +\@ s2 hidden false +\@ s2 type xy +\@ s2 symbol 1 +\@ s2 symbol size 1.000000 +\@ s2 symbol color 3 +\@ s2 symbol pattern 1 +\@ s2 symbol fill color 3 +\@ s2 symbol fill pattern 1 +\@ s2 symbol linewidth 1.0 +\@ s2 symbol linestyle 1 +\@ s2 symbol char 65 +\@ s2 symbol char font 0 +\@ s2 symbol skip 0 +\@ s2 line type 1 +\@ s2 line linestyle 1 +\@ s2 line linewidth 4.0 +\@ s2 line color 3 +\@ s2 line pattern 1 +\@ s2 baseline type 0 +\@ s2 baseline off +\@ s2 dropline off +\@ s2 fill type 0 +\@ s2 fill rule 0 +\@ s2 fill color 1 +\@ s2 fill pattern 1 +\@ s2 avalue off +\@ s2 avalue type 2 +\@ s2 avalue char size 1.000000 +\@ s2 avalue font 0 +\@ s2 avalue color 1 +\@ s2 avalue rot 0 +\@ s2 avalue format general +\@ s2 avalue prec 3 +\@ s2 avalue prepend "" +\@ s2 avalue append "" +\@ s2 avalue offset 0.000000 , 0.000000 +\@ s2 errorbar on +\@ s2 errorbar place both +\@ s2 errorbar color 3 +\@ s2 errorbar pattern 1 +\@ s2 errorbar size 1.000000 +\@ s2 errorbar linewidth 1.0 +\@ s2 errorbar linestyle 1 +\@ s2 errorbar riser linewidth 1.0 +\@ s2 errorbar riser linestyle 1 +\@ s2 errorbar riser clip off +\@ s2 errorbar riser clip length 0.100000 +\@ s2 legend "Copy" +\@ s3 hidden false +\@ s3 type xy +\@ s3 symbol 1 +\@ s3 symbol size 1.000000 +\@ s3 symbol color 4 +\@ s3 symbol pattern 1 +\@ s3 symbol fill color 4 +\@ s3 symbol fill pattern 1 +\@ s3 symbol linewidth 1.0 +\@ s3 symbol linestyle 1 +\@ s3 symbol char 65 +\@ s3 symbol char font 0 +\@ s3 symbol skip 0 +\@ s3 line type 1 +\@ s3 line linestyle 1 +\@ s3 line linewidth 4.0 +\@ s3 line color 4 +\@ s3 line pattern 1 +\@ s3 baseline type 0 +\@ s3 baseline off +\@ s3 dropline off +\@ s3 fill type 0 +\@ s3 fill rule 0 +\@ s3 fill color 1 +\@ s3 fill pattern 1 +\@ s3 avalue off +\@ s3 avalue type 2 +\@ s3 avalue char size 1.000000 +\@ s3 avalue font 0 +\@ s3 avalue color 1 +\@ s3 avalue rot 0 +\@ s3 avalue format general +\@ s3 avalue prec 3 +\@ s3 avalue prepend "" +\@ s3 avalue append "" +\@ s3 avalue offset 0.000000 , 0.000000 +\@ s3 errorbar on +\@ s3 errorbar place both +\@ s3 errorbar color 4 +\@ s3 errorbar pattern 1 +\@ s3 errorbar size 1.000000 +\@ s3 errorbar linewidth 1.0 +\@ s3 errorbar linestyle 1 +\@ s3 errorbar riser linewidth 1.0 +\@ s3 errorbar riser linestyle 1 +\@ s3 errorbar riser clip off +\@ s3 errorbar riser clip length 0.100000 +\@ s3 legend "Update" +\@ s4 hidden false +\@ s4 type xy +\@ s4 symbol 1 +\@ s4 symbol size 1.000000 +\@ s4 symbol color 5 +\@ s4 symbol pattern 1 +\@ s4 symbol fill color 5 +\@ s4 symbol fill pattern 1 +\@ s4 symbol linewidth 1.0 +\@ s4 symbol linestyle 1 +\@ s4 symbol char 65 +\@ s4 symbol char font 0 +\@ s4 symbol skip 0 +\@ s4 line type 1 +\@ s4 line linestyle 1 +\@ s4 line linewidth 4.0 +\@ s4 line color 5 +\@ s4 line pattern 1 +\@ s4 baseline type 0 +\@ s4 baseline off +\@ s4 dropline off +\@ s4 fill type 0 +\@ s4 fill rule 0 +\@ s4 fill color 1 +\@ s4 fill pattern 1 +\@ s4 avalue off +\@ s4 avalue type 2 +\@ s4 avalue char size 1.000000 +\@ s4 avalue font 0 +\@ s4 avalue color 1 +\@ s4 avalue rot 0 +\@ s4 avalue format general +\@ s4 avalue prec 3 +\@ s4 avalue prepend "" +\@ s4 avalue append "" +\@ s4 avalue offset 0.000000 , 0.000000 +\@ s4 errorbar on +\@ s4 errorbar place both +\@ s4 errorbar color 5 +\@ s4 errorbar pattern 1 +\@ s4 errorbar size 1.000000 +\@ s4 errorbar linewidth 1.0 +\@ s4 errorbar linestyle 1 +\@ s4 errorbar riser linewidth 1.0 +\@ s4 errorbar riser linestyle 1 +\@ s4 errorbar riser clip off +\@ s4 errorbar riser clip length 0.100000 +\@ s4 legend "Triad" +\@ s5 hidden false +\@ s5 type xy +\@ s5 symbol 1 +\@ s5 symbol size 1.000000 +\@ s5 symbol color 6 +\@ s5 symbol pattern 1 +\@ s5 symbol fill color 6 +\@ s5 symbol fill pattern 1 +\@ s5 symbol linewidth 1.0 +\@ s5 symbol linestyle 1 +\@ s5 symbol char 65 +\@ s5 symbol char font 0 +\@ s5 symbol skip 0 +\@ s5 line type 1 +\@ s5 line linestyle 1 +\@ s5 line linewidth 4.0 +\@ s5 line color 6 +\@ s5 line pattern 1 +\@ s5 baseline type 0 +\@ s5 baseline off +\@ s5 dropline off +\@ s5 fill type 0 +\@ s5 fill rule 0 +\@ s5 fill color 1 +\@ s5 fill pattern 1 +\@ s5 avalue off +\@ s5 avalue type 2 +\@ s5 avalue char size 1.000000 +\@ s5 avalue font 0 +\@ s5 avalue color 1 +\@ s5 avalue rot 0 +\@ s5 avalue format general +\@ s5 avalue prec 3 +\@ s5 avalue prepend "" +\@ s5 avalue append "" +\@ s5 avalue offset 0.000000 , 0.000000 +\@ s5 errorbar on +\@ s5 errorbar place both +\@ s5 errorbar color 6 +\@ s5 errorbar pattern 1 +\@ s5 errorbar size 1.000000 +\@ s5 errorbar linewidth 1.0 +\@ s5 errorbar linestyle 1 +\@ s5 errorbar riser linewidth 1.0 +\@ s5 errorbar riser linestyle 1 +\@ s5 errorbar riser clip off +\@ s5 errorbar riser clip length 0.100000 +\@ s5 legend "Daxpy" +\@ s6 hidden false +\@ s6 type xy +\@ s6 symbol 1 +\@ s6 symbol size 1.000000 +\@ s6 symbol color 7 +\@ s6 symbol pattern 1 +\@ s6 symbol fill color 7 +\@ s6 symbol fill pattern 1 +\@ s6 symbol linewidth 1.0 +\@ s6 symbol linestyle 1 +\@ s6 symbol char 65 +\@ s6 symbol char font 0 +\@ s6 symbol skip 0 +\@ s6 line type 1 +\@ s6 line linestyle 1 +\@ s6 line linewidth 4.0 +\@ s6 line color 7 +\@ s6 line pattern 1 +\@ s6 baseline type 0 +\@ s6 baseline off +\@ s6 dropline off +\@ s6 fill type 0 +\@ s6 fill rule 0 +\@ s6 fill color 1 +\@ s6 fill pattern 1 +\@ s6 avalue off +\@ s6 avalue type 2 +\@ s6 avalue char size 1.000000 +\@ s6 avalue font 0 +\@ s6 avalue color 1 +\@ s6 avalue rot 0 +\@ s6 avalue format general +\@ s6 avalue prec 3 +\@ s6 avalue prepend "" +\@ s6 avalue append "" +\@ s6 avalue offset 0.000000 , 0.000000 +\@ s6 errorbar on +\@ s6 errorbar place both +\@ s6 errorbar color 7 +\@ s6 errorbar pattern 1 +\@ s6 errorbar size 1.000000 +\@ s6 errorbar linewidth 1.0 +\@ s6 errorbar linestyle 1 +\@ s6 errorbar riser linewidth 1.0 +\@ s6 errorbar riser linestyle 1 +\@ s6 errorbar riser clip off +\@ s6 errorbar riser clip length 0.100000 +\@ s6 legend "STriad" +\@ s7 hidden false +\@ s7 type xy +\@ s7 symbol 1 +\@ s7 symbol size 1.000000 +\@ s7 symbol color 8 +\@ s7 symbol pattern 1 +\@ s7 symbol fill color 8 +\@ s7 symbol fill pattern 1 +\@ s7 symbol linewidth 1.0 +\@ s7 symbol linestyle 1 +\@ s7 symbol char 65 +\@ s7 symbol char font 0 +\@ s7 symbol skip 0 +\@ s7 line type 1 +\@ s7 line linestyle 1 +\@ s7 line linewidth 4.0 +\@ s7 line color 8 +\@ s7 line pattern 1 +\@ s7 baseline type 0 +\@ s7 baseline off +\@ s7 dropline off +\@ s7 fill type 0 +\@ s7 fill rule 0 +\@ s7 fill color 1 +\@ s7 fill pattern 1 +\@ s7 avalue off +\@ s7 avalue type 2 +\@ s7 avalue char size 1.000000 +\@ s7 avalue font 0 +\@ s7 avalue color 1 +\@ s7 avalue rot 0 +\@ s7 avalue format general +\@ s7 avalue prec 3 +\@ s7 avalue prepend "" +\@ s7 avalue append "" +\@ s7 avalue offset 0.000000 , 0.000000 +\@ s7 errorbar on +\@ s7 errorbar place both +\@ s7 errorbar color 8 +\@ s7 errorbar pattern 1 +\@ s7 errorbar size 1.000000 +\@ s7 errorbar linewidth 1.0 +\@ s7 errorbar linestyle 1 +\@ s7 errorbar riser linewidth 1.0 +\@ s7 errorbar riser linestyle 1 +\@ s7 errorbar riser clip off +\@ s7 errorbar riser clip length 0.100000 +\@ s7 legend "SDaxpy" +#QTGRACE_ADDITIONAL_PARAMETER: PLOT_ALPHA 255 255 +#QTGRACE_ADDITIONAL_PARAMETER: GRAPH_ALPHA G 0 {255;255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: AXIS_ALPHA G 0 A 0 {255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: AXIS_ALPHA G 0 A 1 {255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: AXIS_ALPHA G 0 A 2 {255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: AXIS_ALPHA G 0 A 3 {255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 0 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 0 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 0 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 0 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 0 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 1 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 1 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 1 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 1 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 1 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 2 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 2 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 2 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 2 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 2 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 3 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 3 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 3 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 3 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 3 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 4 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 4 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 4 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 4 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 4 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 5 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 5 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 5 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 5 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 5 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 6 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 6 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 6 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 6 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 6 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 7 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 7 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 7 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 7 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 7 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: AUTOATTACH G 0 0 0 +#QTGRACE_ADDITIONAL_PARAMETER: TITLE_SHIFT G 0 0 0 +#QTGRACE_ADDITIONAL_PARAMETER: SUBTITLE_SHIFT G 0 0 0 +#QTGRACE_ADDITIONAL_PARAMETER: VIEWPORT_NAME 0 0 "Default" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT_RESET 1 +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Times New Roman,10,-1,5,50,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Times New Roman,10,-1,5,50,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Times New Roman,10,-1,5,75,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Times New Roman,10,-1,5,75,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Helvetica,10,-1,5,50,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Helvetica,10,-1,5,50,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Helvetica,10,-1,5,75,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Helvetica,10,-1,5,75,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Courier,10,-1,5,50,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Courier,10,-1,5,50,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Courier,10,-1,5,75,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Courier,10,-1,5,75,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Symbol,10,-1,5,50,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Zapf Dingbats,10,-1,5,50,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: ENCODING "UTF-8" +#QTGRACE_ADDITIONAL_PARAMETER: UNIVERSAL_FONT_SIZE_FACTOR 1.0000 +#QTGRACE_ADDITIONAL_PARAMETER: TIMESTAMP_PATH 0 +#QTGRACE_ADDITIONAL_PARAMETER: LINESTYLES 9 {2;2;2;2;2;4;4;6;6} {{0;1},{1;0},{1;3},{5;3},{7;3},{1;3;5;3},{1;3;7;3},{1;3;5;3;1;3},{5;3;1;3;5;3}} +\@target G0.S0 +\@type xy +$PLOT{Init} +& +\@target G0.S1 +\@type xy +$PLOT{Sum} +& +\@target G0.S2 +\@type xy +$PLOT{Copy} +& +\@target G0.S3 +\@type xy +$PLOT{Update} +& +\@target G0.S4 +\@type xy +$PLOT{Triad} +& +\@target G0.S5 +\@type xy +$PLOT{Daxpy} +& +\@target G0.S6 +\@type xy +$PLOT{STriad} +& +\@target G0.S7 +\@type xy +$PLOT{SDaxpy} +& +END +close $fh; +} + +sub generateDomainScalingPlot { +my $filename = shift; +open(my $fh, '>', $filename) or die "Could not open file '$filename' $!"; + +print $fh <<"END"; +# Grace project file +# +\@version 50122 +\@page size 792, 612 +\@page scroll 5% +\@page inout 5% +\@link page off +\@map font 0 to "Times-Roman", "Times-Roman" +\@map font 1 to "Times-Italic", "Times-Italic" +\@map font 2 to "Times-Bold", "Times-Bold" +\@map font 3 to "Times-BoldItalic", "Times-BoldItalic" +\@map font 4 to "Helvetica", "Helvetica" +\@map font 5 to "Helvetica-Oblique", "Helvetica-Oblique" +\@map font 6 to "Helvetica-Bold", "Helvetica-Bold" +\@map font 7 to "Helvetica-BoldOblique", "Helvetica-BoldOblique" +\@map font 8 to "Courier", "Courier" +\@map font 9 to "Courier-Oblique", "Courier-Oblique" +\@map font 10 to "Courier-Bold", "Courier-Bold" +\@map font 11 to "Courier-BoldOblique", "Courier-BoldOblique" +\@map font 12 to "Symbol", "Symbol" +\@map font 13 to "ZapfDingbats", "ZapfDingbats" +\@map color 0 to (255, 255, 255), "white" +\@map color 1 to (0, 0, 0), "black" +\@map color 2 to (255, 0, 0), "red" +\@map color 3 to (0, 255, 0), "green" +\@map color 4 to (0, 0, 255), "blue" +\@map color 5 to (255, 255, 0), "yellow" +\@map color 6 to (188, 143, 143), "brown" +\@map color 7 to (220, 220, 220), "grey" +\@map color 8 to (148, 0, 211), "violet" +\@map color 9 to (0, 255, 255), "cyan" +\@map color 10 to (255, 0, 255), "magenta" +\@map color 11 to (255, 165, 0), "orange" +\@map color 12 to (114, 33, 188), "indigo" +\@map color 13 to (103, 7, 72), "maroon" +\@map color 14 to (64, 224, 208), "turquoise" +\@map color 15 to (0, 139, 0), "green4" +\@reference date 0 +\@date wrap off +\@date wrap year 1950 +\@default linewidth 1.0 +\@default linestyle 1 +\@default color 1 +\@default pattern 1 +\@default font 0 +\@default char size 1.000000 +\@default symbol size 1.000000 +\@default sformat "%.8g" +\@background color 0 +\@page background fill on +\@timestamp off +\@timestamp 0.03, 0.03 +\@timestamp color 1 +\@timestamp rot 0 +\@timestamp font 0 +\@timestamp char size 1.000000 +\@timestamp def "Wed Jan 13 13:31:39 2021" +\@r0 off +\@link r0 to g0 +\@r0 type above +\@r0 linestyle 1 +\@r0 linewidth 1.0 +\@r0 color 1 +\@r0 line 0, 0, 0, 0 +\@r1 off +\@link r1 to g0 +\@r1 type above +\@r1 linestyle 1 +\@r1 linewidth 1.0 +\@r1 color 1 +\@r1 line 0, 0, 0, 0 +\@r2 off +\@link r2 to g0 +\@r2 type above +\@r2 linestyle 1 +\@r2 linewidth 1.0 +\@r2 color 1 +\@r2 line 0, 0, 0, 0 +\@r3 off +\@link r3 to g0 +\@r3 type above +\@r3 linestyle 1 +\@r3 linewidth 1.0 +\@r3 color 1 +\@r3 line 0, 0, 0, 0 +\@r4 off +\@link r4 to g0 +\@r4 type above +\@r4 linestyle 1 +\@r4 linewidth 1.0 +\@r4 color 1 +\@r4 line 0, 0, 0, 0 +\@g0 on +\@g0 hidden false +\@g0 type XY +\@g0 stacked false +\@g0 bar hgap 0.000000 +\@g0 fixedpoint off +\@g0 fixedpoint type 0 +\@g0 fixedpoint xy 0.000000, 0.000000 +\@g0 fixedpoint format general general +\@g0 fixedpoint prec 6, 6 +\@with g0 +\@ world $DPLOT{world} +\@ stack world 0, 1, 0, 1 +\@ znorm 1 +\@ view 0.150000, 0.150000, 1.150000, 0.850000 +\@ title "" +\@ title font 0 +\@ title size 1.500000 +\@ title color 1 +\@ subtitle "" +\@ subtitle font 0 +\@ subtitle size 1.000000 +\@ subtitle color 1 +\@ xaxes scale Normal +\@ yaxes scale Normal +\@ xaxes invert off +\@ yaxes invert off +\@ xaxis on +\@ xaxis type zero false +\@ xaxis offset 0.000000 , 0.000000 +\@ xaxis bar on +\@ xaxis bar color 1 +\@ xaxis bar linestyle 1 +\@ xaxis bar linewidth 1.0 +\@ xaxis label "number of cores per memory domain" +\@ xaxis label layout para +\@ xaxis label place auto +\@ xaxis label char size 1.500000 +\@ xaxis label font 0 +\@ xaxis label color 1 +\@ xaxis label place normal +\@ xaxis tick on +\@ xaxis tick major 1 +\@ xaxis tick minor ticks 0 +\@ xaxis tick default 6 +\@ xaxis tick place rounded true +\@ xaxis tick in +\@ xaxis tick major size 1.000000 +\@ xaxis tick major color 1 +\@ xaxis tick major linewidth 1.0 +\@ xaxis tick major linestyle 1 +\@ xaxis tick major grid off +\@ xaxis tick minor color 1 +\@ xaxis tick minor linewidth 1.0 +\@ xaxis tick minor linestyle 1 +\@ xaxis tick minor grid off +\@ xaxis tick minor size 0.500000 +\@ xaxis ticklabel on +\@ xaxis ticklabel format general +\@ xaxis ticklabel prec 5 +\@ xaxis ticklabel formula "" +\@ xaxis ticklabel append "" +\@ xaxis ticklabel prepend "" +\@ xaxis ticklabel angle 0 +\@ xaxis ticklabel skip 0 +\@ xaxis ticklabel stagger 0 +\@ xaxis ticklabel place normal +\@ xaxis ticklabel offset auto +\@ xaxis ticklabel offset 0.000000 , 0.010000 +\@ xaxis ticklabel start type auto +\@ xaxis ticklabel start 0.000000 +\@ xaxis ticklabel stop type auto +\@ xaxis ticklabel stop 0.000000 +\@ xaxis ticklabel char size 1.250000 +\@ xaxis ticklabel font 0 +\@ xaxis ticklabel color 1 +\@ xaxis tick place normal +\@ xaxis tick spec type none +\@ yaxis on +\@ yaxis type zero false +\@ yaxis offset 0.000000 , 0.000000 +\@ yaxis bar on +\@ yaxis bar color 1 +\@ yaxis bar linestyle 1 +\@ yaxis bar linewidth 1.0 +\@ yaxis label "Memory bandwidth [GB/s]" +\@ yaxis label layout para +\@ yaxis label place auto +\@ yaxis label char size 1.500000 +\@ yaxis label font 0 +\@ yaxis label color 1 +\@ yaxis label place normal +\@ yaxis tick on +\@ yaxis tick major 50 +\@ yaxis tick minor ticks 1 +\@ yaxis tick default 6 +\@ yaxis tick place rounded true +\@ yaxis tick in +\@ yaxis tick major size 1.000000 +\@ yaxis tick major color 1 +\@ yaxis tick major linewidth 1.0 +\@ yaxis tick major linestyle 1 +\@ yaxis tick major grid on +\@ yaxis tick minor color 7 +\@ yaxis tick minor linewidth 1.0 +\@ yaxis tick minor linestyle 1 +\@ yaxis tick minor grid on +\@ yaxis tick minor size 0.500000 +\@ yaxis ticklabel on +\@ yaxis ticklabel format general +\@ yaxis ticklabel prec 5 +\@ yaxis ticklabel formula "" +\@ yaxis ticklabel append "" +\@ yaxis ticklabel prepend "" +\@ yaxis ticklabel angle 0 +\@ yaxis ticklabel skip 0 +\@ yaxis ticklabel stagger 0 +\@ yaxis ticklabel place normal +\@ yaxis ticklabel offset auto +\@ yaxis ticklabel offset 0.000000 , 0.010000 +\@ yaxis ticklabel start type auto +\@ yaxis ticklabel start 0.000000 +\@ yaxis ticklabel stop type auto +\@ yaxis ticklabel stop 0.000000 +\@ yaxis ticklabel char size 1.250000 +\@ yaxis ticklabel font 0 +\@ yaxis ticklabel color 1 +\@ yaxis tick place both +\@ yaxis tick spec type none +\@ altxaxis off +\@ altyaxis off +\@ legend on +\@ legend loctype view +\@ legend 0.9, 0.4 +\@ legend box color 1 +\@ legend box pattern 1 +\@ legend box linewidth 1.0 +\@ legend box linestyle 1 +\@ legend box fill color 0 +\@ legend box fill pattern 1 +\@ legend font 0 +\@ legend char size 1.000000 +\@ legend color 1 +\@ legend length 4 +\@ legend vgap 1 +\@ legend hgap 1 +\@ legend invert false +\@ frame type 0 +\@ frame linestyle 1 +\@ frame linewidth 1.0 +\@ frame color 1 +\@ frame pattern 1 +\@ frame background color 0 +\@ frame background pattern 0 +$DPLOT{meta} +#QTGRACE_ADDITIONAL_PARAMETER: PLOT_ALPHA 255 255 +#QTGRACE_ADDITIONAL_PARAMETER: GRAPH_ALPHA G 0 {255;255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: AXIS_ALPHA G 0 A 0 {255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: AXIS_ALPHA G 0 A 1 {255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: AXIS_ALPHA G 0 A 2 {255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: AXIS_ALPHA G 0 A 3 {255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 0 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 0 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 0 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 0 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 0 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 1 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 1 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 1 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 1 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 1 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 2 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 2 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 2 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 2 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 2 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 3 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 3 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 3 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 3 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 3 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 4 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 4 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 4 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 4 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 4 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 5 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 5 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 5 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 5 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 5 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 6 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 6 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 6 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 6 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 6 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 7 POLYGONEBASESET -1 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 7 SHOWERRORBARINLEGEND 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 7 CONNECTERRORBARS 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 7 IGNOREINAUTOSCALE 0 +#QTGRACE_ADDITIONAL_PARAMETER: G 0 S 7 ALPHA_CHANNELS {255;255;255;255;255;255} +#QTGRACE_ADDITIONAL_PARAMETER: AUTOATTACH G 0 0 0 +#QTGRACE_ADDITIONAL_PARAMETER: TITLE_SHIFT G 0 0 0 +#QTGRACE_ADDITIONAL_PARAMETER: SUBTITLE_SHIFT G 0 0 0 +#QTGRACE_ADDITIONAL_PARAMETER: VIEWPORT_NAME 0 0 "Default" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT_RESET 1 +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Times New Roman,10,-1,5,50,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Times New Roman,10,-1,5,50,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Times New Roman,10,-1,5,75,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Times New Roman,10,-1,5,75,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Helvetica,10,-1,5,50,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Helvetica,10,-1,5,50,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Helvetica,10,-1,5,75,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Helvetica,10,-1,5,75,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Courier,10,-1,5,50,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Courier,10,-1,5,50,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Courier,10,-1,5,75,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Courier,10,-1,5,75,1,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Symbol,10,-1,5,50,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: QTFONT "Zapf Dingbats,10,-1,5,50,0,0,0,0,0" +#QTGRACE_ADDITIONAL_PARAMETER: ENCODING "UTF-8" +#QTGRACE_ADDITIONAL_PARAMETER: UNIVERSAL_FONT_SIZE_FACTOR 1.0000 +#QTGRACE_ADDITIONAL_PARAMETER: TIMESTAMP_PATH 0 +#QTGRACE_ADDITIONAL_PARAMETER: LINESTYLES 9 {2;2;2;2;2;4;4;6;6} {{0;1},{1;0},{1;3},{5;3},{7;3},{1;3;5;3},{1;3;7;3},{1;3;5;3;1;3},{5;3;1;3;5;3}} +$DPLOT{series} +END +close $fh; +} + +sub generateMarkdown { +my $filename = shift; +open(my $fh, '>', $filename) or die "Could not open file '$filename' $!"; + +print $fh <<"END"; +# System + +* **Processor:** $INFO{processor} +* **Base frequency:** ?? +* **Number of sockets:** $INFO{numSockets} +* **Number of memory domains per socket:** $INFO{numDomainsPerSocket} +* **Number of cores per socket:** $INFO{numCoresPerSocket} +* **Number of HWThreads per core:** $INFO{numThreadsPerCore} +* **[MachineState](https://github.com/RRZE-HPC/MachineState) output:** NA + +# Tool chain + +``` ++----------+-----------+ +| Compiler | $INFO{toolchain} | +|----------|-----------| +| Version | $INFO{version} | ++----------+-----------+ +``` + +Optimizing flags: ```$INFO{flags}``` + +# Results + +All results are in ```GB/s```. + +Summary results: +``` ++---------------------------------+ +| Single core | $RESULT{core} | +| Memory domain | $RESULT{domain} | +| Socket | $RESULT{socket} | +| Node | $RESULT{node} | ++---------------------------------+ +``` + +Results for scaling within a memory domain: +``` +$RESULT{scaling} +``` + +Results for scaling across memory domains. Shown are the results for the number of memory domains used (nm) with columns number of cores used per memory domain. + +Init: +``` +$RESULT{domainInit} +``` + +Sum: +``` +$RESULT{domainSum} +``` + +Copy +``` +$RESULT{domainCopy} +``` + +Update +``` +$RESULT{domainUpdate} +``` + +Triad +``` +$RESULT{domainTriad} +``` + +# Scaling + +Memory bandwidth scaling within one memory domain: +![Main memory bandwidth scaling plot]($RESULT{scalingPlot}) + +The following plots illustrate the the performance scaling over multiple memory domains using different number of cores per memory domain. + +Memory bandwidth scaling across memory domains for init: +![Memory domain scaling plot]($RESULT{domainInitPlot}) + +Memory bandwidth scaling across memory domains for sum +![Memory domain scaling plot]($RESULT{domainSumPlot}) + +Memory bandwidth scaling across memory domains for copy +![Memory domain scaling plot]($RESULT{domainCopyPlot}) + +Memory bandwidth scaling across memory domains for Triad +![Memory domain scaling plot]($RESULT{domainTriadPlot}) +END + +close $fh; +} diff --git a/util/extractResults.pl b/util/extractResults.pl index 5ac2978..af113fb 100755 --- a/util/extractResults.pl +++ b/util/extractResults.pl @@ -27,7 +27,20 @@ use strict; use warnings; use utf8; -my $DIR = $ARGV[0]; +my ($DIR, $UNIT) = @ARGV; + +if (not defined $DIR) { + die "Need directory: $0 \n"; +} + +if (not defined $UNIT) { + $UNIT = 1.0; +} else { + if ( $UNIT eq 'GB' ) { + $UNIT = 0.001; + } +} + my %RES; my @testcases = ('Init', 'Sum', 'Copy', 'Update', 'Triad', 'Daxpy', 'STriad', 'SDaxpy'); @@ -49,7 +62,7 @@ while( defined( my $file = glob($DIR . '/*' ) ) ) { if ( $fields[1] =~ /[0-9]+/ ) { $fields[0] =~ s/://; - $RES{$nt}->{$fields[0]} = $fields[1]; + $RES{$nt}->{$fields[0]} = $fields[1] * $UNIT; } } @@ -68,7 +81,11 @@ foreach my $key (sort {$a <=> $b} keys %RES) { printf "%d", $key; foreach my $test ( @testcases ) { - printf "\t%.0f", $RES{$key}->{$test}; + if ( $UNIT > 0.1 ) { + printf "\t%.0f", $RES{$key}->{$test}; + } else { + printf "\t%.2f", $RES{$key}->{$test}; + } } printf "\n"; } From 0e09aefab6e38d87e2ef637928dd9fc67740e159 Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Sat, 16 Jan 2021 07:28:23 +0100 Subject: [PATCH 11/14] Update README.md --- util/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/util/README.md b/util/README.md index aaadfc9..be58ec2 100644 --- a/util/README.md +++ b/util/README.md @@ -24,3 +24,22 @@ $./bench.pl ./bwbench-GCC 14-24 10 1 ## extractResults.pl to generate a plottable output files from multiple scaling runs Please see how to use it in the toplevel [README](https://github.com/RRZE-HPC/TheBandwidthBenchmark#scaling-runs). + +## benchmarkSystem.pl to benchmark a system and generate plots and markdown for the result wiki + +**Please use with care!** + +The script is designed to be used from the root of TheBandwidthBenchmark. +This script cleans and builds the currently configured toolchain. It expects that all Likwid tools are in the path! +Desired Frequency settings must be already in place. + +Usage: +``` +perl ./benchmarkSystem.pl +``` + +where `````` is the directory where you want to store all results and generated output. +`````` is the bwBench executable name, this must be in accordance to the configured tool chain in ```config.mk```. E.g. ```./bwBench-CLANG```. +`````` is the file prefix for all generated output, e.g. Intel-Haswell . + + From 067c243752d8fd6f0352f683998b4cd484bf4556 Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Sat, 16 Jan 2021 07:29:04 +0100 Subject: [PATCH 12/14] Update README.md --- util/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/README.md b/util/README.md index be58ec2..f849cd3 100644 --- a/util/README.md +++ b/util/README.md @@ -31,7 +31,7 @@ Please see how to use it in the toplevel [README](https://github.com/RRZE-HPC/Th The script is designed to be used from the root of TheBandwidthBenchmark. This script cleans and builds the currently configured toolchain. It expects that all Likwid tools are in the path! -Desired Frequency settings must be already in place. +Desired frequency settings must be already in place. Usage: ``` From bcd23b2f096af62fbc71ef99d2ddd668359c7e0e Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Sat, 16 Jan 2021 07:50:00 +0100 Subject: [PATCH 13/14] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 58bf1c8..87c9760 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ It contains C modules for: * Accurate timing Moreover the benchmark showcases a simple generic Makefile that can be used in other projects. +You may want to have a look at our [[Result wiki|https://github.com/RRZE-HPC/TheBandwidthBenchmark/wiki]] that was created using TheBandwidthBenchmark. ## Overview From 3729067798fb27418070c5e0478106539fe246f4 Mon Sep 17 00:00:00 2001 From: moebiusband73 Date: Sat, 16 Jan 2021 07:52:16 +0100 Subject: [PATCH 14/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 87c9760..88f4bfb 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ It contains C modules for: * Accurate timing Moreover the benchmark showcases a simple generic Makefile that can be used in other projects. -You may want to have a look at our [[Result wiki|https://github.com/RRZE-HPC/TheBandwidthBenchmark/wiki]] that was created using TheBandwidthBenchmark. +You may want to have a look at https://github.com/RRZE-HPC/TheBandwidthBenchmark/wiki for a collection of results that were created using TheBandwidthBenchmark. ## Overview