diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-09-18 19:27:27 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-09-18 19:27:27 (GMT) |
commit | fec0297f869e1f34bd4bb4fc0cb91ac403b73ccb (patch) | |
tree | e56930c56bd7f8ad7058bf5438dbe8b8da36c00e /src/H5FPserver.c | |
parent | 2e3693aa8be42bfd1d30adda1dd3b278c9d450ec (diff) | |
download | hdf5-fec0297f869e1f34bd4bb4fc0cb91ac403b73ccb.zip hdf5-fec0297f869e1f34bd4bb4fc0cb91ac403b73ccb.tar.gz hdf5-fec0297f869e1f34bd4bb4fc0cb91ac403b73ccb.tar.bz2 |
[svn-r7489] Purpose:
Update
Description:
A lot of modifications for the FPHDF5 stuff:
H5AC.c
H5ACprivate.h - Removed AC_find (it's replaced with AC_protect
and AC_unprotect). Added flushing if it's an FPHDF5 driver and
we're doing an AC_set or AC_unprotect with the dirty flag set.
H5B.c - Split up the B_flush function into different functions
since the one function was doing serialization which is better
left as a separate entity.
H5D.c - Removed some FPHDF5 code that was incorrect
H5F.c - Split up the F_flush function so that it no longer
allocates file space. Created new functions (F_init_superblock,
F_read_superblock, and F_write_superblock) for greater modularity
and so that the FPHDF5 non-captain processes can read the
superblock after the captain process writes it.
H5FD.c - Error message correction.
H5FDfphdf5.c - Removed MPI barrier call that wasn't needed.
H5FPclient.c
H5FPserver.c - Modified so that if a process requests data that
isn't exactly aligned, we can return it if we have the block that
contains the requested address.
H5G.c
H5Gent.c
H5Gnode.c
H5HL.c
H5HLpkg.h
H5HLprivate.h
H5Oefl.c - Removed the H5HL_peek function since it was doing a
(now unsafe) holding of the information in the cache. Replaced
with protect and unprotect calls.
H5TB.c - Error fix. The TB_dless function wasn't working
properly.
H5Gstab.c - Format change.
H5err.txt
H5Edefin.h
H5Einit.h
H5Epubgen.h
H5Eterm.h - Added new error code.
Platforms tested:
Modi4 (paralle, Fortran)
Sol (Fortran)
Linux (C++, Fortran)
Copper (Parallel, Fortran)
Misc. update:
Diffstat (limited to 'src/H5FPserver.c')
-rw-r--r-- | src/H5FPserver.c | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/src/H5FPserver.c b/src/H5FPserver.c index 4b3df6b..d45f1da 100644 --- a/src/H5FPserver.c +++ b/src/H5FPserver.c @@ -313,7 +313,7 @@ H5FP_object_lock_cmp(H5FP_object_lock *o1, FUNC_ENTER_NOINIT(H5FP_object_lock_cmp); assert(o1); assert(o2); - FUNC_LEAVE_NOAPI(o1->oid - o2->oid); + FUNC_LEAVE_NOAPI(o2->oid - o1->oid); } /* @@ -441,7 +441,7 @@ H5FP_file_mod_cmp(H5FP_mdata_mod *k1, FUNC_ENTER_NOINIT(H5FP_file_mod_cmp); assert(k1); assert(k2); - FUNC_LEAVE_NOAPI(k1->addr - k2->addr); + FUNC_LEAVE_NOAPI(k2->addr - k1->addr); } /* @@ -1114,6 +1114,7 @@ done: if (ret_value != SUCCEED) { /* Can't lock the whole group at one time for some reason */ HDfprintf(stderr, "%s: locking failure (%d)!!\n", FUNC, ret_value); +assert(0); } HDfree(oids); @@ -1272,13 +1273,27 @@ H5FP_sap_handle_read_request(H5FP_request_t *req) mod.addr = req->addr; /* This is the key field for the TBBT */ - if ((node = H5TB_dfind(info->mod_tree, (void *)&mod, NULL)) != NULL) { + if ((node = H5TB_dless(info->mod_tree, (void *)&mod, NULL)) != NULL) { H5FP_mdata_mod *fm = (H5FP_mdata_mod *)node->data; - r.md_size = fm->md_size; - r.addr = fm->addr; - r.status = H5FP_STATUS_OK; - metadata = fm->metadata; /* Sent out in a separate message */ + if (H5F_addr_eq(req->addr, fm->addr)) { + r.md_size = fm->md_size; + r.addr = fm->addr; + r.status = H5FP_STATUS_OK; + metadata = fm->metadata; /* Sent out in a separate message */ + } else if (H5F_addr_gt(req->addr, fm->addr) + && H5F_addr_lt(req->addr, fm->addr + fm->md_size)) { + r.md_size = fm->md_size - (req->addr - fm->addr); + r.addr = req->addr; + r.status = H5FP_STATUS_OK; + metadata = fm->metadata + (req->addr - fm->addr); /* Sent out in a separate message */ + } else { +HDfprintf(stderr, "Panic!!!!\n"); +assert(0); + } + } else { +HDfprintf(stderr, "%s: Couldn't find metadata at req->addr == %a\n", FUNC, req->addr); +assert(0); } } @@ -1402,7 +1417,7 @@ H5FP_sap_handle_flush_request(H5FP_request_t *req) FUNC_ENTER_NOINIT(H5FP_sap_handle_flush_request); - if ((info = H5FP_find_file_info(req->file_id)) != NULL) + if ((info = H5FP_find_file_info(req->file_id)) != NULL) { if (info->num_mods) { /* * If there are any modifications not written out yet, dump @@ -1421,6 +1436,10 @@ H5FP_sap_handle_flush_request(H5FP_request_t *req) "can't dump metadata to client"); } } + } else { + HGOTO_ERROR(H5E_FPHDF5, H5E_NOTFOUND, FAIL, + "can't find information for file"); + } done: H5FP_send_reply(req->proc_rank, req->req_id, req->file_id, exit_state); @@ -1462,6 +1481,9 @@ H5FP_sap_handle_close_request(H5FP_request_t *req) "cannot remove file ID from list"); } } + } else { + HGOTO_ERROR(H5E_FPHDF5, H5E_NOTFOUND, FAIL, + "can't find information for file"); } done: |