[petsc-users] Runtime error

Matthew Knepley knepley at gmail.com
Fri Mar 19 21:23:32 CDT 2021


On Fri, Mar 19, 2021 at 8:50 PM Jorti, Zakariae via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Hi,
>
>
> I have a PETSc code which works in some cases circumstances whereas in
> others it gives me the error message below.
>
> The code works on my machine when I compile PETSc with debug flag on:
>
> ./configure PETSC_DIR=/Users/zjorti/software/petsc-3.14.5 PETSC_ARCH=macx
> --with-fc=0 --with-mpi-dir=$HOME/.brew --download-hypre  --with-debugging=1
> --with-cxx-dialect=C++11
>
>
>
> It does not work however when I compile Petsc with debug flag off:
>
> ./configure PETSC_DIR=/Users/zjorti/software/petsc-3.14.5 PETSC_ARCH=macx
> --with-fc=0 --with-mpi-dir=$HOME/.brew --download-hypre  --with-debugging=0
> --with-cxx-dialect=C++11
>
>
>
> I asked a colleague to test this same code.
>
> He compiles PETSc with debug flag off, runs the code and it works for him.
> He has an older machine but we both use the same version PETSc version
> which is 3.14.5.
>
These are the symptoms of an uninitialized variable or memory overwrite.
Both things should be caught by valgrind,
which we highly recommend, but you can start by running with -malloc_debug.

 Thanks,

     Matt

> As I do not have any debugger I could not identify the cause of this
> runtime error.
>
> One more thing: We did not run the code in parallel.
>
> Is this a hardware related issue or is it something else?
>
> Thanks,
>
>
> Zakariae
>
>
>
> [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: configure using --with-debugging=yes, recompile, link, and
> run
>
> [0]PETSC ERROR: to get more information on the crash.
>
> *[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 Release Version 3.14.5, Mar 03, 2021
>
> [0]PETSC ERROR: ./mimeticcurleuler2 on a macx named pn2032683.lanl.gov by
> zjorti Fri Mar 19 16:07:03 2021
>
> [0]PETSC ERROR: Configure options
> PETSC_DIR=/Users/zjorti/software/petsc-3.14.5 PETSC_ARCH=macx --with-fc=0
> --with-mpi-dir=/Users/zjorti/.brew --download-hypre --with-debugging=0
> --with-cxx-dialect=C++11
>
> [0]PETSC ERROR: #1 User provided function() line 0 in  unknown file
>
> [0]PETSC ERROR: Run with -malloc_debug to check if memory corruption is
> causing the crash.
>
> --------------------------------------------------------------------------
>
> MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
>
> with errorcode 50176059.
>
>
> 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.
>


-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210319/00d3a3f8/attachment.html>


More information about the petsc-users mailing list