Skip to content

Commit 9a13bd0

Browse files
committed
Bump dev version
2 parents 4b4664c + 71f2597 commit 9a13bd0

File tree

6 files changed

+40
-25
lines changed

6 files changed

+40
-25
lines changed

docs/manpage.rst

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,13 @@ Whenever an environment variable is associated with a configuration option, its
15151515
================================== ==================
15161516

15171517

1518+
.. envvar:: RFM_INSTALL_PREFIX
1519+
1520+
The framework's installation prefix.
1521+
Users cannot set this variable.
1522+
ReFrame will set it always upon startup.
1523+
1524+
15181525
.. envvar:: RFM_KEEP_STAGE_FILES
15191526

15201527
Keep test stage directories even for tests that finish successfully.
@@ -1867,28 +1874,15 @@ Whenever an environment variable is associated with a configuration option, its
18671874
Configuration File
18681875
------------------
18691876

1870-
The configuration file of ReFrame defines the systems and environments to test as well as parameters controlling its behavior.
1871-
Upon start up ReFrame checks for configuration files in the following locations in that order:
1872-
1873-
1. ``$HOME/.reframe/settings.{py,json}``
1874-
2. ``$RFM_INSTALL_PREFIX/settings.{py,json}``
1875-
3. ``/etc/reframe.d/settings.{py,json}``
1876-
1877-
ReFrame accepts configuration files either in Python or JSON syntax.
1878-
If both are found in the same location, the Python file will be preferred.
1879-
1880-
The ``RFM_INSTALL_PREFIX`` environment variable refers to the installation directory of ReFrame.
1881-
Users have no control over this variable.
1882-
It is always set by the framework upon startup.
1877+
The configuration file of ReFrame defines the systems and environments to test as well as parameters controlling the framework's behavior.
18831878

1884-
If no configuration file can be found in any of the predefined locations, ReFrame will fall back to a generic configuration that allows it to run on any system.
1885-
This configuration file is located in |reframe/core/settings.py|_.
1886-
Users may *not* modify this file.
1879+
ReFrame loads multiple configuration files to determine its final configuration.
1880+
First, it loads unconditionally its builtin configuration which is located in ``${RFM_INSTALL_PREFIX}/reframe/core/settings.py``.
1881+
If the :envvar:`RFM_CONFIG_PATH` environment variable is defined, ReFrame will look for configuration files named either ``settings.py`` or ``settings.json`` (in that order) in every location in the path and will load them.
1882+
Finally, the :option:`--config-file` option is processed and any configuration files specified will also be loaded.
18871883

1888-
For a complete reference of the configuration, please refer to :doc:`reframe.settings(8) <config_reference>` man page.
1884+
For a complete reference of the available configuration options, please refer to the :doc:`reframe.settings(8) <config_reference>` man page.
18891885

1890-
.. |reframe/core/settings.py| replace:: ``reframe/core/settings.py``
1891-
.. _reframe/core/settings.py: https://github.com/reframe-hpc/reframe/blob/master/reframe/core/settings.py
18921886

18931887
Reporting Bugs
18941888
--------------

docs/regression_test_api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ Modules Systems
290290
:show-inheritance:
291291

292292
.. _build-systems:
293+
293294
-------------
294295
Build Systems
295296
-------------

