Skip to content

Commit e1003e8

Browse files
authored
Merge branch 'master' into bugfix/perflog-compat-headers
2 parents f9ab2a1 + 4d8753a commit e1003e8

File tree

10 files changed

+58
-38
lines changed

10 files changed

+58
-38
lines changed

docs/config_reference.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ System Configuration
115115
:required: Yes
116116

117117
A list of hostname regular expression patterns in Python `syntax <https://docs.python.org/3.8/library/re.html>`__, which will be used by the framework in order to automatically select a system configuration.
118-
For the auto-selection process, see `here <configure.html#picking-a-system-configuration>`__.
118+
For the auto-selection process, check the configuration of the :attr:`~config.autodetect_methods` option.
119119

120120
.. py:attribute:: systems.max_local_jobs
121121
@@ -244,6 +244,8 @@ System Configuration
244244
This option is broken in 4.0.
245245

246246

247+
.. _system-partition-configuration:
248+
247249
System Partition Configuration
248250
==============================
249251

@@ -470,7 +472,7 @@ System Partition Configuration
470472
.. versionadded:: 4.0.0
471473

472474
ReFrame also allows you to register your own custom launchers simply by defining them in the configuration.
473-
You can follow a small tutorial `here <tutorial_advanced.html#adding-a-custom-launcher-to-a-partition>`__.
475+
You can follow a small tutorial :ref:`here <custom-launchers>`.
474476

475477

476478
.. py:attribute:: systems.partitions.access
@@ -550,7 +552,7 @@ System Partition Configuration
550552
:default: ``8``
551553

552554
The maximum number of concurrent regression tests that may be active (i.e., not completed) on this partition.
553-
This option is relevant only when ReFrame executes with the `asynchronous execution policy <pipeline.html#execution-policies>`__.
555+
This option is relevant only when ReFrame executes with the :ref:`asynchronous execution policy <execution-policies>`.
554556

555557

556558
.. py:attribute:: systems.partitions.prepare_cmds
@@ -568,7 +570,7 @@ System Partition Configuration
568570
:required: No
569571
:default: ``[]``
570572

571-
A list of job scheduler `resource specification <config_reference.html#custom-job-scheduler-resources>`__ objects.
573+
A list of job scheduler `resource specification <#custom-job-scheduler-resources>`__ objects.
572574

573575

574576
.. py:attribute:: systems.partitions.processor
@@ -976,7 +978,7 @@ They are associated with `system partitions <#system-partition-configuration>`__
976978
:default: ``{}``
977979

978980
Scheduler resources associated with this environments.
979-
981+
980982
This is the equivalent of a test's :attr:`~reframe.core.pipeline.RegressionTest.extra_resources`.
981983

982984
.. versionadded:: 4.6
@@ -1231,6 +1233,8 @@ All logging handlers share the following set of common attributes:
12311233
In addition to the format directives supported by the standard library's `time.strftime() <https://docs.python.org/3.8/library/time.html#time.strftime>`__ function, ReFrame allows you to use the ``%:z`` directive -- a GNU ``date`` extension -- that will print the time zone difference in a RFC3339 compliant way, i.e., ``+/-HH:MM`` instead of ``+/-HHMM``.
12321234

12331235

1236+
.. _file-handler:
1237+
12341238
The ``file`` log handler
12351239
------------------------
12361240

docs/deferrables.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Understanding the Mechanism of Deferrable Functions
33
===================================================
44

55
This section describes the mechanism behind deferrable functions, which in ReFrame, they are used for sanity and performance checking.
6-
Generally, writing a new sanity function in a :class:`~reframe.core.pipeline.RegressionTest` is as straightforward as decorating a simple member function with the built-in :func:`~reframe.core.pipeline.RegressionMixin.sanity_function` decorator.
6+
Generally, writing a new sanity function in a :class:`~reframe.core.pipeline.RegressionTest` is as straightforward as decorating a simple member function with the built-in :func:`~reframe.core.builtins.sanity_function` decorator.
77
Behind the scenes, this decorator will convert the Python function into a deferrable function and schedule its evaluation for the sanity stage of the test.
88
However, when dealing with more complex scenarios such as a deferrable function taking as an argument the results from other deferrable functions, it is crucial to understand how a deferrable function differs from a regular Python function, and when is it actually evaluated.
99

