Skip to content

Commit 4a8b8a2

Browse files
glesurvrevilleHal Baljeankpf
authored
V2.2.02 (#355)
## [2.2.02] 2025-10-18 ### Changed - Added a module to add explicit units (#338) - fixed a bug that could lead to incorrect profiling information on non-blocking cuda loops (#341) - fixed a bug that could lead to incorrect energy budget when shearing box and fargo were both enabled (#346) - fixed a bug that led to incorrect BX2 reconstruction when axis is not used on both sides of the domain (#345) - fixed a bug that led to incorrect reflective boundary conditions on B when DIMENSIONS < 3 (#345) - fixed a bug that led to incorrect dust stopping time when the adiabatic equation of state is used with "size" drag law (#353) ### Added - documentation for the continuous integration (#354) --------- Co-authored-by: Victor Réville <victorreville@gmail.com> Co-authored-by: Hal Bal <vreville@irap.omp.eu> Co-authored-by: Jean Kempf <jean.kempf@irap.omp.eu> Co-authored-by: Victor Réville <47865059+vreville@users.noreply.github.com>
1 parent ede2e1f commit 4a8b8a2

22 files changed

Lines changed: 563 additions & 84 deletions

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.2.02] 2025-10-18
8+
### Changed
9+
10+
- Added a module to add explicit units (#338)
11+
- fixed a bug that could lead to incorrect profiling information on non-blocking cuda loops (#341)
12+
- fixed a bug that could lead to incorrect energy budget when shearing box and fargo were both enabled (#346)
13+
- fixed a bug that led to incorrect BX2 reconstruction when axis is not used on both sides of the domain (#345)
14+
- fixed a bug that led to incorrect reflective boundary conditions on B when DIMENSIONS < 3 (#345)
15+
- fixed a bug that led to incorrect dust stopping time when the adiabatic equation of state is used with "size" drag law (#353)
16+
17+
### Added
18+
19+
- documentation for the continuous integration (#354)
20+
721
## [2.2.01] 2025-04-16
822
### Changed
923

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ set (CMAKE_CXX_STANDARD 17)
66

77
set(Idefix_VERSION_MAJOR 2)
88
set(Idefix_VERSION_MINOR 2)
9-
set(Idefix_VERSION_PATCH 01)
9+
set(Idefix_VERSION_PATCH 02)
1010

11-
project (idefix VERSION 2.2.01)
11+
project (idefix VERSION 2.2.02)
1212
option(Idefix_MHD "enable MHD" OFF)
1313
option(Idefix_MPI "enable Message Passing Interface parallelisation" OFF)
1414
option(Idefix_HIGH_ORDER_FARGO "Force Fargo to use a PPM reconstruction scheme" OFF)

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
author = 'Geoffroy Lesur'
2424

2525
# The full version, including alpha/beta/rc tags
26-
release = '2.2.00'
26+
release = '2.2.02'
2727

2828

2929

doc/source/faq.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,18 @@ How can I stop the code without loosing the current calculation?
6161
I'm doing performance measures. How do I disable all outputs in *Idefix*?
6262
Add ``-nowrite`` when you call *Idefix* executable.
6363

64+
VTK output appears corrupted when running with MPI (OpenMPI)
65+
Some OpenMPI configurations (notably OpenMPI 4 with the ompio component) can produce corrupted VTK/VTU output when running with MPI enabled. This appears to be caused by bugs in OpenMPI's ompio I/O component.
66+
Disable ompio so OpenMPI falls back to ROMIO (MPICH's MPI-IO), which is typically more stable:
6467

65-
Developement
66-
------------
68+
.. code-block:: console
69+
70+
mpirun --mca io ^ompio ...
71+
72+
This has resolved intermittent corruption for several users. See issue #348 for discussion and reports.
73+
74+
Development
75+
-----------
6776

6877
I have a serious bug (e.g. segmentation fault), in my setup, how do I proceed?
6978
Add ``-DIdefix_DEBUG=ON`` to ``cmake`` and recompile to find out exactly where the code crashes (see :ref:`debugging`).

doc/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ The Idefix collaboration benefited from funding from the “Programme National d
122122
reference
123123
modules
124124
programmingguide
125+
testing
125126
performances
126127
kokkos
127128
contributing

doc/source/reference/idefix.ini.rst

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,10 @@ section as followed:
265265
+----------------+-------------------------+---------------------------------------------------------------------------------------------+
266266
| Mcentral | real | | Mass of the central object when a central potential is enabled (see above). Default is 1. |
267267
+----------------+-------------------------+---------------------------------------------------------------------------------------------+
268-
| gravCst | real | | Set the value of the gravitational constant :math:`G_c` used by the central |
268+
| gravCst | real or string | | Set the value of the gravitational constant :math:`G_c` used by the central |
269269
| | | | mass potential and self-gravitational potential (when enabled) ). Default is 1. |
270+
| | | | If set to "units", Idefix will compute the gravitational constant from the user units |
271+
| | | | defined in the units section (see :ref:`unitsSection`). |
270272
+----------------+-------------------------+---------------------------------------------------------------------------------------------+
271273
| bodyForce | string | | Adds an acceleration vector to each cell of the domain. The only value allowed |
272274
| | | | is ``userdef``. The ``Gravity`` class then expects a user-defined bodyforce function to |
@@ -310,7 +312,28 @@ of gravitational potential in the ``Gravity`` section (see :ref:`gravitySection`
310312
| | | | Default is 1 (i.e. self-gravity is computed at every cycle). |
311313
+----------------+-------------------------+---------------------------------------------------------------------------------------------+
312314

315+
.. _unitsSection:
313316

317+
``Units`` section
318+
------------------
319+
320+
This optional section controls how the code handles units. By default, Idefix work "unit free" and this section is not useful.
321+
However, some physical processes like self-gravity or radiative transfer require the explicit use of units to define natural constants.
322+
These entries define how one code units should be converted to CGS units. When used, the following values should be set:
323+
324+
+----------------+--------------------+-----------------------------------------------------------------------------------------------------------+
325+
| Entry name | Parameter type | Comment |
326+
+================+====================+===========================================================================================================+
327+
| length | float | The code unit length: 1 code unit = `length` cm. 1 by default. |
328+
+----------------+--------------------+-----------------------------------------------------------------------------------------------------------+
329+
| velocity | float | The code unit velocity: 1 code unit = `velocity` cm/s. 1 by default. |
330+
+----------------+--------------------+-----------------------------------------------------------------------------------------------------------+
331+
| density | float | The code unit density: 1 code unit = `density` g/cm^3. 1 by default. |
332+
+----------------+--------------------+-----------------------------------------------------------------------------------------------------------+
333+
334+
.. note::
335+
The units module automatically reconstruct all of the units (time, temperature, magnetic field, etc.) from the above 3 fundamental constants. These can
336+
all be obtained from the global object ``idfx::units``. Note however that the code outputs remain in code units, even if `[Units]` are defined.
314337

315338
``RKL`` section
316339
------------------

doc/source/testing.rst

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
Continuous Integration (CI) tests
2+
================================
3+
4+
This document describes the GitHub Actions continuous-integration setup used to run the Idefix
5+
test-suite. The CI is implemented by two workflows checked in .github/workflows:
6+
7+
- .github/workflows/idefix-ci.yml
8+
- .github/workflows/idefix-ci-jobs.yml
9+
10+
Overview
11+
--------
12+
13+
The CI is split in two layers:
14+
15+
- A top-level workflow (.github/workflows/idefix-ci.yml) that:
16+
17+
- runs a Linter job (pre-commit) on push / PR / manual dispatch,
18+
- then calls a reusable workflow for different compiler/backends (intel, gcc, cuda)
19+
providing two inputs: TESTME_OPTIONS and IDEFIX_COMPILER.
20+
21+
- A reusable workflow (.github/workflows/idefix-ci-jobs.yml) that:
22+
23+
- defines the actual test jobs grouped by physics domain (ShocksHydro, ParabolicHydro,
24+
ShocksMHD, ParabolicMHD, Fargo, ShearingBox, SelfGravity, Planet, Dust, Braginskii,
25+
Examples, Utils),
26+
- runs test scripts on self-hosted runners,
27+
- expects the repository to be checked out with submodules,
28+
- invokes the repository-provided CI helper scripts to configure / build / run tests.
29+
30+
Key configuration points
31+
------------------------
32+
33+
- Inputs passed from the top-level workflow:
34+
35+
- TESTME_OPTIONS (string): flags forwarded to the per-test runner (examples: -cuda, -Werror,
36+
-intel, -all).
37+
- IDEFIX_COMPILER (string): which compiler the tests should use (e.g. icc, gcc, nvcc).
38+
39+
- Environment variables set by the reusable workflow:
40+
41+
- IDEFIX_COMPILER, TESTME_OPTIONS, PYTHONPATH, IDEFIX_DIR
42+
43+
- Linter job:
44+
45+
- Runs only when repository is the main project (not arbitrary forks).
46+
- Uses actions/setup-python and runs pre-commit (pre-commit/action@v3 and pre-commit-ci/lite).
47+
- Prevents regressions in style and common mistakes before running heavy test jobs.
48+
49+
- Test execution:
50+
51+
- All test jobs call the repository script scripts/ci/run-tests with a test directory
52+
and the TESTME_OPTIONS flags. Example invocation (from the workflows):
53+
scripts/ci/run-tests $IDEFIX_DIR/test/HD/sod -all $TESTME_OPTIONS
54+
55+
- The reusable workflow is written to execute many test directories in separate job steps,
56+
so each physics group is kept logically separated in CI logs.
57+
58+
Runners and prerequisites
59+
-------------------------
60+
61+
- The heavy numerical tests run on self-hosted runners (see runs-on: self-hosted).
62+
The CI assumes appropriate hardware and dependencies are available on those runners
63+
(compilers, MPI, GPUs when CUDA/HIP flags are used, required system libraries).
64+
65+
- The workflows check out the repository and its submodules. Submodules must be available
66+
on the CI machines.
67+
68+
How tests are driven (testme scripts)
69+
-------------------------------------
70+
71+
Each test directory contains a small Python "testMe" driver that uses the helper Python
72+
class documented in the repository:
73+
74+
- See the test helper documentation: :doc:`idfxTest <testing/idfxTest>`
75+
76+
That helper (idfxTest) is responsible for:
77+
78+
- parsing TESTME_OPTIONS-like flags (precision, MPI, CUDA, reconstruction, vector potential, etc.),
79+
- calling configure / compile / run,
80+
- performing standard python checks and non-regression (RMSE) comparisons against
81+
reference dumps,
82+
- optionally creating / updating reference dumps (init mode).
83+
84+
Practical examples
85+
------------------
86+
87+
- Example of a CI invocation (triggered by workflows):
88+
89+
- Top-level workflow calls the reusable jobs workflow for each compiler/back-end, e.g.
90+
TESTME_OPTIONS="-cuda -Werror" IDEFIX_COMPILER=nvcc
91+
92+
- Running tests locally (developer machine)
93+
- You can mimic what CI does by calling the repository helper script directly. Example:
94+
scripts/ci/run-tests /path/to/idefix/test/HD/sod -all -mpi -dec 2 2 -reconstruction 3 -single
95+
96+
Notes for maintainers
97+
---------------------
98+
99+
- The reusable jobs workflow contains a commented concurrency block for optional cancellation
100+
of in-flight runs — consider enabling it if you want to auto-cancel redundant CI runs.
101+
- Because tests are run on self-hosted runners, ensure the pools have the required compilers,
102+
MPI stacks and GPU drivers for the requested TESTME_OPTIONS.
103+
- Keep TESTME_OPTIONS in sync with the options understood by the test helper documented in
104+
:doc:`idfxTest <testing/idfxTest>`.
105+
106+
Relevant files
107+
--------------
108+
109+
- Workflow entry point: .github/workflows/idefix-ci.yml
110+
- Reusable jobs: .github/workflows/idefix-ci-jobs.yml
111+
- Test helper documentation: :doc:`idfxTest <testing/idfxTest>`
112+
113+
.. toctree::
114+
:maxdepth: 2
115+
:caption: Contents:
116+
117+
testing/idfxTest.rst

0 commit comments

Comments
 (0)