[petsc-users] Valgrind unhandled instruction
Tabrez Ali
stali at geology.wisc.edu
Wed May 21 16:48:51 CDT 2014
Hello
With petsc-dev I get the following error with my own code and also with
ex56 as shown below. Both run fine otherwise. This is with Valgrind 3.7
(in Debian stable).
Is this a PETSc or Valgrind issue?
T
stali at i5:~/petsc-dev/src/ksp/ksp/examples/tutorials$ valgrind ./ex56 -ne
9 -alpha 1.e-3 -pc_type gamg -pc_gamg_type agg -pc_gamg_agg_nsmooths 1
-pc_gamg_coarse_eq_limit 10 -pc_gamg_reuse_interpolation true
-two_solves -ksp_monitor_short -use_mat_nearnullspace
==16123== Memcheck, a memory error detector
==16123== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==16123== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==16123== Command: ./ex56 -ne 9 -alpha 1.e-3 -pc_type gamg -pc_gamg_type
agg -pc_gamg_agg_nsmooths 1 -pc_gamg_coarse_eq_limit 10
-pc_gamg_reuse_interpolation true -two_solves -ksp_monitor_short
-use_mat_nearnullspace
==16123==
vex x86->IR: unhandled instruction bytes: 0x66 0xF 0x38 0x39
==16123== valgrind: Unrecognised instruction at address 0x4228928.
==16123== at 0x4228928: ISCreateGeneral_Private (in
/home/stali/petsc-dev/arch-linux2-c-debug/lib/libpetsc.so.3.04.4)
==16123== by 0x4228D54: ISGeneralSetIndices_General (in
/home/stali/petsc-dev/arch-linux2-c-debug/lib/libpetsc.so.3.04.4)
==16123== by 0x4229504: ISGeneralSetIndices (in
/home/stali/petsc-dev/arch-linux2-c-debug/lib/libpetsc.so.3.04.4)
==16123== by 0x422976F: ISCreateGeneral (in
/home/stali/petsc-dev/arch-linux2-c-debug/lib/libpetsc.so.3.04.4)
==16123== by 0x4A94CAA: PCGAMGCoarsen_AGG (in
/home/stali/petsc-dev/arch-linux2-c-debug/lib/libpetsc.so.3.04.4)
==16123== by 0x4A84FD6: PCSetUp_GAMG (in
/home/stali/petsc-dev/arch-linux2-c-debug/lib/libpetsc.so.3.04.4)
==16123== by 0x49E8163: PCSetUp (in
/home/stali/petsc-dev/arch-linux2-c-debug/lib/libpetsc.so.3.04.4)
==16123== by 0x4AE6023: KSPSetUp (in
/home/stali/petsc-dev/arch-linux2-c-debug/lib/libpetsc.so.3.04.4)
==16123== by 0x804C7D6: main (in
/home/stali/petsc-dev/src/ksp/ksp/examples/tutorials/ex56)
==16123== Your program just tried to execute an instruction that Valgrind
==16123== did not recognise. There are two possible reasons for this.
==16123== 1. Your program has a bug and erroneously jumped to a non-code
==16123== location. If you are running Memcheck and you just saw a
==16123== warning about a bad jump, it's probably your program's fault.
==16123== 2. The instruction is legitimate but Valgrind doesn't handle it,
==16123== i.e. it's Valgrind's fault. If you think this is the case or
==16123== you are not sure, please let us know and we'll try to fix it.
==16123== Either way, Valgrind will now raise a SIGILL signal which will
==16123== probably kill your program.
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 4 Illegal instruction: Likely due
to memory corruption
[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: 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] ISCreateGeneral_Private line 575
/home/stali/petsc-dev/src/vec/is/is/impls/general/general.c
[0]PETSC ERROR: [0] ISGeneralSetIndices_General line 674
/home/stali/petsc-dev/src/vec/is/is/impls/general/general.c
[0]PETSC ERROR: [0] ISGeneralSetIndices line 662
/home/stali/petsc-dev/src/vec/is/is/impls/general/general.c
[0]PETSC ERROR: [0] ISCreateGeneral line 631
/home/stali/petsc-dev/src/vec/is/is/impls/general/general.c
[0]PETSC ERROR: [0] PCGAMGCoarsen_AGG line 976
/home/stali/petsc-dev/src/ksp/pc/impls/gamg/agg.c
[0]PETSC ERROR: [0] PCSetUp_GAMG line 487
/home/stali/petsc-dev/src/ksp/pc/impls/gamg/gamg.c
[0]PETSC ERROR: [0] KSPSetUp line 219
/home/stali/petsc-dev/src/ksp/ksp/interface/itfunc.c
[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 Development GIT revision: v3.4.4-4344-ge0d8a6f
GIT Date: 2014-05-21 16:02:44 -0500
[0]PETSC ERROR: ./ex56 on a arch-linux2-c-debug named i5 by stali Wed
May 21 16:41:07 2014
[0]PETSC ERROR: Configure options --with-fc=gfortran --with-cc=gcc
--download-mpich --with-metis=1 --download-metis=1 --COPTFLAGS="-O3
-march=native" --FOPTFLAGS="-O3 -march=native" --with-shared-libraries
--with-debugging=1
[0]PETSC ERROR: #1 User provided function() line 0 in unknown file
application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
[unset]: aborting job:
application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
==16123==
==16123== HEAP SUMMARY:
==16123== in use at exit: 4,627,684 bytes in 1,188 blocks
==16123== total heap usage: 1,649 allocs, 461 frees, 6,073,192 bytes
allocated
==16123==
==16123== LEAK SUMMARY:
==16123== definitely lost: 0 bytes in 0 blocks
==16123== indirectly lost: 0 bytes in 0 blocks
==16123== possibly lost: 0 bytes in 0 blocks
==16123== still reachable: 4,627,684 bytes in 1,188 blocks
==16123== suppressed: 0 bytes in 0 blocks
==16123== Rerun with --leak-check=full to see details of leaked memory
==16123==
==16123== For counts of detected and suppressed errors, rerun with: -v
==16123== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 61 from 8)
More information about the petsc-users
mailing list