<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 21, 2013 at 1:48 PM, Geoffrey Irving <span dir="ltr"><<a href="mailto:irving@naml.us" target="_blank">irving@naml.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm getting the following crash trying to use a two triangle mesh with<br>
DMPlex FEM. The problem is that the PetscFEGetQuadrature call on line<br>
546 of DMPlexComputeResidualFEM produces a quadrature object with<br>
q.numPoints = 0, which we then use for division.<br></blockquote><div><br></div><div>Yes, it causes batchSize = 0. I think we could error is q.numPoints == 0.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm using the default elements, which based on the "fe dofs" printout<br>
are piecewise constant.<br></blockquote><div><br></div><div>You are supposed to create the quadrature (like ex12.c:382). The default</div><div>thing is completely empty.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I imagine this is user error, but in addition to fixing it I'd like to<br>
insert another error check into the petsc code so that similar errors<br>
look nicer in future.<br>
<br>
Extra data: if I use a slightly larger mesh, it bails with a negative<br>
determinant error. I don't quite understand how DMPlex determines<br></blockquote><div><br></div><div>This likely happens because your quadrature is completely undefined.</div><div><br></div><div> Thanks,</div><div>
<br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
orientations, so that may or may be related to this crash. I'm<br>
building my own DMPlex rather than using one of the existing creation<br>
routines, so it's quite possible my DMPlex is invalid. An example<br>
determinant error is reproduced below. For completeness, the DMPlex<br>
creation code is here:<br>
<br>
<a href="https://github.com/otherlab/hollow/blob/6fa039bcc2a3308532db45ccd350e201900bcf08/hollow/dm.cpp#L213" target="_blank">https://github.com/otherlab/hollow/blob/6fa039bcc2a3308532db45ccd350e201900bcf08/hollow/dm.cpp#L213</a><br>
<br>
Thanks,<br>
Geoffrey<br>
<br>
---------------------------------------<br>
<br>
(master) cayley:example% ./laplace --resolution 1<br>
mesh counts = [4 5 2]<br>
dm counts = [4 5 2]<br>
fe dofs = [0 0 1]<br>
fe bd dofs = [0 0 1]<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Caught signal number 8 FPE: Floating Point<br>
Exception,probably divide by zero<br>
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>
[0]PETSC ERROR: or see<br>
<a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[0]PETSC" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[0]PETSC</a><br>
ERROR: or try <a href="http://valgrind.org" target="_blank">http://valgrind.org</a> on GNU/linux and Apple Mac OS X to<br>
find memory corruption errors<br>
[0]PETSC ERROR: likely location of problem given in stack below<br>
[0]PETSC ERROR: --------------------- Stack Frames<br>
------------------------------------<br>
[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,<br>
[0]PETSC ERROR: INSTEAD the line number of the start of the function<br>
[0]PETSC ERROR: is given.<br>
[0]PETSC ERROR: [0] DMPlexComputeResidualFEM line 492<br>
src/dm/impls/plex/plexfem.c<br>
[0]PETSC ERROR: [0] SNESComputeFunction_DMLocal line 63<br>
src/snes/utils/dmlocalsnes.c<br>
[0]PETSC ERROR: [0] SNES user function line 2076 src/snes/interface/snes.c<br>
[0]PETSC ERROR: [0] SNESComputeFunction line 2064 src/snes/interface/snes.c<br>
[0]PETSC ERROR: [0] SNESSolve_NEWTONLS line 144 src/snes/impls/ls/ls.c<br>
[0]PETSC ERROR: [0] SNESSolve line 3755 src/snes/interface/snes.c<br>
[0]PETSC ERROR: --------------------- Error Message<br>
------------------------------------<br>
[0]PETSC ERROR: Signal received!<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc Development GIT revision:<br>
352a19e720c6e388b1693cf6502c5f90a094459e GIT Date: 2013-11-20<br>
19:18:56 -0800<br>
[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual pages.<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Unknown Name on a debug named cayley by irving Thu Nov<br>
21 11:34:18 2013<br>
[0]PETSC ERROR: Libraries linked from /home/irving/petsc/debug/lib<br>
[0]PETSC ERROR: Configure run at Wed Nov 20 19:39:25 2013<br>
[0]PETSC ERROR: Configure options --download-ctetgen<br>
--download-exodusii --download-generator --with-debugging=1<br>
--with-fortran=1 --with-hdf5-dir=/usr --with-netcdf-dir=/usr<br>
--with-triangle-dir=/usr PETSC_ARCH=debug<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: User provided function() line 0 in unknown file<br>
--------------------------------------------------------------------------<br>
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD<br>
with errorcode 59.<br>
<br>
NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.<br>
You may or may not see output from other processes, depending on<br>
exactly when Open MPI kills them.<br>
--------------------------------------------------------------------------<br>
<br>
------------------------------------------------------------------------------<br>
<br>
(master) cayley:example% ./laplace --resolution 2<br>
mesh counts = [12 23 12]<br>
dm counts = [12 23 12]<br>
fe dofs = [0 0 1]<br>
fe bd dofs = [0 0 1]<br>
[0]PETSC ERROR: --------------------- Error Message<br>
------------------------------------<br>
[0]PETSC ERROR: Argument out of range!<br>
[0]PETSC ERROR: Invalid determinant -0.0416667 for element 4!<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc Development GIT revision:<br>
352a19e720c6e388b1693cf6502c5f90a094459e GIT Date: 2013-11-20<br>
19:18:56 -0800<br>
[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual pages.<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Unknown Name on a debug named cayley by irving Thu Nov<br>
21 11:42:24 2013<br>
[0]PETSC ERROR: Libraries linked from /home/irving/petsc/debug/lib<br>
[0]PETSC ERROR: Configure run at Wed Nov 20 19:39:25 2013<br>
[0]PETSC ERROR: Configure options --download-ctetgen<br>
--download-exodusii --download-generator --with-debugging=1<br>
--with-fortran=1 --with-hdf5-dir=/usr --with-netcdf-dir=/usr<br>
--with-triangle-dir=/usr PETSC_ARCH=debug<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: DMPlexComputeResidualFEM() line 530 in<br>
src/dm/impls/plex/plexfem.c<br>
[0]PETSC ERROR: SNESComputeFunction_DMLocal() line 75 in<br>
src/snes/utils/dmlocalsnes.c<br>
[0]PETSC ERROR: SNESComputeFunction() line 2077 in src/snes/interface/snes.c<br>
[0]PETSC ERROR: SNESSolve_NEWTONLS() line 175 in src/snes/impls/ls/ls.c<br>
[0]PETSC ERROR: SNESSolve() line 3809 in src/snes/interface/snes.c<br>
[0]PETSC ERROR: --------------------- Error Message<br>
------------------------------------<br>
[0]PETSC ERROR: Argument out of range!<br>
[0]PETSC ERROR: !<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc Development GIT revision:<br>
352a19e720c6e388b1693cf6502c5f90a094459e GIT Date: 2013-11-20<br>
19:18:56 -0800<br>
[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual pages.<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Unknown Name on a debug named cayley by irving Thu Nov<br>
21 11:42:24 2013<br>
[0]PETSC ERROR: Libraries linked from /home/irving/petsc/debug/lib<br>
[0]PETSC ERROR: Configure run at Wed Nov 20 19:39:25 2013<br>
[0]PETSC ERROR: Configure options --download-ctetgen<br>
--download-exodusii --download-generator --with-debugging=1<br>
--with-fortran=1 --with-hdf5-dir=/usr --with-netcdf-dir=/usr<br>
--with-triangle-dir=/usr PETSC_ARCH=debug<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: solve() line 33 in hollow/snes.cpp<br>
Traceback (most recent call last):<br>
File "./laplace", line 94, in <module><br>
main()<br>
File "./laplace", line 89, in main<br>
snes.solve(None,u)<br>
RuntimeError: hollow/config.cpp:void hollow::check_failed(const int,<br>
const char *, const char *, const char *, const int):33: Fatal error<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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>