You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
1867
1874
Configuration File
1868
1875
------------------
1869
1876
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.
1883
1878
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.
1887
1883
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.
Copy file name to clipboardExpand all lines: docs/tutorial.rst
+20-4Lines changed: 20 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,13 +264,14 @@ Here is an example for our STREAM benchmark:
264
264
classstream_test(rfm.RunOnlyRegressionTest):
265
265
...
266
266
reference = {
267
-
'myhost:baseline': {
267
+
'generic:default': {
268
268
'copy_bw': (23_890, -0.10, 0.30, 'MB/s'),
269
269
'triad_bw': (17_064, -0.05, 0.50, 'MB/s'),
270
270
}
271
271
}
272
272
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`.
274
275
It is not necessary that all performance variables and all systems have a reference.
275
276
If a reference value is not found, then the obtained performance will be logged, but no performance validation will be performed.
276
277
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.
310
311
You can also check the generated test script in ``stage/generic/default/builtin/stream_test/rfm_job.sh``.
311
312
312
313
314
+
.. _systems-and-environments:
315
+
313
316
Systems and environments
314
317
========================
315
318
@@ -338,7 +341,7 @@ We could do that simply by setting the :attr:`valid_prog_environs` as follows:
338
341
339
342
self.valid_prog_environs = ['+stream']
340
343
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).
342
345
If we try to run the test now, nothing will be run:
343
346
344
347
.. code-block:: bash
@@ -355,7 +358,7 @@ If we try to run the test now, nothing will be run:
355
358
This happens because ReFrame by default defines a generic system and environment.
356
359
You may have noticed in our first run the ``@generic:default+builtin`` notation printed after test name.
357
360
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.
359
362
They make the minimum possible assumptions:
360
363
361
364
- 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:
387
390
Their definitions are resolved in the :attr:`~config.environments` section.
388
391
* 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.
389
392
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
+
390
406
391
407
There are many options that we can be define for systems, partitions and environments.
392
408
We will cover several of them as we go through the tutorial, but for the complete reference you should refer to :doc:`config_reference`.
0 commit comments