Use more 0-based indexing for tallies

This commit is contained in:
Sterling Harper 2019-02-11 15:34:55 -05:00
parent 743db3c02e
commit 8b3be55f0e
9 changed files with 77 additions and 102 deletions

View file

@ -546,7 +546,7 @@ void calculate_work()
#ifdef OPENMC_MPI
void broadcast_results() {
// Broadcast tally results so that each process has access to results
for (int i = 1; i <= n_tallies; ++i) {
for (int i = 0; i < n_tallies; ++i) {
// Create a new datatype that consists of all values for a given filter
// bin and then use that to broadcast. This is done to minimize the
// chance of the 'count' argument of MPI_BCAST exceeding 2**31