def test_partition(self): p = rt.runtime().system.partition('gpu') self.assertEqual(2, sn.count(filter(filters.have_partition([p]), self.checks))) p = rt.runtime().system.partition('login') self.assertEqual(0, sn.count(filter(filters.have_partition([p]), self.checks)))
def test_have_tags(self): self.assertEqual(1, sn.count(filter(filters.have_tag(['a', 'c']), self.checks))) self.assertEqual(0, sn.count(filter(filters.have_tag(['p', 'q']), self.checks))) self.assertEqual(2, sn.count(filter(filters.have_tag(['z']), self.checks)))
def test_have_prgenv(self): self.assertEqual(1, sn.count(filter( filters.have_prgenv(['env1', 'env2']), self.checks))) self.assertEqual(2, sn.count(filter(filters.have_prgenv(['env3']), self.checks))) self.assertEqual(1, sn.count(filter(filters.have_prgenv(['env4']), self.checks))) self.assertEqual(0, sn.count(filter( filters.have_prgenv(['env1', 'env3']), self.checks)))
def test_have_name(self): self.assertEqual(1, sn.count(filter(filters.have_name('check1'), self.checks))) self.assertEqual(1, sn.count(filter(filters.have_name('check2'), self.checks))) self.assertEqual(1, sn.count(filter(filters.have_name('check3'), self.checks))) self.assertEqual(0, sn.count(filter(filters.have_name('check4'), self.checks)))
def assert_count_gpus(self): return sn.all([ sn.assert_eq( sn.count(sn.findall(r'\[\S+\] Found \d+ gpu\(s\)', self.stdout)), self.num_tasks_assigned), sn.assert_eq( sn.count( sn.findall( r'\[\S+\] \[gpu \d+\] Kernel launch ' r'latency: \S+ us', self.stdout)), self.num_tasks_assigned * self.num_gpus_per_node) ])
def assert_count_gpus(self): '''Assert GPU count is consistent.''' return sn.all([ sn.assert_eq( sn.count(sn.findall(r'\[\S+\] Found \d+ gpu\(s\)', self.stdout)), sn.getattr(self.job, 'num_tasks')), sn.assert_eq( sn.count( sn.findall( r'\[\S+\] \[gpu \d+\] Kernel launch ' r'latency: \S+ us', self.stdout)), self.job.num_tasks * self.num_gpus_per_node) ])
def test_sanity_multiple_patterns(dummytest, sanity_file, dummy_gpu_exec_ctx): sanity_file.write_text('result1 = success\n' 'result2 = success\n') # Simulate a pure sanity test; reset the perf_patterns dummytest.perf_patterns = None dummytest.sanity_patterns = sn.assert_eq( sn.count(sn.findall(r'result\d = success', sanity_file)), 2) _run_sanity(dummytest, *dummy_gpu_exec_ctx, skip_perf=True) # Require more patterns to be present dummytest.sanity_patterns = sn.assert_eq( sn.count(sn.findall(r'result\d = success', sanity_file)), 3) with pytest.raises(SanityError): _run_sanity(dummytest, *dummy_gpu_exec_ctx, skip_perf=True)
def __init__(self): super().__init__() self.valid_systems = ['dom:gpu', 'daint:gpu'] self.valid_prog_environs = ['PrgEnv-pgi'] self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'RRTMGP') self.tags = {'external-resources'} self.prebuild_cmd = ['cp build/Makefile.conf.dom build/Makefile.conf'] self.executable = 'python' self.executable_opts = [ 'util/scripts/run_tests.py', '--verbose', '--rel_diff_cut 1e-13', '--root ..', '--test ${INIFILE}_ncol-${NCOL}.ini' ] self.pre_run = [ 'pwd', 'module load netcdf-python/1.4.1-CrayGNU-19.06-python2', 'cd test' ] self.modules = ['craype-accel-nvidia60', 'cray-netcdf'] self.variables = {'NCOL': '500', 'INIFILE': 'openacc-solvers-lw'} values = sn.extractall(r'.*\[\S+, (\S+)\]', self.stdout, 1, float) self.sanity_patterns = sn.all( sn.chain( [sn.assert_gt(sn.count(values), 0, msg='regex not matched')], sn.map(lambda x: sn.assert_lt(x, 1e-5), values))) self.maintainers = ['WS', 'VK']
def validate_test(self): numbers = sn.extractall(r'Random: (?P<number>\S+)', self.stdout, 'number', float) return sn.all([ sn.assert_eq(sn.count(numbers), 100), sn.all(sn.map(lambda x: sn.assert_bounded(x, 90, 100), numbers)) ])
def set_sanity_patterns(self): numbers = sn.extractall(r'Random: (?P<number>\S+)', self.stdout, 'number', float) self.sanity_patterns = sn.all([ sn.assert_eq(sn.count(numbers), 100), sn.all(sn.map(lambda x: sn.assert_bounded(x, 90, 100), numbers)) ])
def program_begin_count(obj): '''Reports the number of ``PROGRAM_BEGIN`` in the otf2 file (trace validation) ''' pg_begin_count = sn.count(sn.findall(r'^(?P<wl>PROGRAM_BEGIN)\s+', obj.rpt)) return pg_begin_count
def setup(self, partition, environ, **job_opts): result = sn.findall( r'Hello World from thread \s*(\d+) out ' r'of \s*(\d+) from process \s*(\d+) out of ' r'\s*(\d+)', self.stdout) self.sanity_patterns = sn.all( sn.chain( [ sn.assert_eq(sn.count(result), self.num_tasks * self.num_cpus_per_task) ], sn.map( lambda x: sn.assert_lt(int(x.group(1)), int(x.group(2))), result), sn.map( lambda x: sn.assert_lt(int(x.group(3)), int(x.group(4))), result), sn.map( lambda x: sn.assert_lt(int(x.group(1)), self. num_cpus_per_task), result), sn.map( lambda x: sn.assert_eq(int(x.group(2)), self. num_cpus_per_task), result), sn.map(lambda x: sn.assert_lt(int(x.group(3)), self.num_tasks), result), sn.map(lambda x: sn.assert_eq(int(x.group(4)), self.num_tasks), result), )) self.perf_patterns = { 'compilation_time': sn.getattr(self, 'compilation_time_seconds') } self.reference = {'*': {'compilation_time': (60, None, 0.1)}} super().setup(partition, environ, **job_opts)
def __init__(self): super().__init__() self.valid_systems = ['daint:gpu', 'dom:gpu'] self.valid_prog_environs = ['PrgEnv-cray'] self.descr = 'Flexible Cuda Memtest' self.maintainers = ['TM', 'VK'] self.num_tasks_per_node = 1 self.num_tasks = 0 self.num_gpus_per_node = 1 self.modules = ['cudatoolkit'] self.sourcesdir = None src_url = ('https://downloads.sourceforge.net/project/cudagpumemtest/' 'cuda_memtest-1.2.3.tar.gz') self.prebuild_cmd = [ 'wget %s' % src_url, 'tar -xzf cuda_memtest-1.2.3.tar.gz --strip-components=1' ] self.executable = 'cuda_memtest_sm20' self.executable_opts = ['--disable_test', '6', '--num_passes', '1'] valid_test_ids = {i for i in range(11) if i not in {6, 9}} assert_finished_tests = [ sn.assert_eq( sn.count(sn.findall('Test%s finished' % test_id, self.stdout)), self.num_tasks_assigned) for test_id in valid_test_ids ] self.sanity_patterns = sn.all([ *assert_finished_tests, sn.assert_not_found('(?i)ERROR', self.stdout), sn.assert_not_found('(?i)ERROR', self.stderr)])
def __init__(self): self.sourcepath = 'strides.cpp' self.build_system = 'SingleSource' self.valid_systems = [ 'cannon:local', 'cannon:local-gpu', 'cannon:gpu_test', 'cannon:test', 'fasse:fasse', 'test:rc-testing' ] self.valid_prog_environs = ['builtin', 'gnu', 'gpu', 'intel'] self.build_system.cxxflags = ['-std=c++11', '-lpthread'] self.num_tasks = 1 self.num_tasks_per_node = 1 self.sanity_patterns = sn.assert_eq( sn.count(sn.findall(r'bandwidth', self.stdout)), self.num_tasks_assigned) self.perf_patterns = { 'bandwidth': sn.extractsingle(r'bandwidth: (?P<bw>\S+) GB/s', self.stdout, 'bw', float) } self.system_num_cpus = { 'cannon:local': 48, 'cannon:local-gpu': 32, 'cannon:gpu_test': 16, 'cannon:test': 48, 'fasse:fasse': 48, 'test:rc-testing': 36, '*': 32, }
def count_successful_burns(self): '''Set the sanity patterns to count the number of successful burns.''' return sn.assert_eq( sn.count( sn.findall(r'^\s*\[[^\]]*\]\s*GPU\s*\d+\(OK\)', self.stdout)), self.num_tasks_assigned)
def __init__(self): self.valid_prog_environs = ['builtin'] self.executable = 'cp2k.psmp' self.executable_opts = ['H2O-256.inp'] energy = sn.extractsingle( r'\s+ENERGY\| Total FORCE_EVAL \( QS \) ' r'energy \(a\.u\.\):\s+(?P<energy>\S+)', self.stdout, 'energy', float, item=-1) energy_reference = -4404.2323 energy_diff = sn.abs(energy - energy_reference) self.sanity_patterns = sn.all([ sn.assert_found(r'PROGRAM STOPPED IN', self.stdout), sn.assert_eq( sn.count( sn.extractall(r'(?P<step_count>STEP NUM)', self.stdout, 'step_count')), 10), sn.assert_lt(energy_diff, 1e-4) ]) self.perf_patterns = { 'time': sn.extractsingle(r'^ CP2K(\s+[\d\.]+){4}\s+(?P<perf>\S+)', self.stdout, 'perf', float) } self.maintainers = ['LM'] self.tags = {'scs'} self.strict_check = False self.modules = ['CP2K'] self.extra_resources = {'switches': {'num_switches': 1}}
def __init__(self, kernel_version): super().__init__() self.sourcepath = 'shmem.cu' self.build_system = 'SingleSource' self.valid_systems = ['daint:gpu', 'dom:gpu'] self.valid_prog_environs = ['PrgEnv-gnu'] self.num_tasks = 0 self.num_tasks_per_node = 1 self.sanity_patterns = sn.assert_eq( sn.count(sn.findall(r'Bandwidth', self.stdout)), self.num_tasks_assigned * 2) self.perf_patterns = { 'bandwidth': sn.extractsingle( r'Bandwidth\(double\) (?P<bw>\S+) GB/s', self.stdout, 'bw', float) } # theoretical limit: # 8 [B/cycle] * 1.328 [GHz] * 16 [bankwidth] * 56 [SM] = 9520 GB/s self.reference = { 'dom:gpu': { 'bandwidth': (8850, -0.01, 1. - 9520/8850, 'GB/s') }, 'daint:gpu': { 'bandwidth': (8850, -0.01, 1. - 9520/8850, 'GB/s') }, } self.maintainers = ['SK'] self.tags = {'benchmark', 'diagnostic'}
def __init__(self): self.sourcepath = 'shmem.cu' self.build_system = 'SingleSource' self.valid_systems = ['daint:gpu', 'dom:gpu', 'tiger:gpu'] self.valid_prog_environs = ['PrgEnv-gnu'] self.num_tasks = 0 self.num_tasks_per_node = 1 self.num_gpus_per_node = 1 if self.current_system.name in {'daint', 'dom', 'tiger'}: self.modules = ['craype-accel-nvidia60'] self.sanity_patterns = sn.assert_eq( sn.count(sn.findall(r'Bandwidth', self.stdout)), self.num_tasks_assigned * 2) self.perf_patterns = { 'bandwidth': sn.extractsingle(r'Bandwidth\(double\) (?P<bw>\S+) GB/s', self.stdout, 'bw', float) } self.reference = { # theoretical limit for P100: # 8 [B/cycle] * 1.328 [GHz] * 16 [bankwidth] * 56 [SM] = 9520 GB/s 'dom:gpu': { 'bandwidth': (8850, -0.01, 9520 / 8850. - 1, 'GB/s') }, 'daint:gpu': { 'bandwidth': (8850, -0.01, 9520 / 8850. - 1, 'GB/s') } } self.maintainers = ['SK'] self.tags = {'benchmark', 'diagnostic', 'craype'}
def __init__(self): self.valid_systems = ['daint:gpu', 'dom:gpu', 'tiger:gpu'] self.valid_prog_environs = ['PrgEnv-cray'] self.descr = 'Flexible CUDA Memtest' self.maintainers = ['TM', 'SK'] self.num_tasks_per_node = 1 self.num_tasks = 0 self.num_gpus_per_node = 1 self.modules = ['cudatoolkit'] src_url = ('https://downloads.sourceforge.net/project/cudagpumemtest/' 'cuda_memtest-1.2.3.tar.gz') self.prebuild_cmd = [ 'wget %s' % src_url, 'tar -xzf cuda_memtest-1.2.3.tar.gz', 'cd cuda_memtest-1.2.3', 'patch -p1 < ../cuda_memtest-1.2.3.patch' ] self.build_system = 'Make' self.executable = './cuda_memtest-1.2.3/cuda_memtest' self.executable_opts = ['--disable_test', '6', '--num_passes', '1'] valid_test_ids = {i for i in range(11) if i not in {6, 9}} assert_finished_tests = [ sn.assert_eq( sn.count(sn.findall('Test%s finished' % test_id, self.stdout)), self.num_tasks_assigned) for test_id in valid_test_ids ] self.sanity_patterns = sn.all([ *assert_finished_tests, sn.assert_not_found('(?i)ERROR', self.stdout), sn.assert_not_found('(?i)ERROR', self.stderr) ]) self.tags = {'diagnostic', 'ops', 'craype'}
def __init__(self): super().__init__() self.sourcepath = 'strides.cpp' self.build_system = 'SingleSource' self.valid_systems = ['daint:gpu', 'dom:gpu', 'daint:mc', 'dom:mc'] self.valid_prog_environs = ['PrgEnv-gnu'] self.num_tasks = 1 self.num_tasks_per_node = 1 self.sanity_patterns = sn.assert_eq( sn.count(sn.findall(r'bandwidth', self.stdout)), self.num_tasks_assigned) self.perf_patterns = { 'bandwidth': sn.extractsingle(r'bandwidth: (?P<bw>\S+) GB/s', self.stdout, 'bw', float) } self.system_num_cpus = { 'daint:mc': 72, 'daint:gpu': 24, 'dom:mc': 72, 'dom:gpu': 24, } self.maintainers = ['SK'] self.tags = {'benchmark', 'diagnostic'}
def __init__(self): super().__init__() self.descr = ('OpenFOAM-Extend check of interMixingFoam: ' 'dambreak tutorial') self.sanity_patterns = sn.assert_eq( sn.count(sn.findall(r'Air phase volume fraction', self.stdout)), 2944)
def gpu_usage_sanity(self): '''Verify that the jobreport output has sensible numbers. This function asserts that the nodes reported are at least a subset of all nodes used by the gpu burn app. Also, the GPU usage is verified by assuming that in the worst case scenario, the usage is near 100% during the burn, and 0% outside the burn period. Lastly, the GPU usage time for each node is also asserted to be greater or equal than the burn time. ''' # Get set with all nodes patt = r'^\s*\[([^\]]*)\]\s*GPU\s*\d+\(OK\)' full_node_set = set(sn.extractall(patt, self.stdout, 1)) # Parse job report data patt = r'^\s*(\w*)\s*(\d+)\s*%\s*\d+\s*MiB\s*\d+:\d+:(\d+)' self.nodes_reported = sn.extractall(patt, self.stdout, 1) usage = sn.extractall(patt, self.stdout, 2, int) time_reported = sn.extractall(patt, self.stdout, 3, int) return sn.all([ sn.assert_ge(sn.count(self.nodes_reported), 1), set(self.nodes_reported).issubset(full_node_set), sn.all( map(lambda x, y: self.burn_time / x <= y, time_reported, usage)), sn.assert_ge(sn.min(time_reported), self.burn_time) ])
def __init__(self, name, *args, **kwargs): if name is not '': name += '_' super().__init__('{0}{1}runs'.format(name,self.multi_rep), *args, **kwargs) # scale the assumed runtime self.time_limit = (self.time_limit[0]*self.multi_rep+ int((self.time_limit[1]*self.multi_rep)/60), (self.time_limit[1]*self.multi_rep) % 60+ int((self.time_limit[2]*self.multi_rep) /60), (self.time_limit[2]*self.multi_rep) % 60) # check if we got #multi_rep the the sanity patern if hasattr(self, 'multirun_san_pat'): self.sanity_patterns = sn.assert_eq(sn.count( sn.findall(*self.multirun_san_pat)), self.multi_rep) # create the list of result values: first the average and # then all single elements (to be stored) if hasattr(self, 'multirun_perf_pat'): self.perf_patterns = {} for key in list(self.multirun_perf_pat.keys()): self.perf_patterns[key] = sn.avg( sn.extractall(*(self.multirun_perf_pat[key]))) for run in range(0,self.multi_rep): self.perf_patterns[key+"_{}".format(run)] = sn.extractall( *(self.multirun_perf_pat[key]))[run]
def setup(self, partition, environ, **job_opts): if partition.fullname in ['daint:gpu', 'dom:gpu']: self.num_tasks_per_node = 2 self.num_cpus_per_task = 12 else: self.num_tasks_per_node = 4 self.num_cpus_per_task = 18 # since this is a flexible test, we divide the extracted # performance by the number of nodes and compare # against a single reference num_nodes = self.num_tasks_assigned / self.num_tasks_per_node self.perf_patterns = { 'gflops': sn.extractsingle( r'HPCG result is VALID with a GFLOP\/s rating of:\s*' r'(?P<perf>\S+)', self.outfile_lazy, 'perf', float) / num_nodes } self.sanity_patterns = sn.all([ sn.assert_eq(4, sn.count(sn.findall(r'PASSED', self.outfile_lazy))), sn.assert_eq(0, self.num_tasks_assigned % self.num_tasks_per_node) ]) super().setup(partition, environ, **job_opts)
def __init__(self, lang, **kwargs): super().__init__('scorep_mpi_omp_%s' % lang.replace('+', 'p'), os.path.dirname(__file__), **kwargs) self.descr = 'SCORE-P %s check' % lang self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc'] self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-intel', 'PrgEnv-pgi'] self.scorep_modules = { 'PrgEnv-gnu': ['Score-P/3.1-CrayGNU-17.08'], 'PrgEnv-intel': ['Score-P/3.1-CrayIntel-17.08'], 'PrgEnv-pgi': ['Score-P/3.1-CrayPGI-17.08'] } self.prgenv_flags = { 'PrgEnv-cray': '-g -homp', 'PrgEnv-gnu': '-g -fopenmp', 'PrgEnv-intel': '-g -openmp', 'PrgEnv-pgi': '-g -mp' } self.executable = 'jacobi' self.makefile = 'Makefile_scorep_mpi_omp' self.sourcesdir = os.path.join('src', lang) self.num_tasks = 3 self.num_tasks_per_node = 3 self.num_cpus_per_task = 4 self.num_iterations = 200 self.variables = { 'OMP_NUM_THREADS': str(self.num_cpus_per_task), 'ITERATIONS': str(self.num_iterations), 'SCOREP_ENABLE_PROFILING': 'false', 'SCOREP_ENABLE_TRACING': 'true', 'OMP_PROC_BIND': 'true', 'SCOREP_TIMER': 'clock_gettime' } cpu_count = self.num_cpus_per_task * self.num_tasks_per_node self.otf2_file = 'otf2.txt' self.sanity_patterns = sn.all([ sn.assert_found('SUCCESS', self.stdout), sn.assert_eq( sn.count( sn.extractall(r'(?P<line>LEAVE.*omp\s+\S+\s+\@_jacobi)', self.otf2_file, 'line')), 4 * self.num_iterations * cpu_count), sn.assert_not_found('warning|WARNING', self.stderr) ]) self.maintainers = ['MK', 'JG'] self.tags = {'production'} # additional program call in order to generate the tracing output for # the sanity check self.post_run = [ 'otf2-print scorep-*/traces.otf2 > %s' % self.otf2_file ]
def __init__(self): super().__init__() self.sourcepath = 'gemm/' self.executable = './gemm/gemm.openacc' self.num_cpus_per_task = 12 self.variables = {'OMP_NUM_THREADS': str(self.num_cpus_per_task)} self.sanity_patterns = sn.assert_eq( 4, sn.count(sn.extractall('success', self.stdout)))
def test_sanity_multiple_patterns(self): self.output_file.write('result1 = success\n') self.output_file.write('result2 = success\n') self.output_file.close() # Simulate a pure sanity test; invalidate the reference values self.test.reference = {} self.test.sanity_patterns = sn.assert_eq( sn.count(sn.findall(r'result\d = success', self.output_file.name)), 2) self.test.check_sanity() # Require more patterns to be present self.test.sanity_patterns = sn.assert_eq( sn.count(sn.findall(r'result\d = success', self.output_file.name)), 3) self.assertRaises(SanityError, self.test.check_sanity)
def __init__(self): self.valid_systems = ['daint:gpu', 'daint:mc'] self.valid_prog_environs = ['builtin'] self.executable = 'hostname' self.num_tasks = 4 self.num_tasks_per_node = 1 self.sanity_patterns = sn.assert_eq( sn.count(sn.extractall(r'^nid\d+', self.stdout)), 10)
def __init__(self, variant, lang, linkage): self.linkage = linkage self.variables = {'CRAYPE_LINK_TYPE': linkage} self.prgenv_flags = {} self.lang_names = {'c': 'C', 'cpp': 'C++', 'f90': 'Fortran 90'} self.descr = self.lang_names[lang] + ' Hello World' self.sourcepath = 'hello_world' self.build_system = 'SingleSource' self.valid_systems = ['ubelix:compute', 'ubelix:gpu'] self.valid_prog_environs = ['foss', 'intel'] self.compilation_time_seconds = None result = sn.findall( r'Hello World from thread \s*(\d+) out ' r'of \s*(\d+) from process \s*(\d+) out of ' r'\s*(\d+)', self.stdout) num_tasks = sn.getattr(self, 'num_tasks') num_cpus_per_task = sn.getattr(self, 'num_cpus_per_task') def tid(match): return int(match.group(1)) def num_threads(match): return int(match.group(2)) def rank(match): return int(match.group(3)) def num_ranks(match): return int(match.group(4)) self.sanity_patterns = sn.all( sn.chain( [ sn.assert_eq(sn.count(result), num_tasks * num_cpus_per_task) ], sn.map(lambda x: sn.assert_lt(tid(x), num_threads(x)), result), sn.map(lambda x: sn.assert_lt(rank(x), num_ranks(x)), result), sn.map(lambda x: sn.assert_lt(tid(x), num_cpus_per_task), result), sn.map( lambda x: sn.assert_eq(num_threads(x), num_cpus_per_task), result), sn.map(lambda x: sn.assert_lt(rank(x), num_tasks), result), sn.map(lambda x: sn.assert_eq(num_ranks(x), num_tasks), result), )) self.perf_patterns = { 'compilation_time': sn.getattr(self, 'compilation_time_seconds') } self.reference = {'*': {'compilation_time': (60, None, 0.1, 's')}} self.maintainers = ['VH', 'EK'] self.tags = {'production', 'prgenv'}
def __init__(self, arch, scale, variant): self.descr = f'NAMD check ({arch}, {variant})' if self.current_system.name == 'pilatus': self.valid_prog_environs = ['cpeIntel'] else: self.valid_prog_environs = ['builtin'] self.modules = ['NAMD'] # Reset sources dir relative to the SCS apps prefix self.sourcesdir = os.path.join(self.current_system.resourcesdir, 'NAMD', 'prod') self.executable = 'namd2' self.use_multithreading = True self.num_tasks_per_core = 2 if scale == 'small': # On Eiger a no-smp NAMD version is the default if self.current_system.name in ['eiger', 'pilatus']: self.num_tasks = 768 self.num_tasks_per_node = 128 else: self.num_tasks = 6 self.num_tasks_per_node = 1 else: if self.current_system.name in ['eiger', 'pilatus']: self.num_tasks = 2048 self.num_tasks_per_node = 128 else: self.num_tasks = 16 self.num_tasks_per_node = 1 energy = sn.avg( sn.extractall(r'ENERGY:([ \t]+\S+){10}[ \t]+(?P<energy>\S+)', self.stdout, 'energy', float)) energy_reference = -2451359.5 energy_diff = sn.abs(energy - energy_reference) self.sanity_patterns = sn.all([ sn.assert_eq( sn.count( sn.extractall(r'TIMING: (?P<step_num>\S+) CPU:', self.stdout, 'step_num')), 50), sn.assert_lt(energy_diff, 2720) ]) self.perf_patterns = { 'days_ns': sn.avg( sn.extractall( r'Info: Benchmark time: \S+ CPUs \S+ ' r's/step (?P<days_ns>\S+) days/ns \S+ MB memory', self.stdout, 'days_ns', float)) } self.maintainers = ['CB', 'LM'] self.tags = {'scs', 'external-resources'} self.extra_resources = {'switches': {'num_switches': 1}}
def __init__(self, **kwargs): super().__init__('gemm_example', **kwargs) self.sourcepath = 'gemm/' self.executable = './gemm/gemm.openacc' self.num_cpus_per_task = 12 self.variables = {'OMP_NUM_THREADS': str(self.num_cpus_per_task)} self.sanity_patterns = sn.assert_eq( 3, sn.count(sn.extractall('success', self.stdout)) )