[petsc-users] Possible causes for segmentation violation error at EPSSetOperators

Shitij Bhargava shitij.cse at gmail.com
Tue Aug 14 04:40:16 CDT 2012


Hi all !

I am using fortran with petsc-3.2-p7, and slepc-3.2-p5

A code snippet of the place where the error is coming:
*
*
*call EPSCreate(PETSC_COMM_WORLD,eps,ierr)*
*call EPSSetOperators(eps,AR,PETSC_NULL,ierr)   <-------*
*call EPSSetProblemType(eps,EPS_HEP,ierr)*

The error message:

[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
http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#valgrind[0]PETSCERROR:
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: [0] EPSSetOperators line 267 src/eps/interface/setup.c
[0]PETSC ERROR: --------------------- Error Message
------------------------------------
[0]PETSC ERROR: Signal received!
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 7, Thu Mar 15 09:30:51
CDT 2012
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: ./nmaex on a new-linux named shitij by shitij Tue Aug 14
14:39:24 2012
[0]PETSC ERROR: Libraries linked from
/home/shitij/NMA/Lib/petsc-3.2-p7/new-linux12/lib
[0]PETSC ERROR: Configure run at Wed Jun 20 10:20:34 2012
[0]PETSC ERROR: Configure options
--with-blas-lapack-dir=/opt/intel/Compiler/11.0/074/mkl/lib/em64t
--with-mpi-dir=/home/shitij/NMA/Lib/mpich2-build
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: User provided function() line 0 in unknown directory
unknown file
application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0


Now, my program conditionally branches in the beginning and then converges
somewhere in the middle, after which this piece of code comes. One branch
works fine, but the other doesn't. So the usage of the function itself is
correct, but something in the other branch is wrong. I can understand this
much.

What I do not understand is why the error is coming at EPSSetOperators, and
how do I debug this problem?

I verified that the MPIAIJ array, AR, itself is not null with MatView, and
I already created the EPS context as eps in the previous line, and the
other arguments to the function are the same as in the other branch, so
they cannot be the problem. The values inside the AR array might be
incorrect, but they are there so this error should not come because of that
as far as I can understand.

Any help will be appreciated.

Thank you in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120814/56898f2b/attachment.html>


More information about the petsc-users mailing list