Skip to content

Commit bbc0d0c

Browse files
committed
valgrind warning: uninitialized variables
1 parent 00f081f commit bbc0d0c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/cases/report_timing.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ int print_timing_WR(e3sm_io_config *cfg,
8888
+ decom->max_nreqs[i] * sizeof(int); /* D*.lengths */
8989
sum_decomp_varlen += vlen;
9090
}
91-
sum_decomp_varlen *= cfg->sub_nprocs;
91+
if (cfg->sub_comm != MPI_COMM_NULL)
92+
sum_decomp_varlen *= cfg->sub_nprocs;
9293
if (cfg->strategy == blob && cfg->api != adios && cfg->sub_rank > 0)
9394
sum_decomp_varlen = 0;
9495
/* sum_decomp_varlen is the size of all decomposition variables defined in

src/e3sm_io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ int main (int argc, char **argv) {
275275
decom.disps[i] = NULL;
276276
decom.raw_offsets[i] = NULL;
277277
decom.w_starts[i] = NULL;
278+
decom.max_nreqs[i] = 0;
278279
}
279280
ffreq = 1;
280281

0 commit comments

Comments
 (0)