<div dir="ltr"><div dir="ltr">On Mon, Oct 18, 2021 at 12:26 AM Gong Yujie <<a href="mailto:yc17470@connect.um.edu.mo">yc17470@connect.um.edu.mo</a>> wrote:<br></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">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hi, </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I'm learning to use DMPlex to write a parallel program. I've tried to write a sequential code earlier successfully, but when to write a parallel code, there are many things different. There are some questions I'm curious about.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<ol>
<li><span>Are the functions as DMPlexCreateGmshFromFile() and other read from file functions reading in the mesh in parallel? Or just the root node read in the mesh?</span></li></ol></div></div></blockquote><div>This function works in parallel, meaning it will correctly read a file if run from a parallel program. However, it is read only by proc 0. The only format that we have truly reading in parallel</div><div>is the PETSc HDF5 format, which relies on the parallel reads from HDF5. <br></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"><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)"><ol><li><span>Are there some examples available for distribute the mesh and create the correspondingly local to global node(or position) mapping</span> ?</li></ol></div></div></blockquote><div>Yes, hundreds of examples. For example, in SNES ex12, we have many parallel examples, such as</div><div><br></div><div> <a href="https://gitlab.com/petsc/petsc/-/blob/main/src/snes/tutorials/ex12.c#L1182">https://gitlab.com/petsc/petsc/-/blob/main/src/snes/tutorials/ex12.c#L1182</a></div><div><br></div><div>You will notice it has '-dm_distribute' in the arguments, which distributes the mesh automatically which was read in or created serially. You can also</div><div>call</div><div><br></div><div> DMPlexDistribute()</div><div><br></div><div>yourself instead of using the option.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </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"><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<div>I'm grateful for your kindly help!</div>
<div><br>
</div>
<div>Best Regards,</div>
<div>Gong</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>