summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-09-16 12:28:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-09-16 12:28:29 (GMT)
commit6fb5f819a51f27ffc44b21e2d0e44808ba71da17 (patch)
treeb6b62d7ceaa3376159a8ee47e0f25345d14b26e1
parentb0a1e95ac7de5d0235dc0bc0732f4225b1589bad (diff)
downloadhdf5-6fb5f819a51f27ffc44b21e2d0e44808ba71da17.zip
hdf5-6fb5f819a51f27ffc44b21e2d0e44808ba71da17.tar.gz
hdf5-6fb5f819a51f27ffc44b21e2d0e44808ba71da17.tar.bz2
[svn-r19397] Description:
Bring r19396 from trunk to 1.8 branch: Bring back various modifications to the v2 B-trees that were introduced in the revise_chunks branch but aren't dependent on any file format or API changes. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode Mac OS X/32 10.6.4 (amazon) in debug mode Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
-rw-r--r--src/H5B2.c4
-rw-r--r--src/H5B2dbg.c19
-rw-r--r--src/H5B2pkg.h6
-rw-r--r--src/H5B2private.h14
-rw-r--r--src/H5B2test.c1
-rw-r--r--src/H5HFbtree2.c1
-rw-r--r--src/H5Olayout.c5
-rwxr-xr-xsrc/H5SMbtree2.c1
-rw-r--r--test/dsets.c138
-rw-r--r--test/error_test.c1
-rw-r--r--tools/misc/h5debug.c11
11 files changed, 61 insertions, 140 deletions
diff --git a/src/H5B2.c b/src/H5B2.c
index 124eaee..8076e48 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -90,10 +90,10 @@ const H5B2_class_t *const H5B2_client_class_g[] = {
H5HF_HUGE_BT2_DIR, /* 3 - H5B2_FHEAP_HUGE_DIR_ID */
H5HF_HUGE_BT2_FILT_DIR, /* 4 - H5B2_FHEAP_HUGE_FILT_DIR_ID */
H5G_BT2_NAME, /* 5 - H5B2_GRP_DENSE_NAME_ID */
- H5G_BT2_CORDER, /* 6 - H5B2_GRP_DENSE_CORDER_ID */
+ H5G_BT2_CORDER, /* 6 - H5B2_GRP_DENSE_CORDER_ID */
H5SM_INDEX, /* 7 - H5B2_SOHM_INDEX_ID */
H5A_BT2_NAME, /* 8 - H5B2_ATTR_DENSE_NAME_ID */
- H5A_BT2_CORDER, /* 9 - H5B2_ATTR_DENSE_CORDER_ID */
+ H5A_BT2_CORDER, /* 9 - H5B2_ATTR_DENSE_CORDER_ID */
};
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index cf7301d..a7f6819 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -88,7 +88,7 @@
*/
herr_t
H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t *type)
+ const H5B2_class_t *type, haddr_t obj_addr)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header info */
void *dbg_ctx = NULL; /* v2 B-tree debugging context */
@@ -104,6 +104,7 @@ H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
*/
HDassert(f);
HDassert(H5F_addr_defined(addr));
+ HDassert(H5F_addr_defined(obj_addr));
HDassert(stream);
HDassert(indent >= 0);
HDassert(fwidth >= 0);
@@ -114,7 +115,7 @@ H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
/* Check for debugging context callback available */
if(type->crt_dbg_ctx) {
/* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, addr)))
+ if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
} /* end if */
@@ -202,7 +203,7 @@ done:
*/
herr_t
H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth)
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header */
H5B2_internal_t *internal = NULL; /* B-tree internal node */
@@ -226,12 +227,13 @@ H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) ||
(NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
HDassert(H5F_addr_defined(hdr_addr));
+ HDassert(H5F_addr_defined(obj_addr));
HDassert(nrec > 0);
/* Check for debugging context callback available */
if(type->crt_dbg_ctx) {
/* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, addr)))
+ if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
} /* end if */
@@ -292,7 +294,7 @@ H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
temp_str);
HDassert(H5B2_INT_NREC(internal, hdr, u));
(void)(type->debug)(stream, f, dxpl_id, indent + 6, MAX (0, fwidth-6),
- H5B2_INT_NREC(internal, hdr, u), NULL);
+ H5B2_INT_NREC(internal, hdr, u), dbg_ctx);
} /* end for */
/* Print final node pointer */
@@ -333,7 +335,7 @@ done:
*/
herr_t
H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec)
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header */
H5B2_leaf_t *leaf = NULL; /* B-tree leaf node */
@@ -357,12 +359,13 @@ H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) ||
(NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
HDassert(H5F_addr_defined(hdr_addr));
+ HDassert(H5F_addr_defined(obj_addr));
HDassert(nrec > 0);
/* Check for debugging context callback available */
if(type->crt_dbg_ctx) {
/* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, addr)))
+ if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
} /* end if */
@@ -412,7 +415,7 @@ H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
temp_str);
HDassert(H5B2_LEAF_NREC(leaf, hdr, u));
(void)(type->debug)(stream, f, dxpl_id, indent + 6, MAX (0, fwidth-6),
- H5B2_LEAF_NREC(leaf, hdr, u), NULL);
+ H5B2_LEAF_NREC(leaf, hdr, u), dbg_ctx);
} /* end for */
done:
diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h
index 543fa3f..b820853 100644
--- a/src/H5B2pkg.h
+++ b/src/H5B2pkg.h
@@ -346,13 +346,13 @@ H5_DLL herr_t H5B2_delete_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
/* Debugging routines for dumping file structures */
H5_DLL herr_t H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- FILE *stream, int indent, int fwidth, const H5B2_class_t *type);
+ FILE *stream, int indent, int fwidth, const H5B2_class_t *type, haddr_t obj_addr);
H5_DLL herr_t H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
FILE *stream, int indent, int fwidth, const H5B2_class_t *type,
- haddr_t hdr_addr, unsigned nrec, unsigned depth);
+ haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr);
H5_DLL herr_t H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
FILE *stream, int indent, int fwidth, const H5B2_class_t *type,
- haddr_t hdr_addr, unsigned nrec);
+ haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr);
/* Testing routines */
#ifdef H5B2_TESTING
diff --git a/src/H5B2private.h b/src/H5B2private.h
index 4880ab2..08d3ce1 100644
--- a/src/H5B2private.h
+++ b/src/H5B2private.h
@@ -88,13 +88,13 @@ struct H5B2_class_t {
/* Extensible array client callback methods */
void *(*crt_context)(void *udata); /* Create context for other client callbacks */
herr_t (*dst_context)(void *ctx); /* Destroy client callback context */
- herr_t (*store)(void *nrecord, const void *udata); /* Store application record in native record table */
- herr_t (*compare)(const void *rec1, const void *rec2); /* Compare two native records */
- herr_t (*encode)(uint8_t *raw, const void *record, void *ctx); /* Encode record from native form to disk storage form */
- herr_t (*decode)(const uint8_t *raw, void *record, void *ctx); /* Decode record from disk storage form to native form */
- herr_t (*debug)(FILE *stream, const H5F_t *f, hid_t dxpl_id, /* Print a record for debugging */
- int indent, int fwidth, const void *record, const void *udata);
- void *(*crt_dbg_ctx)(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr); /* Create debugging context */
+ herr_t (*store)(void *nrecord, const void *udata); /* Store application record in native record table */
+ herr_t (*compare)(const void *rec1, const void *rec2); /* Compare two native records */
+ herr_t (*encode)(uint8_t *raw, const void *record, void *ctx); /* Encode record from native form to disk storage form */
+ herr_t (*decode)(const uint8_t *raw, void *record, void *ctx); /* Decode record from disk storage form to native form */
+ herr_t (*debug)(FILE *stream, const H5F_t *f, hid_t dxpl_id, /* Print a record for debugging */
+ int indent, int fwidth, const void *record, const void *ctx);
+ void *(*crt_dbg_ctx)(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr); /* Create debugging context */
herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */
};
diff --git a/src/H5B2test.c b/src/H5B2test.c
index a604e51..68215c2 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -333,7 +333,6 @@ H5B2_test_crt_dbg_context(H5F_t *f, hid_t UNUSED dxpl_id, haddr_t UNUSED addr)
/* Sanity check */
HDassert(f);
- HDassert(H5F_addr_defined(addr));
/* Allocate callback context */
if(NULL == (ctx = H5FL_MALLOC(H5B2_test_ctx_t)))
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index 3f208e7..bce58b7 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -287,7 +287,6 @@ H5HF_huge_bt2_crt_dbg_context(H5F_t *f, hid_t UNUSED dxpl_id, haddr_t UNUSED add
/* Sanity check */
HDassert(f);
- HDassert(H5F_addr_defined(addr));
/* Allocate callback context */
if(NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t)))
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index e413598..4a119ac 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -32,6 +32,9 @@
#include "H5Pprivate.h" /* Property lists */
+/* Local macros */
+
+
/* PRIVATE PROTOTYPES */
static void *H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
unsigned mesg_flags, unsigned *ioflags, const uint8_t *p);
@@ -668,8 +671,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, October 8, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index 95527f9..156a6c5 100755
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -240,7 +240,6 @@ H5SM_bt2_crt_dbg_context(H5F_t *f, hid_t UNUSED dxpl_id, haddr_t UNUSED addr)
/* Sanity check */
HDassert(f);
- HDassert(H5F_addr_defined(addr));
/* Allocate callback context */
if(NULL == (ctx = H5FL_MALLOC(H5SM_bt2_ctx_t)))
diff --git a/test/dsets.c b/test/dsets.c
index 8a39bc0..1d81e1d 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -232,11 +232,6 @@ static size_t filter_expand(unsigned int flags, size_t cd_nelmts,
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
- * Modifications:
- * Added test for compact dataset creation.
- * Raymond Lu
- * August 8, 2002
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -391,8 +386,6 @@ test_create(hid_t file)
* Programmer: Robb Matzke
* Wednesday, December 10, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -513,8 +506,6 @@ error:
* Programmer: Raymond Lu
* Wednesday, November 27, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -608,8 +599,6 @@ error:
* Programmer: Raymond Lu
* August 8, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -845,8 +834,8 @@ error:
/* Close file */
H5Sclose(space);
H5Pclose(plist);
- H5Fclose(file);
H5Dclose(dataset);
+ H5Fclose(file);
} H5E_END_TRY;
return -1;
@@ -874,10 +863,10 @@ static herr_t
test_layout_extend(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE]; /* File name */
- hid_t fid; /* File id */
- hid_t sid_fix, sid_unlim; /* Dataspace id */
- hid_t dcpl_compact, dcpl_contig, dcpl_chunked; /* Dataset creation property list id */
- hid_t did_fixed, did_unlim; /* Dataset id */
+ hid_t fid = -1; /* File id */
+ hid_t sid_fix = -1, sid_unlim = -1; /* Dataspace id */
+ hid_t dcpl_compact = -1, dcpl_contig = -1, dcpl_chunked = -1; /* Dataset creation property list id */
+ hid_t did_fixed = -1, did_unlim = -1; /* Dataset id */
hsize_t cur_size[1] = {10}; /* Current size of dataspace */
hsize_t max_unlim[1] = {H5S_UNLIMITED}; /* Maximum size of dataspace (unlimited) */
hsize_t max_fix[1] = {100}; /* Maximum size of dataspace (fixed) */
@@ -991,8 +980,6 @@ error:
* Programmer: Raymond Lu
* Monday, May 12, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1139,8 +1126,6 @@ error:
* Programmer: Robb Matzke
* Wednesday, January 14, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1241,8 +1226,6 @@ const H5Z_class2_t H5Z_BOGUS[1] = {{
* Programmer: Quincey Koziol
* Friday, April 5, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static htri_t
@@ -1269,8 +1252,6 @@ can_apply_bogus(hid_t UNUSED dcpl_id, hid_t type_id, hid_t UNUSED space_id)
* Programmer: Robb Matzke
* Tuesday, April 21, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static size_t
@@ -1295,8 +1276,6 @@ filter_bogus(unsigned int UNUSED flags, size_t UNUSED cd_nelmts,
* Programmer: Quincey Koziol
* Friday, April 5, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1348,8 +1327,6 @@ set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t UNUSED space_id)
* Programmer: Quincey Koziol
* Monday, April 7, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static size_t
@@ -1406,8 +1383,6 @@ filter_bogus2(unsigned int flags, size_t cd_nelmts,
* Programmer: Raymond Lu
* 4 August 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static size_t
@@ -1504,8 +1479,6 @@ error:
* Programmer: Raymond Lu
* Jan 14, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5Z_cb_return_t
@@ -1529,8 +1502,6 @@ filter_cb_cont(H5Z_filter_t filter, void UNUSED *buf, size_t UNUSED buf_size,
* Programmer: Raymond Lu
* Jan 14, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5Z_cb_return_t
@@ -1558,10 +1529,6 @@ filter_cb_fail(H5Z_filter_t filter, void UNUSED *buf, size_t UNUSED buf_size,
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
- * Modifications:
- * Moved out of main test_compression routine
- * Quincey Koziol, November 14, 2002
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1908,10 +1875,6 @@ error:
* Programmer: Nat Furrer and James Laird
* Monday, June 7, 2004
*
- * Modifications:
- * Make copy of data file since the test writes to the file.
- * Larry Knox, October 14, 2009
- *
*-------------------------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_SZIP
@@ -2033,8 +1996,6 @@ error:
* Programmer: Nat Furrer and James Laird
* Thursday, June 10, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2112,14 +2073,6 @@ error:
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
- * Modifications:
- * Moved guts of filter testing out of main routine.
- * Tests shuffle, deflate, fletcher32 checksum filters.
- * Quincey Koziol, November 14, 2002
- *
- * Added Fletcher32 filter testing
- * Raymond Lu, Jan 22, 2002
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2663,8 +2616,6 @@ error:
* Programmer: Kent Yang
* Wednesday, Nov. 13th, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2781,8 +2732,6 @@ error:
* Programmer: Xiaowen Wu
* Wednesday, Dec. 23th, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2923,8 +2872,6 @@ error:
* Programmer: Xiaowen Wu
* Friday, Jan. 21th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3054,8 +3001,6 @@ error:
* Programmer: Xiaowen Wu
* Wednesday, Jan. 26th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3187,8 +3132,6 @@ error:
* Programmer: Xiaowen Wu
* Tuesday, Jan. 18th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3335,8 +3278,6 @@ error:
* Programmer: Xiaowen Wu
* Tuesday, Jan. 18th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3533,8 +3474,6 @@ error:
* Programmer: Xiaowen Wu
* Tuesday, Jan. 18th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3822,8 +3761,6 @@ error:
* Programmer: Xiaowen Wu
* Thursday, Mar. 31th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -4021,8 +3958,6 @@ error:
* Programmer: Xiaowen Wu
* Monday, Feb. 14th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -4152,8 +4087,6 @@ error:
* Programmer: Xiaowen Wu
* Tuesday, March 15th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -4299,8 +4232,6 @@ error:
* Programmer: Xiaowen Wu
* Wednesday, Apr. 20th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -4431,8 +4362,6 @@ error:
* Programmer: Xiaowen Wu
* Wednesday, Apr. 20th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -4579,8 +4508,6 @@ error:
* Programmer: Xiaowen Wu
* Monday, Apr. 25th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -4711,8 +4638,6 @@ error:
* Programmer: Xiaowen Wu
* Monday, Apr. 25th, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -4862,8 +4787,6 @@ error:
* Programmer: Robb Matzke
* Tuesday, June 9, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -4928,8 +4851,6 @@ test_multiopen (hid_t file)
* Programmer: Robb Matzke
* Monday, June 7, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -6053,8 +5974,6 @@ error:
* Programmer: Pedro Vicente
* Monday, January 26, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -6182,8 +6101,6 @@ error:
* Programmer: Pedro Vicente
* Monday, March 8, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -6360,17 +6277,21 @@ error:
static herr_t
test_zero_dims(hid_t file)
{
- hid_t s=-1, d=-1, dcpl=-1;
- hsize_t dsize=0, dmax=H5S_UNLIMITED, csize=5;
+ hid_t s = -1, d = -1, dcpl = -1;
+ hsize_t dsize = 0, dmax = H5S_UNLIMITED, csize = 5;
herr_t ret;
TESTING("I/O on datasets with zero-sized dims");
+ /*
+ * One-dimensional dataset
+ */
if((s = H5Screate_simple(1, &dsize, &dmax)) < 0) FAIL_STACK_ERROR
- /* Try creating chunked dataset with zero-sized chunk dimensions */
+ /* Try creating chunked dataset with undefined chunk dimensions */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR
if(H5Pset_layout(dcpl, H5D_CHUNKED) < 0) FAIL_STACK_ERROR
+
H5E_BEGIN_TRY {
d = H5Dcreate2(file, ZERODIM_DATASET, H5T_NATIVE_INT, s, H5P_DEFAULT, dcpl, H5P_DEFAULT);
} H5E_END_TRY;
@@ -6379,6 +6300,7 @@ test_zero_dims(hid_t file)
FAIL_PUTS_ERROR("created dataset with undefined chunk dimensions")
} /* end if */
+ /* Try creating chunked dataset with zero-sized chunk dimensions */
H5E_BEGIN_TRY {
ret = H5Pset_chunk(dcpl, 1, &dsize);
} H5E_END_TRY;
@@ -6387,15 +6309,16 @@ test_zero_dims(hid_t file)
if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ /* Create the zero-sized extendible dataset */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR
if(H5Pset_chunk(dcpl, 1, &csize) < 0) FAIL_STACK_ERROR
if((d = H5Dcreate2(file, ZERODIM_DATASET, H5T_NATIVE_INT, s, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ /* Just a no-op */
if(H5Dwrite(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, (void*)911) < 0) FAIL_STACK_ERROR
if(H5Dclose(d) < 0) FAIL_STACK_ERROR
if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
-
if(H5Sclose(s) < 0) FAIL_STACK_ERROR
PASSED();
@@ -6424,29 +6347,28 @@ error:
* Programmer: Quincey Koziol
* Tuesday, August 25, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
test_missing_chunk(hid_t file)
{
- hid_t s=-1, d=-1, dcpl=-1;
+ hid_t s = -1, d = -1, dcpl = -1;
hsize_t hs_start[1];
hsize_t hs_stride[1],
hs_count[1],
hs_block[1];
int wdata[MISSING_CHUNK_DIM],
rdata[MISSING_CHUNK_DIM];
- hsize_t dsize=100, dmax=H5S_UNLIMITED, csize=5;
+ hsize_t dsize=100, dmax=H5S_UNLIMITED;
+ hsize_t csize=5;
size_t u;
TESTING("Read dataset with unwritten chunk & undefined fill value");
- /* Initialize data */
- for(u=0; u<MISSING_CHUNK_DIM; u++) {
- wdata[u]=(int)u;
- rdata[u]=911;
+ /* Initialize data for 1-D dataset */
+ for(u = 0; u < MISSING_CHUNK_DIM; u++) {
+ wdata[u] = (int)u;
+ rdata[u] = 911;
} /* end for */
/* Create dataspace */
@@ -6464,7 +6386,7 @@ test_missing_chunk(hid_t file)
/* Create dataset */
if((d = H5Dcreate2(file, MISSING_CHUNK_DATASET, H5T_NATIVE_INT, s, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) TEST_ERROR;
- /* Select elements in every other chunk */
+ /* Select elements in every other chunk for 1-D dataset */
hs_start[0]=0;
hs_stride[0]=10;
hs_count[0]=10;
@@ -6526,8 +6448,6 @@ error:
* Programmer: Christian Chilan
* Monday, March 26, 2007
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -6553,7 +6473,7 @@ test_random_chunks(hid_t fapl)
h5_fixname(FILENAME[6], fapl, filename, sizeof filename);
/* Create file for first test */
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR;
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR;
/* Create dataspace */
if((s = H5Screate_simple(2, dsize, NULL)) < 0) TEST_ERROR;
@@ -6604,7 +6524,7 @@ test_random_chunks(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR;
/* Open file again */
- if((file = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) TEST_ERROR;
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR;
/* Open dataset */
if((d = H5Dopen2(file, dname, H5P_DEFAULT)) < 0) TEST_ERROR;
@@ -6637,7 +6557,7 @@ test_random_chunks(hid_t fapl)
/* Create file for second test */
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR;
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR;
/* Create dataspace with unlimited maximum dimensions */
if((s = H5Screate_simple(2, dsize, dmax)) < 0) TEST_ERROR;
@@ -6694,7 +6614,7 @@ test_random_chunks(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR;
/* Open file again */
- if((file = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) TEST_ERROR;
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR;
/* Open dataset */
if((d = H5Dopen2(file, dname, H5P_DEFAULT)) < 0) TEST_ERROR;
@@ -7339,7 +7259,7 @@ test_big_chunks_bypass_cache(hid_t fapl)
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET) < 0) FAIL_STACK_ERROR
if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_INCR) < 0) FAIL_STACK_ERROR
- /* Create a first dataset */
+ /* Create the first 1-D dataset */
if((dsid = H5Dcreate2(fid, BYPASS_DATASET1, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
@@ -7850,8 +7770,6 @@ error:
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
diff --git a/test/error_test.c b/test/error_test.c
index 9424957..52dcc0c 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -515,7 +515,6 @@ error:
return(-1);
} /* end test_create() */
-
/*-------------------------------------------------------------------------
* Function: test_copy
*
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index 1988894..6d5c2af 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -146,7 +146,7 @@ main(int argc, char *argv[])
{
hid_t fid, fapl, dxpl;
H5F_t *f;
- haddr_t addr = 0, extra = 0, extra2 = 0, extra3 = 0;
+ haddr_t addr = 1, extra = 0, extra2 = 0, extra3 = 0, extra4 = 0;
uint8_t sig[H5F_SIGNATURE_LEN];
size_t u;
herr_t status = SUCCEED;
@@ -195,6 +195,8 @@ main(int argc, char *argv[])
extra2 = HDstrtoll(argv[4], NULL, 0);
if(argc > 5)
extra3 = HDstrtoll(argv[5], NULL, 0);
+ if(argc > 6)
+ extra4 = (haddr_t)HDstrtoll(argv[6], NULL, 0);
/*
* Read the signature at the specified file position.
@@ -281,7 +283,8 @@ main(int argc, char *argv[])
*/
const H5B2_class_t *cls = get_H5B2_class(sig);
HDassert(cls);
- status = H5B2_hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls);
+
+ status = H5B2_hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, (haddr_t)extra);
} else if(!HDmemcmp(sig, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
@@ -299,7 +302,7 @@ main(int argc, char *argv[])
HDexit(4);
} /* end if */
- status = H5B2_int_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (unsigned)extra2, (unsigned)extra3);
+ status = H5B2_int_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (unsigned)extra2, (unsigned)extra3, (haddr_t)extra4);
} else if(!HDmemcmp(sig, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
@@ -316,7 +319,7 @@ main(int argc, char *argv[])
HDexit(4);
} /* end if */
- status = H5B2_leaf_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (unsigned)extra2);
+ status = H5B2_leaf_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (unsigned)extra2, (haddr_t)extra3);
} else if(!HDmemcmp(sig, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*