Skip to content

Commit 81a8392

Browse files
committed
fix MPI IO repetions for non zero ranks
1 parent 7a03f8d commit 81a8392

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src_c/IMB_cpu_exploit.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ in: target_secs: desired runtime (about) of the current call
8989
static float a[SIZE][SIZE], x[SIZE], y[SIZE];
9090
double t1,t2;
9191
static int Nrep, target_reps;
92-
int i,j,repeat;
92+
int i, j, repeat;
9393

9494
if (target_secs <= 0.) {
9595
return;
@@ -142,4 +142,3 @@ in: target_secs: desired runtime (about) of the current call
142142
}
143143
}
144144
}
145-

src_cpp/helpers/original_benchmark.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,13 @@ class OriginalBenchmark : public Benchmark {
177177
glob.iter = c_info.n_lens - 1;
178178
}
179179
#ifdef MPIIO
180-
if(c_info.w_rank == 0 &&
181-
do_nonblocking_) {
180+
if(do_nonblocking_) {
182181
double MFlops = IMB_cpu_exploit_reworked(TARGET_CPU_SECS, 1);
183-
printf("\n\n# For nonblocking benchmarks:\n\n");
184-
printf("# Function CPU_Exploit obtains an undisturbed\n");
185-
printf("# performance of %7.2f MFlops\n",MFlops);
182+
if (c_info.w_rank == 0) {
183+
printf("\n\n# For nonblocking benchmarks:\n\n");
184+
printf("# Function CPU_Exploit obtains an undisturbed\n");
185+
printf("# performance of %7.2f MFlops\n",MFlops);
186+
}
186187
do_nonblocking_ = 0;
187188
}
188189
#endif

0 commit comments

Comments
 (0)