7279 does change the code for MatZeroRowsColumns_MPIAIJ(). But perhaps that does not resolve the problem you are seeing? If that is the case we will need a reproducible example so we can determine exactly what else is happening in your code to cause the difficulties.
Here is the diff for MatZeroRowsColumns_MPIAIJ() @@ -1026,7 +1023,7 @@ static PetscErrorCode MatZeroRowsColumns_MPIAIJ(Mat A, PetscInt N, const PetscIn PetscCall(PetscFree(lrows)); /* only change matrix nonzero state if pattern was allowed to be changed */ - if (!((Mat_SeqAIJ *)(l->A->data))->keepnonzeropattern) { + if (!((Mat_SeqAIJ *)(l->A->data))->nonew) { PetscObjectState state = l->A->nonzerostate + l->B->nonzerostate; PetscCall(MPIU_Allreduce(&state, &A->nonzerostate, 1, MPIU_INT64, MPI_SUM, PetscObjectComm((PetscObject)A))); } > On Feb 12, 2024, at 7:02 AM, Jeremy Theler (External) > <jeremy.theler-...@ansys.com> wrote: > > Hi Barry > > > The bug fix for 2 is availabel in > > https://gitlab.com/petsc/petsc/-/merge_requests/7279 > > Note that our code goes through MatZeroRowsColumns_MPIAIJ() not through > MatZeroRows_MPIAIJ() so this fix does not change anything for the case I > mentioned. > > -- > jeremy