Skip to content

Commit

Permalink
Merge pull request #291 from hpc/3.2-281
Browse files Browse the repository at this point in the history
Backmerged #281 to fix iteration number
  • Loading branch information
JulianKunkel authored Dec 3, 2020
2 parents ca87879 + 7a490c8 commit 6efd7e6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/mdtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,11 @@ void print_help (void) {
exit(0);
}

int calc_allreduce_index(int iter, int rank, int op){
int tableSize = MDTEST_LAST_NUM;
return iter * tableSize * size + rank * tableSize + op;
}

void summarize_results(int iterations) {
char access[MAX_PATHLEN];
int i, j, k;
Expand Down Expand Up @@ -1436,7 +1441,8 @@ void summarize_results(int iterations) {
for (j=0; j<iterations; j++) {
maxes[j] = all[j*tableSize + i];
for (k=0; k<size; k++) {
curr = all[(k*tableSize*iterations) + (j*tableSize) + i];
curr = all[calc_allreduce_index(j, k, i)];
//For verification in 3.2 printf("%d %d %d = %f\n", j, k, i, curr);
if (maxes[j] < curr) {
maxes[j] = curr;
}
Expand Down Expand Up @@ -1488,8 +1494,7 @@ void summarize_results(int iterations) {
min = max = all[i];
for (k=0; k < size; k++) {
for (j = 0; j < iterations; j++) {
curr = all[(k*tableSize*iterations)
+ (j*tableSize) + i];
curr = all[calc_allreduce_index(j, k, i)];
if (min > curr) {
min = curr;
}
Expand Down

0 comments on commit 6efd7e6

Please sign in to comment.