Skip to content

Commit 4ada425

Browse files
author
Vasileios Karakasis
authored
Merge branch 'master' into bugfix/failed_cleanup
2 parents 015a7a7 + 4dc7d2e commit 4ada425

File tree

13 files changed

+147
-116
lines changed

13 files changed

+147
-116
lines changed

Jenkinsfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,9 @@ stage('Unittest') {
9292
script: """${loginBash}
9393
echo \$SCRATCH""").trim()
9494
def reframeDir = "${scratch}/${dirPrefix}-${machineName}-${uniqueID}"
95-
def moduleDefinition = ''
96-
if (machineName == 'leone') {
97-
moduleDefinition = '''module() { eval `/usr/bin/modulecmd bash $*`; }
98-
export -f module'''
99-
}
10095
dir(reframeDir) {
10196
checkout scm
10297
sh("""${loginBash}
103-
${moduleDefinition}
10498
bash ${reframeDir}/${bashScript} -f ${reframeDir} -i ''""")
10599
}
106100
}

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
[![Build Status](https://travis-ci.org/eth-cscs/reframe.svg?branch=master)](https://travis-ci.org/eth-cscs/reframe)
22
[![Documentation Status](https://readthedocs.org/projects/reframe-hpc/badge/?version=latest)](https://reframe-hpc.readthedocs.io/en/latest/?badge=latest)
3-
[![codecov.io](https://codecov.io/gh/eth-cscs/reframe/branch/master/graph/badge.svg)](https://codecov.io/github/eth-cscs/reframe)
3+
[![codecov.io](https://codecov.io/gh/eth-cscs/reframe/branch/master/graph/badge.svg)](https://codecov.io/github/eth-cscs/reframe)<br/>
4+
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/eth-cscs/reframe?include_prereleases)
5+
![GitHub commits since latest release](https://img.shields.io/github/commits-since/eth-cscs/reframe/latest)
6+
![GitHub contributors](https://img.shields.io/github/contributors-anon/eth-cscs/reframe)<br/>
47
[![PyPI version](https://badge.fury.io/py/ReFrame-HPC.svg)](https://badge.fury.io/py/ReFrame-HPC)
8+
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/reframe-hpc)<br/>
9+
[![Slack](https://reframe-slack.herokuapp.com/badge.svg)](https://reframe-slack.herokuapp.com/)<br/>
510
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
6-
[![Slack](https://reframe-slack.herokuapp.com/badge.svg)](https://reframe-slack.herokuapp.com/)
711

812
# ReFrame
913

ci-scripts/ci-runner.bash

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ checked_exec()
4141

4242
run_tutorial_checks()
4343
{
44-
cmd="./bin/reframe -C tutorial/config/settings.py --exec-policy=async \
44+
cmd="./bin/reframe -C tutorial/config/settings.py \
4545
--save-log-files -r -t tutorial $@"
4646
echo "Running tutorial checks with \`$cmd'"
4747
checked_exec $cmd
4848
}
4949

5050
run_user_checks()
5151
{
52-
cmd="./bin/reframe -C config/cscs.py --exec-policy=async --save-log-files \
52+
cmd="./bin/reframe -C config/cscs.py --save-log-files \
5353
-r --flex-alloc-nodes=2 -t production|benchmark $@"
5454
echo "Running user checks with \`$cmd'"
5555
checked_exec $cmd
@@ -160,10 +160,7 @@ elif [ $CI_TUTORIAL -eq 1 ]; then
160160
grep -e '^tutorial/(?!config/).*\.py') )
161161

162162
if [ ${#tutorialchecks[@]} -ne 0 ]; then
163-
tutorialchecks_path=""
164-
for check in ${tutorialchecks[@]}; do
165-
tutorialchecks_path="${tutorialchecks_path} -c ${check}"
166-
done
163+
tutorialchecks_path="-c $(IFS=: eval 'echo "${tutorialchecks[*]}"')"
167164

168165
echo "========================"
169166
echo "Modified tutorial checks"
@@ -197,10 +194,7 @@ else
197194
userchecks=( $(git diff origin/master...HEAD --name-only --oneline --no-merges | \
198195
grep -e '^cscs-checks/.*\.py') )
199196
if [ ${#userchecks[@]} -ne 0 ]; then
200-
userchecks_path=""
201-
for check in ${userchecks[@]}; do
202-
userchecks_path="${userchecks_path} -c ${check}"
203-
done
197+
userchecks_path="-c $(IFS=: eval 'echo "${userchecks[*]}"')"
204198

205199
echo "===================="
206200
echo "Modified user checks"

cscs-checks/cuda/cuda_checks.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import os
2-
32
import reframe as rfm
43
import reframe.utility.sanity as sn
54

65

76
class CudaCheck(rfm.RegressionTest):
87
def __init__(self):
9-
super().__init__()
108
self.valid_systems = ['daint:gpu', 'dom:gpu', 'kesch:cn', 'tiger:gpu']
119
self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu']
1210
if self.current_system.name == 'kesch':
@@ -81,7 +79,7 @@ def __init__(self):
8179
self.descr = 'Simple example demonstrating how to use MPI with CUDA'
8280
self.sourcesdir = os.path.join(self.current_system.resourcesdir,
8381
'CUDA', 'simplempi')
84-
self.executable = 'simplempi'
82+
self.executable = './simplempi'
8583
self.num_tasks = 2
8684
self.num_tasks_per_node = 2
8785
self.sanity_patterns = sn.assert_found(r'Result = PASS', self.stdout)

docs/running.rst

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ ReFrame the does not search recursively into directories specified with the ``-c
306306

307307
The ``-c`` option completely overrides the default path.
308308
Currently, there is no option to prepend or append to the default regression path.
309-
However, you can build your own check path by specifying multiple times the ``-c`` option.
309+
However, you can build your own check path by specifying a colon separated list of paths to the ``-c`` option.
310310
The ``-c``\ option accepts also regular files. This is very useful when you are implementing new regression tests, since it allows you to run only your test:
311311

312312
.. code-block:: bash
@@ -321,6 +321,17 @@ The ``-c``\ option accepts also regular files. This is very useful when you are
321321

322322
.. versionadded:: 2.12
323323

324+
.. warning::
325+
Using the command line ``-c`` or ``--checkpath`` multiple times is not supported anymore and only the last option will be considered.
326+
Multiple paths should be passed instead as a colon separated list:
327+
328+
.. code-block:: bash
329+
330+
./bin/reframe -c /path/to/my/first/test.py:/path/to/my/second/ -r
331+
332+
333+
.. versionchanged:: 3.0
334+
324335

325336
Filtering of Regression Tests
326337
-----------------------------
@@ -1059,8 +1070,8 @@ Asynchronous Execution of Regression Checks
10591070
-------------------------------------------
10601071

10611072
From version `2.4 <https://github.com/eth-cscs/reframe/releases/tag/v2.4>`__, ReFrame supports asynchronous execution of regression tests.
1062-
This execution policy can be enabled by passing the option ``--exec-policy=async`` to the command line.
1063-
The default execution policy is ``serial`` which enforces a sequential execution of the selected regression tests.
1073+
This execution policy is the default one.
1074+
To enforce a sequential execution of the regression tests the ``serial`` execution policy can be enabled by passing the option ``--exec-policy=serial`` to the command line.
10641075
The asynchronous execution policy parallelizes only the `running phase <pipeline.html#the-run-phase>`__ of the tests.
10651076
The rest of the phases remain sequential.
10661077

@@ -1152,6 +1163,11 @@ Here is an example output of ReFrame using asynchronous execution policy:
11521163
The asynchronous execution policy may provide significant overall performance benefits for run-only regression tests.
11531164
For compile-only and normal tests that require a compilation, the execution time will be bound by the total compilation time of the test.
11541165

1166+
.. note::
1167+
.. versionchanged:: 3.0
1168+
1169+
The asynchronous execution policy has become the default.
1170+
11551171

11561172
Manipulating modules
11571173
--------------------

docs/tutorial.rst

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ For the configuration of the system, we provide a minimal configuration file for
1616
The site configuration that we used for this tutorial is the following:
1717

1818
.. literalinclude:: ../tutorial/config/settings.py
19-
:lines: 12-75
19+
:lines: 11-79
2020
:dedent: 4
2121

2222
You can find the full ``settings.py`` file ready to be used by ReFrame in ``<reframe-install-prefix>/tutorial/config/settings.py``.
@@ -172,50 +172,52 @@ If everything is configured correctly for your system, you should get an output
172172

173173
.. code-block:: none
174174
175-
Command line: ./bin/reframe -C tutorial/config/settings.py -c tutorial/example1.py -r
176-
Reframe version: 2.13-dev0
177-
Launched by user: XXX
178-
Launched on host: daint104
179-
Reframe paths
180-
=============
181-
Check prefix :
182-
Check search path : 'tutorial/example1.py'
183-
Stage dir prefix : /current/working/dir/stage/
184-
Output dir prefix : /current/working/dir/output/
185-
Logging dir : /current/working/dir/logs
186-
[==========] Running 1 check(s)
187-
[==========] Started on Fri May 18 13:19:12 2018
188-
189-
[----------] started processing Example1Test (Simple matrix-vector multiplication example)
190-
[ RUN ] Example1Test on daint:login using PrgEnv-cray
191-
[ OK ] Example1Test on daint:login using PrgEnv-cray
192-
[ RUN ] Example1Test on daint:login using PrgEnv-gnu
193-
[ OK ] Example1Test on daint:login using PrgEnv-gnu
194-
[ RUN ] Example1Test on daint:login using PrgEnv-intel
195-
[ OK ] Example1Test on daint:login using PrgEnv-intel
196-
[ RUN ] Example1Test on daint:login using PrgEnv-pgi
197-
[ OK ] Example1Test on daint:login using PrgEnv-pgi
198-
[ RUN ] Example1Test on daint:gpu using PrgEnv-cray
199-
[ OK ] Example1Test on daint:gpu using PrgEnv-cray
200-
[ RUN ] Example1Test on daint:gpu using PrgEnv-gnu
201-
[ OK ] Example1Test on daint:gpu using PrgEnv-gnu
202-
[ RUN ] Example1Test on daint:gpu using PrgEnv-intel
203-
[ OK ] Example1Test on daint:gpu using PrgEnv-intel
204-
[ RUN ] Example1Test on daint:gpu using PrgEnv-pgi
205-
[ OK ] Example1Test on daint:gpu using PrgEnv-pgi
206-
[ RUN ] Example1Test on daint:mc using PrgEnv-cray
207-
[ OK ] Example1Test on daint:mc using PrgEnv-cray
208-
[ RUN ] Example1Test on daint:mc using PrgEnv-gnu
209-
[ OK ] Example1Test on daint:mc using PrgEnv-gnu
210-
[ RUN ] Example1Test on daint:mc using PrgEnv-intel
211-
[ OK ] Example1Test on daint:mc using PrgEnv-intel
212-
[ RUN ] Example1Test on daint:mc using PrgEnv-pgi
213-
[ OK ] Example1Test on daint:mc using PrgEnv-pgi
214-
[----------] finished processing Example1Test (Simple matrix-vector multiplication example)
215-
216-
[ PASSED ] Ran 12 test case(s) from 1 check(s) (0 failure(s))
217-
[==========] Finished on Fri May 18 13:20:17 2018
218-
175+
Command line: ./bin/reframe -C tutorial/config/settings.py -c tutorial/example1.py -r
176+
Reframe version: 3.0-dev0
177+
Launched by user: XXX
178+
Launched on host: daint103
179+
Reframe paths
180+
=============
181+
Check prefix :
182+
Check search path : 'tutorial/example1.py'
183+
Stage dir prefix : /current/working/dir/stage/
184+
Output dir prefix : /current/working/dir/output/
185+
Perf. logging prefix : /current/working/dir/perflogs/
186+
[==========] Running 1 check(s)
187+
[==========] Started on Thu Jan 23 14:14:12 2020
188+
189+
[----------] started processing Example1Test (Simple matrix-vector multiplication example)
190+
[ RUN ] Example1Test on daint:login using PrgEnv-cray
191+
[ RUN ] Example1Test on daint:login using PrgEnv-gnu
192+
[ RUN ] Example1Test on daint:login using PrgEnv-intel
193+
[ RUN ] Example1Test on daint:login using PrgEnv-pgi
194+
[ RUN ] Example1Test on daint:gpu using PrgEnv-cray
195+
[ RUN ] Example1Test on daint:gpu using PrgEnv-gnu
196+
[ RUN ] Example1Test on daint:gpu using PrgEnv-intel
197+
[ RUN ] Example1Test on daint:gpu using PrgEnv-pgi
198+
[ RUN ] Example1Test on daint:mc using PrgEnv-cray
199+
[ RUN ] Example1Test on daint:mc using PrgEnv-gnu
200+
[ RUN ] Example1Test on daint:mc using PrgEnv-intel
201+
[ RUN ] Example1Test on daint:mc using PrgEnv-pgi
202+
[----------] finished processing Example1Test (Simple matrix-vector multiplication example)
203+
204+
[----------] waiting for spawned checks to finish
205+
[ OK ] Example1Test on daint:login using PrgEnv-intel
206+
[ OK ] Example1Test on daint:login using PrgEnv-cray
207+
[ OK ] Example1Test on daint:login using PrgEnv-gnu
208+
[ OK ] Example1Test on daint:login using PrgEnv-pgi
209+
[ OK ] Example1Test on daint:mc using PrgEnv-pgi
210+
[ OK ] Example1Test on daint:mc using PrgEnv-gnu
211+
[ OK ] Example1Test on daint:gpu using PrgEnv-intel
212+
[ OK ] Example1Test on daint:gpu using PrgEnv-cray
213+
[ OK ] Example1Test on daint:mc using PrgEnv-cray
214+
[ OK ] Example1Test on daint:gpu using PrgEnv-gnu
215+
[ OK ] Example1Test on daint:gpu using PrgEnv-pgi
216+
[ OK ] Example1Test on daint:mc using PrgEnv-intel
217+
[----------] all spawned checks have finished
218+
219+
[ PASSED ] Ran 12 test case(s) from 1 check(s) (0 failure(s))
220+
[==========] Finished on Thu Jan 23 14:16:25 2020
219221
220222
Notice how our regression test is run on every partition of the configured system and for every programming environment.
221223

reframe/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys
33

44

5-
VERSION = '2.22-dev0'
5+
VERSION = '3.0-dev0'
66
INSTALL_PREFIX = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
77
MIN_PYTHON_VERSION = (3, 5, 0)
88

reframe/core/pipeline.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,6 @@ class RegressionTest(metaclass=RegressionTestMeta):
621621
#:
622622
#: A new more powerful syntax was introduced
623623
#: that allows also custom job script directive prefixes.
624-
#:
625624
extra_resources = fields.TypedField('extra_resources',
626625
typ.Dict[str, typ.Dict[str, object]])
627626

@@ -959,12 +958,6 @@ def _setup_job(self, **job_opts):
959958
msg.format('local' if self.is_local else
960959
self._current_partition.scheduler.registered_name))
961960

962-
# num_gpus_per_node is a managed resource
963-
if self.num_gpus_per_node > 0:
964-
self.extra_resources.setdefault(
965-
'_rfm_gpu', {'num_gpus_per_node': self.num_gpus_per_node}
966-
)
967-
968961
if self.local:
969962
scheduler_type = getscheduler('local')
970963
launcher_type = getlauncher('local')
@@ -980,16 +973,6 @@ def _setup_job(self, **job_opts):
980973
sched_exclusive_access=self.exclusive_access,
981974
**job_opts)
982975

983-
# Get job options from managed resources and prepend them to
984-
# job_opts. We want any user supplied options to be able to
985-
# override those set by the framework.
986-
resources_opts = []
987-
for r, v in self.extra_resources.items():
988-
resources_opts.extend(
989-
self._current_partition.get_resource(r, **v))
990-
991-
self._job.options = resources_opts + self._job.options
992-
993976
def _setup_perf_logging(self):
994977
self.logger.debug('setting up performance logging')
995978
self._perf_logger = logging.getperflogger(self)
@@ -1185,6 +1168,21 @@ def run(self):
11851168
self._cdt_environ
11861169
]
11871170

1171+
# num_gpus_per_node is a managed resource
1172+
if self.num_gpus_per_node > 0:
1173+
self.extra_resources.setdefault(
1174+
'_rfm_gpu', {'num_gpus_per_node': self.num_gpus_per_node}
1175+
)
1176+
1177+
# Get job options from managed resources and prepend them to
1178+
# job_opts. We want any user supplied options to be able to
1179+
# override those set by the framework.
1180+
resources_opts = []
1181+
for r, v in self.extra_resources.items():
1182+
resources_opts.extend(
1183+
self._current_partition.get_resource(r, **v))
1184+
1185+
self._job.options = resources_opts + self._job.options
11881186
with os_ext.change_dir(self._stagedir):
11891187
try:
11901188
self._job.prepare(commands, environs)

reframe/frontend/cli.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ def main():
9393

9494
# Check discovery options
9595
locate_options.add_argument(
96-
'-c', '--checkpath', action='append', metavar='DIR|FILE',
97-
help='Search for checks in DIR or FILE')
96+
'-c', '--checkpath', action='store', metavar='DIR|FILE',
97+
help="Search for checks in DIR or FILE; multiple paths can be "
98+
"separated with `:'")
9899
locate_options.add_argument(
99100
'-R', '--recursive', action='store_true',
100101
help='Load checks recursively')
@@ -173,9 +174,9 @@ def main():
173174
help='Skip prog. environment check')
174175
run_options.add_argument(
175176
'--exec-policy', metavar='POLICY', action='store',
176-
choices=['serial', 'async'], default='serial',
177+
choices=['async', 'serial'], default='async',
177178
help='Specify the execution policy for running the regression tests. '
178-
'Available policies: "serial" (default), "async"')
179+
'Available policies: "async" (default), "serial"')
179180
run_options.add_argument(
180181
'--mode', action='store', help='Execution mode to use')
181182
run_options.add_argument(
@@ -410,7 +411,7 @@ def main():
410411
# Setup the check loader
411412
if options.checkpath:
412413
load_path = []
413-
for d in options.checkpath:
414+
for d in options.checkpath.split(':'):
414415
d = os_ext.expandvars(d)
415416
if not os.path.exists(d):
416417
printer.warning("%s: path `%s' does not exist. Skipping..." %

0 commit comments

Comments
 (0)