[petsc-users] Segfault in DMPlexDistributeFieldIS with -log_view

Adrian Croucher a.croucher at auckland.ac.nz
Thu Sep 12 21:41:53 CDT 2019


PS if I run with -start_in_debugger and do a backtrace I get the following:

Thread 1 "waiwera" received signal SIGSEGV, Segmentation fault.
0x00007fe12231b761 in PetscObjectComm (obj=0xfffffffffffffffe)
     at /home/acro018/software/PETSc/code/src/sys/objects/gcomm.c:33
33        return obj->comm;
(gdb) bt
#0  0x00007fe12231b761 in PetscObjectComm (obj=0xfffffffffffffffe)
     at /home/acro018/software/PETSc/code/src/sys/objects/gcomm.c:33
#1  0x00007fe12231488c in PetscLogEventBeginDefault (event=133, t=0,
     o1=0xfffffffffffffffe, o2=0x0, o3=0x0, o4=0x0)
     at 
/home/acro018/software/PETSc/code/src/sys/logging/utils/eventlog.c:647
#2  0x00007fe1231bcbbd in DMPlexDistributeFieldIS (dm=0xfffffffffffffffe,
     pointSF=0x55857b89eb40, originalSection=0x55857b7bdaf0,
     originalIS=0x55857b793270, newSection=0x55857b8a26d0, 
newIS=0x7ffc52486d58)
     at 
/home/acro018/software/PETSc/code/src/dm/impls/plex/plexdistribute.c:832
#3  0x00007fe1233e5c9a in dmplexdistributefieldis_ (
     dm=0x55857a4cdea8 <simulation+232>,
     pointSF=0x55857a4cdf20 <simulation+352>, 
originalSection=0x7ffc52486d88,
     originalIS=0x55857a4cdf10 <simulation+336>, newSection=0x7ffc52486d50,
     newIS=0x7ffc52486d58, __ierr=0x7ffc52486d4c)
     at 
/home/acro018/software/PETSc/code/src/dm/impls/plex/ftn-auto/plexdistributef.c:135
#4  0x000055857a202cc8 in mesh_module::mesh_distribute_index_set (self=...,
     sf=..., section=..., index_set=...) at ../src/mesh.F90:3393
#5  0x000055857a22b60c in mesh_module::mesh_distribute (self=...)
     at ../src/mesh.F90:152
#6  0x000055857a224626 in mesh_module::mesh_configure (self=..., 
gravity=...,
     json=0x55857b574180, logfile=..., err=0) at ../src/mesh.F90:826
#7  0x000055857a1baf14 in flow_simulation_module::flow_simulation_init (
---Type <return> to continue, or q <return> to quit---Quit

On 13/09/19 2:31 PM, Adrian Croucher wrote:
> hi
>
> My code is using DMPlexDistributeFieldIS() to distribute an index set, 
> and it seems to work ok, except if I run with -log_view.
>
> In that case I get the error below.
>
> The code (Fortran) looks like this:
>
>     call PetscSectionCreate(PETSC_COMM_WORLD, dist_section, ierr)
>     CHKERRQ(ierr)
>     call ISCreate(PETSC_COMM_WORLD, dist_index_set, ierr)
>     CHKERRQ(ierr)
>     call DMPlexDistributeFieldIS(self%dm, sf, section, &
>          index_set, dist_section, &
>          dist_index_set, ierr); CHKERRQ(ierr)
>     call PetscSectionDestroy(dist_section, ierr); CHKERRQ(ierr)
>     call ISDestroy(index_set, ierr); CHKERRQ(ierr)
>     index_set = dist_index_set
>
> I'm running the master branch.
>
> Any clues?
>
> - Adrian
>
> -- 
>
> [0]PETSC ERROR: 
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, 
> probably memory access out of range
> [0]PETSC ERROR: Try option -start_in_debugger or 
> -on_error_attach_debugger
> [0]PETSC ERROR: or see 
> https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
> [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac 
> OS X to find memory corruption errors
> [0]PETSC ERROR: likely location of problem given in stack below
> [0]PETSC ERROR: ---------------------  Stack Frames 
> ------------------------------------
> [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 
> https://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] PetscLogEventBeginDefault line 642 
> /home/acro018/software/PETSc/code/src/sys/logging/utils/eventlog.c
> [1]PETSC ERROR: [1] DMPlexDistributeFieldIS line 831 
> /home/acro018/software/PETSc/code/src/dm/impls/plex/plexdistribute.c
> [0]PETSC ERROR: Note: The EXACT line numbers in the stack are not 
> available,
> [0]PETSC ERROR:       INSTEAD the line number of the start of the 
> function
> [0]PETSC ERROR:       is given.
> [0]PETSC ERROR: [0] PetscLogEventBeginDefault line 642 
> /home/acro018/software/PETSc/code/src/sys/logging/utils/eventlog.c
> [0]PETSC ERROR: [1]PETSC ERROR: --------------------- Error Message 
> --------------------------------------------------------------
> [1]PETSC ERROR: Signal received
> [1]PETSC ERROR: See 
> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble 
> shooting.
> [1]PETSC ERROR: Petsc Development GIT revision: 
> v3.11.3-1582-gcb66735359  GIT Date: 2019-08-04 16:01:27 -0500
> [1]PETSC ERROR: waiwera on a linux-gnu-c-debug named en-354401 by 
> acro018 Fri Sep 13 14:20:41 2019
> [1]PETSC ERROR: Configure options --with-x --download-hdf5 
> --download-zlib --download-netcdf --download-pnetcdf 
> --download-exodusii --download-triangle --download-ptscotch 
> --download-chaco --download-hypre
> [1]PETSC ERROR: #1 User provided function() line 0 in  unknown file
> [0] DMPlexDistributeFieldIS line 831 
> /home/acro018/software/PETSc/code/src/dm/impls/plex/plexdistribute.c
> [0]PETSC ERROR: --------------------- Error Message 
> --------------------------------------------------------------
> [0]PETSC ERROR: Signal received
> [0]PETSC ERROR: See 
> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble 
> shooting.
> [0]PETSC ERROR: Petsc Development GIT revision: 
> v3.11.3-1582-gcb66735359  GIT Date: 2019-08-04 16:01:27 -0500
> [0]PETSC ERROR: waiwera on a linux-gnu-c-debug named en-354401 by 
> acro018 Fri Sep 13 14:20:41 2019
> [0]PETSC ERROR: Configure options --with-x --download-hdf5 
> --download-zlib --download-netcdf --download-pnetcdf 
> --download-exodusii --download-triangle --download-ptscotch 
> --download-chaco --download-hypre
> [0]PETSC ERROR: #1 User provided function() line 0 in  unknown file
>
-- 
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: a.croucher at auckland.ac.nz
tel: +64 (0)9 923 4611



More information about the petsc-users mailing list