From c9475318f20325c5ca77df199b26e630362e2039 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sat, 21 Jun 2025 16:08:48 +0200 Subject: [PATCH 1/2] docs: document run_tests usage --- docs/user_guide/ci.rst | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/docs/user_guide/ci.rst b/docs/user_guide/ci.rst index 7feba2074..73faac5e0 100644 --- a/docs/user_guide/ci.rst +++ b/docs/user_guide/ci.rst @@ -13,3 +13,46 @@ The CI pipeline for this project is illustrated in the following diagram: .. image:: ../_static/ci_graph.svg :alt: CI Pipeline Diagram :align: center + +Running ``scripts/run_tests.py`` +------------------------------- + +Automated tests are executed through the ``scripts/run_tests.py`` helper. The +script requires several environment variables to be defined: + +``PPC_NUM_THREADS`` + Number of threads to use. The value is also exported as + ``OMP_NUM_THREADS``. + +``PPC_NUM_PROC`` + Number of MPI processes to launch. + +``PPC_ASAN_RUN`` + Set to ``1`` when sanitizers are enabled to skip ``valgrind`` runs (optional, + default ``0``). + +``PPC_IGNORE_TEST_TIME_LIMIT`` + Set to ``1`` to disable test time limits (optional, default ``0``). + +The execution mode is selected with ``--running-type``. The most common modes +are ``threads`` for shared-memory backends and ``processes`` for MPI based +tests. ``performance`` mode runs performance benchmarks. + +Example usage: + +.. code-block:: bash + + export PPC_NUM_THREADS=4 + export PPC_NUM_PROC=2 + + # Multithreaded functional tests + python3 scripts/run_tests.py --running-type="threads" + + # MPI functional tests + python3 scripts/run_tests.py --running-type="processes" + + # Performance benchmarks + python3 scripts/run_tests.py --running-type="performance" + +Additional MPI arguments can be supplied with ``--additional-mpi-args`` when +running in ``processes`` mode. From cf1f10afe538629d7c91e4fb814733dcff2fd70c Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sat, 21 Jun 2025 18:24:51 +0200 Subject: [PATCH 2/2] Fix sphinx complaint --- docs/user_guide/ci.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user_guide/ci.rst b/docs/user_guide/ci.rst index 73faac5e0..1dae74d5d 100644 --- a/docs/user_guide/ci.rst +++ b/docs/user_guide/ci.rst @@ -15,7 +15,7 @@ The CI pipeline for this project is illustrated in the following diagram: :align: center Running ``scripts/run_tests.py`` -------------------------------- +-------------------------------- Automated tests are executed through the ``scripts/run_tests.py`` helper. The script requires several environment variables to be defined: