io4dolfinx 2.1.0__tar.gz → 2.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {io4dolfinx-2.1.0/src/io4dolfinx.egg-info → io4dolfinx-2.2.1}/PKG-INFO +18 -3
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/README.md +16 -1
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/pyproject.toml +3 -3
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/adios2/backend.py +2 -1
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/adios2/helpers.py +2 -1
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/vtkhdf/backend.py +8 -5
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1/src/io4dolfinx.egg-info}/PKG-INFO +18 -3
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx.egg-info/requires.txt +1 -1
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_backends.py +3 -1
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_converter.py +6 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_openfoam.py +1 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_vtkhdf_compression.py +37 -2
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/LICENSE +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/setup.cfg +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/ascii_helpers.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/adios2/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/adios2_serial/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/adios2_serial/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/exodus/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/exodus/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/gmsh/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/gmsh/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/h5py/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/h5py/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/h5py/storage.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/h5py_serial/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/h5py_serial/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/med/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/med/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/nastran/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/nastran/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/nastran/helpers.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/opencarp/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/opencarp/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/opencarp/helpers.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/openfoam/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/openfoam/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/openfoam/helpers.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/pyvista/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/pyvista/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/pyvista/helpers.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/serial.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/vtk_cell_types.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/vtkhdf/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/vtkhdf_serial/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/vtkhdf_serial/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/xdmf/__init__.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/backends/xdmf/backend.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/checkpointing.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/comm_helpers.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/converter.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/format.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/original_checkpoint.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/py.typed +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/readers.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/snapshot.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/structures.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/submesh.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/utils.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx/writers.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx.egg-info/SOURCES.txt +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx.egg-info/dependency_links.txt +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx.egg-info/entry_points.txt +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/src/io4dolfinx.egg-info/top_level.txt +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_attributes.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_checkpointing.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_checkpointing_vector.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_exodus.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_format_version.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_geometry_dofmap_reconstruction.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_gmsh.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_h5py_compression.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_legacy_readers.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_med.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_mesh_writer.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_meshtags.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_nastran.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_numpy_vectorization.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_opencarp.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_original_checkpoint.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_pyvista.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_snapshot_checkpoint.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_submesh.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_version.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_vtkhdf.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_write_data_input_order.py +0 -0
- {io4dolfinx-2.1.0 → io4dolfinx-2.2.1}/tests/test_xdmf.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: io4dolfinx
|
|
3
|
-
Version: 2.1
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: Checkpointing functionality for DOLFINx meshes/functions with ADIOS2
|
|
5
5
|
Author-email: "Jørgen S. Dokken" <dokken@simula.no>, "Henrik N.T. Finsberg" <henriknf@simula.no>
|
|
6
6
|
License: Copyright 2023 Jørgen S. Dokken, Henrik N.T. Finsberg and Simula Research Laboratory
|
|
@@ -15,7 +15,7 @@ Requires-Python: >=3.12
|
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
Requires-Dist: fenics-dolfinx>=0.10.0
|
|
18
|
-
Requires-Dist: fenicsx-compat>=0.
|
|
18
|
+
Requires-Dist: fenicsx-compat>=0.7.0
|
|
19
19
|
Requires-Dist: h5py>=3.10
|
|
20
20
|
Provides-Extra: adios2
|
|
21
21
|
Requires-Dist: adios2; extra == "adios2"
|
|
@@ -153,6 +153,8 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc
|
|
|
153
153
|
## Releasing
|
|
154
154
|
Versions are managed with [bump-my-version](https://callowayproject.github.io/bump-my-version/), configured in `pyproject.toml`. Between releases the version is a development version, `X.Y.Z.devN`; a release drops the suffix. Each bump commits the version change, so start from a clean working tree.
|
|
155
155
|
|
|
156
|
+
### Releasing the development version
|
|
157
|
+
|
|
156
158
|
To release the current development version, e.g. `2.1.0.dev0`, and start the next one:
|
|
157
159
|
|
|
158
160
|
```bash
|
|
@@ -162,7 +164,20 @@ bump-my-version bump minor --no-tag # 2.1.0 -> 2.2.0.dev0
|
|
|
162
164
|
|
|
163
165
|
For a patch release of 2.1, bump `patch` instead of `minor` (`2.1.0 -> 2.1.1.dev0`), then `release` (`2.1.1.dev0 -> 2.1.1`). `bump-my-version show-bump` previews what each bump gives.
|
|
164
166
|
|
|
165
|
-
|
|
167
|
+
### Patch release of the previous version
|
|
168
|
+
|
|
169
|
+
To release `main` as a patch of the previous release, e.g. `2.0.1` while `main` is at `2.1.0.dev0`, set the version directly and then restore the development version:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
bump-my-version bump --new-version 2.0.1 --no-tag # 2.1.0.dev0 -> 2.0.1
|
|
173
|
+
bump-my-version bump minor --no-tag # 2.0.1 -> 2.1.0.dev0
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
This releases everything on `main`, so use it only if `main` holds nothing but fixes since `v2.0.0`. The first bump warns that `2.1.0.dev0` does not match the last tag, `v2.0.0`; this is expected, as development versions are not tagged.
|
|
177
|
+
|
|
178
|
+
### Tagging
|
|
179
|
+
|
|
180
|
+
The bumps do not tag. A `v*` tag publishes to PyPI and the documentation, so tag the release commit (`Bump version: 2.1.0.dev0 → 2.1.0`, or `Bump version: 2.1.0.dev0 → 2.0.1`) as `v2.1.0` or `v2.0.1`, for instance by creating a GitHub release from it.
|
|
166
181
|
|
|
167
182
|
Releasing a new minor version also adds it to `.github/docs-versions.toml`, which lists the versions on the documentation website, built in the DOLFINx image of the previous one; edit that image afterwards if a newer DOLFINx release should be used. A patch release needs no entry, as each minor version is built from its newest tag.
|
|
168
183
|
|
|
@@ -114,6 +114,8 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc
|
|
|
114
114
|
## Releasing
|
|
115
115
|
Versions are managed with [bump-my-version](https://callowayproject.github.io/bump-my-version/), configured in `pyproject.toml`. Between releases the version is a development version, `X.Y.Z.devN`; a release drops the suffix. Each bump commits the version change, so start from a clean working tree.
|
|
116
116
|
|
|
117
|
+
### Releasing the development version
|
|
118
|
+
|
|
117
119
|
To release the current development version, e.g. `2.1.0.dev0`, and start the next one:
|
|
118
120
|
|
|
119
121
|
```bash
|
|
@@ -123,7 +125,20 @@ bump-my-version bump minor --no-tag # 2.1.0 -> 2.2.0.dev0
|
|
|
123
125
|
|
|
124
126
|
For a patch release of 2.1, bump `patch` instead of `minor` (`2.1.0 -> 2.1.1.dev0`), then `release` (`2.1.1.dev0 -> 2.1.1`). `bump-my-version show-bump` previews what each bump gives.
|
|
125
127
|
|
|
126
|
-
|
|
128
|
+
### Patch release of the previous version
|
|
129
|
+
|
|
130
|
+
To release `main` as a patch of the previous release, e.g. `2.0.1` while `main` is at `2.1.0.dev0`, set the version directly and then restore the development version:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
bump-my-version bump --new-version 2.0.1 --no-tag # 2.1.0.dev0 -> 2.0.1
|
|
134
|
+
bump-my-version bump minor --no-tag # 2.0.1 -> 2.1.0.dev0
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
This releases everything on `main`, so use it only if `main` holds nothing but fixes since `v2.0.0`. The first bump warns that `2.1.0.dev0` does not match the last tag, `v2.0.0`; this is expected, as development versions are not tagged.
|
|
138
|
+
|
|
139
|
+
### Tagging
|
|
140
|
+
|
|
141
|
+
The bumps do not tag. A `v*` tag publishes to PyPI and the documentation, so tag the release commit (`Bump version: 2.1.0.dev0 → 2.1.0`, or `Bump version: 2.1.0.dev0 → 2.0.1`) as `v2.1.0` or `v2.0.1`, for instance by creating a GitHub release from it.
|
|
127
142
|
|
|
128
143
|
Releasing a new minor version also adds it to `.github/docs-versions.toml`, which lists the versions on the documentation website, built in the DOLFINx image of the previous one; edit that image afterwards if a newer DOLFINx release should be used. A patch release needs no entry, as each minor version is built from its newest tag.
|
|
129
144
|
|
|
@@ -11,7 +11,7 @@ build-backend = "setuptools.build_meta"
|
|
|
11
11
|
|
|
12
12
|
[project]
|
|
13
13
|
name = "io4dolfinx"
|
|
14
|
-
version = "2.1
|
|
14
|
+
version = "2.2.1"
|
|
15
15
|
description = "Checkpointing functionality for DOLFINx meshes/functions with ADIOS2"
|
|
16
16
|
authors = [
|
|
17
17
|
{ name = "Jørgen S. Dokken", email = "dokken@simula.no" },
|
|
@@ -20,7 +20,7 @@ authors = [
|
|
|
20
20
|
license = { file = "LICENSE" }
|
|
21
21
|
readme = "README.md"
|
|
22
22
|
requires-python = ">=3.12"
|
|
23
|
-
dependencies = ["fenics-dolfinx>=0.10.0", "fenicsx-compat>=0.
|
|
23
|
+
dependencies = ["fenics-dolfinx>=0.10.0", "fenicsx-compat>=0.7.0", "h5py>=3.10"]
|
|
24
24
|
|
|
25
25
|
[project.scripts]
|
|
26
26
|
io4dolfinx-convert = "io4dolfinx.converter:main"
|
|
@@ -141,7 +141,7 @@ tag = true
|
|
|
141
141
|
sign_tags = false
|
|
142
142
|
tag_name = "v{new_version}"
|
|
143
143
|
tag_message = "Bump version: {current_version} → {new_version}"
|
|
144
|
-
current_version = "2.1
|
|
144
|
+
current_version = "2.2.1"
|
|
145
145
|
# X.Y.Z.devN while developing, X.Y.Z when released
|
|
146
146
|
parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>dev)(?P<pre_n>\d+))?'
|
|
147
147
|
serialize = ["{major}.{minor}.{patch}.{release}{pre_n}", "{major}.{minor}.{patch}"]
|
|
@@ -24,7 +24,8 @@ from .helpers import (
|
|
|
24
24
|
read_local_rows,
|
|
25
25
|
)
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
# ADIOS2 without MPI is supported through the adios2-serial backend
|
|
28
|
+
adios2 = fenicsx_compat.resolve_adios_scope(adios2, require_mpi=False)
|
|
28
29
|
|
|
29
30
|
read_mode = ReadMode.parallel
|
|
30
31
|
|
|
@@ -20,7 +20,8 @@ import numpy.typing as npt
|
|
|
20
20
|
|
|
21
21
|
from ...utils import compute_local_range, valid_function_types
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
# ADIOS2 without MPI is supported through the adios2-serial backend
|
|
24
|
+
adios2 = fenicsx_compat.resolve_adios_scope(adios2, require_mpi=False)
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
__all__ = [
|
|
@@ -45,6 +45,8 @@ _lagrange_variant_attr = "LagrangeVariant"
|
|
|
45
45
|
#: first write share the data of the first write, and the offsets alone cannot tell at
|
|
46
46
|
#: which step that was. The writer needs it to fill in steps written out of order.
|
|
47
47
|
_written_steps = "Steps"
|
|
48
|
+
#: Chunk length of the per-step datasets (time stamps, offsets, written steps).
|
|
49
|
+
_step_chunk = 1024
|
|
48
50
|
|
|
49
51
|
|
|
50
52
|
def _array_metadata_group(mesh_name: str, extension: str, name: str) -> str:
|
|
@@ -403,7 +405,7 @@ def _create_temporal_record(h5file: h5py.File, record: str, written_steps: np.nd
|
|
|
403
405
|
h5file[record].resize(written_steps.shape)
|
|
404
406
|
h5file[record][:] = written_steps
|
|
405
407
|
else:
|
|
406
|
-
h5file.create_dataset(record, data=written_steps, chunks=
|
|
408
|
+
h5file.create_dataset(record, data=written_steps, chunks=(_step_chunk,), maxshape=(None,))
|
|
407
409
|
|
|
408
410
|
|
|
409
411
|
def _get_time_index(hdf: h5py.Group, time: float | str, filename: str | Path) -> int:
|
|
@@ -772,15 +774,16 @@ def _create_dataset(
|
|
|
772
774
|
Args:
|
|
773
775
|
storage: Storage options of a bulk dataset, from
|
|
774
776
|
:func:`io4dolfinx.backends.h5py.storage.storage_options`. A new bulk dataset
|
|
775
|
-
is chunked by rows and filtered as these options say. Omitted for
|
|
776
|
-
|
|
777
|
-
therefore stay unfiltered; they
|
|
777
|
+
is chunked by rows and filtered as these options say. Omitted for the
|
|
778
|
+
per-step datasets, which every rank writes independently and which must
|
|
779
|
+
therefore stay unfiltered; they are chunked by ``_step_chunk`` entries.
|
|
778
780
|
"""
|
|
779
781
|
if name not in root.keys():
|
|
780
782
|
mode = "w"
|
|
781
783
|
if mode == "w":
|
|
782
784
|
if storage is None:
|
|
783
|
-
|
|
785
|
+
assert len(shape) == 1, "Only per-step datasets are created without storage options"
|
|
786
|
+
layout: dict[str, Any] = {"chunks": (_step_chunk,)}
|
|
784
787
|
else:
|
|
785
788
|
layout = {
|
|
786
789
|
"chunks": h5_storage.chunk_shape(storage, shape, dtype),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: io4dolfinx
|
|
3
|
-
Version: 2.1
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: Checkpointing functionality for DOLFINx meshes/functions with ADIOS2
|
|
5
5
|
Author-email: "Jørgen S. Dokken" <dokken@simula.no>, "Henrik N.T. Finsberg" <henriknf@simula.no>
|
|
6
6
|
License: Copyright 2023 Jørgen S. Dokken, Henrik N.T. Finsberg and Simula Research Laboratory
|
|
@@ -15,7 +15,7 @@ Requires-Python: >=3.12
|
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
Requires-Dist: fenics-dolfinx>=0.10.0
|
|
18
|
-
Requires-Dist: fenicsx-compat>=0.
|
|
18
|
+
Requires-Dist: fenicsx-compat>=0.7.0
|
|
19
19
|
Requires-Dist: h5py>=3.10
|
|
20
20
|
Provides-Extra: adios2
|
|
21
21
|
Requires-Dist: adios2; extra == "adios2"
|
|
@@ -153,6 +153,8 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc
|
|
|
153
153
|
## Releasing
|
|
154
154
|
Versions are managed with [bump-my-version](https://callowayproject.github.io/bump-my-version/), configured in `pyproject.toml`. Between releases the version is a development version, `X.Y.Z.devN`; a release drops the suffix. Each bump commits the version change, so start from a clean working tree.
|
|
155
155
|
|
|
156
|
+
### Releasing the development version
|
|
157
|
+
|
|
156
158
|
To release the current development version, e.g. `2.1.0.dev0`, and start the next one:
|
|
157
159
|
|
|
158
160
|
```bash
|
|
@@ -162,7 +164,20 @@ bump-my-version bump minor --no-tag # 2.1.0 -> 2.2.0.dev0
|
|
|
162
164
|
|
|
163
165
|
For a patch release of 2.1, bump `patch` instead of `minor` (`2.1.0 -> 2.1.1.dev0`), then `release` (`2.1.1.dev0 -> 2.1.1`). `bump-my-version show-bump` previews what each bump gives.
|
|
164
166
|
|
|
165
|
-
|
|
167
|
+
### Patch release of the previous version
|
|
168
|
+
|
|
169
|
+
To release `main` as a patch of the previous release, e.g. `2.0.1` while `main` is at `2.1.0.dev0`, set the version directly and then restore the development version:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
bump-my-version bump --new-version 2.0.1 --no-tag # 2.1.0.dev0 -> 2.0.1
|
|
173
|
+
bump-my-version bump minor --no-tag # 2.0.1 -> 2.1.0.dev0
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
This releases everything on `main`, so use it only if `main` holds nothing but fixes since `v2.0.0`. The first bump warns that `2.1.0.dev0` does not match the last tag, `v2.0.0`; this is expected, as development versions are not tagged.
|
|
177
|
+
|
|
178
|
+
### Tagging
|
|
179
|
+
|
|
180
|
+
The bumps do not tag. A `v*` tag publishes to PyPI and the documentation, so tag the release commit (`Bump version: 2.1.0.dev0 → 2.1.0`, or `Bump version: 2.1.0.dev0 → 2.0.1`) as `v2.1.0` or `v2.0.1`, for instance by creating a GitHub release from it.
|
|
166
181
|
|
|
167
182
|
Releasing a new minor version also adds it to `.github/docs-versions.toml`, which lists the versions on the documentation website, built in the DOLFINx image of the previous one; edit that image afterwards if a newer DOLFINx release should be used. A patch release needs no entry, as each minor version is built from its newest tag.
|
|
168
183
|
|
|
@@ -149,7 +149,9 @@ def test_serial_adios2_writes_adios2_files(tmp_path, writer, reader):
|
|
|
149
149
|
and snapshots of the other."""
|
|
150
150
|
adios2 = pytest.importorskip("adios2")
|
|
151
151
|
if not adios2.is_built_with_mpi:
|
|
152
|
-
|
|
152
|
+
# Without MPI, adios2 falls back to adios2-serial, whose writes and reads the tests
|
|
153
|
+
# with the backend fixture cover
|
|
154
|
+
pytest.skip("Compares the MPI adios2 backend with adios2-serial; needs ADIOS2 with MPI")
|
|
153
155
|
comm = MPI.COMM_WORLD
|
|
154
156
|
mesh = dolfinx.mesh.create_unit_square(comm, 4, 5)
|
|
155
157
|
V = dolfinx.fem.functionspace(mesh, ("Lagrange", 2))
|
|
@@ -44,6 +44,8 @@ def test_convert(shared_tmp_path, backend, command_line):
|
|
|
44
44
|
"""The converted checkpoint is read as any other, with the backend chosen from its
|
|
45
45
|
suffix."""
|
|
46
46
|
source = legacy_dir / "adios4dolfinx_checkpoint.bp"
|
|
47
|
+
if not source.exists():
|
|
48
|
+
pytest.skip(f"{source} does not exist")
|
|
47
49
|
output = shared_tmp_path / f"converted{suffixes[backend]}"
|
|
48
50
|
if command_line:
|
|
49
51
|
main([str(source), str(output)])
|
|
@@ -59,6 +61,8 @@ def test_convert(shared_tmp_path, backend, command_line):
|
|
|
59
61
|
def test_names(shared_tmp_path, backend):
|
|
60
62
|
"""Each function of the file gets the name at its position."""
|
|
61
63
|
source = legacy_dir / "adios4dolfinx_two_functions.bp"
|
|
64
|
+
if not source.exists():
|
|
65
|
+
pytest.skip(f"{source} does not exist")
|
|
62
66
|
output = shared_tmp_path / "two_functions.checkpoint"
|
|
63
67
|
main([str(source), str(output), "--names", "u", "v", "--backend", backend])
|
|
64
68
|
|
|
@@ -98,6 +102,8 @@ def test_convert_dolfin(shared_tmp_path, backend):
|
|
|
98
102
|
"""The mesh and a mesh function of a legacy DOLFIN file become a mesh and mesh tags, with
|
|
99
103
|
the node order of the file, so DOLFIN functions are read onto the converted mesh."""
|
|
100
104
|
source = dolfin_dir / "mesh.h5"
|
|
105
|
+
if not source.exists():
|
|
106
|
+
pytest.skip(f"{source} does not exist")
|
|
101
107
|
output = shared_tmp_path / f"dolfin{suffixes[backend]}"
|
|
102
108
|
main([str(source), str(output), "--meshtags", "facet_tags"])
|
|
103
109
|
|
|
@@ -496,6 +496,7 @@ def test_binary_and_compressed_files(shared_tmp_path, label_bits, compress, unit
|
|
|
496
496
|
assert comm.allreduce(len(a.values), op=MPI.SUM) > 0
|
|
497
497
|
|
|
498
498
|
|
|
499
|
+
@pytest.mark.usefixtures("scotch_partitioner")
|
|
499
500
|
def test_baffle(shared_tmp_path, unit_mesh, integral):
|
|
500
501
|
"""Two cells side by side, with separate but coincident points on the face between
|
|
501
502
|
them and a patch on each side. The patches are told apart by their labels, which
|
|
@@ -492,9 +492,44 @@ def test_row_chunks(shared_tmp_path, chunk_bytes, backend):
|
|
|
492
492
|
min(_rows_per_chunk(target, dataset), dataset.shape[0]),
|
|
493
493
|
*dataset.shape[1:],
|
|
494
494
|
)
|
|
495
|
-
|
|
496
|
-
assert block["NumberOfPoints"].chunks is not None
|
|
495
|
+
assert block["NumberOfPoints"].chunks == (vtkhdf._step_chunk,)
|
|
497
496
|
|
|
498
497
|
restored = io4dolfinx.read_mesh(filename, comm, time=1.0, backend="vtkhdf")
|
|
499
498
|
v = io4dolfinx.read_point_data(filename, "u", restored, time=1.0, backend="vtkhdf")
|
|
500
499
|
np.testing.assert_allclose(v.x.array, 1.0)
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
@pytest.mark.parametrize("backend", ["vtkhdf", "vtkhdf-serial"])
|
|
503
|
+
def test_step_datasets_share_chunks(shared_tmp_path, backend):
|
|
504
|
+
"""Per-step datasets hold all time steps in one chunk."""
|
|
505
|
+
comm = MPI.COMM_WORLD
|
|
506
|
+
if backend == "vtkhdf" and comm.size > 1 and not h5py.get_config().mpi:
|
|
507
|
+
pytest.skip("Writing in parallel needs h5py with MPI")
|
|
508
|
+
filename = shared_tmp_path / "steps.vtkhdf"
|
|
509
|
+
mesh = create_unit_square(comm, 4, 4)
|
|
510
|
+
io4dolfinx.write_mesh(filename, mesh, backend=backend, backend_args={})
|
|
511
|
+
u = Function(functionspace(mesh, ("Lagrange", 1)), name="u")
|
|
512
|
+
num_steps = 5
|
|
513
|
+
for step in range(num_steps):
|
|
514
|
+
io4dolfinx.write_point_data(
|
|
515
|
+
filename,
|
|
516
|
+
u,
|
|
517
|
+
time=float(step),
|
|
518
|
+
mode=io4dolfinx.FileMode.append,
|
|
519
|
+
backend=backend,
|
|
520
|
+
backend_args={},
|
|
521
|
+
)
|
|
522
|
+
|
|
523
|
+
step_datasets = []
|
|
524
|
+
|
|
525
|
+
def collect(name, item):
|
|
526
|
+
if isinstance(item, h5py.Dataset) and item.shape == (num_steps,):
|
|
527
|
+
step_datasets.append(item)
|
|
528
|
+
|
|
529
|
+
with h5py.File(filename, "r") as hdf:
|
|
530
|
+
hdf.visititems(collect)
|
|
531
|
+
assert {"Values", "NumberOfPoints", "u", "Steps"} <= {
|
|
532
|
+
d.name.rsplit("/", 1)[1] for d in step_datasets
|
|
533
|
+
}
|
|
534
|
+
for dataset in step_datasets:
|
|
535
|
+
assert dataset.id.get_num_chunks() == 1, dataset.name
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|