[petsc-users] Understanding parallelism in DMPlexCreateBoxMesh

Jed Brown jedbrown at mcs.anl.gov
Mon Nov 18 18:18:04 CST 2013


Geoffrey Irving <irving at naml.us> writes:

> DMPlexCreateSquareBoundary naively seems to
>
> 1. Create topology only on rank 0.
> 2. Set positions on all ranks.
>
> In particular, if seems to allocate space proportional to the entire
> number of vertices on every rank:
>
>   ierr = PetscSectionGetStorageSize(coordSection, &coordSize);CHKERRQ(ierr);
>   ierr = VecCreate(PetscObjectComm((PetscObject)dm),
> &coordinates);CHKERRQ(ierr);
>   ierr = VecSetSizes(coordinates, coordSize, PETSC_DETERMINE);CHKERRQ(ierr);
>
> How does this code work?  It's clearly intended to be callable in a
> parallel context given that it has a !rank conditional, and works as
> part of various examples, so I'm clearly missing something.

This just creates the mesh on rank 0.  It is usually partitioned and
distributed subsequently (see src/snes/examples/tutorials/ex12.c).  It's
fine for testing, but obviously non-scalable.

Now that Matt and I are running some larger tests with DMPlex, this is
one of the scalability issues that will be fixed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131118/6361b65c/attachment.pgp>


More information about the petsc-users mailing list