[petsc-users] Error in VecAssemeblyBegin after VecView

Barry Smith bsmith at mcs.anl.gov
Tue Jan 3 10:56:11 CST 2012


On Jan 3, 2012, at 6:59 AM, Jed Brown wrote:

> On Tue, Jan 3, 2012 at 06:41, <Johannes.Huber at unibas.ch> wrote:
> The first assembly works well, and I would agree, if the first assmebly crashed. However, it's the second assembly call and in between those two calls, all I'm doing is viewing the vector.
> 
> Use a debugger to set a breakpoint in VecSetValues(); maybe starting after your first assemble. Also try Valgrind, it could be memory corruption.

http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind


> 
> You can also break in the first VecAssemblyBegin and do
> 
> (gdb) p &vec->stash.insertmode
> $1 = (InsertMode *) 0xADDRESS
> (gdb) wat *$1
> Hardware watchpoint 3: *$1
> (gdb) c
> ... breaks when insertmode is modified for any reason.



More information about the petsc-users mailing list