Skip to content

Commit d11a049

Browse files
authored
Merge pull request #26 from vkarak/deploy/reframe-2.8
Reframe 2.8 public release
2 parents a01ac95 + b69c5b6 commit d11a049

Some content is hidden

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

55 files changed

+2668
-2026
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ var/
2424
.installed.cfg
2525
*.egg
2626

27+
# Ignore Mac DS_Store files
28+
.DS_Store
29+
2730
# PyInstaller
2831
# Usually these files are written by a python script from a template
2932
# before PyInstaller builds the exe, so as to inject date/other infos into it.

docs/Makefile

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@
22
#
33

44
# You can set these variables from the command line.
5+
BUILD_CMD = build
6+
DOCS = docs
7+
DOCS_ALL = _build/_allversions
8+
MASTER = master
59
PYTHON = python
610
SPHINXOPTS =
711
SPHINXBUILD = -msphinx
812
SPHINXPROJ = ReFrame
13+
SPHINX_VERS = sphinx-versioning
914
SOURCEDIR = .
1015
BUILDDIR = $(VERSION)
1116
PANDOC = pandoc
1217
PANDOCOPTS = --columns 1000
1318
RM = /bin/rm -rf
14-
15-
ifeq ($(finstring "darwin", $(OSTYPE)), "darwin")
16-
SYMLINK_DIR=ln -sfh
17-
else
18-
# Assume a GNU/Linux system here
19-
SYMLINK_DIR=ln -sfn
20-
endif
19+
TAG_VERS = '^v\d+(\.\d+)*[a-z]*'
2120

2221
MDS = about.md \
2322
advanced.md \
@@ -58,24 +57,29 @@ TARGET_DOCS := \
5857
coverage
5958

6059
all: $(RSTS)
60+
@$(SPHINX_VERS) -l conf.py build docs/ html/
61+
@rsync -az old/ html/_old/
62+
@./link_old_docs.sh
63+
64+
latest: $(RSTS)
6165
@make html
6266
@touch html/.nojekyll
63-
@echo 'Linking to old documentation pages'
64-
@cd html && $(SYMLINK_DIR) ../old _old && cd - > /dev/null
67+
@rsync -az old/ html/_old/
6568

6669
%.rst: %.md
6770
$(PANDOC) $(PANDOCOPTS) --from=markdown --to=rst --output=$(@) $(@:.rst=.md)
6871

6972
clean:
7073
@echo 'Removing md files'
71-
-$(RM) $(RSTS) doctrees
74+
-$(RM) $(RSTS)
7275

7376
distclean: clean
7477
@echo 'Removing directories'
75-
-$(RM) $(TARGET_DOCS)
78+
-$(RM) $(TARGET_DOCS) doctrees
7679

7780
$(TARGET_DOCS): Makefile
7881
@$(PYTHON) $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
7982

8083

81-
.PHONY: clean Makefile
84+
85+
.PHONY: all distclean clean latest Makefile

docs/_templates/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
</div>
6363
<div class="cscs_right" style="margin-left: auto; margin-right: auto;">
6464
<a href="http://www.cscs.ch" target="_blank">
65-
<img id="cscs-cscs-logo" src="{{ pathto('../_static/img/logo_cscs.png', 1) }}" style="background-color: transparent; margin-top: 5px;">
65+
<img id="cscs-cscs-logo" src="{{ pathto('_static/img/logo_cscs.png', 1) }}" style="background-color: transparent; margin-top: 5px;">
6666
</a>
6767
</div>
6868
</div>

docs/_templates/layout.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<span class="caption-text">Useful Links</span>
1313
</p>
1414
<ul>
15+
<li class="toctree-l1"><a class="reference internal" href="https://github.com/eth-cscs/reframe" target="_blank">Get ReFrame</a></li>
16+
<li class="toctree-l1"><a class="reference internal" href="https://github.com/eth-cscs/production" target="_blank">CSCS Easybuild recipes</a></li>
1517
<li class="toctree-l1"><a class="reference internal" href="http://www.cscs.ch" target="_blank">CSCS</a></li>
1618
<li class="toctree-l1"><a class="reference internal" href="http://www.ethz.ch" target="_blank">ETH Zurich</a></li>
1719
</ul>
1820
{% endblock %}
19-
20-

docs/conf.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
1919
#
2020
import os
21+
import re
2122
import sys
2223
sys.path.insert(0, os.path.abspath('..'))
2324
from recommonmark.parser import CommonMarkParser
@@ -74,9 +75,9 @@
7475
# built documents.
7576
#
7677
# The short X.Y version.
77-
version = '2.7'
78+
version = '2.8'
7879
# The full version, including alpha/beta/rc tags.
79-
release = '2.7'
80+
release = '2.8'
8081