@@ -181,7 +181,7 @@ There are some exceptions to this rule, though.
181181
The logical :keyword:`and`, :keyword:`or` and :keyword:`not` operators as well as the :keyword:`in` operator cannot be deferred automatically.
182182
These operators try to take the truthy value of their arguments by calling :func:`bool <python:bool>` on them.
183183
As we shall see later, applying the :func:`bool <python:bool>` function on a deferred expression causes its immediate evaluation and returns the result.
184-
If you want to defer the execution of such operators, you should use the corresponding :func:`and_ <reframe.utility.sanity.and_>`, :func:`or_ <reframe.utility.sanity.or_>`, :func:`not_ <reframe.utility.sanity.not_>` and :func:`contains <reframe.utility.sanity.contains>` functions in :mod:`reframe.utility.sanity`, which basically wrap the expression in a deferrable function.
184+
If you want to defer the execution of such operators, you should use the corresponding :func:`~reframe.utility.sanity.and_`, :func:`~reframe.utility.sanity.or_`, :func:`~reframe.utility.sanity.not_` and :func:`~reframe.utility.sanity.contains` functions in :mod:`reframe.utility.sanity`, which basically wrap the expression in a deferrable function.
185185

186186
In summary deferrable functions have the following characteristics:
187187

docs/dependencies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
How Test Dependencies Work In ReFrame
33
=====================================
44

5-
Dependencies in ReFrame are defined at the test level using the :func:`depends_on` function, but are projected to the `test cases <pipeline.html>`__ space.
5+
Dependencies in ReFrame are defined at the test level using the :func:`depends_on` function, but are projected to the :doc:`test cases <pipeline>` space.
66
We will see the rules of that projection in a while.
77
The dependency graph construction and the subsequent dependency analysis happen also at the level of the test cases.
88

docs/howto.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ Finally, if none of the above build systems fits, users are allowed to use their
2525
Using Make, CMake or Autotools
2626
------------------------------
2727

28-
We have seen already in the `tutorial <tutorial.html#compiling-the-test-code>`__ how to build a test with a single source file.
28+
We have seen already in the :ref:`tutorial <compiling-the-test-code>` how to build a test with a single source file.
2929
ReFrame can also build test code using common build systems, such as `Make <https://www.gnu.org/software/make/>`__, `CMake <https://cmake.org/>`__ or `Autotools <https://www.gnu.org/software/automake/>`__.
3030
The build system to be used is selected by the :attr:`build_system` test attribute.
31-
This is a "magic" attribute where you assign it a string and ReFrame will create the appropriate `build system object <regression_test_api.html#build-systems>`__.
31+
This is a "magic" attribute where you assign it a string and ReFrame will create the appropriate :ref:`build system object <build-systems>`.
3232
Each build system can define its own properties, but some build systems have a common set of properties that are interpreted accordingly.
3333
Let's see a version of the STREAM benchmark that uses ``make``:
3434

@@ -84,7 +84,7 @@ In this case, only the flags requested by the test will be emitted.
8484

8585
The Autotools and CMake build systems are quite similar.
8686
For passing ``configure`` options, the :attr:`~reframe.core.buildsystems.ConfigureBasedBuildSystem.config_opts` build system attribute should be set, whereas for ``make`` options the :attr:`~reframe.core.buildsystems.ConfigureBasedBuildSystem.make_opts` should be used.
87-
The `OSU benchmarks <tutorial.html#multi-node-tests>`__ in the main tutorial use the Autotools build system.
87+
The :ref:`OSU benchmarks <multi-node-tests>` in the main tutorial use the Autotools build system.
8888

8989
Finally, in all three build systems, the :attr:`~reframe.core.buildsystems.Make.max_concurrency` can be set to control the number of parallel make jobs.
9090

@@ -118,7 +118,7 @@ For running this test, we need the following Docker image:
118118
docker run -h myhost --mount type=bind,source=$(pwd)/examples/,target=/home/user/reframe-examples --workdir=/home/user/reframe-examples/tutorial -it reframe-eb-spack:latest /bin/bash -l
119119
120120
121-
EasyBuild requires a `modules system <#working-with-environment-modules>`__ to run, so we need a configuration file that sets the modules system of the current system:
121+
EasyBuild requires a :ref:`modules system <working-with-environment-modules>` to run, so we need a configuration file that sets the modules system of the current system:
122122

123123
.. literalinclude:: ../examples/tutorial/config/baseline_modules.py
124124
:caption:
@@ -404,10 +404,10 @@ If you used an environment module to load ReFrame, e.g., ``reframe``, you can us
404404
Working with low-level dependencies
405405
===================================
406406

