<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</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 Mar 16, 2020, at 12:12 PM, Lisandro Dalcin <<a href="mailto:dalcinl@gmail.com" class="">dalcinl@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><br class="Apple-interchange-newline">
<br style="caret-color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px; 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="">
<div class="gmail_quote" style="caret-color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px; 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;">
<div dir="ltr" class="gmail_attr">On Mon, 16 Mar 2020 at 16:35, Jed Brown <<a href="mailto:jed@jedbrown.org" class="">jed@jedbrown.org</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">
Lisandro Dalcin <<a href="mailto:dalcinl@gmail.com" target="_blank" class="">dalcinl@gmail.com</a>> writes:<br class="">
<br class="">
> Currently, binary viewers using POSIX file descriptors with READ mode open<br class="">
> the file in ALL processes in the communicator. For WRITE mode, only process<br class="">
> zero opens the file.<br class="">
><br class="">
> The current PetscViewerBynaryXXX APIs make it really unnecessary to open<br class="">
> the file in all processes for READ. I would like to get rid of that and<br class="">
> always open on rank 0 for both READ or WROTE.<span class="Apple-converted-space"> </span><br class="">
<br class="">
I think we should use MPI-IO by default, and advise that people use it<br class="">
whenever they can.</blockquote>
<div class=""><br class="">
</div>
<div class="">OK, let me look again to the details, I think a few minor things should be done before using MPI-IO as a default (like a proper subviewer implementation)</div>
<div class=""> </div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">
I'm not sure of this suggested change, in that a<br class="">
"bad for MPI-IO" workload (like each rank randomly seeking around a big<br class="">
file) might not be better with rank 0 acting as a service rank.<br class="">
</blockquote>
<div class=""><br class="">
</div>
<div class="">Please note my main question is unrelated to MPI-IO. It is about the original POSIX-based implementation of binary viewers. For mode READ, all processes open the file (with the open() system call),</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>I am a bit confused. Isn’t this required when one uses MPI-IO? But of course, when not using MPI-IO, only process zero should open the file.</div>
<div><br class="">
</div>
<div>Hong (Mr.)</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div class="gmail_quote" style="caret-color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px; 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;">
<div class="">but in the current implementation, only process zero ever reads the file (unless the user gets the file descriptor and start issuing low-level PetscBinaryRead() calls). So I do not see the point of opening the file on all processes (and then stress
metadata servers on parallel filesystem), if we are not going to ever read from rank != 0. Let's just fix things to open the file at rank==0 only. If users ever need to read in rank != 0, then can very well create the viewer on COMM_SELF, or whatever.</div>
<div class=""><br class="">
</div>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px; 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 class="">
</div>
<span style="caret-color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px; 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="">--<span class="Apple-converted-space"> </span></span><br style="caret-color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px; 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="">
<div dir="ltr" class="gmail_signature" style="caret-color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px; 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;">
<div dir="ltr" class="">
<div class="">Lisandro Dalcin<br class="">
============<br class="">
Research Scientist<br class="">
Extreme Computing Research Center (ECRC)<br class="">
King Abdullah University of Science and Technology (KAUST)<br class="">
<a href="http://ecrc.kaust.edu.sa/" target="_blank" class="">http://ecrc.kaust.edu.sa/</a></div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>