-
Notifications
You must be signed in to change notification settings - Fork 117
[test] Add tests for SPEC-ACCEL benchmarks #618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b015deb
first incomplete test
sekelle 4c52039
fixed sourcesdir
sekelle 389e090
updated resourcesdir
sekelle c8930c9
added perf reference data
sekelle 2d473f2
need upper threshold since measuring runtime
sekelle 43739ea
extension to PrgEnv-cray
sekelle eed5aef
removed old comment
sekelle 8779e23
moved openacc to different file temporarily
sekelle 209c269
moved spec-accel to microbenchmarks
sekelle 813e9df
formatting corrections
sekelle 229e522
corrected reference times for openacc
sekelle 5731237
added openacc benchmarks
sekelle 9aa4f1f
pep8 cosmetics
sekelle 58def6c
pep8 2nd iteration
sekelle 313055b
improve formatting
sekelle 04bb6ef
Fix identantion issue
cf77dda
Fix formatting
0b4b60e
Merge branch 'master' into checks/spec-accel
vkarak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| import os | ||
|
|
||
| import reframe as rfm | ||
| import reframe.utility.sanity as sn | ||
| from reframe.core.launchers.registry import getlauncher | ||
|
|
||
|
|
||
| class SpecAccelCheckBase(rfm.RegressionTest): | ||
| def __init__(self, prg_envs): | ||
| super().__init__() | ||
| self.valid_systems = ['daint:gpu', 'dom:gpu'] | ||
| self.valid_prog_environs = prg_envs | ||
| self.modules = ['craype-accel-nvidia60'] | ||
|
|
||
| self.configs = { | ||
| 'PrgEnv-gnu': 'cscs-gnu', | ||
| '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.refs = { | ||
| env: {bench_name: (rt, None, 0.1, 'Seconds') | ||
| for (bench_name, rt) in | ||
| zip(self.benchmarks, self.exec_times[env])} | ||
| for env in self.valid_prog_environs | ||
| } | ||
|
|
||
| self.num_tasks = 1 | ||
| self.num_tasks_per_node = 1 | ||
| 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: sn.avg(sn.extractall( | ||
| r'Success.*%s.*runtime=(?P<rt>[0-9.]+)' % bench_name, | ||
| outfile, 'rt', float)) | ||
| 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')() | ||
|
|
||
|
|
||
| @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.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], | ||
| '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.exec_times = { | ||
| 'PrgEnv-cray': [18, 26, 121, 20, 73, 59, 41, | ||
| 50, 71, 34, 72, 41, 34, 378] | ||
| } | ||
|
|
||
| super().__init__(valid_prog_environs) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| ext = compsys | ||
| output_format = asc | ||
| #table = 0 | ||
| teeout = no | ||
| teerunout = yes | ||
| tune = base | ||
|
|
||
| ###################################################################### | ||
| # Compiler selection, versions, and dates. | ||
| # | ||
| # sw_compiler<xx> = 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. | ||
| ####################################################################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| ext = compsys | ||
| output_format = asc | ||
| #table = 0 | ||
| teeout = no | ||
| teerunout = yes | ||
| tune = base | ||
|
|
||
| ###################################################################### | ||
| # Compiler selection, versions, and dates. | ||
| # | ||
| # sw_compiler<xx> = 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 = -O3 | ||
| LIBS = -lOpenCL | ||
| #EXTRA_LIBS = | ||
| EXTRA_CXXFLAGS = -std=c++03 | ||
| #EXTRA_CFLAGS = | ||
|
|
||
| ####################################################################### | ||
| # End of user-supplied information. | ||
| ####################################################################### |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.