|
3 | 3 | # |
4 | 4 | # SPDX-License-Identifier: BSD-3-Clause |
5 | 5 |
|
| 6 | +import os |
| 7 | + |
6 | 8 | import reframe as rfm |
7 | 9 | import reframe.utility.sanity as sn |
8 | 10 |
|
@@ -31,41 +33,35 @@ def __init__(self): |
31 | 33 | r'(?P<temp>\S*) Celsius') |
32 | 34 | self.perf_patterns = { |
33 | 35 | 'perf': sn.min(sn.extractall(patt, self.stdout, 'perf', float)), |
| 36 | + 'temp': sn.max(sn.extractall(patt, self.stdout, 'temp', float)), |
34 | 37 | } |
35 | 38 |
|
36 | 39 | self.reference = { |
37 | 40 | 'dom:gpu': { |
38 | 41 | 'perf': (4115, -0.10, None, 'Gflop/s'), |
39 | | - 'max_temp': (0, None, None, 'Celsius') |
40 | 42 | }, |
41 | 43 | 'daint:gpu': { |
42 | 44 | 'perf': (4115, -0.10, None, 'Gflop/s'), |
43 | | - 'max_temp': (0, None, None, 'Celsius') |
44 | 45 | }, |
45 | 46 | 'arolla:cn': { |
46 | 47 | 'perf': (5861, -0.10, None, 'Gflop/s'), |
47 | | - 'max_temp': (0, None, None, 'Celsius') |
48 | 48 | }, |
49 | 49 | 'tsa:cn': { |
50 | 50 | 'perf': (5861, -0.10, None, 'Gflop/s'), |
51 | | - 'max_temp': (0, None, None, 'Celsius') |
52 | 51 | }, |
53 | 52 | 'ault:amda100': { |
54 | 53 | 'perf': (15000, -0.10, None, 'Gflop/s'), |
55 | | - 'max_temp': (0, None, None, 'Celsius') |
56 | 54 | }, |
57 | 55 | 'ault:amdv100': { |
58 | 56 | 'perf': (5500, -0.10, None, 'Gflop/s'), |
59 | | - 'max_temp': (0, None, None, 'Celsius') |
60 | 57 | }, |
61 | 58 | 'ault:intelv100': { |
62 | 59 | 'perf': (5500, -0.10, None, 'Gflop/s'), |
63 | | - 'max_temp': (0, None, None, 'Celsius') |
64 | 60 | }, |
65 | 61 | 'ault:amdvega': { |
66 | 62 | 'perf': (3450, -0.10, None, 'Gflop/s'), |
67 | | - 'max_temp': (0, None, None, 'Celsius') |
68 | 63 | }, |
| 64 | + '*': {'temp': (0, None, None, 'degC')} |
69 | 65 | } |
70 | 66 |
|
71 | 67 | self.maintainers = ['AJ', 'TM'] |
@@ -133,3 +129,18 @@ def set_gpus_per_node(self): |
133 | 129 | self.num_gpus_per_node = 3 |
134 | 130 | else: |
135 | 131 | self.num_gpus_per_node = 1 |
| 132 | + |
| 133 | + @rfm.run_before('performance') |
| 134 | + def report_nid_with_smallest_flops(self): |
| 135 | + regex = r'\[(\S+)\] GPU\s+\d\(OK\): (\d+) GF/s' |
| 136 | + rptf = os.path.join(self.stagedir, sn.evaluate(self.stdout)) |
| 137 | + self.nids = sn.extractall(regex, rptf, 1) |
| 138 | + self.flops = sn.extractall(regex, rptf, 2, float) |
| 139 | + |
| 140 | + # Find index of smallest flops and update reference dictionary to |
| 141 | + # include our patched units |
| 142 | + index = self.flops.evaluate().index(min(self.flops)) |
| 143 | + unit = f'GF/s ({self.nids[index]})' |
| 144 | + for key, ref in self.reference.items(): |
| 145 | + if not key.endswith(':temp'): |
| 146 | + self.reference[key] = (*ref[:3], unit) |
0 commit comments