Re: [petsc-users] segv in VecSum when using nested vec
In a larger code I'm getting a segmentation fault when setting a null space with KSPSetNullSpace. After some trying I can reproduce the problem with the small code below. It happens when calling VecSum on a nested vec.
Runs for me:
and it was valgrind clean. Are you running on multiple processes?
Matt
Strange, I get the same error both with single and multiple processes...
Could you get a stack trace with gdb? Also, I ran on petsc-dev.
Breakpoint 1, vecsumsegv::vecsumsegv (this=0x7fffffffd310, m=3, n=4) at vecsumsegv.cc:28 28 ierr = VecSum(x,&val); (gdb) next Program received signal SIGSEGV, Segmentation fault. 0x00000000004fda7c in VecSum (v=0xbad750, sum=0x7fffffffd2c8) at /home/CKlaij/ReFRESCO/Libraries/build/petsc-3.2-p5/src/vec/vec/utils/vinv.c:1307 1307 lsum += x[i]; (gdb) backtrace #0 0x00000000004fda7c in VecSum (v=0xbad750, sum=0x7fffffffd2c8) at /home/CKlaij/ReFRESCO/Libraries/build/petsc-3.2-p5/src/vec/vec/utils/vinv.c:1307 #1 0x000000000041f93e in vecsumsegv::vecsumsegv (this=0x7fffffffd310, m=3, n=4) at vecsumsegv.cc:28 #2 0x00000000004202fd in main (argc=1, argv=0x7fffffffd468) at vecsumsegv.cc:78 (gdb) bt full #0 0x00000000004fda7c in VecSum (v=0xbad750, sum=0x7fffffffd2c8) at /home/CKlaij/ReFRESCO/Libraries/build/petsc-3.2-p5/src/vec/vec/utils/vinv.c:1307 ierr = 0 i = 0 n = 36 x = 0x2 lsum = 0 #1 0x000000000041f93e in vecsumsegv::vecsumsegv (this=0x7fffffffd310, m=3, n=4) at vecsumsegv.cc:28 val = 0 #2 0x00000000004202fd in main (argc=1, argv=0x7fffffffd468) at vecsumsegv.cc:78 ierr = 0 val = 6.3659873728958169e-314 tryme = {ierr = 0, nx = 3, ny = 4, x = 0xbad750, subx = {0xb954e0, 0xb9b640}, isg = {0xba4ac0, 0xba9140}} dr. ir. Christiaan Klaij CFD Researcher Research & Development E mailto:[email protected] T +31 317 49 33 44 MARIN 2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl
On Tue, Mar 6, 2012 at 09:52, Klaij, Christiaan <[email protected]> wrote:
Could you get a stack trace with gdb? Also, I ran on petsc-dev.
Breakpoint 1, vecsumsegv::vecsumsegv (this=0x7fffffffd310, m=3, n=4) at vecsumsegv.cc:28 28 ierr = VecSum(x,&val); (gdb) next
This was fixed in petsc-dev. http://petsc.cs.iit.edu/petsc/petsc-dev/rev/3b9bc425b217 Why are you using VecNest? It causes more harm than good in all but some very special circumstances.
participants (2)
-
Jed Brown -
Klaij, Christiaan