[petsc-users] MatSetValues() for MATMPICUSP

Jed Brown jedbrown at mcs.anl.gov
Sat Feb 11 10:56:19 CST 2012


On Sat, Feb 11, 2012 at 10:52, recrusader <recrusader at gmail.com> wrote:

> When I removed 'if (NONEW == -2)
> SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"New nonzero at
> (%D,%D) caused a malloc",ROW,COL); \' from the following function in
> src/mat/impls/aij/seq/aij.h. It works in GPU mode. Do you have any
> comments? Thanks a lot.
>

If you want that effect, you can

MatSetOption(A,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE);

or -mat_new_nonzero_allocation_err 0.

The more serious problem is that preallocation information seems to be
getting lost. If you don't fix that, assembly will be horrendously slow.
Are you sure the Mat type is being set *before* the call to
MatMPIAIJSetPreallocation()?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120211/b4ae9c95/attachment-0001.htm>


More information about the petsc-users mailing list