nate-sime / adios4dolfinx

Interface of ADIOS2 for DOLFINx

Home Page:http://jsdokken.com/adios4dolfinx/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/adios4dolfinx@v0.7.2

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

http://jsdokken.com/adios4dolfinx/

License:MIT License


Languages

Language:Python 100.0%