Merge branch 'master' of github.com:RRZE-HPC/TheBandwidthBenchmark
This commit is contained in:
13
README.md
13
README.md
@@ -102,3 +102,16 @@ SDaxpy: 46822.63 23411.32 0.0281 0.0273 0.0325
|
||||
----------------------------------------------------------------------------
|
||||
Solution Validates
|
||||
```
|
||||
|
||||
A perl wrapper script (bench.pl) is 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:
|
||||
```
|
||||
$./bench.pl <executable> <thread count range> <repititions> [<SMT setting>]
|
||||
```
|
||||
Example usage:
|
||||
```
|
||||
$./bench.pl ./bwbench-GCC 2-8 6
|
||||
```
|
||||
The script will always use physical cores only, where two SMT threads is the default. For different SMT thread counts use the 4th command line argument. Example for a processor without SMT:
|
||||
```
|
||||
$./bench.pl ./bwbench-GCC 14-24 10 1
|
||||
```
|
||||
|
||||
23
bench.pl
Executable file
23
bench.pl
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env perl
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
|
||||
my $CMD = $ARGV[0];
|
||||
my @N = split /-/, $ARGV[1];
|
||||
my $R = $ARGV[2];
|
||||
my $MAX = 0; my $CORES = 0; my $BENCH = '';
|
||||
my $SMT = $ARGV[3] ? $ARGV[3] : 2;
|
||||
|
||||
foreach my $numcores ( $N[0] ... $N[1] ) {
|
||||
foreach ( 1 ... $R ) {
|
||||
foreach my $ln ( split /\n/, `likwid-pin -c E:S0:$numcores:1:$SMT $CMD` ){
|
||||
if ( $ln =~ /^([A-Za-z]+):[ ]+([0-9.]+) /) {
|
||||
if ( $MAX < $2 ){
|
||||
$MAX = $2; $CORES = $numcores; $BENCH = $1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
print "$BENCH was best using $CORES threads: $MAX\n";
|
||||
Reference in New Issue
Block a user