Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/idefix-ci-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ on:
paths-ignore:
- '.github/ISSUE_TEMPLATE/*'

permissions: {}

jobs:
ReadTheDocs:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false
- name: install doxygen
run: sudo apt-get install -y doxygen
- name: install python dependencies
Expand Down
71 changes: 58 additions & 13 deletions .github/workflows/idefix-ci-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,34 @@ env:
PYTHONPATH: ${{ github.workspace }}
IDEFIX_DIR: ${{ github.workspace }}

permissions: {}

jobs:
ShocksHydro:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: Sod test
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/sod -all $TESTME_OPTIONS
- name: Isothermal Sod test
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/sod-iso -all $TESTME_OPTIONS
- name: Mach reflection test
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD//MachReflection -all $TESTME_OPTIONS
- name: Sedov blast wave
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/SedovBlastWave -all $TESTME_OPTIONS

ParabolicHydro:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: Viscous flow past cylinder
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/ViscousFlowPastCylinder -all $TESTME_OPTIONS
- name: Viscous disk
Expand All @@ -54,25 +60,31 @@ jobs:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: MHD Sod test
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sod -all $TESTME_OPTIONS
- name: MHD Isothermal Sod test
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sod-iso -all $TESTME_OPTIONS
- name: Orszag Tang
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang -all $TESTME_OPTIONS
- name: Orszag Tang 3D+restart tests
- name: Orszag Tang 3D
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang3D -all $TESTME_OPTIONS
- name: Linear wave test
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/LinearWaveTest -all $TESTME_OPTIONS
- name: Axis Flux tube
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/AxisFluxTube -all $TESTME_OPTIONS

ParabolicMHD:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: Ambipolar C Shock
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/AmbipolarCshock -all $TESTME_OPTIONS
- name: Ambipolar C Shock 3D
Expand All @@ -89,9 +101,10 @@ jobs:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: Fargo + planet
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/FargoPlanet -all $TESTME_OPTIONS
- name: Fargo MHD spherical
Expand All @@ -102,9 +115,10 @@ jobs:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: Hydro shearing box
run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/ShearingBox -all $TESTME_OPTIONS
- name: MHD shearing box
Expand All @@ -115,9 +129,10 @@ jobs:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: Jeans Instability
run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/JeansInstability -all $TESTME_OPTIONS
- name: Random sphere spherical
Expand All @@ -134,9 +149,10 @@ jobs:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: 3 body
run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/Planet3Body -all $TESTME_OPTIONS
- name: migration
Expand All @@ -155,9 +171,10 @@ jobs:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: Energy conservation
run: scripts/ci/run-tests $IDEFIX_DIR/test/Dust/DustEnergy -all $TESTME_OPTIONS
- name: Dusty wave
Expand All @@ -168,24 +185,28 @@ jobs:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: MTI
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/MTI -all $TESTME_OPTIONS
- name: Spherical anisotropic diffusion
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragTDiffusion -all $TESTME_OPTIONS
- name: Spherical anisotropic viscosity
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragViscosity -all $TESTME_OPTIONS
- name: Collisionless thermal conduction
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/clessTDiffusion -all $TESTME_OPTIONS

Examples:
needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: Run examples test
run: cd test && ./checks_examples.sh $TEST_OPTIONS

Expand All @@ -194,10 +215,34 @@ jobs:
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: Lookup table
run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/lookupTable -all $TESTME_OPTIONS
- name: Dump Image
run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/dumpImage -all $TESTME_OPTIONS
- name: Column density
run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/columnDensity -all $TESTME_OPTIONS

IOs:
needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
persist-credentials: false
- name: Restart dumps
run: scripts/ci/run-tests $IDEFIX_DIR/test/IO/dump -all $TESTME_OPTIONS
- name: Pydefix
run: |
python3 -m venv $IDEFIX_DIR/test/IO/pydefix/env
source $IDEFIX_DIR/test/IO/pydefix/env/bin/activate
python3 -m pip install -r $IDEFIX_DIR/test/IO/pydefix/python_requirements.txt
scripts/ci/run-tests $IDEFIX_DIR/test/IO/pydefix -all $TESTME_OPTIONS

- name: xdmf
run: scripts/ci/run-tests $IDEFIX_DIR/test/IO/xdmf -all $TESTME_OPTIONS
16 changes: 10 additions & 6 deletions .github/workflows/idefix-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,38 @@ on:
paths-ignore:
- '.github/ISSUE_TEMPLATE/*'

permissions: {}

