I am getting a segmentation fault when I try to distribute a DMPlex mesh:<br><br>[1]PETSC ERROR: ------------------------------------------------------------------------<br>[1]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range<br>
[1]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>[1]PETSC ERROR: or see <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[1]PETSC">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[1]PETSC</a> ERROR: or try <a href="http://valgrind.org">http://valgrind.org</a> on GNU/linux and Apple Mac OS X to find memory corruption errors<br>
[1]PETSC ERROR: likely location of problem given in stack below<br>[1]PETSC ERROR: ---------------------  Stack Frames ------------------------------------<br>[1]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,<br>
[1]PETSC ERROR:       INSTEAD the line number of the start of the function<br>[1]PETSC ERROR:       is given.<br>[1]PETSC ERROR: [1] PetscSFCreateEmbeddedSF line 863 /home/user/Desktop/LIBRARIES/petsc/src/vec/is/sf/interface/sf.c<br>
[1]PETSC ERROR: [1] PetscSFDistributeSection line 1755 /home/user/Desktop/LIBRARIES/petsc/src/vec/is/utils/vsectionis.c<br>[1]PETSC ERROR: [1] DMPlexDistribute line 2771 /home/user/Desktop/LIBRARIES/petsc/src/dm/impls/plex/plex.c<br>
[1]PETSC ERROR: --------------------- Error Message ------------------------------------<br>[1]PETSC ERROR: Signal received!<br>[1]PETSC ERROR: ------------------------------------------------------------------------<br>[1]PETSC ERROR: Petsc Development GIT revision: dd831807ccae33b4bba0c6456b55575ff17239c3  GIT Date: 2013-06-03 14:26:06 -0600<br>
[1]PETSC ERROR: See docs/changes/index.html for recent updates.<br>[1]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>[1]PETSC ERROR: See docs/index.html for manual pages.<br>[1]PETSC ERROR: ------------------------------------------------------------------------<br>
[1]PETSC ERROR: ./test on a arch-linux2-cxx-debug named Puget-101334 by user Wed Jul 31 12:44:44 2013<br>[1]PETSC ERROR: Libraries linked from /home/user/Desktop/LIBRARIES/petsc/arch-linux2-cxx-debug/lib<br>[1]PETSC ERROR: Configure run at Mon Jun  3 14:29:12 2013<br>
[1]PETSC ERROR: Configure options --download-boost --download-chaco --download-ctetgen --download-f-blas-lapack --download-fiat --download-generator --download-hdf5 --download-metis --download-ml --download-mpich --download-parmetis --download-scientificpython --download-triangle --with-clanguage=cxx --with-dynamic-loading --with-openmp --with-pthreadclasses --with-shared-libraries --with-sieve --with-threadcomm PETSC_ARCH=arch-linux2-cxx-debug<br>
[1]PETSC ERROR: ------------------------------------------------------------------------<br>[1]PETSC ERROR: User provided function() line 0 in unknown directory unknown file<br>application called MPI_Abort(MPI_COMM_WORLD, 59) - process 1<br>
[cli_1]: aborting job:<br>application called MPI_Abort(MPI_COMM_WORLD, 59) - process 1<br><br>I am building the mesh using DMPlexCreateFromCellList but I get the 
exact same error occurring if I build it using DMPlexSetCone, etc. It is the sample mesh from <a href="http://www.mcs.anl.gov/petsc/petsc-as/documentation/tutorials/sieve.pdf">http://www.mcs.anl.gov/petsc/petsc-as/documentation/tutorials/sieve.pdf</a> (figure 2) so very simple. <br>
<br>Here is my relevant code:<br><br>cell_list = (/ 0 , 1 , 2  , 1 , 3 , 2 /)<br>vertex_coords = 0.0<br><br>call DMPlexCreateFromCellList(PETSC_COMM_WORLD, 2, 2, 4, 3,  1 , cell_list , 2 , vertex_coords , dm,  ierr)<br>CHKERRQ(ierr)<br>
<br>call DMPlexDistribute(dm,'chaco',0,dm_distrib,ierr)<br>CHKERRQ(ierr)<br><br>I am running the code with mpirun -np 2 ./test (it also segfaults with higher values for np).<br><br>Any ideas? The code works fine with mpirun -np 1 (presumably since it is not actually attempting to distribute the mesh).<br>
<br>Thanks,<br>-Chris Eldred<br><br>--<br>Chris Eldred<br>DOE Computational Science Graduate Fellow<br>Graduate Student, Atmospheric Science, Colorado State University<br>B.S. Applied Computational Physics, Carnegie Mellon University, 2009<br>
<a href="mailto:chris.eldred@gmail.com">chris.eldred@gmail.com</a> / <a href="mailto:celdred@atmos.colostate.edu">celdred@atmos.colostate.edu</a>