Dear Jed,<br><br>The first example works. However, the example uses MatSetValuesStencil() not MatSetValues(). Are they same?<br><br>Thanks a lot,<br>Yujie<br><br><div class="gmail_quote">On Fri, Feb 10, 2012 at 2:51 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im">On Fri, Feb 10, 2012 at 14:49, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Since MATMPIAIJ works (I didn't change anything. Just set the vec and mat types to mpicusp and mpiaijcusp for GPU), I think the problem is likely from MatSetValues_MPIAIJ().<br><br>Which PETSc examples can test this function?</blockquote>
<div><br></div></div><div>Try src/ksp/ksp/examples/tutorials/ex43.c and src/snes/examples/tutorials/ex48.c</div></div>
</blockquote></div><br>