[petsc-users] PETSc Segmentation Violation error
Satish Balay
balay at mcs.anl.gov
Sun Jun 19 20:59:07 CDT 2022
As the below message indicates - you can try running this code via valgrind or gdb to determine the location of error.
https://petsc.org/release/faq/#valgrind
i.e
mpirun -np 4 valgrind --tool=memcheck python test.py
One way to specify option -start_in_debugger is:
PETSC_OPTION=-start_in_debugger mpirun -np 4 python test.py
Also good to use latest petsc version - currently its 3.17
Satish
On Sun, 19 Jun 2022, Pavankumar Koratikere wrote:
> Hello,
>
> I am trying to run a script that uses packages that depend on OpenMPI and
> PETSC (as shown below).
>
> mpirun -np 4 python test.py
>
> I am getting following error:
>
> [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://petsc.org/release/faq/#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: --------------------- Error Message
> --------------------------------------------------------------
> [1]PETSC ERROR: Signal received
> [1]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
> [1]PETSC ERROR: Petsc Release Version 3.15.5, Sep 29, 2021
> [1]PETSC ERROR: Unknown Name on a real-debug named skynet by pavan Sat
> Jun 18 10:30:04 2022
> [1]PETSC ERROR: Configure options --PETSC_ARCH=real-debug
> --with-scalar-type=real --with-debugging=1
> --with-mpi-dir=/home/pavan/packages/openmpi-4.0.7/opt-gfortran
> --download-metis=yes --download-parmetis=yes
> --download-superlu_dist=yes --with-shared-libraries=yes
> --with-fortran-bindings=1 --with-cxx-dialect=C++11
> [1]PETSC ERROR: #1 User provided function() at unknown file:0
> [1]PETSC ERROR: Checking the memory for corruption.
> [2]PETSC ERROR:
> ------------------------------------------------------------------------
> [2]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
> probably memory access out of range
> [2]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
> [2]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind
> [2]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac
> OS X to find memory corruption errors
> [2]PETSC ERROR: likely location of problem given in stack below
> [2]PETSC ERROR: --------------------- Stack Frames
> ------------------------------------
> [2]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,
> [2]PETSC ERROR: INSTEAD the line number of the start of the function
> [2]PETSC ERROR: is given.
> [2]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [2]PETSC ERROR: Signal received
> [2]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
> [2]PETSC ERROR: Petsc Release Version 3.15.5, Sep 29, 2021
> [2]PETSC ERROR: Unknown Name on a real-debug named skynet by pavan Sat
> Jun 18 10:30:04 2022
> [2]PETSC ERROR: Configure options --PETSC_ARCH=real-debug
> --with-scalar-type=real --with-debugging=1
> --with-mpi-dir=/home/pavan/packages/openmpi-4.0.7/opt-gfortran
> --download-metis=yes --download-parmetis=yes
> --download-superlu_dist=yes --with-shared-libraries=yes
> --with-fortran-bindings=1 --with-cxx-dialect=C++11
> [2]PETSC ERROR: #1 User provided function() at unknown file:0
> [2]PETSC ERROR: Checking the memory for corruption.
> [3]PETSC ERROR:
> ------------------------------------------------------------------------
> [3]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
> probably memory access out of range
> [3]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
> [3]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind
> [3]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac
> OS X to find memory corruption errors
> [3]PETSC ERROR: likely location of problem given in stack below
> [3]PETSC ERROR: --------------------- Stack Frames
> ------------------------------------
> [3]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,
> [3]PETSC ERROR: INSTEAD the line number of the start of the function
> [3]PETSC ERROR: is given.
> [3]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [3]PETSC ERROR: Signal received
> [3]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
> [3]PETSC ERROR: Petsc Release Version 3.15.5, Sep 29, 2021
> [3]PETSC ERROR: Unknown Name on a real-debug named skynet by pavan Sat
> Jun 18 10:30:04 2022
> [3]PETSC ERROR: Configure options --PETSC_ARCH=real-debug
> --with-scalar-type=real --with-debugging=1
> --with-mpi-dir=/home/pavan/packages/openmpi-4.0.7/opt-gfortran
> --download-metis=yes --download-parmetis=yes
> --download-superlu_dist=yes --with-shared-libraries=yes
> --with-fortran-bindings=1 --with-cxx-dialect=C++11
> [3]PETSC ERROR: #1 User provided function() at unknown file:0
> [3]PETSC ERROR: Checking the memory for corruption.
> [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://petsc.org/release/faq/#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
> ------------------------------------
> [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: --------------------- Error Message
> --------------------------------------------------------------
> [0]PETSC ERROR: Signal received
> [0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.15.5, Sep 29, 2021
> [0]PETSC ERROR: Unknown Name on a real-debug named skynet by pavan Sat
> Jun 18 10:30:04 2022
> [0]PETSC ERROR: Configure options --PETSC_ARCH=real-debug
> --with-scalar-type=real --with-debugging=1
> --with-mpi-dir=/home/pavan/packages/openmpi-4.0.7/opt-gfortran
> --download-metis=yes --download-parmetis=yes
> --download-superlu_dist=yes --with-shared-libraries=yes
> --with-fortran-bindings=1 --with-cxx-dialect=C++11
> [0]PETSC ERROR: #1 User provided function() at unknown file:0
> [0]PETSC ERROR: Checking the memory for corruption.
>
> I am new to PETSc and I don't really know how to debug this. Any help
> will be much appreciated!
>
> Regards,
>
> Pavan.
>
More information about the petsc-users
mailing list