<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 12 Oct 2021, at 11:56, Hapla Vaclav <<a href="mailto:vaclav.hapla@erdw.ethz.ch" class="">vaclav.hapla@erdw.ethz.ch</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class=""><br class="">
<br class="">
<blockquote type="cite" class="">On 8 Oct 2021, at 00:48, Jed Brown <<a href="mailto:jed@jedbrown.org" class="">jed@jedbrown.org</a>> wrote:<br class="">
<br class="">
Adrian Croucher <<a href="mailto:a.croucher@auckland.ac.nz" class="">a.croucher@auckland.ac.nz</a>> writes:<br class="">
<br class="">
<blockquote type="cite" class="">hi Jed,<br class="">
<br class="">
It looked to me like a call to h5f_flush() is all that is required.<br class="">
<br class="">
Some people said there would be a performance hit (maybe ~ 10% slower), <br class="">
which would be the trade-off for increased reliability. So if this were <br class="">
made available via PetscViewerFlush(), I'd probably make it optional in <br class="">
my code so the user could decide for themselves if it was worth it for them.<br class="">
<br class="">
Do you think flushing would be a better option than closing/opening the <br class="">
file between writes?<br class="">
</blockquote>
<br class="">
Yes, less costly at scale (metadata like opening files can be expensive on parallel file systems), and simpler to manage from your code.<br class="">
</blockquote>
<br class="">
I have just come across this a couple of days ago. I think PetscViewerFlush() [no-op for HDF5 currently] should call H5Fflush() for sure. I can do it now.<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div><a href="https://gitlab.com/petsc/petsc/-/merge_requests/4445" class="">https://gitlab.com/petsc/petsc/-/merge_requests/4445</a></div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div class=""><br class="">
I agree with Jed that closing/opening can have significant overhead on large number of processes due to metadata processing.<br class="">
<br class="">
Thanks,<br class="">
<br class="">
Vaclav</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>