-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathbenchmark_onnode_test4_gcc.py
96 lines (78 loc) · 3.68 KB
/
benchmark_onnode_test4_gcc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import reframe as rfm
import reframe.utility.sanity as sn
import reframe.core.launchers as rcl
import hackathon as hack
@rfm.simple_test
class MiniGMGOnNodeTest4GCC(hack.HackathonBase): ###################################################
# Where to run the binaries 'aws:c6gn' on Arm or 'aws:c5n' on Intel
valid_systems = ['aws:c6gn']
# valid_prog_environs = ['*']
# Logging Variables
log_team_name = 'Wolfpack'
log_app_name = 'miniGMG'
log_test_name = 'minigmg_on_node_test4_gcc' ############################################
# Define Execution
# Binary to run
executable = 'run.miniGMG'
# Command line options to pass
executable_opts = ['6 12 12 12 1 1 1']#, '> miniGMG.out'] ####################################
# Where the output is written to
# logfile = 'miniGMG.out'
# # Store the output file (used for validation later)
# keep_files = [logfile]
# Parameters - Compilers - Defined as their Spack specs (use spec or hash)
spec = parameter([ #####################################################################
'minigmg@local%[email protected]',
# 'minigmg@local%[email protected]',
# 'minigmg@local%[email protected]',
# 'minigmg@qidong%[email protected]',
])
# Parameters - MPI / Threads - Used for scaling studies
parallelism = parameter([ #################################################################
{ 'nodes' : 1, 'mpi' : 1, 'omp' : 4},
{ 'nodes' : 1, 'mpi' : 1, 'omp' : 8},
{ 'nodes' : 1, 'mpi' : 1, 'omp' : 16},
{ 'nodes' : 1, 'mpi' : 1, 'omp' : 32},
{ 'nodes' : 1, 'mpi' : 1, 'omp' : 64},
])
@run_before('run')
def prepare_job(self):
self.job.launcher = rcl.LauncherWrapper(self.job.launcher, 'time -p')
self.job.launcher.options = ['--exclusive']
# @run_before('run')
# def set_profiler(self):
# self.proffile = 'profile.map'
# self.keep_files = [self.proffile]
# # self.modules.append('[email protected]')
# self.job.launcher = rcl.LauncherWrapper(self.job.launcher, 'map', ['--profile', '--output='+self.proffile])
# @run_before('run')
# def perf_libs_tools(self):
# apl_dir = 'plt_out'
# self.prerun_cmds.append('mkdir {0}'.format(apl_dir))
# self.variables['ARMPL_SUMMARY_FILEROOT'] = '$PWD/{0}/'.format(apl_dir)
# self.keep_files = [apl_dir]
# self.job.launcher.options = ['--export=ALL,LD_PRELOAD=libarmpl_mp-summarylog.so']
# apl_file = '{0}_{1}_apl_summary.log'.format(self.log_app_name, self.log_test_name)
# self.postrun_cmds.append('process_summary.py {0}/*.apl > {1}'.format(apl_dir, apl_file))
# self.keep_files.append(apl_file)
# /scratch/opt/spack/linux-amzn2-graviton2/gcc-10.3.0/perf-libs-tools-git-master-ja4rifwkuuj4nw2c7usikdlomimo6yxm/lib/
@sn.sanity_function
def get_time_in_sec_list(self, min_list, sec_list):
return list(x * 60 + y
for x, y in sn.zip(min_list, sec_list))
# Code validation
@run_before('sanity')
def set_sanity_patterns(self):
sol_regex = r'v-cycle=(\S+),\s+norm=(\S+)\s+\((\S+)\)\ndone'
norm_list = sn.extractall(sol_regex, self.stdout, 3, float)
self.sanity_patterns = sn.assert_lt(sn.max(norm_list), 1e-15)
self.reference = {
'*': {'v-cycles Time': (0, None, None, 's'),
'Total Time': (0, None, None, 's'),}
}
perf_regex_real = r'real\s+(\S+)'
real = sn.extractsingle(perf_regex_real, self.stderr, 1, float)
self.perf_patterns = {
# 'v-cycles Time': sn.extractsingle(perf_regex_vcycles, self.stdout, 1, float),
'Total Time': real,
}