mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-11-02 20:30:55 -06:00
Speedup communication by doing single sum().
This commit is contained in:
1 parent
390e807aa3
commit
26bd980e3d
1 file changed
+1
-3
@@ -585,9 +585,7 @@ regionSum(const ScalarBuffer& property,
|
||||
totals[regionIdx] += property[j];
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < maxNumberOfRegions; ++i) {
|
||||
totals[i] = comm.sum(totals[i]);
|
||||
}
|
||||
comm.sum(totals.data(), totals.size());
|
||||
|
||||
return totals;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user