[petsc-users] New nonzero caused a malloc

Matthew Knepley knepley at gmail.com
Thu Oct 5 03:47:38 CDT 2017


On Thu, Oct 5, 2017 at 2:59 AM, Luca Verzeroli <
l.verzeroli at studenti.unibg.it> wrote:

> Good mornig,
>
> I'm new to PETSc and i'm wondering about this problem.
>
> When i run my code with 2 processes I have no problem. When i use more
> than 2 processes I receive this message:
>
> [1]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [1]PETSC ERROR: Argument out of range
> [1]PETSC ERROR: New nonzero at (0,43) caused a malloc
> Use MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE) to turn
> off this check
>
> This means that a process is trying to write in cell (0,43)?
>
> Then I try with MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR,
> PETSC_FALSE) and I
>
> check with MatView if there's an element in (0,43) but nothing is written
> there.
>
> Otherwise, I have checked the index I use to insert element in the matrix
> but no (0,43) is present.
>

Unfortunately, the error reporting here is substandard and we should fix
it. You have exceeded the preallocation
on process 1, but it is caught in the code for the serial matrix for the
diagonal block, so this means 1st row on proc 1,
and column 43 relative to the first column.

  Thanks,

    Matt


> Could you give me some advices about the possible solution of this problem?
>
> Luca
>
>


-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171005/037ebc62/attachment-0001.html>


More information about the petsc-users mailing list