[petsc-dev] DMPlex test ex18 and DMPlexCreateFromDAG
Matthew Knepley
knepley at gmail.com
Tue Dec 12 13:22:37 CST 2017
On Thu, Nov 23, 2017 at 11:15 AM, Vaclav Hapla <vaclav.hapla at erdw.ethz.ch>
wrote:
> Hello
>
> The DMPlex example src/dm/impls/plex/examples/tests/ex18.c fails with
> -cell_simplex 0 :
>
> [0]PETSC ERROR: Null argument, when expecting valid pointer
> [0]PETSC ERROR: Null Object: Parameter # 1
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
> [0]PETSC ERROR: Petsc Development GIT revision: v3.8.2-360-gb71d430 GIT
> Date: 2017-11-23 09:02:30 -0600
> [0]PETSC ERROR: ./ex18 on a arch-linux-gcc-salvus named salvus-vm by
> haplav Thu Nov 23 17:03:16 2017
> [0]PETSC ERROR: Configure options --download-chaco --download-exodusii
> --download-hdf5 --download-med --download-metis --download-netcdf
> --download-parmetis --download-ptscotch --download-triangle
> --download-ctetgen --with-cc=mpicc --with-cxx=mpicxx --with-eigen-dir=/usr
> --with-fc=mpifort --with-python=1 --with-shared-libraries=1
> --with-valgrind-dir=/opt/valgrind/valgrind-3.13 PETSC_ARCH=arch-linux-gcc-
> salvus
> [0]PETSC ERROR: #1 DMGetDimension() line 4048 in /scratch/petsc-dev/src/dm/
> interface/dm.c
> [0]PETSC ERROR: #2 DMPlexCreateFromDAG() line 2704 in
> /scratch/petsc-dev/src/dm/impls/plex/plexcreate.c
> [0]PETSC ERROR: #3 CreateQuad_2D() line 302 in /scratch/petsc-dev/src/dm/
> impls/plex/examples/tests/ex18.c
> [0]PETSC ERROR: #4 CreateMesh() line 425 in /scratch/petsc-dev/src/dm/
> impls/plex/examples/tests/ex18.c
> [0]PETSC ERROR: #5 main() line 464 in /scratch/petsc-dev/src/dm/
> impls/plex/examples/tests/ex18.c
>
>
> The problem is that the DM is never created in this case. It could be
> fixed by adding
> ierr = DMCreate(comm, dm);CHKERRQ(ierr);
> ierr = DMSetType(*dm, DMPLEX);CHKERRQ(ierr);
> to the beginning of CreateQuad_2D and CreateHex_3D in ex18.c.
>
> However, I rather suggest to
> 1) change the DM argument of these functions to DM* to unify them with
> CreateSimplex_2D and CreateSimplex_3D,
> 2) alter DMPlexCreateFromDAG so that DM is strictly output parameter. I
> don't understand why it couldn't create the DMPlex on its own - see the
> manual page: "dm - The empty DM object, usually from DMCreate() and
> DMSetDimension()".
>
This happened because its a partial cut & paste. Only the Simplex functions
have been updated. The CreateFromDag() should change to
a DMPlexCreateFromCellListParallel(). I will do it today hopefully.
Thanks,
Matt
> I can fix that as suggested above if you agree.
>
> Vaclav
--
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.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20171212/40f7826e/attachment.html>
More information about the petsc-dev
mailing list