[petsc-users] Error with debug

Matthew Knepley knepley at gmail.com
Mon Mar 9 11:49:00 CDT 2015


Use valgrind like it says and find out where memory is being overwritten.

  Thanks,

     Matt

On Mon, Mar 9, 2015 at 11:25 AM, Saurabh Chawdhary <
saurabh.chawdhary at gmail.com> wrote:

> Sorry here is the Error trace I get on running on 1 processor:
> [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/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: PetscMallocValidate: error detected at
>  PetscSignalHandlerDefault() line 149 in src/sys/error/signal.c
> [0]PETSC ERROR: Memory at address 0x7fe4fdc6f010 is corrupted
> [0]PETSC ERROR: Probably write past beginning or end of array
> [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> [0]PETSC ERROR: Memory corruption!
> [0]PETSC ERROR:  !
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Petsc Release Version 3.4.5, Jun, 29, 2014
> [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: ../IB-AMRS/test1 on a arch-linux2-c-debug named
> aegean.safl.umn.edu by chaw0023 Mon Mar  9 11:24:50 2015
> [0]PETSC ERROR: Libraries linked from
> /home/chaw0023/software/aegean/debug/petsc-3.4.5/arch-linux2-c-debug/lib
> [0]PETSC ERROR: Configure run at Thu Feb 19 12:22:29 2015
> [0]PETSC ERROR: Configure options
> --with-mpi-dir=/safl/software/aegean/openmpi/1.5.5/gcc/4.7.0-fix
> --with-blas-lapack-dir=/safl/software/x86_64/acml/4.4.0/gfortran64
> --download-hypre=yes --with-shared-libraries=0 --with-debugging=1
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: PetscMallocValidate() line 137 in src/sys/memory/mtr.c
> [0]PETSC ERROR: PetscSignalHandlerDefault() line 149 in
> src/sys/error/signal.c
> --------------------------------------------------------------------------
> MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
> with errorcode 0.
>
> NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
> You may or may not see output from other processes, depending on
> exactly when Open MPI kills them.
> --------------------------------------------------------------------------
>
>
>
> On Mon, Mar 9, 2015 at 10:55 AM, Jed Brown <jed at jedbrown.org> wrote:
>
>> Saurabh Chawdhary <saurabh.chawdhary at gmail.com> writes:
>>
>> > Hi,
>> > I used to work with petsc and running everything fine thus far. But
>> then I
>> > decided to run it with a debugger. To this end I re-installed petsc
>> > --with-debugging=1. I can compile the code with this new petsc
>> installation
>> > but when I run it I get Segmentation fault error. Same code compiled
>> with
>> > the old without debug option runs perfectly fine.
>> > Is something wrong with my new installation?
>>
>> Run in a debugger and send the stack trace.
>>
>
>
>
> --
> सौरभ चौधरी
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150309/ac314def/attachment.html>


More information about the petsc-users mailing list