Skip to content

Commit

Permalink
io: increment version to 3.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
ksagiyam committed Jan 31, 2024
1 parent 5285efd commit c513d5f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion firedrake/checkpointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def __init__(self, filename, mode, comm=COMM_WORLD):
assert self.commkey != MPI.COMM_NULL.py2f()
self._function_spaces = {}
self._function_load_utils = {}
self.opts = OptionsManager({"dm_plex_view_hdf5_storage_version": "2.1.0"}, "")
self.opts = OptionsManager({"dm_plex_view_hdf5_storage_version": "3.0.0"}, "")
r"""DMPlex HDF5 version options."""

def __enter__(self):
Expand Down Expand Up @@ -654,6 +654,7 @@ def _save_mesh_topology(self, tmesh):
if tmesh_name in self.require_group(self._path_to_topologies()):
# Check if the global number of DMPlex points and
# the global sum of DMPlex cone sizes are consistent.
"""
order_array_size, ornt_array_size = dmcommon.compute_point_cone_global_sizes(topology_dm)
path = os.path.join(self._path_to_topology(tmesh_name), "topology")
order_array_size1 = self.h5pyfile[path]["order"].size
Expand All @@ -662,6 +663,7 @@ def _save_mesh_topology(self, tmesh):
raise ValueError(f"Mesh ({tmesh_name}) already exists in {self.filename}, but the global number of DMPlex points is inconsistent: {order_array_size1} ({self.filename}) != {order_array_size} ({tmesh_name})")
if ornt_array_size1 != ornt_array_size:
raise ValueError(f"Mesh ({tmesh_name}) already exists in {self.filename}, but the global sum of all DMPlex cone sizes is inconsistent: {ornt_array_size1} ({self.filename}) != {ornt_array_size} ({tmesh_name})")
"""
# We assume that each (conceptually the same) mesh topology (plex)
# is uniquely named (this is users' responsibility).
# With the current setup, "distributions" folder will always contain
Expand Down Expand Up @@ -1032,11 +1034,13 @@ def _load_mesh_topology(self, tmesh_name, reorder, distribution_parameters):
plex.setName(tmesh_name)
# Check format
path = os.path.join(self._path_to_topology(tmesh_name), "topology")
"""
if any(d not in self.h5pyfile for d in [os.path.join(path, "cells"),
os.path.join(path, "cones"),
os.path.join(path, "order"),
os.path.join(path, "orientation")]):
raise RuntimeError(f"Unsupported PETSc ViewerHDF5 format used in {self.filename}")
"""
format = ViewerHDF5.Format.HDF5_PETSC
self.viewer.pushFormat(format=format)
plex.distributionSetName(distribution_name)
Expand Down

0 comments on commit c513d5f

Please sign in to comment.