[petsc-users] Input argument out of range with MatZeroRows
Barry Smith
bsmith at petsc.dev
Fri Apr 15 17:42:26 CDT 2022
Yes, this sounds like the intended usage. The only expected reason this would error is if one of the indices is less than 0 or greater than or equal to the number of rows in the entire matrix. In the error message, it should print both the index and the number of rows in the matrix. Can you send the full error message, cut and paste?
Barry
> On Apr 15, 2022, at 5:09 PM, Jennifer Ellen Fromm <jefromm at eng.ucsd.edu> wrote:
>
> Hello,
> I am using petsc4py, and attempting to zero rows of an mpiaij matrix (and set the diagonal to 1). I loop over the owned row indices to identify the rows I want to zero, then attempt to call zeroRows() with the list of owned indices. When I run in parallel (mpirun --np 2) I get petsc4py error 63, 'input argument out of range'. I have tried to adjust several matrix options but nothing has worked. Is this a valid method for trying to zero rows?
> Thanks,
> Jennifer
More information about the petsc-users
mailing list