summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-07-02 17:04:19 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-07-02 17:04:19 (GMT)
commit3c4dd5fa530555ab8a0d4c84d3d880aafe158346 (patch)
treebc664a21890174154b0ee4c372907952c4518931
parent364c193744a84058038b54f4ae08317aee081b55 (diff)
downloadhdf5-3c4dd5fa530555ab8a0d4c84d3d880aafe158346.zip
hdf5-3c4dd5fa530555ab8a0d4c84d3d880aafe158346.tar.gz
hdf5-3c4dd5fa530555ab8a0d4c84d3d880aafe158346.tar.bz2
[svn-r27323] Implement support for H5Dflush for VDS.
Implement support for H5Ocopy on VDS. Testing for H5Ocopy on VDS. Fix check-vfd failure. Other minor fixes/cleanup. Note there is a preexisting failure in h5repack testing. Tested: ummon
-rw-r--r--src/H5Dint.c14
-rw-r--r--src/H5Dpkg.h4
-rw-r--r--src/H5Dvirtual.c128
-rw-r--r--src/H5Olayout.c5
-rw-r--r--test/vds.c338
5 files changed, 350 insertions, 139 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 10fa4ca..657f893 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1591,13 +1591,6 @@ H5D_close(H5D_t *dataset)
#endif /* NDEBUG */
} /* end switch */ /*lint !e788 All appropriate cases are covered */
- /*
- * Release datatype, dataspace and creation property list -- there isn't
- * much we can do if one of these fails, so we just continue.
- */
- free_failed = (unsigned)(H5I_dec_ref(dataset->shared->type_id) < 0 || H5S_close(dataset->shared->space) < 0 ||
- H5I_dec_ref(dataset->shared->dcpl_id) < 0);
-
/* Remove the dataset from the list of opened objects in the file */
if(H5FO_top_decr(dataset->oloc.file, dataset->oloc.addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
@@ -1610,6 +1603,13 @@ H5D_close(H5D_t *dataset)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release object header")
/*
+ * Release datatype, dataspace and creation property list -- there isn't
+ * much we can do if one of these fails, so we just continue.
+ */
+ free_failed = (unsigned)(H5I_dec_ref(dataset->shared->type_id) < 0 || H5S_close(dataset->shared->space) < 0 ||
+ H5I_dec_ref(dataset->shared->dcpl_id) < 0);
+
+ /*
* Free memory. Before freeing the memory set the file pointer to NULL.
* We always check for a null file pointer in other H5D functions to be
* sure we're not accessing an already freed dataset (see the HDassert()
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 6a0b15e..44e119c 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -662,9 +662,7 @@ H5_DLL herr_t H5D__virtual_copy_layout(H5O_layout_t *layout);
H5_DLL herr_t H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id);
H5_DLL herr_t H5D__virtual_reset_layout(H5O_layout_t *layout);
H5_DLL herr_t H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage);
-H5_DLL herr_t H5D__virtual_copy(H5F_t *f_src,
- const H5O_storage_virtual_t *storage_src, H5F_t *f_dst,
- H5O_storage_virtual_t *storage_dst, H5T_t *dt_src, H5O_copy_t *cpy_info,
+H5_DLL herr_t H5D__virtual_copy(H5F_t *f_src, H5O_layout_t *layout_dst,
hid_t dxpl_id);
H5_DLL herr_t H5D__virtual_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset,
hid_t dapl_id);
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index a783a5a..b4a8060 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -432,6 +432,51 @@ H5D__virtual_reset_layout(H5O_layout_t *layout)
/*-------------------------------------------------------------------------
+ * Function: H5D__virtual_copy
+ *
+ * Purpose: Copy virtual storage raw data from SRC file to DST file.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Neil Fortner
+ * February 6, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5D__virtual_copy(H5F_t H5_ATTR_UNUSED *f_dst, H5O_layout_t *layout_dst,
+ hid_t H5_ATTR_UNUSED dxpl_id)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_PACKAGE
+
+ /* Copy message in memory */
+ if(H5D__virtual_copy_layout(layout_dst) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual layout")
+
+#ifdef NOT_YET
+ /* Check for copy to the same file */
+ if(f_dst == f_src) {
+ /* Increase reference count on global heap object */
+ if((heap_rc = H5HG_link(f_dst, dxpl_id, (H5HG_t *)&(layout_dst->u.virt.serial_list_hobjid), 1)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap refence count")
+ } /* end if */
+ else
+#endif /* NOT_YET */
+ {
+ /* Reset global heap id so a new heap objerct is created when the
+ * message is flushed */
+ layout_dst->storage.u.virt.serial_list_hobjid.addr = HADDR_UNDEF;
+ layout_dst->storage.u.virt.serial_list_hobjid.idx = (size_t)0;
+ } /* end block/else */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D__virtual_copy() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5D__virtual_delete
*
* Purpose: Delete the file space for a virtual dataset
@@ -446,7 +491,10 @@ H5D__virtual_reset_layout(H5O_layout_t *layout)
herr_t
H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage)
{
- herr_t ret_value = SUCCEED; /* Return value */
+#ifdef NOT_YET
+ int heap_rc; /* Reference count of global heap object */
+#endif /* NOT_YET */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -455,9 +503,15 @@ H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage)
HDassert(storage);
HDassert(storage->type == H5D_VIRTUAL);
- /* Delete the global heap block */
- if(H5HG_remove(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "Unable to remove heap object")
+#ifdef NOT_YET
+ /* Unlink the global heap block */
+ if((heap_rc = H5HG_link(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid), -1)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap refence count")
+ if(heap_rc == 0)
+#endif /* NOT_YET */
+ /* Delete the global heap block */
+ if(H5HG_remove(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to remove heap object")
/* Clear global heap ID in storage */
storage->u.virt.serial_list_hobjid.addr = HADDR_UNDEF;
@@ -499,8 +553,6 @@ H5D__virtual_open_source_dset(const H5D_t *vdset,
HDassert(source_dset->file_name);
HDassert(source_dset->dset_name);
- /* Get dapl and fapl from current (virtual dataset) location? VDSINC */
-
/* Check if we need to open the source file */
if(HDstrcmp(source_dset->file_name, ".")) {
/* Open the source file */
@@ -2048,7 +2100,7 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
{
H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */
hsize_t tot_nelmts; /* Total number of elements mapped to mem_space */
- size_t i, j; /* Local index variable */
+ size_t i, j; /* Local index variables */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2092,13 +2144,13 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
j < storage->list[i].sub_dset_io_end; j++) {
HDassert(0 && "Checking code coverage..."); //VDSINC
if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i].sub_dset[j]) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset")
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write to source dataset")
} //VDSINC
} /* end if */
else
/* Write to source dataset */
if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i].source_dset) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset")
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write to source dataset")
} /* end for */
done:
@@ -2123,41 +2175,37 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__virtual_flush(H5D_t H5_ATTR_UNUSED *dset, hid_t H5_ATTR_UNUSED dxpl_id)
+H5D__virtual_flush(H5D_t *dset, hid_t dxpl_id)
{
- FUNC_ENTER_STATIC_NOERR
+ H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */
+ size_t i, j; /* Local index variables */
+ herr_t ret_value = SUCCEED; /* Return value */
- /* Flush only open datasets */
- /* No-op for now VDSINC */
+ FUNC_ENTER_STATIC
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5D__virtual_flush() */
+ /* Sanity check */
+ HDassert(dset);
-
-/*-------------------------------------------------------------------------
- * Function: H5D__virtual_copy
- *
- * Purpose: Copy virtual storage raw data from SRC file to DST file.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Neil Fortner
- * February 6, 2015
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5D__virtual_copy(H5F_t H5_ATTR_UNUSED *f_src,
- const H5O_storage_virtual_t H5_ATTR_UNUSED *storage_src,
- H5F_t H5_ATTR_UNUSED *f_dst,
- H5O_storage_virtual_t H5_ATTR_UNUSED *storage_dst,
- H5T_t H5_ATTR_UNUSED *dt_src, H5O_copy_t H5_ATTR_UNUSED *cpy_info,
- hid_t H5_ATTR_UNUSED dxpl_id)
-{
- FUNC_ENTER_PACKAGE_NOERR
+ storage = &dset->shared->layout.storage.u.virt;
- HDassert(0 && "Not yet implemented...");//VDSINC
+ /* Flush only open datasets */
+ for(i = 0; i < storage->list_nused; i++)
+ /* Check for "printf" source dataset resolution */
+ if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) {
+ /* Iterate over sub-source dsets */
+ for(j = 0; j < storage->list[i].sub_dset_nused; j++)
+ if(storage->list[i].sub_dset[j].dset)
+ /* Flush source dataset */
+ if(H5D__flush_real(storage->list[i].sub_dset[j].dset, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush source dataset")
+ } /* end if */
+ else
+ if(storage->list[i].source_dset.dset)
+ /* Flush source dataset */
+ if(H5D__flush_real(storage->list[i].source_dset.dset, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset")
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5D__virtual_copy() */
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D__virtual_flush() */
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index b72d41b..ba3df82 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -903,7 +903,10 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
break;
case H5D_VIRTUAL:
- HDassert(0 && "Not yet implemented...");//VDSINC
+ /* Copy virtual layout. Always copy so the memory fields get copied
+ * properly. */
+ if(H5D__virtual_copy(file_dst, layout_dst, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy virtual storage")
break;
case H5D_LAYOUT_ERROR:
diff --git a/test/vds.c b/test/vds.c
index 6540e5a..50026b6 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -32,7 +32,8 @@ typedef enum {
} test_api_config_t;
const char *FILENAME[] = {
- "vds_virt",
+ "vds_virt_0",
+ "vds_virt_1",
"vds_src_0",
"vds_src_1",
"vds%_src",
@@ -994,11 +995,13 @@ test_basic_io(unsigned config, hid_t fapl)
{
char srcfilename[FILENAME_BUF_SIZE];
char vfilename[FILENAME_BUF_SIZE];
+ char vfilename2[FILENAME_BUF_SIZE];
char srcfilenamepct[FILENAME_BUF_SIZE];
char srcfilenamepct_fmt_fix[FILENAME_BUF_SIZE];
const char *srcfilenamepct_fmt = "vds%%_src";
hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
hid_t vfile = -1; /* File with virtual dset */
+ hid_t vfile2 = -1; /* File with copied virtual dset */
hid_t dcpl = -1; /* Dataset creation property list */
hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */
@@ -1021,8 +1024,9 @@ test_basic_io(unsigned config, hid_t fapl)
TESTING("basic virtual dataset I/O")
h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[1], fapl, srcfilename, sizeof srcfilename);
- h5_fixname(FILENAME[3], fapl, srcfilenamepct, sizeof srcfilenamepct);
+ h5_fixname(FILENAME[1], fapl, vfilename2, sizeof vfilename2);
+ h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
+ h5_fixname(FILENAME[4], fapl, srcfilenamepct, sizeof srcfilenamepct);
h5_fixname(srcfilenamepct_fmt, fapl, srcfilenamepct_fmt_fix, sizeof srcfilenamepct_fmt_fix);
/* Create DCPL */
@@ -1107,7 +1111,7 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1136,7 +1140,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdset and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1176,7 +1180,7 @@ test_basic_io(unsigned config, hid_t fapl)
/*
* Test 2: 2 Source datasets, hyperslab virtual mappings, '%' in source
- * dataset name
+ * dataset name, also test H5Ocopy()
*/
/* Clear virtual layout in DCPL */
if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
@@ -1276,7 +1280,7 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1305,7 +1309,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdsets and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1326,6 +1330,162 @@ test_basic_io(unsigned config, hid_t fapl)
if(rbuf[i][j] != buf[i][j])
TEST_ERROR
+ /* Test H5Ocopy() to same file */
+ /* Copy virtual dataset */
+ if(H5Ocopy(vfile, "v_dset", vfile, "v_dset2", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ TEST_ERROR
+
+ /* Close v_dset */
+ if(H5Dclose(vdset) < 0)
+ TEST_ERROR
+ vdset = -1;
+
+ /* Adjust write buffer */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0]));
+
+ /* Write data directly to source datasets */
+ if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ TEST_ERROR
+ if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ TEST_ERROR
+
+ /* Close srcdsets and srcfile if config option specified */
+ if(config & TEST_IO_CLOSE_SRC) {
+ if(H5Dclose(srcdset[0]) < 0)
+ TEST_ERROR
+ srcdset[0] = -1;
+ if(H5Dclose(srcdset[1]) < 0)
+ TEST_ERROR
+ srcdset[1] = -1;
+
+ if(config & TEST_IO_DIFFERENT_FILE) {
+ if(H5Fclose(srcfile[0]) < 0)
+ TEST_ERROR
+ srcfile[0] = -1;
+ } /* end if */
+ } /* end if */
+
+ /* Reopen virtual file if config option specified */
+ if(config & TEST_IO_REOPEN_VIRT) {
+ if(H5Fclose(vfile) < 0)
+ TEST_ERROR
+ vfile = -1;
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
+ TEST_ERROR
+ } /* end if */
+
+ /* Open v_dset2 */
+ if((vdset = H5Dopen2(vfile, "v_dset2", H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ /* Read data through copied virtual dataset */
+ HDmemset(rbuf[0], 0, sizeof(rbuf));
+ if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
+ TEST_ERROR
+
+ /* Verify read data */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ if(rbuf[i][j] != buf[i][j])
+ TEST_ERROR
+
+ /* Reopen srcdsets and srcfile if config option specified */
+ if(config & TEST_IO_CLOSE_SRC) {
+ if(config & TEST_IO_DIFFERENT_FILE)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
+ TEST_ERROR
+ if((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0)
+ TEST_ERROR
+ if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
+ TEST_ERROR
+ } /* end if */
+
+ /* Only copy to a different file if the source datasets are in a different
+ * file */
+ if(config & TEST_IO_DIFFERENT_FILE) {
+ /* Close v_dset2 */
+ if(H5Dclose(vdset) < 0)
+ TEST_ERROR
+ vdset = -1;
+
+ /* Create file to copy virtual dataset to */
+ if((vfile2 = H5Fcreate(vfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+
+ /* Copy virtual dataset */
+ if(H5Ocopy(vfile, "v_dset", vfile2, "v_dset3", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ TEST_ERROR
+
+ /* Adjust write buffer */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0]));
+
+ /* Write data directly to source datasets */
+ if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ TEST_ERROR
+ if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ TEST_ERROR
+
+ /* Close srcdsets and srcfile if config option specified */
+ if(config & TEST_IO_CLOSE_SRC) {
+ if(H5Dclose(srcdset[0]) < 0)
+ TEST_ERROR
+ srcdset[0] = -1;
+ if(H5Dclose(srcdset[1]) < 0)
+ TEST_ERROR
+ srcdset[1] = -1;
+
+ if(config & TEST_IO_DIFFERENT_FILE) {
+ if(H5Fclose(srcfile[0]) < 0)
+ TEST_ERROR
+ srcfile[0] = -1;
+ } /* end if */
+ } /* end if */
+
+ /* Reopen copied virtual file if config option specified */
+ if(config & TEST_IO_REOPEN_VIRT) {
+ if(H5Fclose(vfile2) < 0)
+ TEST_ERROR
+ vfile2 = -1;
+ if((vfile2 = H5Fopen(vfilename2, H5F_ACC_RDWR, fapl)) < 0)
+ TEST_ERROR
+ } /* end if */
+
+ /* Open v_dset3 */
+ if((vdset = H5Dopen2(vfile2, "v_dset3", H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ /* Read data through copied virtual dataset */
+ HDmemset(rbuf[0], 0, sizeof(rbuf));
+ if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
+ TEST_ERROR
+
+ /* Verify read data */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ if(rbuf[i][j] != buf[i][j])
+ TEST_ERROR
+
+ /* Reopen srcdsets and srcfile if config option specified */
+ if(config & TEST_IO_CLOSE_SRC) {
+ if(config & TEST_IO_DIFFERENT_FILE)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
+ TEST_ERROR
+ if((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0)
+ TEST_ERROR
+ if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
+ TEST_ERROR
+ } /* end if */
+
+ /* Close copied virtual file */
+ if(H5Fclose(vfile2) < 0)
+ TEST_ERROR
+ vfile2 = -1;
+ } /* end if */
+
/* Close */
if(H5Dclose(srcdset[0]) < 0)
TEST_ERROR
@@ -1455,7 +1615,7 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1506,7 +1666,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdsets and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1687,7 +1847,7 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1765,7 +1925,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdsets and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1989,7 +2149,7 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2058,7 +2218,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdsets and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2313,7 +2473,7 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2690,7 +2850,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdset and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2770,6 +2930,8 @@ error:
} /* end for */
if(vfile >= 0)
(void)H5Fclose(vfile);
+ if(vfile2 >= 0)
+ (void)H5Fclose(vfile2);
for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) {
if(srcspace[i] >= 0)
(void)H5Sclose(srcspace[i]);
@@ -2837,7 +2999,7 @@ test_unlim(unsigned config, hid_t fapl)
TESTING("virtual dataset I/O with unlimited selections")
h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[1], fapl, srcfilename, sizeof srcfilename);
+ h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
/* Create DCPLs */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -2992,7 +3154,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -3057,7 +3219,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -3110,7 +3272,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen srcdset[0] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -3160,7 +3322,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -3227,7 +3389,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -3291,7 +3453,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen srcdset[1] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -3346,7 +3508,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -3427,7 +3589,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -3662,7 +3824,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -3726,7 +3888,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -3779,7 +3941,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen srcdset[0] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -3834,7 +3996,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -3900,7 +4062,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -3962,7 +4124,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen srcdset[1] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -4017,7 +4179,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -4098,7 +4260,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -4380,7 +4542,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -4444,7 +4606,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -4497,7 +4659,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen srcdset[0] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -4547,7 +4709,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -4612,7 +4774,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -4677,7 +4839,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen srcdset[2] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[2] = H5Dopen2(srcfile[0], "src_dset3", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -4734,7 +4896,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -4799,7 +4961,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -4856,7 +5018,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen srcdset[1] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -4912,7 +5074,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -4976,7 +5138,7 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -5211,10 +5373,10 @@ test_printf(unsigned config, hid_t fapl)
TESTING("virtual dataset I/O with printf source")
h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[1], fapl, srcfilename, sizeof srcfilename);
- h5_fixname(FILENAME[2], fapl, srcfilename2, sizeof srcfilename2);
+ h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
+ h5_fixname(FILENAME[3], fapl, srcfilename2, sizeof srcfilename2);
h5_fixname(printf_srcfilename_fmt, fapl, printf_srcfilename, sizeof printf_srcfilename);
- h5_fixname(FILENAME[3], fapl, srcfilenamepct, sizeof srcfilenamepct);
+ h5_fixname(FILENAME[4], fapl, srcfilenamepct, sizeof srcfilenamepct);
h5_fixname(srcfilenamepct_fmt, fapl, srcfilenamepct_fmt_fix, sizeof srcfilenamepct_fmt_fix);
/* Create DCPL */
@@ -5299,7 +5461,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -5332,7 +5494,7 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC)
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
/* Create 2 source datasets */
@@ -5400,7 +5562,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -5456,7 +5618,7 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
/* Create 3rd source dataset */
@@ -5500,7 +5662,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -5687,7 +5849,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -5720,7 +5882,7 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC)
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
/* Create source datasets in a pattern with increasing gaps:
@@ -5846,7 +6008,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -5910,7 +6072,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -5974,7 +6136,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -6038,7 +6200,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -6102,7 +6264,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -6166,7 +6328,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -6309,7 +6471,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -6389,7 +6551,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -6445,7 +6607,7 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen srcfile[1] if config option specified */
if(config & TEST_IO_CLOSE_SRC)
- if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
/* Create 2nd source dataset */
@@ -6486,7 +6648,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -6619,7 +6781,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -6699,7 +6861,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -6755,7 +6917,7 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen srcfile[1] if config option specified */
if(config & TEST_IO_CLOSE_SRC)
- if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
/* Create 2nd source dataset */
@@ -6796,7 +6958,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -6962,7 +7124,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -6995,7 +7157,7 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC)
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
/* Create 2 source datasets */
@@ -7063,7 +7225,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -7119,7 +7281,7 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
/* Create 3rd source dataset */
@@ -7162,7 +7324,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -7226,7 +7388,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -7283,7 +7445,7 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
/* Create 4th source dataset */
@@ -7326,7 +7488,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -7390,7 +7552,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -7455,7 +7617,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -7634,7 +7796,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -7667,7 +7829,7 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC)
if(config & TEST_IO_DIFFERENT_FILE)
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
/* Create 2 source datasets */
@@ -7745,7 +7907,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -7809,7 +7971,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -7866,7 +8028,7 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
/* Create 3rd source dataset */
@@ -7913,7 +8075,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -7977,7 +8139,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
@@ -8033,7 +8195,7 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR
/* Create 4th source dataset */
@@ -8077,7 +8239,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -8141,7 +8303,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(vfile) < 0)
TEST_ERROR
vfile = -1;
- if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
} /* end if */
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)