Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes #699

Merged
merged 22 commits into from
May 28, 2021
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b67893f
fixed missed closing of a dataset
brtnfld Feb 3, 2021
e5b8c8b
fixed missed closing of a dataset
brtnfld Feb 3, 2021
e0e0163
Merge remote-tracking branch 'upstream/develop' into develop
brtnfld Feb 17, 2021
268638f
Merge remote-tracking branch 'upstream/develop' into develop
brtnfld Feb 25, 2021
c20acc1
fixed typo in error return
brtnfld Feb 26, 2021
a920bdc
Merge remote-tracking branch 'upstream/develop' into develop
brtnfld Mar 2, 2021
91d6bcb
Merge remote-tracking branch 'upstream/develop' into develop
brtnfld Mar 19, 2021
0550cbb
Committing clang-format changes
github-actions[bot] Mar 19, 2021
8a42502
minor edits
brtnfld Mar 19, 2021
5a85e97
Merge branch 'develop' of https://github.com/brtnfld/hdf5 into develop
brtnfld Mar 19, 2021
ee3f29f
code format
brtnfld Mar 19, 2021
50f0b26
Committing clang-format changes
github-actions[bot] Mar 19, 2021
d2d7386
code format
brtnfld Mar 19, 2021
b94a0fa
Merge branch 'develop' of https://github.com/brtnfld/hdf5 into develop
brtnfld Mar 19, 2021
8bd1e8e
minor edit
brtnfld Mar 19, 2021
c9c62ed
Merge remote-tracking branch 'upstream/develop' into develop
brtnfld May 18, 2021
9c7f8d2
Merge remote-tracking branch 'upstream/develop' into develop
brtnfld May 27, 2021
00a88df
switched from using MPI_count, to actual bytes written for H5FD_mpio_…
brtnfld May 27, 2021
7c22adb
Committing clang-format changes
github-actions[bot] May 27, 2021
5cd709f
changed size_i in printf to reflect the I/O.
brtnfld May 28, 2021
08204c4
Merge branch 'develop' of https://github.com/brtnfld/hdf5 into develop
brtnfld May 28, 2021
64909d1
Committing clang-format changes
github-actions[bot] May 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/H5FDmpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,12 +1195,6 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
if ((hsize_t)size_i != size)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from size to size_i")

#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
HDfprintf(stderr, "%s: (%d) mpi_off = %ld size_i = %d\n", FUNC, file->mpi_rank, (long)mpi_off,
size_i);
#endif

/* Only look for MPI views for raw data transfers */
if (type == H5FD_MEM_DRAW) {
H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode */
Expand Down Expand Up @@ -1349,6 +1343,12 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
if (bytes_read < 0 || bytes_read > io_size)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")

#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_read = %lld\n", FUNC, file->mpi_rank, (long)mpi_off,
bytes_read);
#endif

/*
* This gives us zeroes beyond end of physical MPI file.
*/
Expand Down Expand Up @@ -1436,12 +1436,6 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off")
size_i = (int)size;

#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
HDfprintf(stderr, "%s: (%d) mpi_off = %ld size_i = %d\n", FUNC, file->mpi_rank, (long)mpi_off,
size_i);
#endif

/* Get the transfer mode from the API context */
if (H5CX_get_io_xfer_mode(&xfer_mode) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode")
Expand Down Expand Up @@ -1566,6 +1560,12 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
if (bytes_written != io_size || bytes_written < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")

#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_written = %lld\n", FUNC, file->mpi_rank,
(long)mpi_off, bytes_written);
#endif

/* Each process will keep track of its perceived EOF value locally, and
* ultimately we will reduce this value to the maximum amongst all
* processes, but until then keep the actual eof at HADDR_UNDEF just in
Expand Down