jobs:
Linter:
# Don't do this in forks
if: ${{ github.repository == 'idefix-code/idefix' || github.repository == 'glesur/idefix' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
with:
python-version: 3.x
- uses: pre-commit/action@v3.0.0
- uses: pre-commit-ci/lite-action@v1.0.0
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # v3.0.0
- uses: pre-commit-ci/lite-action@50143aaf27e2c42e75a5e06185a471d9582e89df # v1.0.0
if: always()

icc-jobs:
needs: Linter
name: CPU Jobs (intel OneApi)
uses: ./.github/workflows/idefix-ci-jobs.yml
with:
TESTME_OPTIONS: -intel -Werror
TESTME_OPTIONS: -intel -Werror -ccache
IDEFIX_COMPILER: icc

gcc-jobs:
needs: Linter
name: CPU Jobs (gcc)
uses: ./.github/workflows/idefix-ci-jobs.yml
with:
TESTME_OPTIONS: -Werror
TESTME_OPTIONS: -Werror -ccache
IDEFIX_COMPILER: gcc

cuda-jobs:
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ doc/source/_static/*
doc/source/_public/*
doc/source/api/*
doc/source/xml/*
doc/env/*

# compiled files
**/__pycache__
Expand All @@ -21,6 +22,9 @@ CMakeFiles
CMakeCache.txt
cmake_install.cmake
Makefile.local
git-state.txt
Kokkos_Version_info.*


# test artifacts
test/**/*.o
Expand All @@ -35,6 +39,9 @@ test/**/KokkosCore*
test/**/*.csv
test/**/*.pyc
test/**/*.dat
test/**/cmake_packages*
test/**/
idefix-tests.junit.xml

# machine specific cache and hidden files
.*
Expand Down
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ repos:
- id: check-added-large-files
args: ['--maxkb=100'] ## prevent files larger than 100kB from being commited (exclude git lfs files)

- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.23.1
hooks:
- id: zizmor

- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
rev: v1.1.2
hooks:
Expand All @@ -40,9 +45,10 @@ repos:
- F403 # ignore import *

- repo: https://github.com/neutrinoceros/inifix
rev: v5.0.2
rev: v6.1.2
hooks:
- id: inifix-format
files: ^(test/).*\.(ini)$ # want to skip pytest.ini

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
Expand Down
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,72 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.3.0] 2026-04-21
### Changed

- fixed a bug that could lead to diverging results around the spherical axis in non-ideal MHD in 2.5D and 3D (#356)
- refactor of the MPI exchange routines and boundary routines to avoid buildup of roundoff errors at domain faces/edges that could lead to the sudden burst of div(B) or incoherences between MPI sub-domains (#357)
- fixed a bug that could lead to compilations error when targetting AMD APUs (#359)
- fixed a bug that led to the generation of incorrect subviews in 2.5D with vector_potential enabled (#362)
- fixed a bug that could lead to memory corruption when using the UCT_HLLD emf reconstruction scheme and DIMENSIONS < COMPONENTS (#363)
- reorganise the test to separate specific IO tests from physics tests (#367)

### Added
- magnetic vector potential is now accessible from pydefix when enabled (#361)
- use ccache in the test suite to reduce the runtime of continuous integration (#364)
- automatically detects pybind11 path with cmake when using pydefix (#367)
- skeleton to run the test suite with pytest (#366)


## [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)
- fixed div(B) normalisation to avoid "too large div(B)" errors when this is actually due to nulls in |B|
- fixed insecure github actions settings (#373)

### Added

- documentation for the continuous integration (#354)

## [2.2.01] 2025-04-16
### Changed

- Fix a bug that led to instabilities in the RKL scheme with very small grid spacings (#323)
- Fix a bug that prevented Idefix from running with Sycl backend (required on Intel GPUs) (#331)
- Fix an error that led to incorrect electrical current regularisation around the polar axis in non-Ideal MHD (#333)
- Improve div(B) checks with a dimensionless implementation, avoiding too large divB errors in grids with large stretch factors (#334)

### Added

- Time-Implicit drag for multiple dust species, preventing small time steps for strongly coupled dust grains (#321)
- Collisionless heat flux added to the Braginskii module (#317)
- New global `idfx::DumpArray` debugging function to dump any Idefix array into a numpy array that can read from python (#318)
- Automatic benchmark plots in the documentation (#319)
- More CI tests of grid coarsening (#329)
- Dump outputs based on wallclock time (#335)


## [2.2.00] 2025-01-17
### Changed

- Fix a bug that could lead to a segmentation fault when MHD+Fargo+MPI (with X3 domain decomposition) are all enabled (#295)
- Fix a bug that could result in an incorrect magnetic field when initialising B from the vector potential in non-axisymmetric spherical geometry (#293)
- Fix a bug that could result in Idefix believing the MPI library is not Cuda aware for some versions of OpenMPI (#310)
- Ensure that the behaviour in 1D Spherical geometry is identical to Pluto (#291)

### Added

- Add the python interface "pydefix", allowing users to initialise and analyse Idefix simulations live from Python without writing any file (#277)
- Add the native Idefix coordinates in VTK file to simplify postprocessing (#292)
- Add code testing on CPU targets using gcc and Intel Oneapi (#300)


## [2.1.02] 2024-10-24
### Changed

Expand Down
Loading