diff --git a/Solver/linearSystemPETSc.hpp b/Solver/linearSystemPETSc.hpp index f8fc4204e6875603c95638b991ead83261a9473a..ac1d2f06f7769587562d1741a9a3552a5865d6cb 100644 --- a/Solver/linearSystemPETSc.hpp +++ b/Solver/linearSystemPETSc.hpp @@ -278,7 +278,7 @@ void linearSystemPETSc<scalar>::zeroMatrix() int value = _entriesPreAllocated ? 1 : 0; int sumValue = 0; MPI_Allreduce((void*)&value, (void*)&sumValue, 1, MPI_INT, MPI_SUM, _comm); - if ((sumValue > 0) &&(sumValue < Msg::GetCommSize()) && !_entriesPreAllocated){ + if ((sumValue >= 0) &&(sumValue < Msg::GetCommSize()) && !_entriesPreAllocated){ preAllocateEntries(); } }