<div dir="ltr"><div>Currently, binary viewers using POSIX file descriptors with READ mode open the file in ALL processes in the communicator. For WRITE mode, only process zero opens the file. </div><div><br></div><div>The current PetscViewerBynaryXXX APIs make it really unnecessary to open the file in all processes for READ. I would like to get rid of that and always open on rank 0 for both READ or WROTE. Such change may impact third-party code using low-level IO. However, note that after MR 2594 <a href="https://gitlab.com/petsc/petsc/-/merge_requests/2594">https://gitlab.com/petsc/petsc/-/merge_requests/2594</a> gets merged, third party code should hardly need to access the file descriptors/MPI_File to perform IO (this would require some minor and relatively easy improvements to subviewers that I'm planning).</div><div><br></div><div>In short, I would like to change binary viewers in READ mode using POSIX file descriptors to open files ONLY in rank 0 rather than ALL ranks as it is now. Any objections? </div><div><br></div><div>PS: After all the enhancements to binary viewers, we should consider whether we should turn MPI-IO on by default.</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div>