Skip to content

nate-sime/adios4dolfinx

 
 

Repository files navigation

ADIOS2Wrappers for DOLFINx

MIT Read Latest Documentation

This is an extension for DOLFINx to checkpoint meshes, meshtags and functions using ADIOS2.

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 for more information.

For scalability, the code uses MPI Neighbourhood collectives for communication across processes.

Installation

Docker

ADIOS2 is installed in the official DOLFINx containers.

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.3 of ADIOS4DOLFINx)

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]

Functionality

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, 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.

Important

A checkpoint file supports multiple functions and multiple time steps, as long as the functions are associated with the same mesh

Important

Only one mesh per file is allowed

Backwards compatibility

Warning

If you are using v0.7.2, you are adviced to upgrade to v0.7.3, as it contains som crucial fixes for openmpi.

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 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).

About

Interface of ADIOS2 for DOLFINx

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%