Skip to content

Commit 37a644a

Browse files
author
Vasileios Karakasis
authored
Merge pull request #1969 from jjotero/feat/hook-from-meta
[feat] Make hook-related machinery available as class directives
2 parents a38c951 + 89a2069 commit 37a644a

File tree

96 files changed

+736
-462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+736
-462
lines changed

cscs-checks/apps/cp2k/cp2k_check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ def __init__(self, scale, variant):
123123
self.reference = references[variant][scale]
124124
self.tags |= {'maintenance' if variant == 'maint' else 'production'}
125125

126-
@rfm.run_before('run')
126+
@run_before('run')
127127
def set_task_distribution(self):
128128
self.job.options = ['--distribution=block:block']
129129

130-
@rfm.run_before('run')
130+
@run_before('run')
131131
def set_cpu_binding(self):
132132
self.job.launcher.options = ['--cpu-bind=cores']
133133

cscs-checks/apps/greasy/greasy_check.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ def __init__(self, variant, partition, num_greasy_tasks, nworkes_per_node,
9090
self.maintainers = ['VH', 'SK']
9191
self.tags = {'production'}
9292

93-
@rfm.run_before('run')
93+
@run_before('run')
9494
def generate_tasks_file(self):
9595
with open(os.path.join(self.stagedir, self.tasks_file), 'w') as fp:
9696
for i in range(self.num_greasy_tasks):
9797
fp.write(f'./{self.executable} output-{i}\n')
9898

99-
@rfm.run_before('run')
99+
@run_before('run')
100100
def daint_dom_gpu_specific_workaround(self):
101101
if self.current_partition.fullname in ['daint:gpu', 'dom:gpu']:
102102
self.variables['CRAY_CUDA_MPS'] = '1'
@@ -121,13 +121,13 @@ def daint_dom_gpu_specific_workaround(self):
121121
}
122122
}
123123

124-
@rfm.run_before('run')
124+
@run_before('run')
125125
def change_executable_name(self):
126126
# After compiling the code we can change the executable to be
127127
# the greasy one
128128
self.executable = 'greasy'
129129

130-
@rfm.run_before('run')
130+
@run_before('run')
131131
def set_launcher(self):
132132
# The job launcher has to be changed to local since greasy
133133
# make calls to srun

cscs-checks/apps/jupyter/check_ipcmagic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self):
5858
self.maintainers = ['RS', 'TR']
5959
self.tags = {'production'}
6060

61-
@rfm.run_before('run')
61+
@run_before('run')
6262
def prepare_run(self):
6363
# Change the job launcher since `ipython`
6464
# needs to be launched without `srun`.

cscs-checks/apps/paraview/paraview_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(self):
2626
self.maintainers = ['JF', 'TM']
2727
self.tags = {'scs', 'production'}
2828

29-
@rfm.run_before('sanity')
29+
@run_before('sanity')
3030
def set_sanity(self):
3131
if self.current_partition.name == 'mc':
3232
self.sanity_patterns = sn.all([

cscs-checks/apps/quantumespresso/quantumespresso_check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ def __init__(self):
123123
'maintenance' if self.variant == 'maint' else 'production'
124124
}
125125

126-
@rfm.run_before('run')
126+
@run_before('run')
127127
def set_task_distribution(self):
128128
self.job.options = ['--distribution=block:block']
129129

130-
@rfm.run_before('run')
130+
@run_before('run')
131131
def set_cpu_binding(self):
132132
self.job.launcher.options = ['--cpu-bind=cores']
133133

cscs-checks/apps/spark/spark_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self):
3030
self.maintainers = ['TM', 'RS']
3131
self.tags = {'production'}
3232

33-
@rfm.run_before('run')
33+
@run_before('run')
3434
def prepare_run(self):
3535
if self.current_partition.fullname in ['daint:gpu', 'dom:gpu']:
3636
num_workers = 12

cscs-checks/apps/vasp/vasp_check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ def __init__(self, variant):
8282
self.reference = references[variant]
8383
self.tags |= {'maintenance' if variant == 'maint' else 'production'}
8484

85-
@rfm.run_before('run')
85+
@run_before('run')
8686
def set_task_distribution(self):
8787
self.job.options = ['--distribution=block:block']
8888

89-
@rfm.run_before('run')
89+
@run_before('run')
9090
def set_cpu_binding(self):
9191
self.job.launcher.options = ['--cpu-bind=cores']
9292

cscs-checks/compile/haswell_fma_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __init__(self):
3131
self.maintainers = ['AJ', 'CB']
3232
self.tags = {'production', 'craype'}
3333

34-
@rfm.run_before('compile')
34+
@run_before('compile')
3535
def setflags(self):
3636
if self.current_environ.name == 'PrgEnv-cray':
3737
self.build_system.cflags = ['-Ofast', '-S']

cscs-checks/compile/libsci_resolve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, module_name):
4040
}
4141
self.postbuild_cmds = [f'readelf -d {self.executable}']
4242

43-
@rfm.run_before('sanity')
43+
@run_before('sanity')
4444
def set_sanity(self):
4545
# here lib_name is in the format: libsci_acc_gnu_48_nv35.so or
4646
# libsci_acc_cray_nv35.so

cscs-checks/libraries/gridtools/gridtools_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def __init__(self, variant):
131131
self.tags = {'scs', 'benchmark'}
132132
self.maintainers = ['CB']
133133

134-
@rfm.require_deps
134+
@require_deps
135135
def set_executable(self, GridToolsCPUBuildCheck):
136136
self.executable = os.path.join(
137137
GridToolsCPUBuildCheck().stagedir,
@@ -176,7 +176,7 @@ def __init__(self, variant):
176176
self.tags = {'scs', 'benchmark'}
177177
self.maintainers = ['CB']
178178

179-
@rfm.require_deps
179+
@require_deps
180180
def set_executable(self, GridToolsGPUBuildCheck):
181181
self.executable = os.path.join(
182182
GridToolsGPUBuildCheck().stagedir,

0 commit comments

Comments
 (0)