From b015deb28db622de2258a970f033361438460e27 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Mon, 26 Nov 2018 15:54:56 +0100 Subject: [PATCH 01/17] first incomplete test --- cscs-checks/analytics/spec-accel/spec.py | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 cscs-checks/analytics/spec-accel/spec.py diff --git a/cscs-checks/analytics/spec-accel/spec.py b/cscs-checks/analytics/spec-accel/spec.py new file mode 100644 index 0000000000..79c2da25c6 --- /dev/null +++ b/cscs-checks/analytics/spec-accel/spec.py @@ -0,0 +1,45 @@ +import os + +import reframe as rfm +import reframe.utility.sanity as sn +from reframe.core.launchers import LauncherWrapper +from reframe.core.launchers.registry import getlauncher + + +@rfm.simple_test +class SpecAccelCheck(rfm.RunOnlyRegressionTest): + def __init__(self): + super().__init__() + self.descr = 'SPEC-accel benchmark' + self.valid_systems = ['daint:gpu'] + self.valid_prog_environs = ['PrgEnv-gnu'] + self.modules = ['cudatoolkit'] + self.sourcesdir = None + self.executable = 'runspec ' + self.executable_opts = ['--config=daint-gpu-cuda8', + ' --platform NVIDIA', + ' --tune=base', + ' --device GPU', + 'bfs', 'cutcp', 'kmeans', 'lavamd', 'cfd', 'nw', + 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] + + + spec_script = '/project/csstaff/sebkelle/spec-accel/SPEC_ACCELv1.2/install.sh' + self.pre_run = [spec_script + ' -d . -f', 'source ./shrc'] + + #pi_value = sn.extractsingle(r'Pi is roughly\s+(?P\S+)', + # self.stdout, 'pi', float) + #self.sanity_patterns = sn.assert_lt(sn.abs(pi_value - math.pi), 0.01) + self.sanity_patterns = sn.assert_found(r'Running Benchmarks', self.stdout) + + self.maintainers = ['SK'] + self.tags = {'benchmark'} + + def setup(self, partition, environ, **job_opts): + self.num_tasks = 12 + self.num_tasks_per_node = 12 + + super().setup(partition, environ, **job_opts) + # The job launcher has to be changed since the `runspec` + # script is not used with srun. + self.job.launcher = getlauncher('local')() From 4c52039181b6283cd9406520398116d5e9797c73 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Tue, 27 Nov 2018 11:54:43 +0100 Subject: [PATCH 02/17] fixed sourcesdir --- cscs-checks/analytics/spec-accel/spec.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cscs-checks/analytics/spec-accel/spec.py b/cscs-checks/analytics/spec-accel/spec.py index 79c2da25c6..fe6c39b727 100644 --- a/cscs-checks/analytics/spec-accel/spec.py +++ b/cscs-checks/analytics/spec-accel/spec.py @@ -14,18 +14,18 @@ def __init__(self): self.valid_systems = ['daint:gpu'] self.valid_prog_environs = ['PrgEnv-gnu'] self.modules = ['cudatoolkit'] - self.sourcesdir = None + #self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'spec-accel-v1.2') + self.sourcesdir = '/project/csstaff/sebkelle/spec-accel/SPEC_ACCELv1.2' self.executable = 'runspec ' - self.executable_opts = ['--config=daint-gpu-cuda8', + self.executable_opts = ['--config=daint-gpu-cuda8', ' --platform NVIDIA', ' --tune=base', ' --device GPU', 'bfs', 'cutcp', 'kmeans', 'lavamd', 'cfd', 'nw', - 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] + 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] - - spec_script = '/project/csstaff/sebkelle/spec-accel/SPEC_ACCELv1.2/install.sh' - self.pre_run = [spec_script + ' -d . -f', 'source ./shrc'] + #spec_script = '/project/csstaff/sebkelle/spec-accel/SPEC_ACCELv1.2/install.sh' + self.pre_run = ['./install.sh -d . -f', 'source ./shrc'] #pi_value = sn.extractsingle(r'Pi is roughly\s+(?P\S+)', # self.stdout, 'pi', float) From 389e09009e249778dca6669597c80854d3036142 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Tue, 27 Nov 2018 18:48:57 +0100 Subject: [PATCH 03/17] updated resourcesdir --- cscs-checks/analytics/spec-accel/spec.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cscs-checks/analytics/spec-accel/spec.py b/cscs-checks/analytics/spec-accel/spec.py index fe6c39b727..e15ac97297 100644 --- a/cscs-checks/analytics/spec-accel/spec.py +++ b/cscs-checks/analytics/spec-accel/spec.py @@ -11,25 +11,21 @@ class SpecAccelCheck(rfm.RunOnlyRegressionTest): def __init__(self): super().__init__() self.descr = 'SPEC-accel benchmark' - self.valid_systems = ['daint:gpu'] + self.valid_systems = ['daint:gpu', 'dom:gpu'] self.valid_prog_environs = ['PrgEnv-gnu'] self.modules = ['cudatoolkit'] - #self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'spec-accel-v1.2') - self.sourcesdir = '/project/csstaff/sebkelle/spec-accel/SPEC_ACCELv1.2' + self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'SPEC_ACCELv1.2') + #self.sourcesdir = '/project/csstaff/sebkelle/spec-accel/SPEC_ACCELv1.2' self.executable = 'runspec ' - self.executable_opts = ['--config=daint-gpu-cuda8', + self.executable_opts = ['--config=daint-gpu', ' --platform NVIDIA', ' --tune=base', ' --device GPU', 'bfs', 'cutcp', 'kmeans', 'lavamd', 'cfd', 'nw', 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] - #spec_script = '/project/csstaff/sebkelle/spec-accel/SPEC_ACCELv1.2/install.sh' self.pre_run = ['./install.sh -d . -f', 'source ./shrc'] - #pi_value = sn.extractsingle(r'Pi is roughly\s+(?P\S+)', - # self.stdout, 'pi', float) - #self.sanity_patterns = sn.assert_lt(sn.abs(pi_value - math.pi), 0.01) self.sanity_patterns = sn.assert_found(r'Running Benchmarks', self.stdout) self.maintainers = ['SK'] From c8930c997e90ec790e7f87841c60508229cdf520 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Thu, 29 Nov 2018 11:14:35 +0100 Subject: [PATCH 04/17] added perf reference data --- cscs-checks/analytics/spec-accel/spec.py | 73 ++++++++++++++++++------ 1 file changed, 56 insertions(+), 17 deletions(-) diff --git a/cscs-checks/analytics/spec-accel/spec.py b/cscs-checks/analytics/spec-accel/spec.py index e15ac97297..ac1231ba37 100644 --- a/cscs-checks/analytics/spec-accel/spec.py +++ b/cscs-checks/analytics/spec-accel/spec.py @@ -2,40 +2,79 @@ import reframe as rfm import reframe.utility.sanity as sn -from reframe.core.launchers import LauncherWrapper from reframe.core.launchers.registry import getlauncher - @rfm.simple_test -class SpecAccelCheck(rfm.RunOnlyRegressionTest): +class SpecAccelCheck(rfm.RegressionTest): def __init__(self): super().__init__() self.descr = 'SPEC-accel benchmark' self.valid_systems = ['daint:gpu', 'dom:gpu'] self.valid_prog_environs = ['PrgEnv-gnu'] - self.modules = ['cudatoolkit'] - self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'SPEC_ACCELv1.2') - #self.sourcesdir = '/project/csstaff/sebkelle/spec-accel/SPEC_ACCELv1.2' - self.executable = 'runspec ' - self.executable_opts = ['--config=daint-gpu', - ' --platform NVIDIA', - ' --tune=base', - ' --device GPU', - 'bfs', 'cutcp', 'kmeans', 'lavamd', 'cfd', 'nw', - 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] + self.modules = ['cudatoolkit/9.1.85_3.18-6.0.7.0_5.1__g2eb7c52'] + + #self.sourcesdir needed for cscs-default config file + app_source = os.path.join(self.current_system.resourcesdir, + 'SPEC_ACCELv1.2') + self.prebuild_cmd = ['cp -r %s/* .' % app_source, + './install.sh -d . -f'] + + # I just want prebuild_cmd, but no action for the build_system + # is not supported, so I find it something useless to do + self.build_system = 'SingleSource' + self.sourcepath = './benchspec/ACCEL/353.clvrleaf/src/timer_c.c' + self.build_system.cflags = ['-c'] + + self.pre_run = ['source ./shrc', 'mv cscs-default config'] + + benchmarks = ['systest', 'tpacf', 'stencil', 'lbm', 'fft', 'spmv', + 'mriq', 'bfs', 'cutcp', 'kmeans', 'lavamd', 'cfd', 'nw', + 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] - self.pre_run = ['./install.sh -d . -f', 'source ./shrc'] + self.executable = 'runspec' + self.executable_opts = ['--config=cscs-default', + '--platform NVIDIA', + '--tune=base', + '--device GPU'] + benchmarks - self.sanity_patterns = sn.assert_found(r'Running Benchmarks', self.stdout) + outfile = sn.getitem(sn.glob('result/ACCEL.*.log'), 0) + self.sanity_patterns = sn.all([sn.assert_found( + r'Success.*%s' % bn, outfile) + for bn in benchmarks]) + + refs = { bench_name : (runtime, -0.1, None) + for (bench_name, runtime) in + zip(benchmarks, + [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, 7.0, + 23.1, 10.8, 55.9, 8.7, 24.4, 16.2, + 15.7, 15.6, 11.1, 20.0, 41.9, 26.2] + ) + } + + self.reference = { + 'dom:gpu' : refs, + 'daint:gpu' : refs + } + + self.perf_patterns = { + bench_name: self.extract_average(outfile, bench_name) + for bench_name in benchmarks + } self.maintainers = ['SK'] self.tags = {'benchmark'} def setup(self, partition, environ, **job_opts): - self.num_tasks = 12 - self.num_tasks_per_node = 12 + self.num_tasks = 1 + self.num_tasks_per_node = 1 super().setup(partition, environ, **job_opts) # The job launcher has to be changed since the `runspec` # script is not used with srun. self.job.launcher = getlauncher('local')() + + @sn.sanity_function + def extract_average(self, ofile, bench_name): + runs = sn.extractall(r'Success.*%s.*runtime=(?P[0-9.]+)' + % bench_name, ofile, 'rt', float) + return sum(runs)/sn.count(runs) From 2d473f2378719b54151e43d631796cdfe1948b4b Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Thu, 29 Nov 2018 14:10:27 +0100 Subject: [PATCH 05/17] need upper threshold since measuring runtime --- cscs-checks/analytics/spec-accel/spec.py | 6 +-- .../analytics/spec-accel/src/cscs-default | 42 +++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 cscs-checks/analytics/spec-accel/src/cscs-default diff --git a/cscs-checks/analytics/spec-accel/spec.py b/cscs-checks/analytics/spec-accel/spec.py index ac1231ba37..4516985ffc 100644 --- a/cscs-checks/analytics/spec-accel/spec.py +++ b/cscs-checks/analytics/spec-accel/spec.py @@ -42,11 +42,11 @@ def __init__(self): r'Success.*%s' % bn, outfile) for bn in benchmarks]) - refs = { bench_name : (runtime, -0.1, None) + refs = { bench_name : (runtime, None, 0.1 for (bench_name, runtime) in zip(benchmarks, - [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, 7.0, - 23.1, 10.8, 55.9, 8.7, 24.4, 16.2, + [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, + 7.0, 23.1, 10.8, 38.4, 8.7, 24.4, 16.2, 15.7, 15.6, 11.1, 20.0, 41.9, 26.2] ) } diff --git a/cscs-checks/analytics/spec-accel/src/cscs-default b/cscs-checks/analytics/spec-accel/src/cscs-default new file mode 100644 index 0000000000..6d0f5acb21 --- /dev/null +++ b/cscs-checks/analytics/spec-accel/src/cscs-default @@ -0,0 +1,42 @@ +ext = compsys +output_format = asc +#table = 0 +teeout = no +teerunout = yes +tune = base + +###################################################################### +# Compiler selection, versions, and dates. +# +# sw_compiler = additional information describing the compiler +# CC = how the C Compiler is invoked +# FC = how the FORTRAN compiler is invoked + + +default=default=default=default: +sw_compiler = Computer System Compiler C and Fortran90 +CC = cc +CXX = CC +FC = ftn + +strict_rundir_verify = 0 + +####################################################################### +# +# OPTIMIZE = flags applicable to all compilers +# COPTIMIZE = flags applicable to the C compiler +# FOPTIMIZE = flags applicable to the Fortran compiler +# +# See your compiler manual for information on the flags available +# for your compiler +# + +OPTIMIZE = -O2 +LIBS = -lOpenCL +#EXTRA_LIBS = +EXTRA_CXXFLAGS = -std=c++03 +#EXTRA_CFLAGS = + +####################################################################### +# End of user-supplied information. +####################################################################### From 43739ea7dbdf55436b2a14a07bedefb2220e71d8 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Fri, 30 Nov 2018 16:15:45 +0100 Subject: [PATCH 06/17] extension to PrgEnv-cray --- cscs-checks/analytics/spec-accel/spec.py | 74 +++++++++++-------- .../analytics/spec-accel/src/cscs-cray | 42 +++++++++++ .../spec-accel/src/{cscs-default => cscs-gnu} | 2 +- 3 files changed, 87 insertions(+), 31 deletions(-) create mode 100644 cscs-checks/analytics/spec-accel/src/cscs-cray rename cscs-checks/analytics/spec-accel/src/{cscs-default => cscs-gnu} (98%) diff --git a/cscs-checks/analytics/spec-accel/spec.py b/cscs-checks/analytics/spec-accel/spec.py index 4516985ffc..6dd0b2c1f5 100644 --- a/cscs-checks/analytics/spec-accel/spec.py +++ b/cscs-checks/analytics/spec-accel/spec.py @@ -10,8 +10,14 @@ def __init__(self): super().__init__() self.descr = 'SPEC-accel benchmark' self.valid_systems = ['daint:gpu', 'dom:gpu'] - self.valid_prog_environs = ['PrgEnv-gnu'] - self.modules = ['cudatoolkit/9.1.85_3.18-6.0.7.0_5.1__g2eb7c52'] + self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-cray'] + #self.modules = ['cudatoolkit/9.1.85_3.18-6.0.7.0_5.1__g2eb7c52'] + self.modules = ['craype-accel-nvidia60'] + + self.configs = { + 'PrgEnv-gnu': 'cscs-gnu', + 'PrgEnv-cray': 'cscs-cray', + } #self.sourcesdir needed for cscs-default config file app_source = os.path.join(self.current_system.resourcesdir, @@ -25,48 +31,56 @@ def __init__(self): self.sourcepath = './benchspec/ACCEL/353.clvrleaf/src/timer_c.c' self.build_system.cflags = ['-c'] - self.pre_run = ['source ./shrc', 'mv cscs-default config'] + self.benchmarks = ['systest', 'tpacf', 'stencil', 'lbm', 'fft', 'spmv', + 'mriq', 'bfs', 'cutcp', 'kmeans', 'lavamd', 'cfd', 'nw', + 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] + self.runtimes = { + 'PrgEnv-gnu': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, + 7.0, 23.1, 10.8, 38.4, 8.7, 24.4, 16.2, + 15.7, 15.6, 11.1, 20.0, 41.9, 26.2], + 'PrgEnv-cray': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, + 7.0, 23.1, 10.8, 24.9, 8.7, 24.4, 16.2, + 15.7, 15.6, 11.1, 20.0, 41.9, 26.2], + } + + self.refs = { + env: { bench_name : (rt, None, 0.1) + for (bench_name, rt) in + zip(self.benchmarks, self.runtimes[env]) + } + for env in self.valid_prog_environs + } - benchmarks = ['systest', 'tpacf', 'stencil', 'lbm', 'fft', 'spmv', - 'mriq', 'bfs', 'cutcp', 'kmeans', 'lavamd', 'cfd', 'nw', - 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] + self.num_tasks = 1 + self.num_tasks_per_node = 1 self.executable = 'runspec' - self.executable_opts = ['--config=cscs-default', - '--platform NVIDIA', - '--tune=base', - '--device GPU'] + benchmarks outfile = sn.getitem(sn.glob('result/ACCEL.*.log'), 0) self.sanity_patterns = sn.all([sn.assert_found( - r'Success.*%s' % bn, outfile) - for bn in benchmarks]) - - refs = { bench_name : (runtime, None, 0.1 - for (bench_name, runtime) in - zip(benchmarks, - [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, - 7.0, 23.1, 10.8, 38.4, 8.7, 24.4, 16.2, - 15.7, 15.6, 11.1, 20.0, 41.9, 26.2] - ) - } - - self.reference = { - 'dom:gpu' : refs, - 'daint:gpu' : refs - } + r'Success.*%s' % bn, outfile) + for bn in self.benchmarks + ]) self.perf_patterns = { bench_name: self.extract_average(outfile, bench_name) - for bench_name in benchmarks + for bench_name in self.benchmarks } self.maintainers = ['SK'] - self.tags = {'benchmark'} + self.tags = {'diagnostic'} def setup(self, partition, environ, **job_opts): - self.num_tasks = 1 - self.num_tasks_per_node = 1 + + self.pre_run = ['source ./shrc', 'mv %s config' % self.configs[environ.name]] + self.executable_opts = ['--config=%s' % self.configs[environ.name], + '--platform NVIDIA', + '--tune=base', + '--device GPU'] + self.benchmarks + self.reference = { + 'dom:gpu': self.refs[environ.name], + 'daint:gpu': self.refs[environ.name] + } super().setup(partition, environ, **job_opts) # The job launcher has to be changed since the `runspec` diff --git a/cscs-checks/analytics/spec-accel/src/cscs-cray b/cscs-checks/analytics/spec-accel/src/cscs-cray new file mode 100644 index 0000000000..a56d17ff4f --- /dev/null +++ b/cscs-checks/analytics/spec-accel/src/cscs-cray @@ -0,0 +1,42 @@ +ext = compsys +output_format = asc +#table = 0 +teeout = no +teerunout = yes +tune = base + +###################################################################### +# Compiler selection, versions, and dates. +# +# sw_compiler = additional information describing the compiler +# CC = how the C Compiler is invoked +# FC = how the FORTRAN compiler is invoked + + +default=default=default=default: +sw_compiler = Computer System Compiler C and Fortran90 +CC = cc +CXX = CC +FC = ftn + +strict_rundir_verify = 0 + +####################################################################### +# +# OPTIMIZE = flags applicable to all compilers +# COPTIMIZE = flags applicable to the C compiler +# FOPTIMIZE = flags applicable to the Fortran compiler +# +# See your compiler manual for information on the flags available +# for your compiler +# + +OPTIMIZE = +LIBS = -lOpenCL +#EXTRA_LIBS = +EXTRA_CXXFLAGS = -h std=c++03 +#EXTRA_CFLAGS = + +####################################################################### +# End of user-supplied information. +####################################################################### diff --git a/cscs-checks/analytics/spec-accel/src/cscs-default b/cscs-checks/analytics/spec-accel/src/cscs-gnu similarity index 98% rename from cscs-checks/analytics/spec-accel/src/cscs-default rename to cscs-checks/analytics/spec-accel/src/cscs-gnu index 6d0f5acb21..d15ad1deba 100644 --- a/cscs-checks/analytics/spec-accel/src/cscs-default +++ b/cscs-checks/analytics/spec-accel/src/cscs-gnu @@ -31,7 +31,7 @@ strict_rundir_verify = 0 # for your compiler # -OPTIMIZE = -O2 +OPTIMIZE = -O3 LIBS = -lOpenCL #EXTRA_LIBS = EXTRA_CXXFLAGS = -std=c++03 From eed5aef856fa963582430e1cb9a8b33031d1ff5c Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Fri, 30 Nov 2018 16:19:42 +0100 Subject: [PATCH 07/17] removed old comment --- cscs-checks/analytics/spec-accel/spec.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cscs-checks/analytics/spec-accel/spec.py b/cscs-checks/analytics/spec-accel/spec.py index 6dd0b2c1f5..f5c28fe767 100644 --- a/cscs-checks/analytics/spec-accel/spec.py +++ b/cscs-checks/analytics/spec-accel/spec.py @@ -11,7 +11,6 @@ def __init__(self): self.descr = 'SPEC-accel benchmark' self.valid_systems = ['daint:gpu', 'dom:gpu'] self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-cray'] - #self.modules = ['cudatoolkit/9.1.85_3.18-6.0.7.0_5.1__g2eb7c52'] self.modules = ['craype-accel-nvidia60'] self.configs = { @@ -19,7 +18,7 @@ def __init__(self): 'PrgEnv-cray': 'cscs-cray', } - #self.sourcesdir needed for cscs-default config file + #self.sourcesdir needed for cscs-* config files app_source = os.path.join(self.current_system.resourcesdir, 'SPEC_ACCELv1.2') self.prebuild_cmd = ['cp -r %s/* .' % app_source, From 8779e234146c21725448bc6bc3d13d4ded046c5e Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Tue, 18 Dec 2018 18:23:19 +0100 Subject: [PATCH 08/17] moved openacc to different file temporarily --- cscs-checks/analytics/spec-accel/spec.py | 6 +- cscs-checks/analytics/spec-accel/spec_acc.py | 102 +++++++++++++++++++ 2 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 cscs-checks/analytics/spec-accel/spec_acc.py diff --git a/cscs-checks/analytics/spec-accel/spec.py b/cscs-checks/analytics/spec-accel/spec.py index f5c28fe767..4b49a44711 100644 --- a/cscs-checks/analytics/spec-accel/spec.py +++ b/cscs-checks/analytics/spec-accel/spec.py @@ -33,6 +33,7 @@ def __init__(self): self.benchmarks = ['systest', 'tpacf', 'stencil', 'lbm', 'fft', 'spmv', 'mriq', 'bfs', 'cutcp', 'kmeans', 'lavamd', 'cfd', 'nw', 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] + self.runtimes = { 'PrgEnv-gnu': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, 7.0, 23.1, 10.8, 38.4, 8.7, 24.4, 16.2, @@ -50,8 +51,9 @@ def __init__(self): for env in self.valid_prog_environs } - self.num_tasks = 1 - self.num_tasks_per_node = 1 + self.num_tasks = 12 + self.num_tasks_per_node = 12 + self.time_limit = (0, 30, 0) self.executable = 'runspec' diff --git a/cscs-checks/analytics/spec-accel/spec_acc.py b/cscs-checks/analytics/spec-accel/spec_acc.py new file mode 100644 index 0000000000..61e8538406 --- /dev/null +++ b/cscs-checks/analytics/spec-accel/spec_acc.py @@ -0,0 +1,102 @@ +import os + +import reframe as rfm +import reframe.utility.sanity as sn +from reframe.core.launchers.registry import getlauncher + +@rfm.simple_test +class SpecAccelCheck(rfm.RegressionTest): + def __init__(self): + super().__init__() + self.descr = 'SPEC-accel benchmark' + self.valid_systems = ['daint:gpu', 'dom:gpu'] + self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-cray'] + self.modules = ['craype-accel-nvidia60'] + + self.configs = { + 'PrgEnv-gnu': 'cscs-gnu', + 'PrgEnv-cray': 'cscs-cray', + } + + #self.sourcesdir needed for cscs-* config files + app_source = os.path.join(self.current_system.resourcesdir, + 'SPEC_ACCELv1.2') + self.prebuild_cmd = ['cp -r %s/* .' % app_source, + './install.sh -d . -f'] + + # I just want prebuild_cmd, but no action for the build_system + # is not supported, so I find it something useless to do + self.build_system = 'SingleSource' + self.sourcepath = './benchspec/ACCEL/353.clvrleaf/src/timer_c.c' + self.build_system.cflags = ['-c'] + + #self.benchmarks = ['systest', 'tpacf', 'stencil', 'lbm', 'fft', 'spmv', + # 'mriq', 'bfs', 'cutcp', 'kmeans', 'lavamd', 'cfd', 'nw', + # 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] + + #self.runtimes = { + # 'PrgEnv-gnu': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, + # 7.0, 23.1, 10.8, 38.4, 8.7, 24.4, 16.2, + # 15.7, 15.6, 11.1, 20.0, 41.9, 26.2], + # 'PrgEnv-cray': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, + # 7.0, 23.1, 10.8, 24.9, 8.7, 24.4, 16.2, + # 15.7, 15.6, 11.1, 20.0, 41.9, 26.2], + #} + self.benchmarks = ['ostencil', 'olbm', 'omriq', 'md', 'ep', 'clvrleaf', 'cg', + 'seismic', 'sp', 'csp', 'miniGhost', 'ilbdc', 'swim', 'bt'] + + self.runtimes = { + 'PrgEnv-gnu': len(self.benchmarks) * [100], + 'PrgEnv-cray': len(self.benchmarks) * [100], + } + + self.refs = { + env: { bench_name : (rt, None, 0.1) + for (bench_name, rt) in + zip(self.benchmarks, self.runtimes[env]) + } + for env in self.valid_prog_environs + } + + self.num_tasks = 12 + self.num_tasks_per_node = 12 + self.time_limit = (0, 30, 0) + + self.executable = 'runspec' + + outfile = sn.getitem(sn.glob('result/ACCEL.*.log'), 0) + self.sanity_patterns = sn.all([sn.assert_found( + r'Success.*%s' % bn, outfile) + for bn in self.benchmarks + ]) + + self.perf_patterns = { + bench_name: self.extract_average(outfile, bench_name) + for bench_name in self.benchmarks + } + + self.maintainers = ['SK'] + self.tags = {'diagnostic'} + + def setup(self, partition, environ, **job_opts): + + self.pre_run = ['source ./shrc', 'mv %s config' % self.configs[environ.name]] + self.executable_opts = ['--config=%s' % self.configs[environ.name], + '--platform NVIDIA', + '--tune=base', + '--device GPU'] + self.benchmarks + self.reference = { + 'dom:gpu': self.refs[environ.name], + 'daint:gpu': self.refs[environ.name] + } + + super().setup(partition, environ, **job_opts) + # The job launcher has to be changed since the `runspec` + # script is not used with srun. + self.job.launcher = getlauncher('local')() + + @sn.sanity_function + def extract_average(self, ofile, bench_name): + runs = sn.extractall(r'Success.*%s.*runtime=(?P[0-9.]+)' + % bench_name, ofile, 'rt', float) + return sum(runs)/sn.count(runs) From 209c269d7d1fc75b59dbd0e0ef33621b83352051 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Wed, 19 Dec 2018 09:02:22 +0100 Subject: [PATCH 09/17] moved spec-accel to microbenchmarks --- cscs-checks/{analytics => microbenchmarks}/spec-accel/spec.py | 0 cscs-checks/{analytics => microbenchmarks}/spec-accel/spec_acc.py | 0 .../{analytics => microbenchmarks}/spec-accel/src/cscs-cray | 0 .../{analytics => microbenchmarks}/spec-accel/src/cscs-gnu | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename cscs-checks/{analytics => microbenchmarks}/spec-accel/spec.py (100%) rename cscs-checks/{analytics => microbenchmarks}/spec-accel/spec_acc.py (100%) rename cscs-checks/{analytics => microbenchmarks}/spec-accel/src/cscs-cray (100%) rename cscs-checks/{analytics => microbenchmarks}/spec-accel/src/cscs-gnu (100%) diff --git a/cscs-checks/analytics/spec-accel/spec.py b/cscs-checks/microbenchmarks/spec-accel/spec.py similarity index 100% rename from cscs-checks/analytics/spec-accel/spec.py rename to cscs-checks/microbenchmarks/spec-accel/spec.py diff --git a/cscs-checks/analytics/spec-accel/spec_acc.py b/cscs-checks/microbenchmarks/spec-accel/spec_acc.py similarity index 100% rename from cscs-checks/analytics/spec-accel/spec_acc.py rename to cscs-checks/microbenchmarks/spec-accel/spec_acc.py diff --git a/cscs-checks/analytics/spec-accel/src/cscs-cray b/cscs-checks/microbenchmarks/spec-accel/src/cscs-cray similarity index 100% rename from cscs-checks/analytics/spec-accel/src/cscs-cray rename to cscs-checks/microbenchmarks/spec-accel/src/cscs-cray diff --git a/cscs-checks/analytics/spec-accel/src/cscs-gnu b/cscs-checks/microbenchmarks/spec-accel/src/cscs-gnu similarity index 100% rename from cscs-checks/analytics/spec-accel/src/cscs-gnu rename to cscs-checks/microbenchmarks/spec-accel/src/cscs-gnu From 813e9df8cbc0e125df069e114ca8041bc65b877a Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Tue, 8 Jan 2019 18:13:02 +0100 Subject: [PATCH 10/17] formatting corrections --- cscs-checks/microbenchmarks/spec-accel/spec.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cscs-checks/microbenchmarks/spec-accel/spec.py b/cscs-checks/microbenchmarks/spec-accel/spec.py index 4b49a44711..212bcce9b6 100644 --- a/cscs-checks/microbenchmarks/spec-accel/spec.py +++ b/cscs-checks/microbenchmarks/spec-accel/spec.py @@ -30,9 +30,10 @@ def __init__(self): self.sourcepath = './benchspec/ACCEL/353.clvrleaf/src/timer_c.c' self.build_system.cflags = ['-c'] - self.benchmarks = ['systest', 'tpacf', 'stencil', 'lbm', 'fft', 'spmv', - 'mriq', 'bfs', 'cutcp', 'kmeans', 'lavamd', 'cfd', 'nw', - 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] + self.benchmarks = ['systest', 'tpacf', 'stencil', 'lbm', 'fft', + 'spmv', 'mriq', 'bfs', 'cutcp', 'kmeans', + 'lavamd', 'cfd', 'nw', 'hotspot', 'lud', + 'ge', 'srad', 'heartwall', 'bplustree'] self.runtimes = { 'PrgEnv-gnu': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, @@ -59,9 +60,7 @@ def __init__(self): outfile = sn.getitem(sn.glob('result/ACCEL.*.log'), 0) self.sanity_patterns = sn.all([sn.assert_found( - r'Success.*%s' % bn, outfile) - for bn in self.benchmarks - ]) + r'Success.*%s' % bn, outfile) for bn in self.benchmarks]) self.perf_patterns = { bench_name: self.extract_average(outfile, bench_name) @@ -91,5 +90,5 @@ def setup(self, partition, environ, **job_opts): @sn.sanity_function def extract_average(self, ofile, bench_name): runs = sn.extractall(r'Success.*%s.*runtime=(?P[0-9.]+)' - % bench_name, ofile, 'rt', float) + % bench_name, ofile, 'rt', float) return sum(runs)/sn.count(runs) From 229e52282be94c9abd47ce600aa7a30707266510 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Tue, 8 Jan 2019 19:21:06 +0100 Subject: [PATCH 11/17] corrected reference times for openacc --- .../microbenchmarks/spec-accel/spec_acc.py | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/cscs-checks/microbenchmarks/spec-accel/spec_acc.py b/cscs-checks/microbenchmarks/spec-accel/spec_acc.py index 61e8538406..c728cd7768 100644 --- a/cscs-checks/microbenchmarks/spec-accel/spec_acc.py +++ b/cscs-checks/microbenchmarks/spec-accel/spec_acc.py @@ -10,15 +10,13 @@ def __init__(self): super().__init__() self.descr = 'SPEC-accel benchmark' self.valid_systems = ['daint:gpu', 'dom:gpu'] - self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-cray'] + self.valid_prog_environs = ['PrgEnv-cray'] self.modules = ['craype-accel-nvidia60'] self.configs = { - 'PrgEnv-gnu': 'cscs-gnu', - 'PrgEnv-cray': 'cscs-cray', + 'PrgEnv-cray': 'cscs-cray' } - #self.sourcesdir needed for cscs-* config files app_source = os.path.join(self.current_system.resourcesdir, 'SPEC_ACCELv1.2') self.prebuild_cmd = ['cp -r %s/* .' % app_source, @@ -30,24 +28,13 @@ def __init__(self): self.sourcepath = './benchspec/ACCEL/353.clvrleaf/src/timer_c.c' self.build_system.cflags = ['-c'] - #self.benchmarks = ['systest', 'tpacf', 'stencil', 'lbm', 'fft', 'spmv', - # 'mriq', 'bfs', 'cutcp', 'kmeans', 'lavamd', 'cfd', 'nw', - # 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] - - #self.runtimes = { - # 'PrgEnv-gnu': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, - # 7.0, 23.1, 10.8, 38.4, 8.7, 24.4, 16.2, - # 15.7, 15.6, 11.1, 20.0, 41.9, 26.2], - # 'PrgEnv-cray': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, - # 7.0, 23.1, 10.8, 24.9, 8.7, 24.4, 16.2, - # 15.7, 15.6, 11.1, 20.0, 41.9, 26.2], - #} - self.benchmarks = ['ostencil', 'olbm', 'omriq', 'md', 'ep', 'clvrleaf', 'cg', - 'seismic', 'sp', 'csp', 'miniGhost', 'ilbdc', 'swim', 'bt'] + self.benchmarks = ['ostencil', 'olbm', 'omriq', 'md', 'ep', + 'clvrleaf', 'cg', 'seismic', 'sp', 'csp', + 'miniGhost', 'ilbdc', 'swim', 'bt'] self.runtimes = { - 'PrgEnv-gnu': len(self.benchmarks) * [100], - 'PrgEnv-cray': len(self.benchmarks) * [100], + 'PrgEnv-cray': [18, 26, 121, 20, 73, 59, 41, + 46, 71, 34, 72, 41, 34, 378] } self.refs = { From 5731237c03fe8579f8b1ecb3b13bc3b22c8a276d Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Wed, 9 Jan 2019 15:46:57 +0100 Subject: [PATCH 12/17] added openacc benchmarks --- .../microbenchmarks/spec-accel/spec.py | 68 +++++++++++++------ 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/cscs-checks/microbenchmarks/spec-accel/spec.py b/cscs-checks/microbenchmarks/spec-accel/spec.py index 212bcce9b6..5887e2c188 100644 --- a/cscs-checks/microbenchmarks/spec-accel/spec.py +++ b/cscs-checks/microbenchmarks/spec-accel/spec.py @@ -4,13 +4,11 @@ import reframe.utility.sanity as sn from reframe.core.launchers.registry import getlauncher -@rfm.simple_test -class SpecAccelCheck(rfm.RegressionTest): - def __init__(self): +class SpecAccelCheckBase(rfm.RegressionTest): + def __init__(self, prg_envs): super().__init__() - self.descr = 'SPEC-accel benchmark' self.valid_systems = ['daint:gpu', 'dom:gpu'] - self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-cray'] + self.valid_prog_environs = prg_envs self.modules = ['craype-accel-nvidia60'] self.configs = { @@ -18,7 +16,6 @@ def __init__(self): 'PrgEnv-cray': 'cscs-cray', } - #self.sourcesdir needed for cscs-* config files app_source = os.path.join(self.current_system.resourcesdir, 'SPEC_ACCELv1.2') self.prebuild_cmd = ['cp -r %s/* .' % app_source, @@ -30,22 +27,8 @@ def __init__(self): self.sourcepath = './benchspec/ACCEL/353.clvrleaf/src/timer_c.c' self.build_system.cflags = ['-c'] - self.benchmarks = ['systest', 'tpacf', 'stencil', 'lbm', 'fft', - 'spmv', 'mriq', 'bfs', 'cutcp', 'kmeans', - 'lavamd', 'cfd', 'nw', 'hotspot', 'lud', - 'ge', 'srad', 'heartwall', 'bplustree'] - - self.runtimes = { - 'PrgEnv-gnu': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, - 7.0, 23.1, 10.8, 38.4, 8.7, 24.4, 16.2, - 15.7, 15.6, 11.1, 20.0, 41.9, 26.2], - 'PrgEnv-cray': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, - 7.0, 23.1, 10.8, 24.9, 8.7, 24.4, 16.2, - 15.7, 15.6, 11.1, 20.0, 41.9, 26.2], - } - self.refs = { - env: { bench_name : (rt, None, 0.1) + env: { bench_name : (rt, None, 0.1, 'Seconds') for (bench_name, rt) in zip(self.benchmarks, self.runtimes[env]) } @@ -92,3 +75,46 @@ def extract_average(self, ofile, bench_name): runs = sn.extractall(r'Success.*%s.*runtime=(?P[0-9.]+)' % bench_name, ofile, 'rt', float) return sum(runs)/sn.count(runs) + + +@rfm.required_version('>=2.16-dev0') +@rfm.simple_test +class SpecAccelCheckOpenCL(SpecAccelCheckBase): + def __init__(self): + self.descr = 'SPEC-accel benchmark OpenCL' + valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-cray'] + + self.benchmarks = ['systest', 'tpacf', 'stencil', 'lbm', 'fft', + 'spmv', 'mriq', 'bfs', 'cutcp', 'kmeans', + 'lavamd', 'cfd', 'nw', 'hotspot', 'lud', + 'ge', 'srad', 'heartwall', 'bplustree'] + + self.runtimes = { + 'PrgEnv-gnu': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, + 7.0, 23.1, 10.8, 38.4, 8.7, 24.4, 16.2, + 15.7, 15.6, 11.1, 20.0, 41.9, 26.2], + 'PrgEnv-cray': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, + 7.0, 23.1, 10.8, 24.9, 8.7, 24.4, 16.2, + 15.7, 15.6, 11.1, 20.0, 41.9, 26.2], + } + + super().__init__(valid_prog_environs) + + +@rfm.required_version('>=2.16-dev0') +@rfm.simple_test +class SpecAccelCheckOpenACC(SpecAccelCheckBase): + def __init__(self): + self.descr = 'SPEC-accel benchmark OpenACC' + valid_prog_environs = ['PrgEnv-cray'] + + self.benchmarks = ['ostencil', 'olbm', 'omriq', 'md', 'ep', + 'clvrleaf', 'cg', 'seismic', 'sp', 'csp', + 'miniGhost', 'ilbdc', 'swim', 'bt'] + + self.runtimes = { + 'PrgEnv-cray': [18, 26, 121, 20, 73, 59, 41, + 50, 71, 34, 72, 41, 34, 378] + } + + super().__init__(valid_prog_environs) From 9aa4f1f3cd2fdb1513f3efafc9175047ace835d8 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Wed, 9 Jan 2019 15:56:52 +0100 Subject: [PATCH 13/17] pep8 cosmetics --- .../microbenchmarks/spec-accel/spec.py | 15 ++-- .../microbenchmarks/spec-accel/spec_acc.py | 89 ------------------- 2 files changed, 8 insertions(+), 96 deletions(-) delete mode 100644 cscs-checks/microbenchmarks/spec-accel/spec_acc.py diff --git a/cscs-checks/microbenchmarks/spec-accel/spec.py b/cscs-checks/microbenchmarks/spec-accel/spec.py index 5887e2c188..a3360639bc 100644 --- a/cscs-checks/microbenchmarks/spec-accel/spec.py +++ b/cscs-checks/microbenchmarks/spec-accel/spec.py @@ -4,6 +4,7 @@ import reframe.utility.sanity as sn from reframe.core.launchers.registry import getlauncher + class SpecAccelCheckBase(rfm.RegressionTest): def __init__(self, prg_envs): super().__init__() @@ -28,11 +29,10 @@ def __init__(self, prg_envs): self.build_system.cflags = ['-c'] self.refs = { - env: { bench_name : (rt, None, 0.1, 'Seconds') - for (bench_name, rt) in - zip(self.benchmarks, self.runtimes[env]) - } - for env in self.valid_prog_environs + env: {bench_name: (rt, None, 0.1, 'Seconds') + for (bench_name, rt) in + zip(self.benchmarks, self.runtimes[env])} + for env in self.valid_prog_environs } self.num_tasks = 12 @@ -47,7 +47,7 @@ def __init__(self, prg_envs): self.perf_patterns = { bench_name: self.extract_average(outfile, bench_name) - for bench_name in self.benchmarks + for bench_name in self.benchmarks } self.maintainers = ['SK'] @@ -55,7 +55,8 @@ def __init__(self, prg_envs): def setup(self, partition, environ, **job_opts): - self.pre_run = ['source ./shrc', 'mv %s config' % self.configs[environ.name]] + self.pre_run = ['source ./shrc', 'mv %s config' % + self.configs[environ.name]] self.executable_opts = ['--config=%s' % self.configs[environ.name], '--platform NVIDIA', '--tune=base', diff --git a/cscs-checks/microbenchmarks/spec-accel/spec_acc.py b/cscs-checks/microbenchmarks/spec-accel/spec_acc.py deleted file mode 100644 index c728cd7768..0000000000 --- a/cscs-checks/microbenchmarks/spec-accel/spec_acc.py +++ /dev/null @@ -1,89 +0,0 @@ -import os - -import reframe as rfm -import reframe.utility.sanity as sn -from reframe.core.launchers.registry import getlauncher - -@rfm.simple_test -class SpecAccelCheck(rfm.RegressionTest): - def __init__(self): - super().__init__() - self.descr = 'SPEC-accel benchmark' - self.valid_systems = ['daint:gpu', 'dom:gpu'] - self.valid_prog_environs = ['PrgEnv-cray'] - self.modules = ['craype-accel-nvidia60'] - - self.configs = { - 'PrgEnv-cray': 'cscs-cray' - } - - app_source = os.path.join(self.current_system.resourcesdir, - 'SPEC_ACCELv1.2') - self.prebuild_cmd = ['cp -r %s/* .' % app_source, - './install.sh -d . -f'] - - # I just want prebuild_cmd, but no action for the build_system - # is not supported, so I find it something useless to do - self.build_system = 'SingleSource' - self.sourcepath = './benchspec/ACCEL/353.clvrleaf/src/timer_c.c' - self.build_system.cflags = ['-c'] - - self.benchmarks = ['ostencil', 'olbm', 'omriq', 'md', 'ep', - 'clvrleaf', 'cg', 'seismic', 'sp', 'csp', - 'miniGhost', 'ilbdc', 'swim', 'bt'] - - self.runtimes = { - 'PrgEnv-cray': [18, 26, 121, 20, 73, 59, 41, - 46, 71, 34, 72, 41, 34, 378] - } - - self.refs = { - env: { bench_name : (rt, None, 0.1) - for (bench_name, rt) in - zip(self.benchmarks, self.runtimes[env]) - } - for env in self.valid_prog_environs - } - - self.num_tasks = 12 - self.num_tasks_per_node = 12 - self.time_limit = (0, 30, 0) - - self.executable = 'runspec' - - outfile = sn.getitem(sn.glob('result/ACCEL.*.log'), 0) - self.sanity_patterns = sn.all([sn.assert_found( - r'Success.*%s' % bn, outfile) - for bn in self.benchmarks - ]) - - self.perf_patterns = { - bench_name: self.extract_average(outfile, bench_name) - for bench_name in self.benchmarks - } - - self.maintainers = ['SK'] - self.tags = {'diagnostic'} - - def setup(self, partition, environ, **job_opts): - - self.pre_run = ['source ./shrc', 'mv %s config' % self.configs[environ.name]] - self.executable_opts = ['--config=%s' % self.configs[environ.name], - '--platform NVIDIA', - '--tune=base', - '--device GPU'] + self.benchmarks - self.reference = { - 'dom:gpu': self.refs[environ.name], - 'daint:gpu': self.refs[environ.name] - } - - super().setup(partition, environ, **job_opts) - # The job launcher has to be changed since the `runspec` - # script is not used with srun. - self.job.launcher = getlauncher('local')() - - @sn.sanity_function - def extract_average(self, ofile, bench_name): - runs = sn.extractall(r'Success.*%s.*runtime=(?P[0-9.]+)' - % bench_name, ofile, 'rt', float) - return sum(runs)/sn.count(runs) From 58def6cf292eba82a269d95ba1592dc84edfcab3 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Wed, 9 Jan 2019 16:00:43 +0100 Subject: [PATCH 14/17] pep8 2nd iteration --- cscs-checks/microbenchmarks/spec-accel/spec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cscs-checks/microbenchmarks/spec-accel/spec.py b/cscs-checks/microbenchmarks/spec-accel/spec.py index a3360639bc..76429a654d 100644 --- a/cscs-checks/microbenchmarks/spec-accel/spec.py +++ b/cscs-checks/microbenchmarks/spec-accel/spec.py @@ -56,7 +56,7 @@ def __init__(self, prg_envs): def setup(self, partition, environ, **job_opts): self.pre_run = ['source ./shrc', 'mv %s config' % - self.configs[environ.name]] + self.configs[environ.name]] self.executable_opts = ['--config=%s' % self.configs[environ.name], '--platform NVIDIA', '--tune=base', @@ -74,7 +74,7 @@ def setup(self, partition, environ, **job_opts): @sn.sanity_function def extract_average(self, ofile, bench_name): runs = sn.extractall(r'Success.*%s.*runtime=(?P[0-9.]+)' - % bench_name, ofile, 'rt', float) + % bench_name, ofile, 'rt', float) return sum(runs)/sn.count(runs) From 313055bb0450095fa2d0ac12b0548cc06c0dcf74 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Mon, 14 Jan 2019 15:44:37 +0100 Subject: [PATCH 15/17] improve formatting --- .../microbenchmarks/spec-accel/spec.py | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/cscs-checks/microbenchmarks/spec-accel/spec.py b/cscs-checks/microbenchmarks/spec-accel/spec.py index 76429a654d..1605a8b3f6 100644 --- a/cscs-checks/microbenchmarks/spec-accel/spec.py +++ b/cscs-checks/microbenchmarks/spec-accel/spec.py @@ -31,12 +31,12 @@ def __init__(self, prg_envs): self.refs = { env: {bench_name: (rt, None, 0.1, 'Seconds') for (bench_name, rt) in - zip(self.benchmarks, self.runtimes[env])} + zip(self.benchmarks, self.exec_times[env])} for env in self.valid_prog_environs } - self.num_tasks = 12 - self.num_tasks_per_node = 12 + self.num_tasks = 1 + self.num_tasks_per_node = 1 self.time_limit = (0, 30, 0) self.executable = 'runspec' @@ -46,7 +46,9 @@ def __init__(self, prg_envs): r'Success.*%s' % bn, outfile) for bn in self.benchmarks]) self.perf_patterns = { - bench_name: self.extract_average(outfile, bench_name) + bench_name: sn.avg(sn.extractall( + r'Success.*%s.*runtime=(?P[0-9.]+)' % bench_name, + outfile, 'rt', float)) for bench_name in self.benchmarks } @@ -71,12 +73,6 @@ def setup(self, partition, environ, **job_opts): # script is not used with srun. self.job.launcher = getlauncher('local')() - @sn.sanity_function - def extract_average(self, ofile, bench_name): - runs = sn.extractall(r'Success.*%s.*runtime=(?P[0-9.]+)' - % bench_name, ofile, 'rt', float) - return sum(runs)/sn.count(runs) - @rfm.required_version('>=2.16-dev0') @rfm.simple_test @@ -90,7 +86,7 @@ def __init__(self): 'lavamd', 'cfd', 'nw', 'hotspot', 'lud', 'ge', 'srad', 'heartwall', 'bplustree'] - self.runtimes = { + self.exec_times = { 'PrgEnv-gnu': [10.7, 13.5, 17.0, 10.9, 11.91, 27.8, 7.0, 23.1, 10.8, 38.4, 8.7, 24.4, 16.2, 15.7, 15.6, 11.1, 20.0, 41.9, 26.2], @@ -113,7 +109,7 @@ def __init__(self): 'clvrleaf', 'cg', 'seismic', 'sp', 'csp', 'miniGhost', 'ilbdc', 'swim', 'bt'] - self.runtimes = { + self.exec_times = { 'PrgEnv-cray': [18, 26, 121, 20, 73, 59, 41, 50, 71, 34, 72, 41, 34, 378] } From 04bb6efda4241ad5c43a7e60d01c354db734f329 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Tue, 15 Jan 2019 15:45:00 +0100 Subject: [PATCH 16/17] Fix identantion issue --- cscs-checks/microbenchmarks/spec-accel/spec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cscs-checks/microbenchmarks/spec-accel/spec.py b/cscs-checks/microbenchmarks/spec-accel/spec.py index 1605a8b3f6..7271da426a 100644 --- a/cscs-checks/microbenchmarks/spec-accel/spec.py +++ b/cscs-checks/microbenchmarks/spec-accel/spec.py @@ -47,8 +47,8 @@ def __init__(self, prg_envs): self.perf_patterns = { bench_name: sn.avg(sn.extractall( - r'Success.*%s.*runtime=(?P[0-9.]+)' % bench_name, - outfile, 'rt', float)) + r'Success.*%s.*runtime=(?P[0-9.]+)' % bench_name, + outfile, 'rt', float)) for bench_name in self.benchmarks } From cf77dda2c314cc294fd0e75956488ba869b18266 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Tue, 15 Jan 2019 16:18:29 +0100 Subject: [PATCH 17/17] Fix formatting --- cscs-checks/microbenchmarks/spec-accel/spec.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cscs-checks/microbenchmarks/spec-accel/spec.py b/cscs-checks/microbenchmarks/spec-accel/spec.py index 7271da426a..2fa4f68edd 100644 --- a/cscs-checks/microbenchmarks/spec-accel/spec.py +++ b/cscs-checks/microbenchmarks/spec-accel/spec.py @@ -56,7 +56,6 @@ def __init__(self, prg_envs): self.tags = {'diagnostic'} def setup(self, partition, environ, **job_opts): - self.pre_run = ['source ./shrc', 'mv %s config' % self.configs[environ.name]] self.executable_opts = ['--config=%s' % self.configs[environ.name],