[petsc-users] KSPSolve() passes in the dbg mode, but failed in opt mode

Matthew Knepley knepley at gmail.com
Mon Jul 25 11:50:05 CDT 2016


On Mon, Jul 25, 2016 at 9:17 AM, Xujun Zhao <xzhao99 at gmail.com> wrote:

> Hi all,
>
> I am trying to solve my problem with a direct solver superLU_dist.
> But the KSPSolve failed in the "opt" mode. I shifted to the "dbg" version
> and wanted to see what error info I can get from the PETSc. Surprisingly,
> it passed the solve and didn't output any errors in the "dbg" version. Does
> anyone have the similar experience? and what type of potential bugs it may
> have?
>

Debugging mode initializes all variables, but as Hong says, valgrind will
warn you of uninitialized variables.

   Matt


>
> --->test in StokesSolver::solve(): Start the KSP solve...
>
> [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: 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 http://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
>
> [0]PETSC ERROR: Petsc Release Version 3.7.2, unknown
>
> [0]PETSC ERROR: ./example-dbg on a arch-darwin-c-opt named
> mcswl091.mcs.anl.gov by xzhao Mon Jul 25 11:10:12 2016
>
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> --with-fc=gfortran --download-mpich --download-fblaslapack
> --download-scalapack --download-mumps --download-superlu_dist
> --download-hypre --download-ml --download-metis --download-parmetis
> --download-triangle --download-chaco --with-debugging=0
>
> [0]PETSC ERROR: #1 User provided function() line 0 in  unknown file
>
> application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
>
>
>


-- 
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/20160725/ccd3ac2f/attachment.html>


More information about the petsc-users mailing list