[petsc-dev] DMPlexInterpolate after DMPlexDistribute

Pierre Jolivet pierre.jolivet at enseeiht.fr
Tue Apr 14 05:36:18 CDT 2020


Hello,
I’d like to call DMPlexInterpolate after DMPlexDistribute and not the other way around for performance reasons (please stop me here if this is equivalent).
When there is no overlap in DMPlexDistribute, it goes through fine.
If there is overlap, I run into an error.
Is this the expected behavior?
Here is a MWE.
$ patch -p1 < patch.txt
$ cd src/dm/impls/plex/tests/
$ make ex18
$ mpirun -n 2 ./ex18 -distribute -interpolate after_distribute
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Petsc has generated inconsistent data
[0]PETSC ERROR: Point SF contains 1 which is a cell

Thanks,
Pierre

diff --git a/src/dm/impls/plex/tests/ex18.c b/src/dm/impls/plex/tests/ex18.c
index 07421b3522..dd62be58e5 100644
--- a/src/dm/impls/plex/tests/ex18.c
+++ b/src/dm/impls/plex/tests/ex18.c
@@ -806 +806 @@ static PetscErrorCode CreateMesh(MPI_Comm comm, AppCtx *user, DM *dm)
-    ierr = DMPlexDistribute(*dm, 0, NULL, &pdm);CHKERRQ(ierr);
+    ierr = DMPlexDistribute(*dm, 1, NULL, &pdm);CHKERRQ(ierr);


More information about the petsc-dev mailing list