<div dir="ltr"><div dir="ltr">On Sun, Jan 8, 2023 at 9:28 AM Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</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><div><br></div><div> Mark,</div><div><br></div><div> Looks like the error checking in PetscCommDuplicate() is doing its job. It is reporting an attempt to use an PETSc object constructer on a subset of ranks of an MPI_Comm (which is, of course, fundamentally impossible in the PETSc/MPI model)</div><div><br></div><div>Note that nroots can be negative on a particular rank but DMPlexLabelComplete_Internal() is collective on sf based on the comment in the code below</div><div><br></div><div><br></div><div>struct _p_PetscSF {</div><div>....</div><div> PetscInt nroots; /* Number of root vertices on current process (candidates for incoming edges) */</div><div><br></div><div>But the next routine calls a collective only when nroots >= 0 </div><div><br></div><div>static PetscErrorCode DMPlexLabelComplete_Internal(DM dm, DMLabel label, PetscBool completeCells){</div><div>...</div><div><div> PetscCall(PetscSFGetGraph(sfPoint, &nroots, NULL, NULL, NULL));</div><div> if (nroots >= 0) {</div><div> DMLabel lblRoots, lblLeaves;</div><div> IS valueIS, pointIS;</div><div> const PetscInt *values;</div><div> PetscInt numValues, v;</div><div><br></div><div> /* Pull point contributions from remote leaves into local roots */</div><div> PetscCall(DMLabelGather(label, sfPoint, &lblLeaves));</div><div><br></div></div><div><br></div><div>The code is four years old? How come this problem of calling the constructure on a subset of ranks hasn't come up since day 1? </div></div></blockquote><div><br></div><div>The contract here is that it should be impossible to have nroots < 0 (meaning the SF is not setup) on a subset of processes. Do we know that this is happening?</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><div><blockquote type="cite"><div>On Jan 8, 2023, at 12:21 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:</div><br><div><div dir="ltr">I am running on Crusher, CPU only, 64 cores per node with Plex/PetscFE. <div>In going up to 64 nodes, something really catastrophic is happening. </div>I understand I am not using the machine the way it was intended, but I just want to see if there are any options that I could try for a quick fix/help.<div><br><div>In a debug build I get a stack trace on many but not all of the 4K processes. <br></div><div>Alas, I am not sure why this job was terminated but every process that I checked, that had an "ERROR", had this stack:</div><div><br></div><div>11:57 main *+= crusher:/gpfs/alpine/csc314/scratch/adams/mg-m3dc1/src/data$ grep ERROR slurm-245063.out |g 3160<br>[3160]PETSC ERROR: ------------------------------------------------------------------------<br>[3160]PETSC ERROR: Caught signal number 15 Terminate: Some process (or the batch system) has told this process to end<br>[3160]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>[3160]PETSC ERROR: or see <a href="https://petsc.org/release/faq/#valgrind" target="_blank">https://petsc.org/release/faq/#valgrind</a> and <a href="https://petsc.org/release/faq/" target="_blank">https://petsc.org/release/faq/</a><br>[3160]PETSC ERROR: --------------------- Stack Frames ------------------------------------<br>[3160]PETSC ERROR: The line numbers in the error traceback are not always exact.<br>[3160]PETSC ERROR: #1 MPI function<br>[3160]PETSC ERROR: #2 PetscCommDuplicate() at /gpfs/alpine/csc314/scratch/adams/petsc/src/sys/objects/tagm.c:248<br>[3160]PETSC ERROR: #3 PetscHeaderCreate_Private() at /gpfs/alpine/csc314/scratch/adams/petsc/src/sys/objects/inherit.c:56<br>[3160]PETSC ERROR: #4 PetscSFCreate() at /gpfs/alpine/csc314/scratch/adams/petsc/src/vec/is/sf/interface/sf.c:65<br>[3160]PETSC ERROR: #5 DMLabelGather() at /gpfs/alpine/csc314/scratch/adams/petsc/src/dm/label/dmlabel.c:1932<br>[3160]PETSC ERROR: #6 DMPlexLabelComplete_Internal() at /gpfs/alpine/csc314/scratch/adams/petsc/src/dm/impls/plex/plexsubmesh.c:177<br>[3160]PETSC ERROR: #7 DMPlexLabelComplete() at /gpfs/alpine/csc314/scratch/adams/petsc/src/dm/impls/plex/plexsubmesh.c:227<br>[3160]PETSC ERROR: #8 DMCompleteBCLabels_Internal() at /gpfs/alpine/csc314/scratch/adams/petsc/src/dm/interface/dm.c:5301<br>[3160]PETSC ERROR: #9 DMCopyDS() at /gpfs/alpine/csc314/scratch/adams/petsc/src/dm/interface/dm.c:6117<br>[3160]PETSC ERROR: #10 DMCopyDisc() at /gpfs/alpine/csc314/scratch/adams/petsc/src/dm/interface/dm.c:6143<br>[3160]PETSC ERROR: #11 SetupDiscretization() at /gpfs/alpine/csc314/scratch/adams/mg-m3dc1/src/mhd_2field.c:755<br></div><div><br></div><div>Maybe the MPI is just getting overwhelmed<b>.</b> </div><div><br></div><div>And I was able to get one run to to work (one TS with beuler), and the solver performance was horrendous and I see this (attached):</div><div><br></div><div>Time (sec): 1.601e+02 1.001 1.600e+02<br></div><div>VecMDot 111712 1.0 5.1684e+01 1.4 2.32e+07 12.8 0.0e+00 0.0e+00 1.1e+05 30 4 0 0 23 30 4 0 0 23 499<br>VecNorm 163478 1.0 6.6660e+01 1.2 1.51e+07 21.5 0.0e+00 0.0e+00 1.6e+05 39 2 0 0 34 39 2 0 0 34 139<br></div><div>VecNormalize 154599 1.0 6.3942e+01 1.2 2.19e+07 23.3 0.0e+00 0.0e+00 1.5e+05 38 2 0 0 32 38 2 0 0 32 189<br></div><div>etc,</div><div>KSPSolve 3 1.0 1.1553e+02 1.0 1.34e+09 47.1 2.8e+09 6.0e+01 2.8e+05 72 95 45 72 58 72 95 45 72 58 4772<br></div><div><br></div><div>Any ideas would be welcome,</div><div>Thanks,</div><div>Mark</div></div></div>
<span id="m_-2264126495614651966cid:f_lcnn3feu0"><cushersolve.txt></span></div></blockquote></div><br></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>