Block until all processes have reached this routine. * @return the sum of count from all processors */
| 104 | * @return the sum of count from all processors |
| 105 | */ |
| 106 | long long unsigned CommLayer::reduce(long long unsigned count) |
| 107 | { |
| 108 | logger(4) << "entering reduce: " << count << '\n'; |
| 109 | long long unsigned sum; |
| 110 | MPI_Allreduce(&count, &sum, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, |
| 111 | MPI_COMM_WORLD); |
| 112 | logger(4) << "left reduce: " << sum << '\n'; |
| 113 | return sum; |
| 114 | } |
| 115 | |
| 116 | /** Reduce the specified vector. */ |
| 117 | vector<unsigned> CommLayer::reduce(const vector<unsigned>& v) |
no test coverage detected