8182
# The language for content autogenerated by Sphinx. Refer to documentation
8283
# for a list of supported languages.
@@ -88,7 +89,7 @@
8889
# List of patterns, relative to source directory, that match files and
8990
# directories to ignore when looking for source files.
9091
# This patterns also effect to html_static_path and html_extra_path
91-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'old', 'html/_old']
92+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'old', 'html/*']
9293

9394
# The name of the Pygments (syntax highlighting) style to use.
9495
pygments_style = 'sphinx'
@@ -236,3 +237,8 @@
236237
author, 'ReFrame', 'ReFrame is a new framework for writing regression tests for HPC systems.',
237238
'Miscellaneous'),
238239
]
240+
241+
242+
# Versioning
243+
scv_whitelist_branches = ('master',)
244+
scv_whitelist_tags = (re.compile(r'^v\d+\.\d+(\.d+)?[a-z]?'),)

docs/configure.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The following example shows a minimal configuration for the [Piz Daint](http://w
2121
'daint': {
2222
'descr': 'Piz Daint',
2323
'hostnames': ['daint'],
24+
'modules_system': 'tmod',
2425
'partitions': {
2526
'login': {
2627
'scheduler': 'local',
@@ -88,6 +89,8 @@ The valid attributes of a system are the following:
8889

8990
* `descr`: A detailed description of the system (default is the system name).
9091
* `hostnames`: This is a list of hostname patterns that will be used by ReFrame when it tries to [auto-detect](#system-auto-detection) the current system (default `[]`).
92+
* `modules_system`: _(New in version 2.8)_ The modules system that should be used for loading environment modules on this system.
93+
The only available modules system backend is currently `tmod`, which corresponds to the [TCL implementation](http://modules.sourceforge.net/) of the environment modules (default `None`).
9194
* `prefix`: Default regression prefix for this system (default `.`).
9295
* `stagedir`: Default stage directory for this system (default `None`).
9396
* `outputdir`: Default output directory for this system (default `None`).
@@ -109,16 +112,33 @@ The partitions of a system are defined similarly to systems as a set of key/valu
109112
The available partition attributes are the following:
110113

111114
* `descr`: A detailed description of the partition (default is the partition name).
112-
* `scheduler`: The job scheduler to use for launching jobs on this partition.
113-
Available values are the following:
114-
* `local` (**default**): Jobs on this partition will be launched locally as OS processes.
115-
When a job is launched with this scheduler, ReFrame will create a wrapper shell script for running the check on the local machine.
116-
* `nativeslurm`: Jobs on this partition will be launched using Slurm and the `srun` command for creating MPI processes.
117-
* `slurm+alps`: Jobs on this partition will be launched using Slurm and the `aprun` command for creating MPI processes.
115+
116+
* `scheduler`: _(Changed in version 2.8)_ The job scheduler and parallel program launcher combination that is used on this partition to launch jobs.
117+
The syntax of this attribute is `<scheduler>+<launcher>`.
118+
The available values for the job scheduler are the following:
119+
- `slurm`: Jobs on this partition will be launched using [Slurm](https://www.schedmd.com/).
120+
- `local`: Jobs on this partition will be launched locally as OS processes.
121+
122+
The available values for the parallel program launchers are the following:
123+
- `srun`: Programs on this partition will be launched using a bare `srun` command *without* any job allocation options passed to it.
124+
This launcher may only be used with the `slurm` scheduler.
125+
- `srunalloc`: Programs on this partition will be launched using the `srun` command *with* job allocation options passed automatically to it.
126+
This launcher may also be used with the `local` scheduler.
127+
- `alps`: Programs on this partition will be launched using the `aprun` command.
128+
- `mpirun`: Programs on this partition will be launched using the `mpirun` command.
129+
- `mpiexec`: Programs on this partition will be launched using the `mpiexec` command.
130+
- `local`: Programs on this partition will be launched as-is without using any parallel program launcher.
131+
132+
There exist also the following aliases for specific combinations of job schedulers and parallel program launchers:
133+
- `nativeslurm`: This is equivalent to `slurm+srun`.
134+
- `local`: This is equivalent to `local+local`.
135+
118136
* `access`: A list of scheduler options that will be passed to the generated job script for gaining access to that logical partition (default `[]`).
137+
119138
* `environs`: A list of environments, with which ReFrame will try to run any regression tests written for this partition (default `[]`).
120139
The environment names must be resolved inside the `environments` section of the `_site_configuration` dictionary (see [Environments Configuration](#environments-configuration) for more information).
121140
* `modules`: A list of modules to be loaded before running a regression test on that partition (default `[]`).
141+
122142
* `variables`: A set of environment variables to be set before running a regression test on that partition (default `{}`).
123143
Environment variables can be set as follows (notice that both the variable name and its value are strings):
124144

@@ -128,9 +148,11 @@ The available partition attributes are the following:
128148
'OTHER': 'foo'
129149
}
130150
```
151+
131152
* `max_jobs`: The maximum number of concurrent regression tests that may be active (not completed) on this partition.
132153
This option is relevant only when Reframe executes with the [asynchronous execution policy](running.html#asynchronous-execution-of-regression-checks).
133-
* `resources`: A set of custom resource specifications and how these can be requested from the partition's scheduler (default `{}`).
154+
155+
* `resources`: _(Changed in version 2.8)_ A set of custom resource specifications and how these can be requested from the partition's scheduler (default `{}`).
134156
This variable is a set of key/value pairs with the key being the resource name and the value being a list of options to be passed to the partition's job scheduler.
135157
The option strings can contain "references" to the resource being required using the syntax `{resource_name}`.
136158
In such cases, the `{resource_name}` will be replaced by the value of that resource defined in the regression test that is being run.
@@ -144,11 +166,19 @@ The available partition attributes are the following:
144166
}
145167
```
146168

147-
When ReFrame will run a test that defines `self.num_gpus_per_node = 8`, the generated job script will have the following line in its preamble:
169+
A regression test then may request this resource as follows:
170+
171+
```python
172+
self.extra_resources = {'num_gpus_per_node': '8'}
173+
```
174+
175+
and the generated job script will have the following line in its preamble:
148176
```bash
149177
#SBATCH --gres=gpu:8
150178
```
151179

180+
Refer to the [reference guide](reference.html#reframe.core.pipeline.RegressionTest.extra_resources) for more information on the use of the `extra_resources` regression test attribute.
181+
152182
## Environments Configuration
153183

154184
The environments available for testing in different systems are defined under the `environments` key of the top-level `_site_configuration` dictionary.

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Reframe also offers a high-level and flexible abstraction for writing sanity and
1414
Writing system regression tests in a high-level modern programming language, like Python, poses a great advantage in organizing and maintaining the tests.
1515
Users can create their own test hierarchies or test factories for generating multiple tests at the same time and they can also customize them in a simple and expressive way.
1616

17-
For versions 2.6.1 and older, please refer to `this documentation <_old/index.html>`__.
17+
For versions 2.6.1 and older, please refer to `this documentation </_old/index.html>`__.
1818

1919
Use Cases
2020
=========

docs/link_old_docs.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
prefix=${1:-html}
4+
5+
if [[ x$OSTYPE =~ x"darwin" ]]; then
6+
symlink="ln -sfh"
7+
else
8+
symlink="ln -sfn"
9+
fi
10+
11+
link_old_docs()
12+
{
13+
echo "linking old docs for $1 ..."
14+
cd $1 && $symlink ../_old _old && cd - > /dev/null
15+
}
16+
17+
18+
link_old_docs $prefix/master
19+
20+
for d in $prefix/v*; do
21+
# Verify that $d is actually a version
22+
if ! echo $(basename $d) | grep -e 'v[0-9]\+\.[0-9]\+' > /dev/null; then
23+
echo Skipping non version directory $d ...
24+
continue
25+
fi
26+
27+
link_old_docs $d
28+
done

docs/pipeline.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,9 @@ At this phase, all these directories are created.
6666
### Prepare a job for the test
6767
At this point a _job descriptor_ will be created for the test. A job descriptor in ReFrame is an abstraction of the job scheduler's functionality relevant to the regression framework.
6868
It is responsible for submitting a job in a job queue and waiting for its completion.
69-
Currently, the ReFrame framework supports three job scheduler backends:
69+
ReFrame supports two job scheduler backends that can be combined with several different parallel program launchers.
70+
For a complete list of the job scheduler/parallel launchers combinations, please refer to ["Partition Configuration"](configure.html#partition-configuration).
7071

71-
* __local__, which is basically a *pseudo-scheduler* that just spawns local OS processes,
72-
* __nativeslurm__, which is the native [Slurm](https://slurm.schedmd.com) job scheduler and
73-
* __slurm+alps__, which uses [Slurm](https://slurm.schedmd.com) for job submission, but uses [Cray's ALPS](http://docs.cray.com/books/S-2529-116//S-2529-116.pdf) for launching MPI processes on the compute nodes.
7472

7573
## 2. The Compilation Phase
7674

docs/reference.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ Reference Guide
2020
.. automodule:: reframe.core.launchers
2121
:members:
2222
:show-inheritance:
23+
24+
.. automodule:: reframe.core.launchers.registry
25+
:members:
26+
:show-inheritance:

0 commit comments

Comments
 (0)