From e3a280a1652327757eac779e50ca584540d334db Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 13 Nov 2003 15:05:56 -0500 Subject: [svn-r7847] Purpose: Bug Fix Description: The SAP was sending back replies to the client but the client wasn't picking them up (this was after a dump from the server. Solution: Read the extra replies from the server. Platforms tested: AIX (w/ FPHDF5) Linux (w/ FPHDF5) Solaris (w/ Fortran & C++) Misc. update: --- src/H5FPclient.c | 14 ++++++++++++++ src/H5FPserver.c | 10 +++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/H5FPclient.c b/src/H5FPclient.c index 200517c..4d78e39 100644 --- a/src/H5FPclient.c +++ b/src/H5FPclient.c @@ -464,6 +464,13 @@ H5FP_request_write_metadata(H5FD_t *file, unsigned file_id, hid_t dxpl_id, "can't write metadata update to file"); } + if ((mrc = MPI_Recv(&sap_reply, 1, H5FP_reply, (int)H5FP_sap_rank, + H5FP_TAG_REPLY, H5FP_SAP_COMM, &mpi_status)) != MPI_SUCCESS) + HMPI_GOTO_ERROR(FAIL, "MPI_Recv failed", mrc); + + if (sap_reply.status != H5FP_STATUS_OK) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCHANGE, FAIL, "can't write metadata to server"); + break; default: *status = sap_reply.status; @@ -544,6 +551,13 @@ H5FP_request_flush_metadata(H5FD_t *file, unsigned file_id, hid_t dxpl_id, "can't write metadata update to file"); } + if ((mrc = MPI_Recv(&sap_reply, 1, H5FP_reply, (int)H5FP_sap_rank, + H5FP_TAG_REPLY, H5FP_SAP_COMM, &mpi_status)) != MPI_SUCCESS) + HMPI_GOTO_ERROR(FAIL, "MPI_Recv failed", mrc); + + if (sap_reply.status != H5FP_STATUS_OK) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCHANGE, FAIL, "can't write metadata to server"); + break; default: *status = sap_reply.status; diff --git a/src/H5FPserver.c b/src/H5FPserver.c index 25a456b..47fefe6 100644 --- a/src/H5FPserver.c +++ b/src/H5FPserver.c @@ -957,15 +957,15 @@ H5FP_sap_handle_lock_request(H5FP_request_t *req) H5FP_file_info *info; H5FP_object_lock *lock; } *oids; - unsigned list_size = 2; /* the size of the "oids" list */ - H5FP_status_t exit_state = H5FP_STATUS_LOCK_ACQUIRED; - herr_t ret_value = SUCCEED; - unsigned i, j; + unsigned list_size = 2; /* the size of the "oids" list */ + H5FP_status_t exit_state = H5FP_STATUS_LOCK_ACQUIRED; + unsigned i, j; + herr_t ret_value = SUCCEED; FUNC_ENTER_NOINIT(H5FP_sap_handle_lock_request); if ((oids = (struct lock_group *)H5MM_malloc(list_size * - sizeof(struct lock_group))) == NULL) { + sizeof(struct lock_group))) == NULL) { exit_state = H5FP_STATUS_OOM; HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "out of memory"); } -- cgit v0.12