<div dir="ltr"><div dir="ltr">On Wed, Jul 13, 2022 at 10:08 AM Mike Michell <<a href="mailto:mi.mike1021@gmail.com">mi.mike1021@gmail.com</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>What I did to avoid the crash is to provide bcPointIS from "call DMGetStratumIS(dm_geom, "depth", dim, bcPointIS(1),ierr);CHKERRA(ierr)", instead of "marker" for calling DMGetStratumIS().</div><div>The petscsection building part is from src/dm/impls/plex/tutorials/ex1f90.F90 (See line 72).</div></div></blockquote><div><br></div><div>That looks like you are putting all cells in the IS. Is that what you want?</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 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 dir="ltr"><br>On Sat, Jul 9, 2022 at 8:34 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</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 dir="ltr">On Fri, Jul 8, 2022 at 7:41 PM Mike Michell <<a href="mailto:mi.mike1021@gmail.com" target="_blank">mi.mike1021@gmail.com</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>As a follow-up, just "depth" default label was provided to avoid NULL PETScIS, and it seems working. </div></div></blockquote><div><br></div><div>Ah, "depth" is definitely required and is produced by DMPlexStratify(). I will put in a check for this so that you get a good error message.</div></div></div></blockquote><div><br></div><div>I cannot find an instance of an IS being pulled from the depth label here. Do you have something I can run that shows this fault?</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 class="gmail_quote"><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>Thanks,</div><div>Mike</div><br><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 dir="ltr"><br>It looks like NULL PETScIS is obtained from DMGetStratumIS() which is shown in the previously attached code. Currently, "marker" label is used to define default bcPointIS pointer with numBC=1 through DMGetStratumIS(), and it seems that if a certain proc does not have any boundary from this "marker" label, the DMPlexCreateSection() crashes. <br><br>The PETSc's manual page for DMPlexCreateSection() says "bcPoints" is an IS holding points to which each boundary condition applies. So, by including no boundary for a certain distributed mesh block, it looks very natural that this function crashes. How can I not to pass a NULL PETScIS in this case? Is there any specific way for that (or a trick)?<br><br>Thanks, <br>Mike<br></div><br><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 dir="ltr"><br>On Wed, Jul 6, 2022 at 3:42 PM Mike Michell <<a href="mailto:mi.mike1021@gmail.com" target="_blank">mi.mike1021@gmail.com</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 dir="ltr">I am passing NULL for IS Permutation as; <div><br></div><div>call DMPlexCreateSection(dm_geom,nolabel,pNumComp,pNumDof,numBC,pBcField,pBcCompIS,pBcPointIS,PETSC_NULL_IS,section,ierr)<br></div><div><br></div><div>Should I define non-NULL IS Permutation before I call DMPlexCreateSection() to avoid the issue?</div></div></div></blockquote><div><br></div><div>No, the problem is not the perm argument. To be sure, we should get a stack trace with line numbers (use a debug build). To me it looked</div><div>like you passed a NULL IS to DMAddBoundary().</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 dir="ltr"><div>Thanks,</div><div>Mike</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><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 dir="ltr">On Wed, Jul 6, 2022 at 12:57 PM Mike Michell <<a href="mailto:mi.mike1021@gmail.com" target="_blank">mi.mike1021@gmail.com</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">Hi, I am using DMPlex for a FVM code written in Fortran that uses DMPlexCreateSection() to prepare an output file in vtu format. A domain of interest has around 5000 node points and with small number of processors (such as nproc=3), the DMPlexCreateSection() works fine. However, if a larger number of procs (such as nproc=20) is used,
DMPlexCreateSection() crashes with error message below. It looks very similar problem in a previous PETSc user inquiry: "
<a href="https://lists.mcs.anl.gov/pipermail/petsc-dev/2013-November/014049.html" style="font-family:"Malgun Gothic";font-size:medium" target="_blank">[petsc-dev] DMPlexCreateSection crash in a no-boundary corner case</a>"</div></blockquote><div><br></div><div>Yes, the recommendation is not to pass a NULL PetscIS to the AddBoundary() routine. Are you doing this?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div><br></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>When I call DMPlexCreateSection(), a nullified pointer "nolabel(:)=>NULL()" is provided. What is a possible solution to this problem? It looks like there is a problem with a processor that does not have any boundaries. A piece of the source code is attached to show how the
DMPlexCreateSection() is used in the code.</div><div><br></div><div>Thanks,</div><div>Mike</div><div><div><br></div><div>[16]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[16]PETSC ERROR: Null argument, when expecting valid pointer<br>[16]PETSC ERROR: Null Pointer: Parameter # 1<br>[16]PETSC ERROR: See <a href="https://petsc.org/release/faq/" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>[16]PETSC ERROR: Petsc Release Version 3.17.0, unknown <br></div></div><div>[16]PETSC ERROR: #1 ISGetLocalSize() at<br></div><div>[16]PETSC ERROR: #2 DMPlexCreateSectionBCDof() at<br></div><div>[16]PETSC ERROR: #3 DMPlexCreateSection() at<br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><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>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><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>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><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>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><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>
</blockquote></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>