[petsc-dev] Segfault in DMPlexDistribute

Barry Smith bsmith at mcs.anl.gov
Wed Jul 31 16:49:02 CDT 2013


http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind

On Jul 31, 2013, at 12:49 PM, Chris Eldred <chris.eldred at gmail.com> wrote:

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




More information about the petsc-dev mailing list