-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add new legacy bound * More updates to readme * Bump citation file
- Loading branch information
Showing
3 changed files
with
25 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,37 +5,36 @@ | |
|
||
This is an extension for [DOLFINx](https://github.com/FEniCS/dolfinx/) to checkpoint meshes, meshtags and functions using [ADIOS2](https://adios2.readthedocs.io/en/latest/). | ||
|
||
## Docker | ||
The code uses the adios2 Python-wrappers to write DOLFINx objects to file, supporting N-to-M (*recoverable*) and N-to-N (*snapshot*) checkpointing. | ||
See: [Checkpointing in DOLFINx - FEniCS 23](https://jsdokken.com/checkpointing-presentation/#/) for more information. | ||
|
||
For scalability, the code uses [MPI Neighbourhood collectives](https://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/node200.htm) for communication across processes. | ||
|
||
## Installation | ||
|
||
### Docker | ||
ADIOS2 is installed in the official DOLFINx containers. | ||
```bash | ||
docker run -ti -v $(pwd):/root/shared -w /root/shared --name=dolfinx-checkpoint ghcr.io/fenics/dolfinx/dolfinx:nightly | ||
``` | ||
|
||
## Conda | ||
To use with conda (DOLFINx release v0.7.0 works with v0.7.1 of ADIOS4DOLFINx) | ||
### Conda | ||
To use with conda (DOLFINx release v0.7.0 works with v0.7.2 of ADIOS4DOLFINx) | ||
```bash | ||
conda create -n dolfinx-checkpoint python=3.10 | ||
conda activate dolfinx-checkpoint | ||
conda install -c conda-forge fenics-dolfinx pip adios2 | ||
python3 -m pip install git+https://github.com/jorgensd/[email protected].1 | ||
python3 -m pip install git+https://github.com/jorgensd/[email protected].2 | ||
``` | ||
|
||
# Long term plan | ||
The long term plan is to get this library merged into DOLFINx (rewritten in C++ with appropriate Python-bindings). | ||
_________________ | ||
|
||
# Functionality | ||
## Functionality | ||
|
||
## Implementation details | ||
The code uses the adios2 Python-wrappers to write DOLFINx objects to file, supporting N-to-M (*recoverable*) and N-to-N (*snapshot*) checkpointing. | ||
See: [Checkpointing in DOLFINx - FEniCS 23](https://jsdokken.com/checkpointing-presentation/#/) for more information. | ||
|
||
For scalability, the code uses [MPI Neighbourhood collectives](https://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/node200.htm) for communication across processes. | ||
|
||
## DOLFINx | ||
### DOLFINx | ||
- Reading and writing meshes, using `adios4dolfinx.read/write_mesh` | ||
- Reading and writing meshtags associated to meshes `adios4dolfinx.read/write_meshtags` | ||
- Reading checkpoints for any element (serial and parallel, one checkpoint per file). Use `adios4dolfinx.read/write_function`. | ||
- Reading checkpoints for any element (serial and parallel, arbitrary number of functions and timesteps per file). Use `adios4dolfinx.read/write_function`. | ||
|
||
> [!IMPORTANT] | ||
> For a checkpoint to be valid, you first have to store the mesh with `write_mesh`, then use `write_function` to append to the checkpoint file. | ||
|
@@ -46,15 +45,20 @@ For scalability, the code uses [MPI Neighbourhood collectives](https://www.mpi-f | |
> [!IMPORTANT] | ||
> Only one mesh per file is allowed | ||
|
||
### Backwards compatibility | ||
> [!WARNING] | ||
> If you are using checkpoints written with `adios4dolfinx` prior to time-dependent/multi-function support, please use the `legacy=True` flag for reading in the checkpoint | ||
> If you are using checkpoints written with `adios4dolfinx<0.7.2` please use the `legacy=True` flag for reading in the checkpoint with | ||
> with any newer version | ||
|
||
## Legacy DOLFIN | ||
### Legacy DOLFIN | ||
Only checkpoints for `Lagrange` or `DG` functions are supported from legacy DOLFIN | ||
- Reading meshes from the DOLFIN HDF5File-format | ||
- Reading checkpoints from the DOLFIN HDF5File-format (one checkpoint per file only) | ||
- Reading checkpoints from the DOLFIN XDMFFile-format (one checkpoint per file only, and only uses the `.h5` file) | ||
|
||
See the [API](./docs/api) for more information. | ||
_________________ | ||
|
||
## Long term plan | ||
The long term plan is to get this library merged into DOLFINx (rewritten in C++ with appropriate Python-bindings). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters