Skip to content
Snippets Groups Projects
Commit 4b3ac74c authored by Van Dung Nguyen's avatar Van Dung Nguyen
Browse files

fix bug

parent b96c7165
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment