Dear Jed,<br><br>I am sorry that I cannot generate the errors using PETSc by itself. <br>However, it easy to generate the errors with libmesh.<br>There is an example from libmesh, that is <a href="http://libmesh.sourceforge.net/ex4.php">http://libmesh.sourceforge.net/ex4.php</a><br>
I can run it using the command "ibrun -n 2 -o 0 ./introduction_ex4-dbg -d 3 -pc_type none -ksp_type gmres -vec_type mpicusp -mat_type mpiaijcusp -ksp_view -ksp_monitor -log_summary -malloc_debug -cuda_show_devices" (You should replace ibrun -n 2 -o 0 using mpiexec -n 2)<br>
I get the same errors. However, when using "ibrun -n 2 -o 0 ./introduction_ex4-dbg -d 3 -pc_type none -ksp_type gmres -ksp_view -ksp_monitor -log_summary". I can run it successfully.<br><br>Thank you very much.<br>
<br>Best,<br>Yujie<br><br><div class="gmail_quote">On Sat, Feb 11, 2012 at 4:43 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im"><div class="gmail_quote">On Sat, Feb 11, 2012 at 00:00, recrusader <span dir="ltr"><<a href="mailto:recrusader@gmail.com" target="_blank">recrusader@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>in <a href="http://www.mcs.anl.gov/petsc/petsc-dev/src/ksp/ksp/examples/tutorials/ex43.c.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-dev/src/ksp/ksp/examples/tutorials/ex43.c.html</a><br><br><a name="1356c03082bb1286_1356b0015b149048_line1468">Why are two matrices set to MATAIJ? if I set MATAIJCUSP, is them changed? <br>
<br>1468: </a> <a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/DM/DMCreateMatrix.html#DMCreateMatrix" target="_blank">DMCreateMatrix</a>(da_Stokes,<a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MATAIJ.html#MATAIJ" target="_blank">MATAIJ</a>,&A);<br>
<pre width="80"><a name="1356c03082bb1286_1356b0015b149048_line1469">1469: </a> <a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/DM/DMCreateMatrix.html#DMCreateMatrix" target="_blank">DMCreateMatrix</a>(da_Stokes,<a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MATAIJ.html#MATAIJ" target="_blank">MATAIJ</a>,&B);</pre>
</div></blockquote></div><br></div><div>You have to follow the code down to where those matrices are used.</div><div><br></div><div><div>1478: AssembleA_Stokes(A,da_Stokes,da_prop,properties);</div><div>1479: AssembleA_PCStokes(B,da_Stokes,da_prop,properties);</div>
</div><div><br></div><div>This uses a "block preconditioner", the B matrix is intentionally different from the A matrix in order to handle the saddle point.</div>
</blockquote></div><br>