Skip to content

Commit

Permalink
Bug fix: set hint nc_ibuf_size based on user's info
Browse files Browse the repository at this point in the history
  • Loading branch information
wkliao committed Nov 29, 2024
1 parent a34b150 commit 81ce5d5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/drivers/ncmpio/ncmpio_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ void ncmpio_set_pnetcdf_hints(NC *ncp,
}
MPI_Info_set(info_used, "nc_in_place_swap", value);

ncp->ibuf_size = PNC_DEFAULT_IBUF_SIZE;
if (user_info != MPI_INFO_NULL) {
/* temporal buffer size used to pack noncontiguous aggregated user
* buffers when calling ncmpi_wait/wait_all, Default 16 MiB
Expand All @@ -147,7 +146,7 @@ void ncmpio_set_pnetcdf_hints(NC *ncp,
MPI_Offset ibuf_size;
errno = 0; /* errno must set to zero before calling strtoll */
ibuf_size = strtoll(value, NULL, 10);
if (errno == 0 && ncp->ibuf_size > 0) ncp->ibuf_size = ibuf_size;
if (errno == 0 && ibuf_size > 0) ncp->ibuf_size = ibuf_size;
}
}
sprintf(value, "%lld", ncp->ibuf_size);
Expand Down

0 comments on commit 81ce5d5

Please sign in to comment.