[petsc-users] PETSC ERROR: Argument out of range New nonzero at (55, 157) caused a malloc

Smith, Barry F. bsmith at mcs.anl.gov
Sat Jan 6 00:16:44 CST 2018



> On Jan 5, 2018, at 9:43 PM, Hao Zhang <hbcbh1999 at gmail.com> wrote:
> 
> when PETSc crashed and reported this message. it also gives the following message

  Correction. PETSC did not "crash" it detected an error condition and stopped, this is very different than a program crashing.

> 
> matsetoption(a mat_new_nonzero_allocation_err petsc_false) to turn off this check

   Does you code have on particular time when the matrix nonzero structure will change, or will it keep changing once in a while forever as it has more and more time steps? 

If it only changes once then you can just use the option, if it changes multiple times regularly you will need to understand the mechanism of why the nonzero structure changes before you do anything. For example, do you have moving meshes that form new connections and hence new nonzeros in the matrix. Does the physics change that equations that previously where not coupled become coupled later etc.

  Barry

> 
> 
> is this a workaround or? Thanks!
> 
> -- 
> Hao Zhang
> Dept. of Applid Mathematics and Statistics,
> Stony Brook University, 
> Stony Brook, New York, 11790



More information about the petsc-users mailing list