mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-05 15:42:32 +08:00
First pass at repack consolidating external storage if layout given.
Checks out manually, tests still complain.
This commit is contained in:
parent
cb6029196a
commit
ad2a7f4789
@ -807,8 +807,17 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed");
|
||||
if ((dcpl_in = H5Dget_create_plist(dset_in)) < 0)
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed");
|
||||
if ((dcpl_out = H5Pcopy(dcpl_in)) < 0)
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcopy failed");
|
||||
/* If the input dataset has external storage, it must be contiguous.
|
||||
* Accordingly, there would be no filter or chunk properties to preserve.
|
||||
*/
|
||||
if (H5Pget_external_count(dcpl_in)) {
|
||||
if ((dcpl_out = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed");
|
||||
}
|
||||
else {
|
||||
if ((dcpl_out = H5Pcopy(dcpl_in)) < 0)
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcopy failed");
|
||||
}
|
||||
if ((rank = H5Sget_simple_extent_ndims(f_space_id)) < 0)
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
|
||||
HDmemset(dims, 0, sizeof dims);
|
||||
@ -1175,7 +1184,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed");
|
||||
}
|
||||
/*-------------------------------------------------------------------------
|
||||
* we do not have request for filter/chunking use H5Ocopy instead
|
||||
* we do not have request for filter/chunking; use H5Ocopy instead
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
else {
|
||||
|
@ -59,7 +59,8 @@ endif
|
||||
|
||||
# Temporary files. *.h5 are generated by h5repack. They should
|
||||
# copied to the testfiles/ directory if update is required.
|
||||
CHECK_CLEANFILES+=*.h5 *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5
|
||||
# *.dat files may be created by h5repackgentest.
|
||||
CHECK_CLEANFILES+=*.h5 *.dat *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5
|
||||
DISTCLEANFILES=h5repack.sh h5repack_plugin.sh
|
||||
|
||||
include $(top_srcdir)/config/conclude.am
|
||||
|
@ -675,7 +675,8 @@ VERIFY_EXTERNAL_CONSOLIDATION()
|
||||
)
|
||||
|
||||
# flag if any of the above checks failed
|
||||
if [ $prev_nerrors != $nerrors ]; then
|
||||
if [ $prev_nerrors != $nerrors ]
|
||||
then
|
||||
echo ". . . *FAILED*"
|
||||
nerrors="`expr $prev_nerrors + 1`"
|
||||
else
|
||||
|
@ -8,7 +8,7 @@
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
*/
|
||||
static void
|
||||
generate_external_int32le(hbool_t external)
|
||||
generate_int32le(hbool_t external)
|
||||
{
|
||||
char filename[MAX_NAME_SIZE];
|
||||
hid_t file;
|
||||
@ -67,7 +67,7 @@ generate_external_int32le(hbool_t external)
|
||||
HDassert(H5Dclose(dset) >= 0);
|
||||
HDassert(H5Sclose(dspace) >= 0);
|
||||
HDassert(H5Fclose(file) >= 0);
|
||||
} /* end generate_external_int32le() */
|
||||
} /* end generate_int32le() */
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
@ -75,8 +75,8 @@ generate_external_int32le(hbool_t external)
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
generate_external_int32le(FALSE);
|
||||
generate_external_int32le(TRUE);
|
||||
generate_int32le(FALSE);
|
||||
generate_int32le(TRUE);
|
||||
return 0;
|
||||
} /* end main() */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user