summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-06-17 20:49:19 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-06-17 20:49:19 (GMT)
commited2df01de27101bf24f6c16a5893ac9345ae7327 (patch)
tree0d37305d65891048821e30c76e82f50eaae6780c
parentb503bc7f64e996fea1b36bfee072f8efc37010ce (diff)
downloadhdf5-ed2df01de27101bf24f6c16a5893ac9345ae7327.zip
hdf5-ed2df01de27101bf24f6c16a5893ac9345ae7327.tar.gz
hdf5-ed2df01de27101bf24f6c16a5893ac9345ae7327.tar.bz2
[svn-r23791] Add FF version of H5DO* routines
Fix bug in IOD set extent to resize the local dataspace Add test for FF version of H5DO* routines
-rw-r--r--examples/CMakeLists.txt3
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/Makefile.in2
-rw-r--r--examples/test_client.c26
-rw-r--r--examples/test_client_acg.c164
-rw-r--r--src/H5FF.c49
-rw-r--r--src/H5VLiod.c23
-rw-r--r--src/H5VLiod_server.c1
-rw-r--r--src/H5VLnative.c1
-rw-r--r--test/dsets.c6
-rw-r--r--test/tattr.c2
11 files changed, 234 insertions, 45 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 4a8a8ac..bd96062 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -58,6 +58,9 @@ IF (H5_HAVE_EFF)
ADD_EXECUTABLE (test_client ${HDF5_EXAMPLES_SOURCE_DIR}/test_client.c)
TARGET_LINK_LIBRARIES (test_client ${HDF5_LIB_TARGET})
SET_TARGET_PROPERTIES (test_client PROPERTIES FOLDER examples)
+ ADD_EXECUTABLE (test_client_acg ${HDF5_EXAMPLES_SOURCE_DIR}/test_client_acg.c)
+ TARGET_LINK_LIBRARIES (test_client_acg ${HDF5_LIB_TARGET})
+ SET_TARGET_PROPERTIES (test_client_acg PROPERTIES FOLDER examples)
ENDIF (H5_HAVE_EFF)
IF (BUILD_TESTING)
diff --git a/examples/Makefile.am b/examples/Makefile.am
index d81bace..096c9fc 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -30,7 +30,7 @@ endif
if BUILD_EFF_CONDITIONAL
INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/test
LDADD = $(LIBH5TEST) $(LIBHDF5) $(MYAXE_LIBS) $(MYIOD_LIBS)
- EXAMPLE_PROG_EFF = test_server test_client test_client_old_api
+ EXAMPLE_PROG_EFF = test_server test_client test_client_old_api test_client_acg
endif
# Example programs.
diff --git a/examples/Makefile.in b/examples/Makefile.in
index f2308d2..47dc829 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -401,7 +401,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog $(EXTLINK_DIRS) *.h5
@BUILD_EFF_CONDITIONAL_TRUE@LDADD = $(LIBH5TEST) $(LIBHDF5) $(MYAXE_LIBS) $(MYIOD_LIBS)
@BUILD_PARALLEL_CONDITIONAL_TRUE@LDADD = $(LIBH5TEST) $(LIBHDF5)
@BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = ph5example
-@BUILD_EFF_CONDITIONAL_TRUE@EXAMPLE_PROG_EFF = test_server test_client test_client_old_api
+@BUILD_EFF_CONDITIONAL_TRUE@EXAMPLE_PROG_EFF = test_server test_client test_client_old_api test_client_acg
# Example programs.
# Don't tell automake about them, because if it knew they were programs,
diff --git a/examples/test_client.c b/examples/test_client.c
index cfa20bf..0d46e0c 100644
--- a/examples/test_client.c
+++ b/examples/test_client.c
@@ -1,5 +1,5 @@
/*
- * test_client.c: Client side of Milestone 3.3 Asynchronous I/O and initial
+ * test_client.c: Client side of Milestone 4.2 Asynchronous I/O and initial
* IOD VOL plugin demonstration. This is, in effect, the application program that
* would run on one or more compute nodes and make calls to the HDF5 API.
*/
@@ -21,6 +21,7 @@ int main(int argc, char **argv) {
hid_t fapl_id, dxpl_id;
const unsigned int nelem=60;
int *data = NULL, *r_data = NULL, *r2_data = NULL, *data2 = NULL;
+ int *buf = NULL;
int16_t *data3 = NULL;
int16_t *r3_data = NULL;
int *a_data = NULL, *ra_data = NULL;
@@ -348,7 +349,7 @@ int main(int argc, char **argv) {
H5Pclose(plist_id);
/* change the dataset dimensions for Dataset D1. */
- ret = H5Dset_extent_ff(did1, &extent, 0, event_q);
+ ret = H5Dset_extent_ff(did3, &extent, 0, event_q);
assert(ret == 0);
}
@@ -597,7 +598,6 @@ int main(int argc, char **argv) {
hsize_t stride = 2;
hsize_t count = 60;
hsize_t block = 1;
- int *buf = NULL;
buf = calloc (120, sizeof(int));
@@ -610,19 +610,7 @@ int main(int argc, char **argv) {
ret = H5Dread_ff(did1, H5T_STD_I32LE, mem_space, dataspaceId, H5P_DEFAULT, buf,
0, event_q);
assert(ret == 0);
-
- if(H5EQpop(event_q, &req1) < 0)
- exit(1);
- assert(H5AOwait(req1, &status1) == 0);
- assert (status1);
-
- fprintf(stderr, "Printing all Dataset values. We should have a 0 after each element: ");
- for(i=0;i<120;++i)
- fprintf(stderr, "%d ", buf[i]);
- fprintf(stderr, "\n");
-
H5Sclose(mem_space);
- free(buf);
}
assert(H5Dclose(did1) == 0);
@@ -652,10 +640,17 @@ int main(int argc, char **argv) {
fprintf(stderr, "\n");
free(status);
+ fprintf(stderr, "Printing all Dataset values. We should have a 0 after each element: ");
+ for(i=0;i<120;++i)
+ fprintf(stderr, "%d ", buf[i]);
+ fprintf(stderr, "\n");
+
+ /*
fprintf(stderr, "Printing Attribute data (after EQ wait): ");
for(i=0;i<nelem;++i)
fprintf(stderr, "%d ",ra_data[i]);
fprintf(stderr, "\n");
+ */
if(exists)
printf("Group G3 exists!\n");
@@ -682,6 +677,7 @@ int main(int argc, char **argv) {
free(r2_data);
free(r3_data);
free(data3);
+ free(buf);
fprintf(stderr, "\n*****************************************************************************************************************\n");
fprintf(stderr, "Finalize EFF stack\n");
diff --git a/examples/test_client_acg.c b/examples/test_client_acg.c
new file mode 100644
index 0000000..c4b2340
--- /dev/null
+++ b/examples/test_client_acg.c
@@ -0,0 +1,164 @@
+/*
+ * test_client_acg.c: Client side of ACG Dynamic Data Structure Support
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+#include "mpi.h"
+#include "hdf5.h"
+
+int main(int argc, char **argv) {
+ const char file_name[]="acg_file.h5";
+ hid_t file_id;
+ hid_t dsid = -1; /* Dataset ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
+ hsize_t curr_size;
+ unsigned u; /* Local index variable */
+ unsigned write_elem[60], read_elem[60]; /* Element written/read */
+ hid_t fapl_id, dxpl_id;
+ int my_rank, my_size;
+ int provided;
+ hid_t event_q;
+ H5_status_t *status = NULL;
+ int num_requests = 0, i;
+ herr_t ret;
+ H5_request_t req1;
+ H5_status_t status1;
+
+ MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided);
+ if(MPI_THREAD_MULTIPLE != provided) {
+ fprintf(stderr, "MPI does not have MPI_THREAD_MULTIPLE support\n");
+ exit(1);
+ }
+
+ /* Call EFF_init to initialize the EFF stack.
+ As a result of this call, the Function Shipper client is started,
+ and HDF5 VOL calls are registered with the function shipper.
+ An "IOD init" call is forwarded from the FS client to the FS server
+ which should already be running. */
+ EFF_init(MPI_COMM_WORLD, MPI_INFO_NULL);
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &my_size);
+ fprintf(stderr, "APP processes = %d, my rank is %d\n", my_size, my_rank);
+
+ fprintf(stderr, "Create the FAPL to set the IOD VOL plugin and create the file\n");
+ /* Choose the IOD VOL plugin to use with this file.
+ First we create a file access property list. Then we call a new routine to set
+ the IOD plugin to use with this fapl */
+ fapl_id = H5Pcreate (H5P_FILE_ACCESS);
+ H5Pset_fapl_iod(fapl_id, MPI_COMM_WORLD, MPI_INFO_NULL);
+
+ /* create an event Queue for managing asynchronous requests.
+
+ Event Queues will releive the use from managing and completing
+ individual requests for every operation. Instead of passing a
+ request for every operation, the event queue is passed and
+ internally the HDF5 library creates a request and adds it to
+ the event queue.
+
+ Multiple Event queue can be created used by the application. */
+ event_q = H5EQcreate(fapl_id);
+ assert(event_q);
+
+ /* create the file. This is asynchronous, but the file_id can be used. */
+ file_id = H5Fcreate_ff(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id, event_q);
+ assert(file_id);
+
+ /* Create 1-D dataspace */
+ dim = 0;
+ max_dim = H5S_UNLIMITED;
+ if((sid = H5Screate_simple(1, &dim, &max_dim)) < 0)
+ return 1;
+
+ /* Create 1-D chunked dataset */
+ if((dsid = H5Dcreate_ff(file_id, "dset", H5T_NATIVE_UINT, sid,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, 0 , event_q)) < 0)
+ return 1;
+
+ /* Close dataspace */
+ H5Sclose(sid);
+
+ /* Initialize data elements */
+ for(u = 0; u < 60; u++)
+ write_elem[u] = u;
+
+ printf("App Dataset Id = %d File id = %d\n", dsid, file_id);
+ ret = H5DOappend_ff(dsid, H5P_DEFAULT, 1, 10, H5T_NATIVE_UINT,
+ write_elem, 0 , event_q);
+ assert(ret<0);
+
+ /* Append 60 elements to dataset, along proper axis */
+ if(H5DOappend_ff(dsid, H5P_DEFAULT, 0, 60, H5T_NATIVE_UINT,
+ write_elem, 0 , event_q) < 0)
+ return 1;
+
+ /* Get the dataset's dataspace now */
+ if((sid = H5Dget_space(dsid)) < 0)
+ return 1;
+
+ if(H5Sget_simple_extent_dims(sid, &curr_size, NULL) < 0)
+ return 1;
+
+ /* Verify dataset is correct size */
+ if(curr_size != 60)
+ return 1;
+
+ /* Close dataspace */
+ if(H5Sclose(sid) < 0)
+ return 1;
+
+ /* Read elements back, with sequence operation */
+ memset(read_elem, 0, sizeof(read_elem));
+
+ /* Sequence 10 elements from dataset, along bad axis */
+ ret = H5DOsequence_ff(dsid, H5P_DEFAULT, 1, 0, 60, H5T_NATIVE_UINT,
+ read_elem, 0 , event_q);
+
+ /* Sequence first 60 elements from dataset, along proper axis */
+ ret = H5DOsequence_ff(dsid, H5P_DEFAULT, 0, 0, 60, H5T_NATIVE_UINT,
+ read_elem, 0 , event_q);
+ assert(ret == 0);
+
+ /* close dataset */
+ assert(H5Dclose_ff(dsid, event_q) == 0);
+
+ /* closing the container also acts as a wait all on all pending requests
+ on the container. */
+ assert(H5Fclose_ff(file_id, event_q) == 0);
+
+ fprintf(stderr, "\n*****************************************************************************************************************\n");
+ fprintf(stderr, "Wait on everything in EQ and check Results of operations in EQ\n");
+ fprintf(stderr, "*****************************************************************************************************************\n");
+
+ /* wait on all requests and print completion status */
+ H5EQwait(event_q, &num_requests, &status);
+ fprintf(stderr, "%d requests in event queue. Completions: ", num_requests);
+ for(i=0 ; i<num_requests; i++)
+ fprintf(stderr, "%d ",status[i]);
+ fprintf(stderr, "\n");
+ free(status);
+
+ /* Verify data read */
+ for(u = 0; u < 60; u++)
+ if(read_elem[u] != write_elem[u])
+ return 1;
+
+ fprintf(stderr, "\n*****************************************************************************************************************\n");
+ fprintf(stderr, "Finalize EFF stack\n");
+ fprintf(stderr, "*****************************************************************************************************************\n");
+
+ H5EQclose(event_q);
+ H5Pclose(fapl_id);
+
+ /* This finalizes the EFF stack. ships a terminate and IOD finalize to the server
+ and shutsdown the FS server (when all clients send the terminate request)
+ and client */
+ EFF_finalize();
+
+ MPI_Finalize();
+ return 0;
+}
diff --git a/src/H5FF.c b/src/H5FF.c
index 1853f6c..18b9769 100644
--- a/src/H5FF.c
+++ b/src/H5FF.c
@@ -2800,7 +2800,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oclose_ff() */
-herr_t
+herr_t
H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
hid_t memtype, const void *buf)
{
@@ -2818,10 +2818,11 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
+ H5TRACE6("e", "iiIuzi*x", dset_id, dxpl_id, axis, extension, memtype, buf);
/* check arguments */
- if(!dset_id)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset");
+ if(H5I_DATASET != H5I_get_type(dset_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset");
/* Get the default dataset transfer property list if the user didn't provide one */
if(H5P_DEFAULT == dxpl_id)
@@ -2885,21 +2886,21 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
done:
/* close old dataspace */
- if(space_id && H5Sclose(space_id) < 0)
+ if(space_id != FAIL && H5Sclose(space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
/* close new dataspace */
- if(new_space_id && H5Sclose(new_space_id) < 0)
+ if(new_space_id != FAIL && H5Sclose(new_space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
/* close memory dataspace */
- if(mem_space_id && H5Sclose(mem_space_id) < 0)
+ if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
FUNC_LEAVE_API(ret_value)
}/* end H5DOappend */
-herr_t
+herr_t
H5DOsequence(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off,
size_t sequence, hid_t memtype, void *buf)
{
@@ -2915,6 +2916,8 @@ H5DOsequence(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off,
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
+ H5TRACE7("e", "iiIuhzi*x", dset_id, dxpl_id, axis, start_off, sequence, memtype,
+ buf);
/* check arguments */
if(!dset_id)
@@ -2968,11 +2971,11 @@ H5DOsequence(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off,
done:
/* close old dataspace */
- if(space_id && H5Sclose(space_id) < 0)
+ if(space_id != FAIL && H5Sclose(space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
/* close memory dataspace */
- if(mem_space_id && H5Sclose(mem_space_id) < 0)
+ if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
FUNC_LEAVE_API(ret_value)
@@ -3015,11 +3018,11 @@ herr_t H5DOset(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[],
done:
/* close old dataspace */
- if(space_id && H5Sclose(space_id) < 0)
+ if(space_id != FAIL && H5Sclose(space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
/* close memory dataspace */
- if(mem_space_id && H5Sclose(mem_space_id) < 0)
+ if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
FUNC_LEAVE_API(ret_value)
@@ -3062,11 +3065,11 @@ herr_t H5DOget(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[],
done:
/* close old dataspace */
- if(space_id && H5Sclose(space_id) < 0)
+ if(space_id != FAIL && H5Sclose(space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
/* close memory dataspace */
- if(mem_space_id && H5Sclose(mem_space_id) < 0)
+ if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
FUNC_LEAVE_API(ret_value)
@@ -3157,21 +3160,21 @@ herr_t H5DOappend_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extensi
done:
/* close old dataspace */
- if(space_id && H5Sclose(space_id) < 0)
+ if(space_id != FAIL && H5Sclose(space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
/* close new dataspace */
- if(new_space_id && H5Sclose(new_space_id) < 0)
+ if(new_space_id != FAIL && H5Sclose(new_space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
/* close memory dataspace */
- if(mem_space_id && H5Sclose(mem_space_id) < 0)
+ if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
FUNC_LEAVE_API(ret_value)
}/* end H5DOappend_ff */
-herr_t
+herr_t
H5DOsequence_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off,
size_t sequence, hid_t memtype, void *buf, uint64_t trans, hid_t eq_id)
{
@@ -3239,11 +3242,11 @@ H5DOsequence_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off,
done:
/* close old dataspace */
- if(space_id && H5Sclose(space_id) < 0)
+ if(space_id != FAIL && H5Sclose(space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
/* close memory dataspace */
- if(mem_space_id && H5Sclose(mem_space_id) < 0)
+ if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
FUNC_LEAVE_API(ret_value)
@@ -3286,11 +3289,11 @@ herr_t H5DOset_ff(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[],
done:
/* close old dataspace */
- if(space_id && H5Sclose(space_id) < 0)
+ if(space_id != FAIL && H5Sclose(space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
/* close memory dataspace */
- if(mem_space_id && H5Sclose(mem_space_id) < 0)
+ if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
FUNC_LEAVE_API(ret_value)
@@ -3333,11 +3336,11 @@ herr_t H5DOget_ff(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[],
done:
/* close old dataspace */
- if(space_id && H5Sclose(space_id) < 0)
+ if(space_id != FAIL && H5Sclose(space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
/* close memory dataspace */
- if(mem_space_id && H5Sclose(mem_space_id) < 0)
+ if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace")
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5VLiod.c b/src/H5VLiod.c
index c3a001b..b35a100 100644
--- a/src/H5VLiod.c
+++ b/src/H5VLiod.c
@@ -645,6 +645,7 @@ H5Pset_dxpl_checksum_ptr(hid_t dxpl_id, uint32_t *cs)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*Iu", dxpl_id, cs);
if(dxpl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
@@ -668,6 +669,7 @@ H5Pget_dxpl_checksum_ptr(hid_t dxpl_id, uint32_t **cs/*out*/)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "ix", dxpl_id, cs);
if(NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
@@ -2819,6 +2821,24 @@ H5VL_iod_dataset_set_extent(void *_dset, const hsize_t size[], hid_t dxpl_id, vo
HDassert(request == &_request);
} /* end else */
+ /* modify the local dataspace of the dataset */
+ {
+ int rank; /* Dataspace # of dimensions */
+ H5S_t *space; /* Dataset's dataspace */
+ hsize_t curr_dims[H5O_LAYOUT_NDIMS];/* Current dimension sizes */
+
+ if(NULL == (space = (H5S_t *)H5I_object_verify(dset->remote_dset.space_id,
+ H5I_DATASPACE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
+
+ /* Check if we are shrinking or expanding any of the dimensions */
+ if((rank = H5S_get_simple_extent_dims(space, curr_dims, NULL)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions");
+
+ /* Modify the size of the data space */
+ if(H5S_set_extent(space, size) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space");
+ }
done:
axe_parents = (uint64_t *)H5MM_xfree(axe_parents);
FUNC_LEAVE_NOAPI(ret_value)
@@ -2883,7 +2903,8 @@ H5VL_iod_dataset_get(void *_dset, H5VL_dataset_get_t get_type, hid_t dxpl_id,
hid_t *ret_id = va_arg (arguments, hid_t *);
if((*ret_id = H5Scopy(dset->remote_dset.space_id)) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get dataspace ID of dataset")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get dataspace ID of dataset");
+ break;
}
case H5VL_DATASET_GET_SPACE_STATUS:
{
diff --git a/src/H5VLiod_server.c b/src/H5VLiod_server.c
index 3c0f913..d3141c1 100644
--- a/src/H5VLiod_server.c
+++ b/src/H5VLiod_server.c
@@ -3480,6 +3480,7 @@ H5VL_iod_server_dset_write_cb(AXE_engine_t UNUSED axe_engine,
}
else {
buf_size = src_size * nelmts;
+ fprintf(stderr, "%d %d\n", buf_size, size);
assert(buf_size == size);
}
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index be62be2..346adc7 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -1084,6 +1084,7 @@ H5VL_native_datatype_open(void *obj, H5VL_loc_params_t loc_params, const char *n
if(NULL == (type = H5T_open(&type_loc, dxpl_id)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype")
+ type->vol_obj = NULL;
ret_value = (void *)type;
done:
if(NULL == type)
diff --git a/test/dsets.c b/test/dsets.c
index d1f9706..898e546 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -9762,14 +9762,14 @@ main(void)
nerrors += (test_append_sequence_1d(my_fapl) < 0 ? 1 : 0);
nerrors += (test_append_sequence_2d(my_fapl) < 0 ? 1 : 0);
nerrors += (test_set_get(my_fapl) < 0 ? 1 : 0);
- exit(0);
+
if(H5Fclose(file) < 0)
goto error;
} /* end for */
/* Close 2nd FAPL */
if(H5Pclose(fapl2) < 0) TEST_ERROR
-
+#if 0
/* Tests that do not use files */
nerrors += (test_scatter() < 0 ? 1 : 0);
nerrors += (test_gather() < 0 ? 1 : 0);
@@ -9778,7 +9778,7 @@ main(void)
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
-
+#endif
if(nerrors)
goto error;
printf("All dataset tests passed.\n");
diff --git a/test/tattr.c b/test/tattr.c
index 25e8241..6556e09 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -10118,7 +10118,7 @@ test_attr_bug5(hid_t fcpl, hid_t fapl)
/* Open the datatype attribute twice */
aidt1 = H5Aopen(tid1, BUG3_ATTR_NAME, H5P_DEFAULT);
CHECK(aidt1, FAIL, "H5Aopen");
- aidt2 = H5Aopen(tid1, BUG3_ATTR_NAME, H5P_DEFAULT);
+ aidt2 = H5Aopen(tid2, BUG3_ATTR_NAME, H5P_DEFAULT);
CHECK(aidt2, FAIL, "H5Aopen");
/* Close all attributes */