From c513d5f40b6b1ad38850b4c6fe734250a8cb4431 Mon Sep 17 00:00:00 2001 From: ksagiyam Date: Mon, 29 Jan 2024 16:57:13 +0000 Subject: [PATCH] io: increment version to 3.0.0. --- firedrake/checkpointing.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firedrake/checkpointing.py b/firedrake/checkpointing.py index c009378ae0..bec0911bdf 100644 --- a/firedrake/checkpointing.py +++ b/firedrake/checkpointing.py @@ -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): @@ -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 @@ -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 @@ -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)