[petsc-users] petsc dev mat assembly fails

Jed Brown jedbrown at mcs.anl.gov
Mon Jun 4 09:11:58 CDT 2012


On Mon, Jun 4, 2012 at 9:02 AM, Wen Jiang <jiangwen84 at gmail.com> wrote:

> Hi,
>
> Sorry for the confusion.
>
> >>There aren't any errors in this -info output? What did you see? Send the
> >>whole error message.
>
> The error message is attached. It said Argument out of range and New
> nonzero at () caused a malloc. I did not have such error in petsc 3.2. I
> realized that I did not give exact preallocation in MatCreateAIJ, but I did
> not set its preallocation call MatSetOption(mat,
> NEW_NONZERO_ALLOCATION_ERR,PETSC_TRUE). Does petsc dev automatically call
> MatSetOption?
>

"Preallocation routines now automatically set
MAT_NEW_NONZERO_ALLOCATION_ERR, if you intentionally preallocate less than
necessary then use
MatSetOption(mat,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE) to disable the
error generation."

http://www.mcs.anl.gov/petsc/documentation/changes/dev.html


In the future, ALWAYS send the full error message so we don't have to ask
for it every time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120604/741d988b/attachment.html>


More information about the petsc-users mailing list