summaryrefslogtreecommitdiffstats
path: root/src/H5FDsubfiling/H5FDioc_threads.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2022-09-30 02:06:17 (GMT)
committerGitHub <noreply@github.com>2022-09-30 02:06:17 (GMT)
commit79bdc6183ee96cc36bd04569d4cce48202a8ae68 (patch)
tree86f1719b0b908ff9d174501bb339da384d9df5a4 /src/H5FDsubfiling/H5FDioc_threads.c
parent1bec0ce2d785b5c0d7f4514fb50f44b524fe4f67 (diff)
downloadhdf5-79bdc6183ee96cc36bd04569d4cce48202a8ae68.zip
hdf5-79bdc6183ee96cc36bd04569d4cce48202a8ae68.tar.gz
hdf5-79bdc6183ee96cc36bd04569d4cce48202a8ae68.tar.bz2
Subfiling testing fix and documentation (#2132)
* Fix a sporadic failure in Subfiling VFD tests * Subfiling VFD - add note to H5Pget_fapl_subfiling documentation Adds note about how H5Pget_fapl_subfiling only returns the original settings on a FAPL and those settings could have been modified by the Subfiling VFD's environment variables
Diffstat (limited to 'src/H5FDsubfiling/H5FDioc_threads.c')
-rw-r--r--src/H5FDsubfiling/H5FDioc_threads.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/H5FDsubfiling/H5FDioc_threads.c b/src/H5FDsubfiling/H5FDioc_threads.c
index b3e8ebc..5bbecab 100644
--- a/src/H5FDsubfiling/H5FDioc_threads.c
+++ b/src/H5FDsubfiling/H5FDioc_threads.c
@@ -1157,6 +1157,7 @@ ioc_file_truncate(sf_work_request_t *msg)
int64_t subfile_idx;
int fd;
int ioc_idx;
+ int mpi_code;
int ret_value = 0;
HDassert(msg);
@@ -1181,6 +1182,14 @@ ioc_file_truncate(sf_work_request_t *msg)
if (HDftruncate(fd, (off_t)length) != 0)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_SEEKERROR, -1, "HDftruncate failed");
+ /*
+ * Send a completion message back to the source that
+ * requested the truncation operation
+ */
+ if (MPI_SUCCESS != (mpi_code = MPI_Send(msg->header, 1, H5_subfiling_rpc_msg_type, msg->source,
+ TRUNC_COMPLETED, sf_context->sf_eof_comm)))
+ H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Send failed", mpi_code);
+
#ifdef H5FD_IOC_DEBUG
HDprintf("[ioc(%d) %s]: truncated subfile to %lld bytes. ret = %d\n", ioc_idx, __func__,
(long long)length, errno);