summaryrefslogtreecommitdiffstats
path: root/testpar/t_prop.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-02-13 22:12:46 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-02-13 22:12:46 (GMT)
commit863ff882b619e8d2c3ad3bdb659f14fa2e9d07d3 (patch)
tree6d5178a9d319ea01836853807e2ef21178a3c819 /testpar/t_prop.c
parent49a9979166bfe78638fe53dc49b6644ff0946b10 (diff)
downloadhdf5-863ff882b619e8d2c3ad3bdb659f14fa2e9d07d3.zip
hdf5-863ff882b619e8d2c3ad3bdb659f14fa2e9d07d3.tar.gz
hdf5-863ff882b619e8d2c3ad3bdb659f14fa2e9d07d3.tar.bz2
[svn-r24709] rename H5V to H5VM since H5V is needed in the fastforward project for
view objects. The addition of view objects in the fastforward project is expected to be brough into the trunk sometimes in the future, which is why we need to make this change. Tested Manually on Jam and Ostrich. Tested with h5commitest - Koala with intel compilers failed, but nothing had to do with those changes. error on Koala: error while loading shared libraries: libirng.so
Diffstat (limited to 'testpar/t_prop.c')
-rw-r--r--testpar/t_prop.c45
1 files changed, 20 insertions, 25 deletions
diff --git a/testpar/t_prop.c b/testpar/t_prop.c
index e85b227..f98febb 100644
--- a/testpar/t_prop.c
+++ b/testpar/t_prop.c
@@ -26,58 +26,53 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc)
MPI_Request req[2];
MPI_Status status;
hid_t pl; /* Decoded property list */
- void *send_buf = NULL;
- size_t send_size = 0;
+ void *buf = NULL;
+ size_t buf_size = 0;
+ int casted_size;
herr_t ret; /* Generic return value */
if(mpi_rank == 0) {
-
/* first call to encode returns only the size of the buffer needed */
- ret = H5Pencode(orig_pl, NULL, &send_size);
+ ret = H5Pencode(orig_pl, NULL, &buf_size);
VRFY((ret >= 0), "H5Pencode succeeded");
- send_buf = (uint8_t *)HDmalloc(send_size);
+ buf = (uint8_t *)HDmalloc(buf_size);
- ret = H5Pencode(orig_pl, send_buf, &send_size);
+ ret = H5Pencode(orig_pl, buf, &buf_size);
VRFY((ret >= 0), "H5Pencode succeeded");
- MPI_Isend(&send_size, 1, MPI_INT, recv_proc, 123, MPI_COMM_WORLD, &req[0]);
- MPI_Isend(send_buf, (int)send_size, MPI_BYTE, recv_proc, 124, MPI_COMM_WORLD, &req[1]);
- } /* end if */
+ /* this is a temp fix to send this size_t */
+ casted_size = (int)buf_size;
+ MPI_Isend(&casted_size, 1, MPI_INT, recv_proc, 123, MPI_COMM_WORLD, &req[0]);
+ MPI_Isend(buf, casted_size, MPI_BYTE, recv_proc, 124, MPI_COMM_WORLD, &req[1]);
+ } /* end if */
if(mpi_rank == recv_proc) {
- void *recv_buf = NULL;
- size_t recv_size = 0;
+ MPI_Recv(&casted_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status);
+ buf_size = casted_size;
+ buf = (uint8_t *)HDmalloc(buf_size);
+ MPI_Recv(buf, casted_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status);
- MPI_Recv(&recv_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status);
- recv_buf = (uint8_t *)HDmalloc(recv_size);
- MPI_Recv(recv_buf, (int)recv_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status);
-
- pl = H5Pdecode(recv_buf);
+ pl = H5Pdecode(buf);
VRFY((pl >= 0), "H5Pdecode succeeded");
VRFY(H5Pequal(orig_pl, pl), "Property List Equal Succeeded");
ret = H5Pclose(pl);
VRFY((ret >= 0), "H5Pclose succeeded");
-
- if(NULL != recv_buf)
- HDfree(recv_buf);
} /* end if */
- if(mpi_rank == 0) {
+ if(0 == mpi_rank)
MPI_Waitall(2, req, MPI_STATUSES_IGNORE);
- if(NULL != send_buf)
- HDfree(send_buf);
- }
+
+ if(NULL != buf)
+ HDfree(buf);
MPI_Barrier(MPI_COMM_WORLD);
return(0);
}
-
-
void
test_plist_ed(void)
{