[petsc-users] MatSetValues() for MATMPICUSP

Matthew Knepley knepley at gmail.com
Fri Feb 10 15:14:15 CST 2012


On Fri, Feb 10, 2012 at 3:12 PM, recrusader <recrusader at gmail.com> wrote:

> Dear Jed,
>
> The first example works. However, the example uses MatSetValuesStencil()
> not MatSetValues(). Are they same?
>

MatSetValuesStencil() calls MatSetValues(). I suspect that your MPIAIJ
matrix does not have the option set to
throw an error when inserting a new nonzero, and your MPICUSP matrix does.

   Matt


> Thanks a lot,
> Yujie
>
> On Fri, Feb 10, 2012 at 2:51 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
>> On Fri, Feb 10, 2012 at 14:49, recrusader <recrusader at gmail.com> wrote:
>>
>>> 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().
>>>
>>> Which PETSc examples can test this function?
>>
>>
>> Try src/ksp/ksp/examples/tutorials/ex43.c and
>> src/snes/examples/tutorials/ex48.c
>>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120210/7de7782e/attachment-0001.htm>


More information about the petsc-users mailing list