<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello petsc team,<div class=""><br class=""></div><div class="">I’ve run into an issue using DMPlexDistribute on Mac OS 10.14.1. Here’s my dilemma:</div><div class="">- Compiling with petsc in debug mode (—with-debugging=true); the problem does not occur</div><div class="">- On two other (linux) machines, the error does not occur</div><div class="">- valgrind is not available for Mac OS Mojave at this point in time and it is unclear until when it will be</div><div class="">- SEGV occurs with mesh from gmsh file and  DMPlexCreateBoxMesh copied from <a href="https://www.mcs.anl.gov/petsc/petsc-current/src/dm/impls/plex/examples/tutorials/ex1.c.html" class="">https://www.mcs.anl.gov/petsc/petsc-current/src/dm/impls/plex/examples/tutorials/ex1.c.html</a></div><div class="">- I use the lastest petsc on maint/ branch from git</div><div class="">- petsc itself compiles and runs its tests (make […] check)  without problems on one and two processors.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Here’s the code I run for testing:</div><div class=""><br class=""></div><div class=""><div class="">#include <petscds.h></div><div class="">#include <petscdmplex.h></div><div class=""><br class=""></div><div class="">int main(int argc, char **args) {</div><div class="">    PetscErrorCode ierr;</div><div class="">    PetscPartitioner part;</div><div class="">    DM dm, distributedDm;</div><div class="">    const char help[] = "no help";</div><div class=""><br class=""></div><div class="">    PetscInitialize(&argc,&args,(char*)0,help);</div><div class=""><br class=""></div><div class="">    ierr = DMPlexCreateFromFile(PETSC_COMM_WORLD,"cylinder_smallring.msh",PETSC_TRUE,&dm); CHKERRQ(ierr);</div><div class="">    // ierr = DMPlexCreateBoxMesh(PETSC_COMM_WORLD, 2, PETSC_TRUE, NULL, NULL, NULL, NULL, PETSC_TRUE, &dm); CHKERRQ(ierr);</div><div class="">    ierr = DMPlexGetPartitioner(dm, &part); CHKERRQ(ierr);</div><div class="">    ierr = PetscPartitionerSetFromOptions(part); CHKERRQ(ierr);</div><div class="">    // ierr = PetscPartitionerSetType(part, PETSCPARTITIONERPARMETIS); CHKERRQ(ierr);</div><div class="">    ierr = DMPlexDistribute(dm, 0, NULL, &distributedDm); CHKERRQ(ierr);</div><div class="">    if(distributedDm){</div><div class="">        ierr = DMDestroy(&dm); CHKERRQ(ierr);</div><div class="">        dm = distributedDm;</div><div class="">    }</div><div class="">    ierr = DMDestroy(&dm); CHKERRQ(ierr);</div><div class=""><br class=""></div><div class="">    PetscFinalize();</div><div class="">    return 0;</div><div class="">}</div></div><div class=""><br class=""></div><div class="">Here’s the error message:</div><div class=""><br class=""></div><span class="">scc-wkit-clx-237-216:cimply_playground maximilianhartig$ ~/petsc/arch-darwin-c/bin/mpiexec -np 2 ./meshTest<br class="">[0]PETSC ERROR: ------------------------------------------------------------------------<br class="">[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range<br class="">[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br class="">[0]PETSC ERROR: or see <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" class="">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a><br class="">[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors<br class="">[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run <br class="">[0]PETSC ERROR: to get more information on the crash.<br class="">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br class="">[0]PETSC ERROR: Signal received<br class="">[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.<br class="">[0]PETSC ERROR: Petsc Release Version 3.10.2, unknown <br class="">[0]PETSC ERROR: ./meshTest on a arch-darwin-c named Maximilians-MacBook.local by maximilianhartig Tue Nov  6 11:02:14 2018<br class="">[0]PETSC ERROR: Configure options PETSC_ARCH=arch-darwin-c --with-debugging=false --download-mumps --download-chacoa --download-scalapack --download-mpich --with-fc=gfortran-mp-6 --download-triangle --with-cc=gcc-mp-6 --with-cxx=g++-mp-6 --download-fblaspack --download-parmetis --download-metis --download-hdf5 --download chaco<br class="">[0]PETSC ERROR: #1 User provided function() line 0 in  unknown file<br class="">application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0</span><div class=""><span class=""><br class=""></span></div><div class=""><span class=""><br class=""></span></div><div class="">I don’t know how to proceed with this and would be thankful for a pointer in the right direction.</div><div class=""><span class="">Thanks,</span></div><div class=""><span class=""><br class=""></span></div><div class=""><span class="">Max<br class=""></span><span class=""><br class=""></span></div></body></html>