<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 11 May 2020, at 19:35, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">On Mon, May 11, 2020 at 1:29 PM Daniel R. Shapero <<a href="mailto:shapero@uw.edu" class="">shapero@uw.edu</a>> wrote:<br class="">
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr" class="">
<div class="">Gotcha, that all makes sense and thanks for the reply!</div>
<div class=""><br class="">
</div>
<div class="">Is adding a namespace mechanism to HDF5 viewers worthwhile from your end? I totally understand if not and we can probably design around that from the Firedrake side, e.g. restricting to only one mesh per checkpoint file.</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">I don't think it's such a huge deal. We are redoing things anyway, so its just another requirement.</div>
</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Yes, this is a totally reasonable requirement. We are going to change the default naming and custom naming will be definitely possible as well.</div>
<div><br class="">
</div>
<div>It's in my backlog but should get to that soon!</div>
<div>See also <a href="https://gitlab.com/petsc/petsc/-/issues/553" class="">https://gitlab.com/petsc/petsc/-/issues/553</a></div>
<div><br class="">
</div>
<div>Thanks,</div>
<div><br class="">
</div>
<div>Vaclav</div>
<div><br class="">
</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div class="gmail_quote">
<div class=""><br class="">
</div>
<div class=""> Thanks,</div>
<div class=""><br class="">
</div>
<div class=""> Matt</div>
<div class=""> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, May 11, 2020 at 3:24 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" class="">knepley@gmail.com</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr" class="">
<div dir="ltr" class="">On Sun, May 10, 2020 at 10:03 PM Daniel R. Shapero <<a href="mailto:shapero@uw.edu" target="_blank" class="">shapero@uw.edu</a>> wrote:<br class="">
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr" class="">
<div class="">I'm trying to improve the checkpointing functionality in the Firedrake library, which currently uses the HDF5 viewer to store PetscVec objects. The problem with this approach is that a lot of context about the stored vector (e.g. the mesh and
finite element space that it came from) is lost and we'd like to save that too.</div>
<div class=""><br class="">
</div>
<div style="text-align:left" class="">In order to make a sensible hierarchy inside the file, I'd like to be able to write a DMPlex to a group, say `/meshes/<mesh_name>`, within the file rather than at the root `/`. I tried using the `PETScViewerHDF5PushGroup`
function; I thought that this will change the current group of the file to whatever name you give and all subsequent dataset writes will go under that group until you call the matching pop. This doesn't seem to be the case and all of the mesh data gets written
under `/`. From reading the source code, it looks like the HDF5 writer pushes the group `/topology` to write out the DMPlex cells (and likewise for coordinates etc) which then clobbers whatever I pushed before it instead of concatenating.<br class="">
</div>
<div style="text-align:left" class=""><br class="">
</div>
<div style="text-align:left" class="">I've attached a minimal example using petsc4py to demonstrate. I get the same results when I use some extra functionality in Firedrake to ensure that the `/meshes` group is created in the first place, which I can then verify
with h5ls.<br class="">
</div>
<div style="text-align:left" class=""><br class="">
</div>
<div style="text-align:left" class="">Is there a way to do what I want and if so how? If there isn't, is that because no one has needed this before or is there a fundamental reason why you shouldn't be doing this in the first place?</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">The reason is the impedence mismatch with visualization formats. VTK/ExodusII/etc are all based on a single mesh and multiple vectors in a file, so I</div>
<div class="">copied that design. It would be possible to namespace everything, and fix the XDMF generator to understand that.</div>
<div class=""><br class="">
</div>
<div class="">Vaclav, should we roll this into the HDF5 parallel reading/writing update?</div>
<div class=""><br class="">
</div>
<div class=""> Thanks,</div>
<div class=""><br class="">
</div>
<div class=""> Matt</div>
<div class=""> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr" class="">
<div style="text-align:left" class="">Thanks!</div>
<div style="text-align:left" class="">Daniel<br class="">
</div>
</div>
</blockquote>
</div>
<br clear="all" class="">
<div class=""><br class="">
</div>
-- <br class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">
-- Norbert Wiener</div>
<div class=""><br class="">
</div>
<div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
<br clear="all" class="">
<div class=""><br class="">
</div>
-- <br class="">
<div dir="ltr" class="gmail_signature">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">
-- Norbert Wiener</div>
<div class=""><br class="">
</div>
<div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>