summaryrefslogtreecommitdiffstats
path: root/src/H5FD.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2003-03-27 21:34:21 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2003-03-27 21:34:21 (GMT)
commitfc295015d8500f495f5de9d6c9b007c45d21ca3e (patch)
treea083a96c2fbcfd2a3d26ff5cff69b829115c09fa /src/H5FD.c
parent5d51e5adebb7d20c132eab84ca5b3d16354d2acc (diff)
downloadhdf5-fc295015d8500f495f5de9d6c9b007c45d21ca3e.zip
hdf5-fc295015d8500f495f5de9d6c9b007c45d21ca3e.tar.gz
hdf5-fc295015d8500f495f5de9d6c9b007c45d21ca3e.tar.bz2
[svn-r6527] Purpose:
Bug Fix & Update Description: FPHDF5 was creating files which didn't have the EOA field in the superblock set correctly. It turns out that the SAP was keeping this information to itself instead of giving it to the client processes. Naughty SAP! Solution: Have the SAP send this information back to the clients so that they can update the superblock as necessary. This now creates a file (with just the root group) that looks correct! Only problem is that there's extra file space being allocated. Also, at program termination, there's an infinite loop... Platforms tested: H5committests (run by hand on burrwhite, arabica, and modi4) Misc. update:
Diffstat (limited to 'src/H5FD.c')
-rw-r--r--src/H5FD.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/H5FD.c b/src/H5FD.c
index a183b48..a2bf906 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -1319,6 +1319,7 @@ H5FD_alloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
unsigned capt_only = 0;
H5FP_status_t status;
H5P_genplist_t *plist;
+ H5FP_alloc_t fp_alloc;
/* Get the data xfer property list */
if ((plist = H5I_object(dxpl_id)) == NULL)
@@ -1333,25 +1334,30 @@ H5FD_alloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
* If the captain is the only one who should allocate resources,
* then do just that...
*/
- if (!capt_only || H5FD_fphdf5_is_captain(file))
+ if (!capt_only || H5FD_fphdf5_is_captain(file)) {
/* Send the request to the SAP */
- if (H5FP_request_allocate(file, type, size, &ret_value, &req_id,
- &status) != SUCCEED)
+ if (H5FP_request_allocate(file, type, size, &fp_alloc.addr,
+ &fp_alloc.eoa, &req_id, &status) != SUCCEED)
/* FIXME: Should we check the "status" variable here? */
HGOTO_ERROR(H5E_FPHDF5, H5E_CANTALLOC, HADDR_UNDEF,
"server couldn't allocate from file");
+ }
if (capt_only) {
int mrc;
- if ((mrc = MPI_Bcast(&ret_value, 1, HADDR_AS_MPI_TYPE,
+ if ((mrc = MPI_Bcast(&fp_alloc, 1, H5FP_alloc,
(int)H5FP_capt_barrier_rank,
H5FP_SAP_BARRIER_COMM)) != MPI_SUCCESS)
HMPI_GOTO_ERROR(HADDR_UNDEF, "MPI_Bcast failed", mrc);
}
+
+ /* Set the EOA for all processes. This doesn't fail. */
+ file->cls->set_eoa(file, fp_alloc.eoa);
+
/* We've succeeded -- return the value */
- HGOTO_DONE(ret_value);
+ HGOTO_DONE(fp_alloc.addr);
}
#endif /* H5_HAVE_FPHDF5 */