Files
TheBandwidthBenchmark/MemoryHierarchy/bench.pl
2019-06-29 10:25:36 +02:00

34 lines
618 B
Perl
Executable File

#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
my $numCores = $ARGV[0];
my $type = 0;
my $SMT = $ARGV[2] ? $ARGV[2] : 2;
my $N = 100;
if ( $ARGV[1] eq 'seq' ){
$type = 0;
} elsif ( $ARGV[1] eq 'tp' ){
$type = 1;
} elsif ( $ARGV[1] eq 'ws' ){
$type = 2;
}
while ( $N < 8000000 ) {
my $result;
my $performance = '0.00';
while ( $performance eq '0.00' ){
$result = `likwid-pin -c E:S0:$numCores:1:$SMT -q ./striad $type $N`;
$result =~ /([0-9.]+) ([0-9.]+)/;
my $size = $1;
$performance = $2;
}
print $result;
$N = int($N * 1.2);
}