407-
We have seen that `test fixtures <tutorial.html#test-fixtures>`__ fixtures introduce dependencies between tests along with a scope.
407+
We have seen that :ref:`test fixtures <test-fixtures>` fixtures introduce dependencies between tests along with a scope.
408408
It is possible to define test dependencies without a scope using the low-level test dependency API.
409409
In fact, test fixtures translate to that low-level API.
410-
In this how-to, we will rewrite the `OSU benchmarks example <tutorial.html#multi-node-tests>`__ of the main tutorial to use the low-level dependency API.
410+
In this how-to, we will rewrite the :ref:`OSU benchmarks example <multi-node-tests>` of the main tutorial to use the low-level dependency API.
411411

412412
Here is the full code:
413413

@@ -560,7 +560,7 @@ The following is an example of ``.gitlab-ci.yml`` file that does exactly that:
560560
561561
It defines two stages.
562562
The first one, called ``generate``, will call ReFrame to generate the pipeline specification for the desired tests.
563-
All the usual `test selection options <manpage.html#test-filtering>`__ can be used to select specific tests.
563+
All the usual :ref:`test selection options <test-filtering>` can be used to select specific tests.
564564
ReFrame will process them as usual, but instead of running the selected tests, it will generate the correct steps for running each test individually as a Gitlab job in a child pipeline.
565565
The generated ReFrame command that will run each individual test reuses the :option:`-C`, :option:`-R`, :option:`-v` and :option:`--mode` options passed to the initial invocation of ReFrame that was used to generate the pipeline.
566566
Users can define CI-specific execution modes in their configuration in order to pass arbitrary options to the ReFrame invocation in the child pipeline.
@@ -569,7 +569,7 @@ Finally, we pass the generated CI pipeline file to the second phase as an artifa
569569
If ``image`` keyword is defined in ``.gitlab-ci.yml``, the emitted pipeline will use the same image as the one defined in the parent pipeline.
570570
Besides, each job in the generated pipeline will output a separate junit report which can be used to create GitLab badges.
571571

572-
The following figure shows one part of the automatically generated pipeline for the test graph depicted `above <#fig-deps-complex>`__.
572+
The following figure shows one part of an automatically generated pipeline.
573573

574574
.. figure:: _static/img/gitlab-ci.png
575575
:align: center
@@ -1036,7 +1036,7 @@ Rerunning with increased verbosity as the message suggests will give a full trac
10361036
Debugging sanity and performance patterns
10371037
-----------------------------------------
10381038

1039-
When creating a new test that requires a complex output parsing for the sanity checking or for extracting the figures of merit, tuning the functions decorated by :attr:`@sanity_function<reframe.core.pipeline.RegressionMixin.sanity_function>` or :attr:`@performance_function<reframe.core.pipeline.RegressionMixin.performance_function>` may involve some trial and error to debug the complex regular expressions required.
1039+
When creating a new test that requires a complex output parsing for the sanity checking or for extracting the figures of merit, tuning the functions decorated by :attr:`@sanity_function<reframe.core.builtins.sanity_function>` or :attr:`@performance_function<reframe.core.builtins.performance_function>` may involve some trial and error to debug the complex regular expressions required.
10401040
For lightweight tests which execute in few seconds, this trial and error may not be an issue at all.
10411041
However, when dealing with tests which take longer to run, this method can quickly become tedious and inefficient.
10421042

@@ -1097,7 +1097,7 @@ After loading the configuration, ReFrame will print out its relevant environment
10971097
Before attempting to load a file, it will validate it and check if it looks like a ReFrame test.
10981098
If it does, it will load that file by importing it.
10991099
This is where any ReFrame tests are instantiated and initialized (see ``Loaded 3 test(s)``), as well as the actual test cases (combination of tests, system partitions and environments) are generated.
1100-
Then the test cases are filtered based on the various `filtering command line options <manpage.html#test-filtering>`__ as well as the programming environments that are defined for the currently selected system.
1100+
Then the test cases are filtered based on the various :ref:`filtering command line options <test-filtering>` as well as the programming environments that are defined for the currently selected system.
11011101
Finally, the test case dependency graph is built and everything is ready for running (or listing).
11021102

11031103
Try passing a specific system or partition with the :option:`--system` option or modify the test (e.g., removing the decorator that registers it) and see how the logs change.
@@ -1124,7 +1124,7 @@ The following is the actual implementation of the ``mpirun`` launcher in ReFrame
11241124

11251125
Each launcher must derive from the abstract base class :class:`~reframe.core.launchers.JobLauncher` ands needs to implement the :func:`~reframe.core.launchers.JobLauncher.command` method and, optionally, change the default :func:`~reframe.core.launchers.JobLauncher.run_command` method.
11261126

