[petsc-users] PETSC ERROR: Floating point exception!

Jed Brown jedbrown at mcs.anl.gov
Sat Nov 24 11:26:10 CST 2012

Lack of reproducibility points its huge foam finger at memory corruption.
You can try

1. running with -fp_trap to see where the bad values are first computed
2. running in valgrind to look for memory corruption
3. linking to a different BLAS/Lapack to rule out linking problems with MKL

On Sat, Nov 24, 2012 at 6:17 PM, Roc Wang <pengxwang at hotmail.com> wrote:

>  Hello,
>   I met a wierd problem.  I am trying to solve linear system by calling
> KSPSolve().  But sometimes, the error information of Floating point
> exception!  I tried to track down the error, but unfortunately, it's
> pretty random. Sometimes the executable runs fine. Other times it will
> crash with floating point exceptions as below. I cannot find the exact line
> causing the error. Could you please give me some suggestions or hints?
> Thanks a lot!
> [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------ [0]PETSC ERROR: Floating point
> exception! [0]PETSC ERROR: Infinite or not-a-number generated in norm!
> ------------------------------------------------------------------------
> [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: /gpfs/home/pzw2/work/MLPIC03_3dCart_20121118/a.out on a
> arch-linu named lionxo64.hpc.aset.psu.edu by pzw2 Sat Nov 24 11:01:49
> 2012 [0]PETSC ERROR: Libraries linked from /usr/global/petsc/3.2-p7/lib
> [0]PETSC ERROR: Configure run at Thu Apr 5 10:32:29 2012 [0]PETSC ERROR:
> Configure options --prefix=/usr/global/petsc/3.2-p7/
> --with-blas-lapack-dir=/usr/global/intel/mkl/[0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: VecNorm() line 167 in src/vec/vec/interface/rvector.c
> [0]PETSC ERROR: VecNormalize() line 261 in src/vec/vec/interface/rvector.c
> [0]PETSC ERROR: GMREScycle() line 128 in src/ksp/ksp/impls/gmres/gmres.c
> [0]PETSC ERROR: KSPSolve_GMRES() line 231 in
> src/ksp/ksp/impls/gmres/gmres.c [0]PETSC ERROR: KSPSolve() line 423 in
> src/ksp/ksp/interface/itfunc.c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20121124/714eb2ee/attachment.html>

More information about the petsc-users mailing list