Skip to content

Commit 9673bb9

Browse files
committed
Merge branch 'fix_race_conditions' of https://github.com/su2code/SU2 into fix_race_conditions
2 parents a68cc74 + c3ac389 commit 9673bb9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Common/include/linear_algebra/CSysVector.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ class CSysVector : public VecExpr::CVecExpr<CSysVector<ScalarType>, ScalarType>
316316
SelectMPIWrapper<ScalarType>::W::Allreduce(&sum, &dotRes, 1, mpi_type, MPI_SUM, SU2_MPI::GetComm());
317317
}
318318
END_SU2_OMP_SAFE_GLOBAL_ACCESS
319+
#else
320+
/*--- Make view of result consistent across threads. ---*/
321+
SU2_OMP_BARRIER
319322
#endif
320323

321324
return dotRes;

0 commit comments

Comments
 (0)