1127-
The :func:`~reframe.core.launchers.JobLauncher.command` returns a list of command tokens that will be combined with any user-supplied `options <regression_test_api.html#reframe.core.launchers.JobLauncher.options>`__ by the :func:`~reframe.core.launchers.JobLauncher.run_command` method to generate the actual launcher command line.
1127+
The :func:`~reframe.core.launchers.JobLauncher.command` returns a list of command tokens that will be combined with any user-supplied job launcher :attr:`~reframe.core.launchers.JobLauncher.options` by the :func:`~reframe.core.launchers.JobLauncher.run_command` method to generate the actual launcher command line.
11281128
Notice you can use the ``job`` argument to get job-specific information that will allow you to construct the correct launcher invocation.
11291129

11301130
If you use a Python-based configuration file, you can define your custom launcher directly inside your config as follows:

docs/manpage.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Synopsis
1212
Description
1313
-----------
1414

15-
ReFrame provides both a `programming interface <regression_test_api.html>`__ for writing regression tests and a command-line interface for managing and running the tests, which is detailed here.
15+
ReFrame provides both a :doc:`programming interface <regression_test_api>` for writing regression tests and a command-line interface for managing and running the tests, which is detailed here.
1616
The ``reframe`` command is part of ReFrame's frontend.
1717
This frontend is responsible for loading and running regression tests written in ReFrame.
1818
ReFrame executes tests by sending them down to a well defined pipeline.
@@ -385,7 +385,7 @@ Options controlling ReFrame output
385385

386386
Directory prefix for logging performance data.
387387

388-
This option is relevant only to the ``filelog`` `logging handler <config_reference.html#the-filelog-log-handler>`__.
388+
This option is relevant only to the ``filelog`` :ref:`logging handler <filelog-handler>`.
389389

390390
This option can also be set using the :envvar:`RFM_PERFLOG_DIR` environment variable or the :attr:`~config.logging.handlers_perflog..filelog..basedir` logging handler configuration parameter.
391391

@@ -441,7 +441,7 @@ Options controlling ReFrame output
441441

442442
Save ReFrame log files in the output directory before exiting.
443443

444-
Only log files generated by ``file`` `log handlers <config_reference.html#the-file-log-handler>`__ will be copied.
444+
Only log files generated by ``file`` :ref:`log handlers <file-handler>` will be copied.
445445

446446
This option can also be set using the :envvar:`RFM_SAVE_LOG_FILES` environment variable or the :attr:`~config.general.save_log_files` general configuration parameter.
447447

@@ -1175,7 +1175,7 @@ Notice that this example leads to a name conflict with the old naming scheme, si
11751175

11761176
Each test is also associated with a hash code that is derived from the test name, its parameters and their values.
11771177
As in the example listing above, the hash code of each test is printed with the :option:`-l` option and individual tests can be selected by their hash using the :option:`-n` option, e.g., ``-n /1c51609b``.
1178-
The stage and output directories, as well as the performance log file of the ``filelog`` `performance log handler <config_reference.html#the-filelog-log-handler>`__ will use the hash code for the test-specific directories and files.
1178+
The stage and output directories, as well as the performance log file of the ``filelog`` :ref:`performance log handler <filelog-handler>` will use the hash code for the test-specific directories and files.
11791179
This might lead to conflicts for tests as the one above when executing them with the asynchronous execution policy, but ensures consistency of performance record files when parameter values are added to or deleted from a test parameter.
11801180
More specifically, the test's hash will not change if a new parameter value is added or deleted or even if the parameter values are shuffled.
11811181
Test variants on the other side are more volatile and can change with such changes.
@@ -1843,13 +1843,10 @@ If no configuration file can be found in any of the predefined locations, ReFram
18431843
This configuration file is located in |reframe/core/settings.py|_.
18441844
Users may *not* modify this file.
18451845

1846-
For a complete reference of the configuration, please refer to |reframe.settings(8)|_ man page.
1846+
For a complete reference of the configuration, please refer to :doc:`reframe.settings(8) <config_reference>` man page.
18471847

18481848
.. |reframe/core/settings.py| replace:: ``reframe/core/settings.py``
18491849
.. _reframe/core/settings.py: https://github.com/reframe-hpc/reframe/blob/master/reframe/core/settings.py
1850-
.. |reframe.settings(8)| replace:: ``reframe.settings(8)``
1851-
.. _reframe.settings(8): config_reference.html
1852-
18531850

18541851
Reporting Bugs
18551852
--------------

0 commit comments

Comments
 (0)