diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-10-31 21:46:58 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-10-31 21:46:58 (GMT) |
commit | d677a77c4d56460b7e0238ba512933c7fd67e3d6 (patch) | |
tree | af5e59454b544db6056964d08d010febd3e56647 /src/H5FDfphdf5.c | |
parent | 61d964625ebb39af5326bc11dc52790ab39c8202 (diff) | |
download | hdf5-d677a77c4d56460b7e0238ba512933c7fd67e3d6.zip hdf5-d677a77c4d56460b7e0238ba512933c7fd67e3d6.tar.gz hdf5-d677a77c4d56460b7e0238ba512933c7fd67e3d6.tar.bz2 |
[svn-r7805] Purpose:
Bug Fix
Description:
The End of Address information needed to be kept by the SAP. Some
processes were trying to get the EOA information in collective mode,
but the action wasn't collective at the time.
Solution:
Keep the EOA information for the file on the SAP. Clients query the
SAP to get/set it when needed.
Platforms tested:
Linux (w/ FPHDF5)
Copper (w/o FPHDF5)
(FPHDF5 specific, so no need for full testing)
Misc. update:
Diffstat (limited to 'src/H5FDfphdf5.c')
-rw-r--r-- | src/H5FDfphdf5.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/H5FDfphdf5.c b/src/H5FDfphdf5.c index 850f344..b9f5b64 100644 --- a/src/H5FDfphdf5.c +++ b/src/H5FDfphdf5.c @@ -1003,6 +1003,8 @@ static haddr_t H5FD_fphdf5_get_eoa(H5FD_t *_file) { H5FD_fphdf5_t *file = (H5FD_fphdf5_t *)_file; + unsigned req_id = 0; + H5FP_status_t status = H5FP_STATUS_OK; haddr_t ret_value; FUNC_ENTER_NOAPI(H5FD_fphdf5_get_eoa, HADDR_UNDEF) @@ -1011,6 +1013,12 @@ H5FD_fphdf5_get_eoa(H5FD_t *_file) assert(file); assert(file->pub.driver_id == H5FD_FPHDF5); + /* The SAP's eoa field is correct */ + if (!H5FD_fphdf5_is_sap(_file)) + /* Retrieve the EOA information */ + if (H5FP_request_get_eoa(_file, &file->eoa, &req_id, &status)) + HGOTO_ERROR(H5E_FPHDF5, H5E_CANTRECV, HADDR_UNDEF, "can't retrieve eoa information") + /* Set return value */ ret_value = file->eoa; @@ -1036,6 +1044,8 @@ static herr_t H5FD_fphdf5_set_eoa(H5FD_t *_file, haddr_t addr) { H5FD_fphdf5_t *file = (H5FD_fphdf5_t *)_file; + unsigned req_id = 0; + H5FP_status_t status = H5FP_STATUS_OK; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(H5FD_fphdf5_set_eoa, FAIL) @@ -1044,6 +1054,12 @@ H5FD_fphdf5_set_eoa(H5FD_t *_file, haddr_t addr) assert(file); assert(file->pub.driver_id == H5FD_FPHDF5); + /* The SAP's eoa field is correct */ + if (!H5FD_fphdf5_is_sap(_file)) + /* Retrieve the EOA information */ + if (H5FP_request_set_eoa(_file, addr, &req_id, &status)) + HGOTO_ERROR(H5E_FPHDF5, H5E_CANTRECV, HADDR_UNDEF, "can't retrieve eoa information") + file->eoa = addr; done: @@ -1570,11 +1586,8 @@ H5FD_fphdf5_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing) /* Only the captain process needs to flush the metadata. */ if (H5FD_fphdf5_is_captain(_file)) { if (H5FP_request_flush_metadata(_file, file->file_id, dxpl_id, - &req_id, &status) != SUCCEED) { - /* FIXME: This failed */ -H5Eprint(H5E_DEFAULT,stderr); -HDfprintf(stderr, "%s:%d: Flush failed (%d)\n", FUNC, __LINE__, status); - } + &req_id, &status) != SUCCEED) + HGOTO_ERROR(H5E_FPHDF5, H5E_CANTFLUSH, FAIL, "can't flush metadata") /* Only sync the file if we are not going to immediately close it */ if (!closing) |