Skip to content

Commit 158d156

Browse files
author
Vasileios Karakasis
authored
Merge branch 'master' into patch-1
2 parents f7f2b1c + 37545d2 commit 158d156

28 files changed

+2897
-255
lines changed

cscs-checks/apps/jupyter/check_ipcmagic.py

Lines changed: 7 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -4,86 +4,26 @@
44
# SPDX-License-Identifier: BSD-3-Clause
55

66
import reframe as rfm
7-
import reframe.utility.osext as osext
8-
import reframe.utility.sanity as sn
9-
from reframe.core.backends import getlauncher
7+
8+
from hpctestlib.apps.jupyter.ipcmagic import ipcmagic_check
109

1110

1211
@rfm.simple_test
13-
class IPCMagicCheck(rfm.RunOnlyRegressionTest):
14-
descr = 'Distributed training with TensorFlow using ipyparallel'
12+
class cscs_ipcmagic_check(ipcmagic_check):
1513
valid_systems = ['daint:gpu', 'dom:gpu']
16-
valid_prog_environs = ['PrgEnv-gnu']
17-
modules = [
18-
f'ipcmagic', f'jupyterlab',
19-
f'Horovod/0.21.0-CrayGNU-{osext.cray_cdt_version()}-tf-2.4.0'
20-
]
21-
num_tasks = 2
22-
num_tasks_per_node = 1
23-
executable = 'ipython'
24-
executable_opts = ['tf-hvd-sgd-ipc-tf2.py']
14+
valid_prog_environs = ['builtin']
15+
modules = ['jupyterlab', 'Horovod']
16+
maintainers = ['RS', 'TR']
17+
tags = {'production'}
2518
reference = {
2619
'daint:gpu': {
2720
'slope': (2.0, -0.1, 0.1, 'N/A'),
2821
'offset': (0.0, -0.1, 0.1, 'N/A'),
2922
'retries': (0, None, None, 'N/A'),
30-
'time': (10, None, None, 's'),
3123
},
3224
'dom:gpu': {
3325
'slope': (2.0, -0.1, 0.1, 'N/A'),
3426
'offset': (0.0, -0.1, 0.1, 'N/A'),
3527
'retries': (0, None, None, 'N/A'),
36-
'time': (10, None, None, 's'),
3728
}
3829
}
39-
40-
maintainers = ['RS', 'TR']
41-
tags = {'production'}
42-
43-
@run_after('setup')
44-
def daint_module_workaround(self):
45-
if self.current_system.name == 'daint':
46-
# FIXME: Use the default modules once Dom/Daint are aligned
47-
self.modules = [
48-
f'ipcmagic/1.0.1-CrayGNU-{osext.cray_cdt_version()}',
49-
f'Horovod/0.21.0-CrayGNU-{osext.cray_cdt_version()}-tf-2.4.0'
50-
]
51-
# FIXME: Enforce loading of jupyterlab module since
52-
# `module show jupyterlab` throws a Tcl error on Daint
53-
self.prerun_cmds = ['module load jupyterlab']
54-
55-
@sanity_function
56-
def assert_successful_execution(self):
57-
nids = sn.extractall(r'nid(?P<nid>\d+)', self.stdout, 'nid', str)
58-
return sn.all([
59-
sn.assert_ne(nids, []), sn.assert_ne(nids[0], nids[1]),
60-
sn.assert_found(r'IPCluster is ready\!\s+', self.stdout),
61-
sn.assert_found(r'slope=\S+', self.stdout)
62-
])
63-
64-
@performance_function('N/A')
65-
def slope(self):
66-
return sn.extractsingle(r'slope=(?P<slope>\S+)', self.stdout,
67-
'slope', float)
68-
69-
@performance_function('N/A')
70-
def offset(self):
71-
return sn.extractsingle(r'offset=(?P<offset>\S+)', self.stdout,
72-
'offset', float)
73-
74-
@performance_function('N/A')
75-
def retries(self):
76-
return 4 - sn.count(sn.findall(r'IPCluster is already running',
77-
self.stdout))
78-
79-
@performance_function('s')
80-
def time(self):
81-
return sn.extractsingle(r'IPCluster is ready\!\s+'
82-
r'\((?P<time>\d+) seconds\)',
83-
self.stdout, 'time', float)
84-
85-
@run_before('run')
86-
def reset_launcher(self):
87-
# Change the job launcher since `ipython`
88-
# needs to be launched without `srun`.
89-
self.job.launcher = getlauncher('local')()

docs/config_reference.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,21 @@ General Configuration
12571257
The command-line option sets the configuration option to ``false``.
12581258

12591259

1260+
.. js:attribute:: .general[].compact_test_names
1261+
1262+
:required: No
1263+
:default: ``false``
1264+
1265+
Use a compact test naming scheme.
1266+
When set to ``true``, the test parameter values will not be encoded into the test name.
1267+
Instead, the several test variants are differentiated by including the unique variant number into the test name.
1268+
1269+
.. warning::
1270+
The default value will be changed to ``true`` in version 4.0.0.
1271+
1272+
.. versionadded:: 3.9.0
1273+
1274+
12601275
.. js:attribute:: .general[].git_timeout
12611276

12621277
:required: No

docs/hpctestlib.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
ReFrame Test Library
2-
====================
1+
ReFrame Test Library (experimental)
2+
===================================
3+
4+
This is a collection of generic tests that you can either run out-of-the-box by specializing them for your system using the :option:`-S` option or create your site-specific tests by building upon them.
35

46

57
Scientific Applications
@@ -16,3 +18,11 @@ Python
1618
.. automodule:: hpctestlib.python.numpy.numpy_ops
1719
:members:
1820
:show-inheritance:
21+
22+
23+
Interactive Computing
24+
-----------------------
25+
26+
.. automodule:: hpctestlib.apps.jupyter.ipcmagic
27+
:members:
28+
:show-inheritance:

docs/manpage.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,21 @@ Here is an alphabetical list of the environment variables recognized by ReFrame:
747747
================================== ==================
748748

749749

750+
.. envvar:: RFM_COMPACT_TEST_NAMES
751+
752+
Enable the compact test naming scheme.
753+
754+
.. table::
755+
:align: left
756+
757+
================================== ==================
758+
Associated command line option N/A
759+
Associated configuration parameter :js:attr:`compact_test_names` general configuration parameter
760+
================================== ==================
761+
762+
.. versionadded:: 3.9.0
763+
764+
750765
.. envvar:: RFM_CONFIG_FILE
751766

752767
Set the configuration file for ReFrame.

0 commit comments

Comments
 (0)