Skip to content

Commit

Permalink
silence a valgrind warning on uninitialized variable
Browse files Browse the repository at this point in the history
  • Loading branch information
wkliao committed Nov 26, 2024
1 parent ed911fa commit 0c50069
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/C/nonblocking_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,12 @@ int main(int argc, char **argv)
MPI_Reduce(&put_size, &sum_put_size, 1, MPI_OFFSET, MPI_SUM, 0, MPI_COMM_WORLD);
MPI_Reduce(&write_timing, &max_write_timing, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);

/* rank 0 also writes header and updates the record number in header NTIME times */
sum_write_size += header_size + NTIMES * 8;

/* rank 0 also writes header and updates the record number to the file
* header NTIME times
*/
if (rank == 0 && verbose) {
sum_write_size += header_size + NTIMES * 8;

printf("\n");
if (use_bput)
printf("Using PnetCDF nonblocking APIs: bput\n");
Expand Down

0 comments on commit 0c50069

Please sign in to comment.