docs/tutorial.rst

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,14 @@ Here is an example for our STREAM benchmark:
264264
class stream_test(rfm.RunOnlyRegressionTest):
265265
...
266266
reference = {
267-
'myhost:baseline': {
267+
'generic:default': {
268268
'copy_bw': (23_890, -0.10, 0.30, 'MB/s'),
269269
'triad_bw': (17_064, -0.05, 0.50, 'MB/s'),
270270
}
271271
}
272272
273-
The :attr:`reference` test variable is a multi-level dictionary that defines the expected performance for each of the test's performance variables on all supported systems.
273+
The :attr:`reference` test variable is a multi-level dictionary that defines the expected performance for each of the test's performance variables on all supported systems (here, ``generic``) and partitions (here, ``default``).
274+
We explain more about this pre-defined system later in :ref:`systems-and-environments`.
274275
It is not necessary that all performance variables and all systems have a reference.
275276
If a reference value is not found, then the obtained performance will be logged, but no performance validation will be performed.
276277
The reference value is essentially a three or four element tuple of the form: ``(target_perf, lower_thres, upper_thres, unit)``. The ``unit`` is optional as it is already defined in the :func:`@performance_function <reframe.core.builtins.performance_function>` definitions.
@@ -310,6 +311,8 @@ Note that the ``RUN`` message is replaced by ``DRY`` in the dry-run mode.
310311
You can also check the generated test script in ``stage/generic/default/builtin/stream_test/rfm_job.sh``.
311312

312313

314+
.. _systems-and-environments:
315+
313316
Systems and environments
314317
========================
315318

@@ -338,7 +341,7 @@ We could do that simply by setting the :attr:`valid_prog_environs` as follows:
338341
339342
self.valid_prog_environs = ['+stream']
340343
341-
This tells ReFrame that this test is valid only for environments that define the ``stream`` feature.
344+
This tells ReFrame that this test is valid only for environments that define the ``stream`` feature (the ``+`` prefix requests a feature; we will explain the syntax later in this section).
342345
If we try to run the test now, nothing will be run:
343346

344347
.. code-block:: bash
@@ -355,7 +358,7 @@ If we try to run the test now, nothing will be run:
355358
This happens because ReFrame by default defines a generic system and environment.
356359
You may have noticed in our first run the ``@generic:default+builtin`` notation printed after test name.
357360
This is the system partition name (``generic:default``) and the environment name (``builtin``) where the test is being run in.
358-
The ``generic`` system and the ``builtin`` partition come as predefined in ReFrame.
361+
The ``generic`` system and the ``builtin`` environment come as predefined in ReFrame.
359362
They make the minimum possible assumptions:
360363

361364
- The ``generic`` system defines a single partition, named ``default`` which launches test jobs locally.
@@ -387,6 +390,19 @@ Let's look at some key elements of the configuration:
387390
Their definitions are resolved in the :attr:`~config.environments` section.
388391
* Every partition and environment can define a set of arbitrary features or key/value pairs in the :attr:`~config.environments.features` and :attr:`~config.environments.extras` options respectively.
389392
ReFrame will try to match system partitions and environments to a test based on the test's specification in :attr:`valid_systems` and :attr:`valid_prog_environs`.
393+
More specifically, a feature is requested with the ``+feat`` and excluded with ``-feat``, whereas an extra is requested with ``%key=val``.
394+
Multiple features or extras can be ANDed if specified in the same :attr:`valid_systems` or :attr:`valid_prog_environs` elements or otherwise ORed if specified in different elements:
395+
396+
.. code-block:: python
397+
398+
# Valid only for system partitions that define `feat0` and `key0=val` but not `feat1`
399+
valid_systems = [r'+feat0 -feat1 %key0=val']
400+
401+
# Valid only for environments with either feature `A` or `B`
402+
valid_prog_environs = ['+A', '+B']
403+
404+
Finally, a system or system partition name can be specified in :attr:`valid_systems` and similarly an environment name in :attr:`valid_prog_environs`, in which case the test is bound to those specific system partitions and/or environments.
405+
390406

391407
There are many options that we can be define for systems, partitions and environments.
392408
We will cover several of them as we go through the tutorial, but for the complete reference you should refer to :doc:`config_reference`.

reframe/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import os
77
import sys
88

9-
VERSION = '4.7.0-dev.2'
9+
VERSION = '4.7.0-dev.3'
1010
INSTALL_PREFIX = os.path.normpath(
1111
os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
1212
)

reframe/core/logging.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,10 @@ def _create_file_handler(site_config, config_prefix):
420420
timestamp = site_config.get(f'{config_prefix}/timestamp')
421421
if timestamp:
422422
basename, ext = os.path.splitext(filename)
423+
if not isinstance(timestamp, str):
424+
# Use the default value from `datefmt`
425+
timestamp = site_config.get(f'{config_prefix}/datefmt')
426+
423427
filename = f'{basename}_{time.strftime(timestamp)}{ext}'
424428

425429
append = site_config.get(f'{config_prefix}/append')

reframe/schemas/runreport.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"prefix": {"type": "string"},
8585
"result": {
8686
"type": "string",
87-
"enum": ["success", "failure", "aborted"]
87+
"enum": ["success", "failure", "aborted", "skipped"]
8888
},
8989
"scheduler": {"type": ["string", "null"]},
9090
"stagedir": {"type": ["string", "null"]},

0 commit comments

Comments
 (0)