Hi,

PetscVFPrintfDefault crashes on using -help on command line
due to bad function arguments.

Tried this using src/snes/examples/tutorials/ex19, and
petsc-dev nightly and petsc-3.3-p1.  The stack is given below
and the code is not valgrind clean.  The debugger told
me that in src/ksp/ksp/interface/itcl.c and on this line
ksp->pc_side is -1.

   ierr = PetscOptionsEList("-ksp_pc_side","KSP preconditioner side",
      "KSPSetPCSide",PCSides,3,PCSides[ksp->pc_side],&indx,&flg);CHKERRQ(ierr);

Stack:

..... [help skipped]

  -ksp_monitor_draw_true_residual: <FALSE> Monitor graphically true residual 
norm (KSPMonitorSet)
  -ksp_monitor_range_draw: <FALSE> Monitor graphically range of preconditioned 
residual norm (KSPMonitorSet)
  -ksp_monitor_ams: <FALSE> Publish KSP progress using AMS (KSPMonitorSet)
[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: 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] PetscVFPrintfDefault line 197 src/sys/fileio/mprint.c
[0]PETSC ERROR: [0] PetscHelpPrintfDefault line 607 src/sys/fileio/mprint.c
[0]PETSC ERROR: [0] PetscOptionsEList line 967 src/sys/objects/aoptions.c
[0]PETSC ERROR: [0] KSPSetFromOptions line 382 src/ksp/ksp/interface/itcl.c
[0]PETSC ERROR: [0] SNESSetFromOptions line 540 src/snes/interface/snes.c
[0]PETSC ERROR: --------------------- Error Message 
------------------------------------
[0]PETSC ERROR: Signal received!
[0]PETSC ERROR: 
------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Development HG revision: 
13f423daabbd83291cd7dca6481f7cffb49b7019  HG Date: Sat Jul 07 21:50:45 2012 
-0500
[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: ./ex19 on a test_cras named mg1.txcorp.com by jhurani Sun Jul  
8 18:15:50 2012
[0]PETSC ERROR: Libraries linked from 
/scr_0/jhurani/builds/crash/petsc-dev/test_crash/lib
[0]PETSC ERROR: Configure run at Sun Jul  8 18:12:46 2012
[0]PETSC ERROR: Configure options --with-clanguage=C++ --with-c-support=1 
--with-fortran=0 --with-debugging=yes
[0]PETSC ERROR: 
------------------------------------------------------------------------
[0]PETSC ERROR: User provided function() line 0 in unknown directory unknown 
file
--------------------------------------------------------------------------

Chetan


Reply via email to