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/H5FPclient.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/H5FPclient.c')
-rw-r--r-- | src/H5FPclient.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/H5FPclient.c b/src/H5FPclient.c index f14b103..7dcca9e 100644 --- a/src/H5FPclient.c +++ b/src/H5FPclient.c @@ -326,18 +326,31 @@ H5FP_request_read_metadata(H5FD_t *file, unsigned file_id, hid_t dxpl_id, H5FP_SAP_COMM, &mpi_status)) != MPI_SUCCESS) HMPI_GOTO_ERROR(FAIL, "MPI_Recv failed", mrc); - HDmemset(*buf, '\0', size); - switch (sap_read.status) { case H5FP_STATUS_OK: /* use the info in the H5FP_read_t structure to update the metadata */ *status = H5FP_STATUS_OK; + HDmemset(*buf, '\0', size); HDmemset(&mpi_status, 0, sizeof(mpi_status)); - if ((mrc = MPI_Recv(*buf, (int)size, MPI_BYTE, (int)H5FP_sap_rank, - H5FP_TAG_METADATA, H5FP_SAP_COMM, - &mpi_status)) != MPI_SUCCESS) - HMPI_GOTO_ERROR(FAIL, "MPI_Recv failed", mrc); + if (size < sap_read.md_size) { + char *mdata; + + if (H5FP_read_metadata(&mdata, (int)sap_read.md_size, (int)H5FP_sap_rank) == FAIL) { +HDfprintf(stderr, "Metadata Read Failed!!!!\n"); + } + + HDmemcpy(*buf, mdata, size); + HDfree(mdata); + } else if (size == sap_read.md_size) { + if ((mrc = MPI_Recv(*buf, (int)sap_read.md_size, MPI_BYTE, + (int)H5FP_sap_rank, H5FP_TAG_METADATA, + H5FP_SAP_COMM, &mpi_status)) != MPI_SUCCESS) + HMPI_GOTO_ERROR(FAIL, "MPI_Recv failed", mrc); + } else { +HDfprintf(stderr, "Buffer not big enough to hold metadata!!!!\n"); +assert(0); + } *bytes_read = size; break; @@ -395,7 +408,7 @@ H5FP_request_write_metadata(H5FD_t *file, unsigned file_id, hid_t dxpl_id, int mrc, my_rank; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI(H5FP_request_change, FAIL); + FUNC_ENTER_NOAPI(H5FP_request_write_metadata, FAIL); /* check args */ assert(file); |