Re: [petsc-users] malloc error

2021-08-16 Thread Jed Brown
"Jorti, Zakariae via petsc-users" writes: > Hello, > > > I am using TSSolve to solve a linear problem. > > In the FormIJacobian function that I provide to TSSetIJacobian, I first set > the coefficients of both J and Jpre matrices the same way (J and Jpre > matrices are equal in the first

[petsc-users] malloc error

2021-08-16 Thread Jorti, Zakariae via petsc-users
Hello, I am using TSSolve to solve a linear problem. In the FormIJacobian function that I provide to TSSetIJacobian, I first set the coefficients of both J and Jpre matrices the same way (J and Jpre matrices are equal in the first step). Then I call MatAXPY to prepare Jpre (Jpre := Jpre -

Re: [petsc-users] Malloc error with 'correct' preallocation?

2018-02-28 Thread Thibaut Appel
Good afternoon, It looks like, after further investigation, that I wasn't filling the diagonal element on some rows and hence not allocating for it - which triggers an error as you must leave room and set the diagonal entry even it is zero according to the MatMPIAIJSetPreallocation

Re: [petsc-users] Malloc error with 'correct' preallocation?

2018-02-27 Thread Smith, Barry F.
> On Feb 27, 2018, at 7:05 PM, Appel, Thibaut wrote: > > Dear PETSc developers and users, > > I am forming a sparse matrix in complex, double precision arithmetic and > can’t understand why I have «PETSC ERROR: Argument out of range - New nonzero > at (X,X) caused

[petsc-users] Malloc error with 'correct' preallocation?

2018-02-27 Thread Appel, Thibaut
Dear PETSc developers and users, I am forming a sparse matrix in complex, double precision arithmetic and can’t understand why I have «PETSC ERROR: Argument out of range - New nonzero at (X,X) caused a malloc» during the assembly of the matrix. This matrix discretizes a PDE in 2D using a