[petsc-dev] DMPlexCreateSection crash in a no-boundary corner case

Matthew Knepley knepley at gmail.com
Thu Nov 21 10:11:37 CST 2013


On Wed, Nov 20, 2013 at 10:35 PM, Geoffrey Irving <irving at naml.us> wrote:

> DMPlexCreateSection expects that the boundary index sets its given are
> non-null.  However, if these are retrieved via DMPlexGetStratumIS from
> a label generated by DMPlexMarkBoundaryFaces, the index sets will come
> out null, causing the following error.
>
> In my case this was caused by a bug: my DMPlex creation routine is
> broken.  However, it could also arise from a mesh without boundary,
> such as a Klein bottle.  Do we care about this kind of corner case?
> If so, what's the right fix?  Two example possibilities are
>
> 1. Make DMPlexCreateSection treat null index sets as no boundary.
> 2. Make DMPlexMarkBoundaryFaces ensure that the stratum for value 1 is
> "there" even though it is empty.  I'm not sure if this makes sense in
> the desired semantics.
>

My preference is to have the code calling DMPlexCreateSection() check for
NULL
when it extracts the IS and decrement numBC if this happens.

   Matt


>
> Thanks,
> Geoffrey
>
> ---------------------------------------------------------------------
>
> [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> [0]PETSC ERROR: Null argument, when expecting valid pointer!
> [0]PETSC ERROR: Null Object: Parameter # 1!
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Petsc Development GIT revision:
> 352a19e720c6e388b1693cf6502c5f90a094459e  GIT Date: 2013-11-20
> 19:18:56 -0800
> [0]PETSC ERROR: See docs/changes/index.html for recent updates.
> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
> [0]PETSC ERROR: See docs/index.html for manual pages.
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Unknown Name on a debug named cayley by irving Wed Nov
> 20 20:29:20 2013
> [0]PETSC ERROR: Libraries linked from /home/irving/petsc/debug/lib
> [0]PETSC ERROR: Configure run at Wed Nov 20 19:39:25 2013
> [0]PETSC ERROR: Configure options --download-ctetgen
> --download-exodusii --download-generator --with-debugging=1
> --with-fortran=1 --with-hdf5-dir=/usr --with-netcdf-dir=/usr
> --with-triangle-dir=/usr PETSC_ARCH=debug
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: ISGetLocalSize() line 322 in
> src/vec/is/is/interface/index.c
> [0]PETSC ERROR: DMPlexCreateSectionBCDof() line 4504 in
> src/dm/impls/plex/plex.c
> [0]PETSC ERROR: DMPlexCreateSection() line 4716 in src/dm/impls/plex/plex.c
> [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> [0]PETSC ERROR: Null argument, when expecting valid pointer!
> [0]PETSC ERROR:  !
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Petsc Development GIT revision:
> 352a19e720c6e388b1693cf6502c5f90a094459e  GIT Date: 2013-11-20
> 19:18:56 -0800
> [0]PETSC ERROR: See docs/changes/index.html for recent updates.
> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
> [0]PETSC ERROR: See docs/index.html for manual pages.
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Unknown Name on a debug named cayley by irving Wed Nov
> 20 20:29:20 2013
> [0]PETSC ERROR: Libraries linked from /home/irving/petsc/debug/lib
> [0]PETSC ERROR: Configure run at Wed Nov 20 19:39:25 2013
> [0]PETSC ERROR: Configure options --download-ctetgen
> --download-exodusii --download-generator --with-debugging=1
> --with-fortran=1 --with-hdf5-dir=/usr --with-netcdf-dir=/usr
> --with-triangle-dir=/usr PETSC_ARCH=debug
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: create_default_section() line 174 in hollow/dm.cpp
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131121/60f2388d/attachment.html>


More information about the petsc-dev mailing list