As a follow-up, just "depth" default label was provided to avoid NULL PETScIS, and it seems working.
Thanks, Mike > 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. > > 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)? > > Thanks, > Mike > > >> On Wed, Jul 6, 2022 at 3:42 PM Mike Michell <[email protected]> >> wrote: >> >>> I am passing NULL for IS Permutation as; >>> >>> call >>> DMPlexCreateSection(dm_geom,nolabel,pNumComp,pNumDof,numBC,pBcField,pBcCompIS,pBcPointIS,PETSC_NULL_IS,section,ierr) >>> >>> Should I define non-NULL IS Permutation before I call >>> DMPlexCreateSection() to avoid the issue? >>> >> >> 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 >> like you passed a NULL IS to DMAddBoundary(). >> >> Thanks, >> >> Matt >> >> >>> Thanks, >>> Mike >>> >>> >>> On Wed, Jul 6, 2022 at 12:57 PM Mike Michell <[email protected]> >>>> wrote: >>>> >>>>> 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: " [petsc-dev] DMPlexCreateSection crash >>>>> in a no-boundary corner case >>>>> <https://lists.mcs.anl.gov/pipermail/petsc-dev/2013-November/014049.html> >>>>> " >>>>> >>>> >>>> Yes, the recommendation is not to pass a NULL PetscIS to the >>>> AddBoundary() routine. Are you doing this? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> >>>> >>>>> 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. >>>>> >>>>> Thanks, >>>>> Mike >>>>> >>>>> [16]PETSC ERROR: --------------------- Error Message >>>>> -------------------------------------------------------------- >>>>> [16]PETSC ERROR: Null argument, when expecting valid pointer >>>>> [16]PETSC ERROR: Null Pointer: Parameter # 1 >>>>> [16]PETSC ERROR: See https://petsc.org/release/faq/ for trouble >>>>> shooting. >>>>> [16]PETSC ERROR: Petsc Release Version 3.17.0, unknown >>>>> [16]PETSC ERROR: #1 ISGetLocalSize() at >>>>> [16]PETSC ERROR: #2 DMPlexCreateSectionBCDof() at >>>>> [16]PETSC ERROR: #3 DMPlexCreateSection() at >>>>> >>>> >>>> >>>> -- >>>> What most experimenters take for granted before they begin their >>>> experiments is infinitely more interesting than any results to which their >>>> experiments lead. >>>> -- Norbert Wiener >>>> >>>> https://www.cse.buffalo.edu/~knepley/ >>>> <http://www.cse.buffalo.edu/~knepley/> >>>> >>> >> >> -- >> What most experimenters take for granted before they begin their >> experiments is infinitely more interesting than any results to which their >> experiments lead. >> -- Norbert Wiener >> >> https://www.cse.buffalo.edu/~knepley/ >> <http://www.cse.buffalo.edu/~knepley/> >> >
