<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="">
To avoid confusions here, Berend seems to be specifically demanding XDMF (<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">PETSC_VIEWER_HDF5_XDMF</span>). The stuff we are now working on is parallel checkpointing in our own HDF5 format (<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">PETSC_VIEWER_HDF5_PETSC</span>),
I will make a series of MRs on this topic in the following days.
<div class=""><br class="">
</div>
<div class="">For XDMF, we are specifically missing the ability to write/load DMLabels properly. XDMF uses specific cell-local numbering for faces for specification of face sets, and face-local numbering for specification of edge sets, which is not great wrt
DMPlex design. And ParaView doesn't show any of these properly so it's hard to debug. Matt, we should talk about this soon.</div>
<div class=""><br class="">
</div>
<div class="">Berend, for now, could you just load the mesh initially from XDMF and then use our PETSC_VIEWER_HDF5_PETSC format for subsequent saving/loading?</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class=""><br class="">
</div>
<div class="">Vaclav</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 17 Sep 2021, at 15:46, Lawrence Mitchell <<a href="mailto:wence@gmx.li" class="">wence@gmx.li</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Hi
Berend,</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<blockquote type="cite" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
On 14 Sep 2021, at 12:23, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:<br class="">
<br class="">
On Tue, Sep 14, 2021 at 5:15 AM Berend van Wachem <<a href="mailto:berend.vanwachem@ovgu.de" class="">berend.vanwachem@ovgu.de</a>> wrote:<br class="">
Dear PETSc-team,<br class="">
<br class="">
We are trying to save and load distributed DMPlex and its associated<span class="Apple-converted-space"> </span><br class="">
physical fields (created with DMCreateGlobalVector) (Uvelocity,<span class="Apple-converted-space"> </span><br class="">
VVelocity, ...) in HDF5_XDMF format. To achieve this, we do the following:<br class="">
<br class="">
1) save in the same xdmf.h5 file:<br class="">
DMView( DM , H5_XDMF_Viewer );<br class="">
VecView( UVelocity, H5_XDMF_Viewer );<br class="">
<br class="">
2) load the dm:<br class="">
DMPlexCreateFromfile(PETSC_COMM_WORLD, Filename, PETSC_TRUE, DM);<br class="">
<br class="">
3) load the physical field:<br class="">
VecLoad( UVelocity, H5_XDMF_Viewer );<br class="">
<br class="">
There are no errors in the execution, but the loaded DM is distributed<span class="Apple-converted-space"> </span><br class="">
differently to the original one, which results in the incorrect<span class="Apple-converted-space"> </span><br class="">
placement of the values of the physical fields (UVelocity etc.) in the<span class="Apple-converted-space"> </span><br class="">
domain.<br class="">
<br class="">
This approach is used to restart the simulation with the last saved DM.<span class="Apple-converted-space"> </span><br class="">
Is there something we are missing, or there exists alternative routes to<span class="Apple-converted-space"> </span><br class="">
this goal? Can we somehow get the IS of the redistribution, so we can<span class="Apple-converted-space"> </span><br class="">
re-distribute the vector data as well?<br class="">
<br class="">
Many thanks, best regards,<br class="">
<br class="">
Hi Berend,<br class="">
<br class="">
We are in the midst of rewriting this. We want to support saving multiple meshes, with fields attached to each,<br class="">
and preserving the discretization (section) information, and allowing us to load up on a different number of<br class="">
processes. We plan to be done by October. Vaclav and I are doing this in collaboration with Koki Sagiyama,<br class="">
David Ham, and Lawrence Mitchell from the Firedrake team.<br class="">
</blockquote>
<br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">The
core load/save cycle functionality is now in PETSc main. So if you're using main rather than a release, you can get access to it now. This section of the manual shows an example of how to do things<span class="Apple-converted-space"> </span></span><a href="https://petsc.org/main/docs/manual/dmplex/#saving-and-loading-data-with-hdf5" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://petsc.org/main/docs/manual/dmplex/#saving-and-loading-data-with-hdf5</a><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Let
us know if things aren't clear!</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Thanks,</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Lawrence</span></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>