This was caused by VecValidValues() for a Vec that does not implement VecGetArray(). Fixed in<div><br></div><div><a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/3b9bc425b217">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/3b9bc425b217</a></div>
<div><br></div><div>I don't think that not implementing VecGetArray() should be a fatal error though, there are certainly Vec types that don't need it.<br><br><div class="gmail_quote">On Fri, Jan 6, 2012 at 10:28, Hong Zhang <span dir="ltr"><<a href="mailto:hzhang@mcs.anl.gov">hzhang@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Jed,<br>
petsc-dev/src/ksp/ksp/examples/tests/ex22 nightly test gives error<br>
<br>
<br>
Program received signal SIGSEGV, Segmentation fault.<br>
0x0000000001047afd in PCApply (pc=0x2a01620, x=0x2982980, y=0x2a43590)<br>
at /sandbox/hzhang/petsc-dev/src/ksp/pc/interface/precon.c:378<br>
378 VecValidValues(x,2,PETSC_TRUE);<br>
(gdb) where<br>
#0 0x0000000001047afd in PCApply (pc=0x2a01620, x=0x2982980, y=0x2a43590)<br>
at /sandbox/hzhang/petsc-dev/src/ksp/pc/interface/precon.c:378<br>
#1 0x0000000001117687 in KSPInitialResidual (ksp=0x29d0820, vsoln=0x299d2b0,<br>
vt1=0x2a1fad0, vt2=0x2a31830, vres=0x2a43590, vb=0x2982980)<br>
at /sandbox/hzhang/petsc-dev/src/ksp/ksp/interface/itres.c:64<br>
#2 0x00000000010dfd38 in KSPSolve_GMRES (ksp=0x29d0820)<br>
at /sandbox/hzhang/petsc-dev/src/ksp/ksp/impls/gmres/gmres.c:230<br>
#3 0x000000000091f387 in KSPSolve (ksp=0x29d0820, b=0x2982980, x=0x299d2b0)<br>
at /sandbox/hzhang/petsc-dev/src/ksp/ksp/interface/itfunc.c:429<br>
#4 0x00000000004085f0 in test_solve () at ex22.c:92<br>
#5 0x000000000040bae0 in main (argc=2, args=0x7fff2765ac78) at ex22.c:229<br>
<br>
Can you take a look at it? I do not know where is the problem.<br>
Thanks,<br>
<br>
Hong<br>
</blockquote></div><br></div>