summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-04-10 23:00:48 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-04-10 23:00:48 (GMT)
commit6a27582a4488d4d18a0b6cd584b8950ab02b81a7 (patch)
tree01615f7679a3d3ef4b2d9caa487874aa421df506 /tools/h5dump
parent7a4b02567e4de16d7478c10ffa07562b0daf320b (diff)
parent3875cc6960266775e8078c782c8864516865be67 (diff)
downloadhdf5-6a27582a4488d4d18a0b6cd584b8950ab02b81a7.zip
hdf5-6a27582a4488d4d18a0b6cd584b8950ab02b81a7.tar.gz
hdf5-6a27582a4488d4d18a0b6cd584b8950ab02b81a7.tar.bz2
[svn-r26781] Merge revisions 26305 through 26780 from trunk to vds branch.
Tested: ummon
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/CMakeLists.txt6
-rw-r--r--tools/h5dump/CMakeTests.cmake20
-rw-r--r--tools/h5dump/CMakeTestsXML.cmake8
-rw-r--r--tools/h5dump/Makefile.in10
-rw-r--r--tools/h5dump/binread.c66
-rw-r--r--tools/h5dump/errfiles/tarray1_big.err54
-rw-r--r--tools/h5dump/errfiles/tattrregR.err36
-rw-r--r--tools/h5dump/errfiles/tdataregR.err36
-rw-r--r--tools/h5dump/h5dump_xml.c2
-rw-r--r--tools/h5dump/h5dumpgentest.c92
-rw-r--r--tools/h5dump/testh5dump.sh.in23
-rw-r--r--tools/h5dump/testh5dumppbits.sh.in4
-rw-r--r--tools/h5dump/testh5dumpxml.sh.in12
13 files changed, 116 insertions, 253 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 4559ae3..7658c04 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -15,7 +15,7 @@ add_executable (h5dump
${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c
)
TARGET_NAMING (h5dump ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5dump " " " ")
+TARGET_C_PROPERTIES (h5dump ${LIB_TYPE} " " " ")
target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5dump PROPERTIES FOLDER tools)
@@ -27,8 +27,8 @@ if (BUILD_TESTING)
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
add_executable (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
- TARGET_NAMING (h5dumpgentest ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5dumpgentest " " " ")
+ TARGET_NAMING (h5dumpgentest STATIC)
+ TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ")
target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools)
diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake
index afb482e..00ec760 100644
--- a/tools/h5dump/CMakeTests.cmake
+++ b/tools/h5dump/CMakeTests.cmake
@@ -1340,30 +1340,14 @@
set (USE_FILTER_SZIP "true")
endif (H5_HAVE_FILTER_SZIP)
- if (H5_HAVE_FILTER_SHUFFLE)
- set (USE_FILTER_SHUFFLE "true")
- endif (H5_HAVE_FILTER_SHUFFLE)
-
- if (H5_HAVE_FILTER_FLETCHER32)
- set (USE_FILTER_FLETCHER32 "true")
- endif (H5_HAVE_FILTER_FLETCHER32)
-
- if (H5_HAVE_FILTER_NBIT)
- set (USE_FILTER_NBIT "true")
- endif (H5_HAVE_FILTER_NBIT)
-
- if (H5_HAVE_FILTER_SCALEOFFSET)
- set (USE_FILTER_SCALEOFFSET "true")
- endif (H5_HAVE_FILTER_SCALEOFFSET)
-
- if (USE_FILTER_DEFLATE AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET)
+ if (USE_FILTER_DEFLATE)
# data read internal filters
ADD_H5_TEST (treadintfilter 0 --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5)
if (HDF5_ENABLE_SZIP_SUPPORT)
# data read all filters
ADD_H5_TEST (treadfilter 0 --enable-error-stack -d all -d szip tfilters.h5)
endif (HDF5_ENABLE_SZIP_SUPPORT)
- endif (USE_FILTER_DEFLATE AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET)
+ endif (USE_FILTER_DEFLATE)
# test for displaying objects with very long names
ADD_H5_TEST (tlonglinks 0 --enable-error-stack tlonglinks.h5)
diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake
index a939d78..0a667c4 100644
--- a/tools/h5dump/CMakeTestsXML.cmake
+++ b/tools/h5dump/CMakeTestsXML.cmake
@@ -411,14 +411,6 @@
ADD_XML_H5_TEST (tempty-dtd.h5 0 --use-dtd tempty.h5)
ADD_XML_H5_TEST (tempty-dtd-2.h5 0 -u tempty.h5)
- # The lone colon here confuses some systems (Cray X1). Skip
- # it if configure detects that this is a problem.
- set (TESTTYPE "TEST")
- if (NOT ${H5_LONE_COLON})
- set (TESTTYPE "SKIP")
- endif (NOT ${H5_LONE_COLON})
- ADD_XML_SKIP_H5_TEST (tempty-nons.h5 0 ${TESTTYPE} -X : tempty.h5)
-
ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5)
## Some of these combinations are syntactically correct but
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index fb8cc9b..7371adf 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -420,7 +420,6 @@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
-AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -452,7 +451,6 @@ DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
-DYNAMIC_DIRS = @DYNAMIC_DIRS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -471,17 +469,14 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
-H5_CXX_SHARED = @H5_CXX_SHARED@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
-H5_LONE_COLON = @H5_LONE_COLON@
H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
@@ -544,7 +539,6 @@ R_INTEGER = @R_INTEGER@
R_LARGE = @R_LARGE@
SEARCH = @SEARCH@
SED = @SED@
-SETX = @SETX@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIZE_T = @SIZE_T@
@@ -559,10 +553,6 @@ TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
-USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
-USE_FILTER_NBIT = @USE_FILTER_NBIT@
-USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@
-USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
VERSION = @VERSION@
diff --git a/tools/h5dump/binread.c b/tools/h5dump/binread.c
index 5abb9af..74db92c 100644
--- a/tools/h5dump/binread.c
+++ b/tools/h5dump/binread.c
@@ -49,8 +49,7 @@
static void
usage (void)
{
- fprintf(stderr, "\
- usage: binread FILE_NAME\n");
+ fprintf(stderr, "usage: binread FILE_NAME\n");
}
/*-------------------------------------------------------------------------
@@ -64,38 +63,35 @@ usage (void)
int
main (int argc, const char *argv[])
{
- FILE *stream;
- int numread;
- TYPE buf[NELMTS];
- size_t i, nelmts = NELMTS;
- char *fname=NULL;
-
- if (argc != 2)
- {
- usage();
- exit(1);
- }
-
- fname = strdup(argv[1]);
-
- if( (stream = fopen(fname, "rb" )) != NULL )
- {
- numread = fread( buf, sizeof( TYPE ), nelmts, stream );
- printf( "Number of items read = %d\n", numread );
-
- for (i = 0; i < nelmts; i++)
- {
- printf(FORMAT,buf[i]);
- }
- printf("\n");
-
- fclose( stream );
- }
- else
- printf( "File %s could not be opened\n",fname );
-
- free(fname);
-
- return 0;
+ FILE *stream;
+ size_t numread;
+ TYPE buf[NELMTS];
+ size_t i, nelmts = NELMTS;
+ char *fname=NULL;
+
+ if (argc != 2) {
+ usage();
+ exit(1);
+ }
+
+ fname = strdup(argv[1]);
+
+ if((stream = fopen(fname, "rb")) != NULL) {
+ numread = fread(buf, sizeof( TYPE ), nelmts, stream);
+ printf("Number of items read = %llu\n", (unsigned long long)numread);
+
+ for (i = 0; i < nelmts; i++) {
+ printf(FORMAT,buf[i]);
+ }
+ printf("\n");
+
+ fclose(stream);
+ }
+ else
+ printf("File %s could not be opened\n", fname);
+
+ free(fname);
+
+ return 0;
}
diff --git a/tools/h5dump/errfiles/tarray1_big.err b/tools/h5dump/errfiles/tarray1_big.err
index 457afdd..7a0fd7b 100644
--- a/tools/h5dump/errfiles/tarray1_big.err
+++ b/tools/h5dump/errfiles/tarray1_big.err
@@ -2,59 +2,23 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Rdereference2(): unable to dereference object
major: References
minor: Unable to initialize object
- #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
- major: References
- minor: Read failed
- #002: (file name) line (number) in H5HG_read(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
- major: Object cache
- minor: Unable to protect metadata
- #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
- major: Object cache
- minor: Inappropriate type
+ #001: (file name) line (number) in H5R_dereference(): Undefined reference pointer
+ major: Invalid arguments to routine
+ minor: Bad value
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Rdereference2(): unable to dereference object
major: References
minor: Unable to initialize object
- #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
- major: References
- minor: Read failed
- #002: (file name) line (number) in H5HG_read(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
- major: Object cache
- minor: Unable to protect metadata
- #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
- major: Object cache
- minor: Inappropriate type
+ #001: (file name) line (number) in H5R_dereference(): Undefined reference pointer
+ major: Invalid arguments to routine
+ minor: Bad value
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Rdereference2(): unable to dereference object
major: References
minor: Unable to initialize object
- #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
- major: References
- minor: Read failed
- #002: (file name) line (number) in H5HG_read(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
- major: Object cache
- minor: Unable to protect metadata
- #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
- major: Object cache
- minor: Inappropriate type
+ #001: (file name) line (number) in H5R_dereference(): Undefined reference pointer
+ major: Invalid arguments to routine
+ minor: Bad value
H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
#000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
major: Failure in tools library
diff --git a/tools/h5dump/errfiles/tattrregR.err b/tools/h5dump/errfiles/tattrregR.err
index 7ab9afd..9449a6d 100644
--- a/tools/h5dump/errfiles/tattrregR.err
+++ b/tools/h5dump/errfiles/tattrregR.err
@@ -2,40 +2,16 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Rdereference2(): unable to dereference object
major: References
minor: Unable to initialize object
- #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
- major: References
- minor: Read failed
- #002: (file name) line (number) in H5HG_read(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
- major: Object cache
- minor: Unable to protect metadata
- #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
- major: Object cache
- minor: Inappropriate type
+ #001: (file name) line (number) in H5R_dereference(): Undefined reference pointer
+ major: Invalid arguments to routine
+ minor: Bad value
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Rdereference2(): unable to dereference object
major: References
minor: Unable to initialize object
- #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
- major: References
- minor: Read failed
- #002: (file name) line (number) in H5HG_read(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
- major: Object cache
- minor: Unable to protect metadata
- #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
- major: Object cache
- minor: Inappropriate type
+ #001: (file name) line (number) in H5R_dereference(): Undefined reference pointer
+ major: Invalid arguments to routine
+ minor: Bad value
H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
#000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
major: Failure in tools library
diff --git a/tools/h5dump/errfiles/tdataregR.err b/tools/h5dump/errfiles/tdataregR.err
index 7ab9afd..9449a6d 100644
--- a/tools/h5dump/errfiles/tdataregR.err
+++ b/tools/h5dump/errfiles/tdataregR.err
@@ -2,40 +2,16 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Rdereference2(): unable to dereference object
major: References
minor: Unable to initialize object
- #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
- major: References
- minor: Read failed
- #002: (file name) line (number) in H5HG_read(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
- major: Object cache
- minor: Unable to protect metadata
- #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
- major: Object cache
- minor: Inappropriate type
+ #001: (file name) line (number) in H5R_dereference(): Undefined reference pointer
+ major: Invalid arguments to routine
+ minor: Bad value
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Rdereference2(): unable to dereference object
major: References
minor: Unable to initialize object
- #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
- major: References
- minor: Read failed
- #002: (file name) line (number) in H5HG_read(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
- major: Heap
- minor: Unable to protect metadata
- #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
- major: Object cache
- minor: Unable to protect metadata
- #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
- major: Object cache
- minor: Inappropriate type
+ #001: (file name) line (number) in H5R_dereference(): Undefined reference pointer
+ major: Invalid arguments to routine
+ minor: Bad value
H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
#000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
major: Failure in tools library
diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c
index 64667cb..6ccbc8c 100644
--- a/tools/h5dump/h5dump_xml.c
+++ b/tools/h5dump/h5dump_xml.c
@@ -3563,7 +3563,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
/* Render the element */
h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "\"%f\"", *(float *) buf);
+ h5tools_str_append(&buffer, "\"%f\"", (double)*(float *)buf);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.need_prefix = TRUE;
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 82273a3..c04afe9 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -429,7 +429,7 @@ gent_dataset(void)
for(i = 0; i < 30; i++)
for(j = 0; j < 20; j++)
- dset2[i][j] = 0.0001 * j + i;
+ dset2[i][j] = 0.0001F * j + i;
H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
@@ -524,7 +524,7 @@ gent_attribute(void)
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(root, "attr3", H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT);
- for(i = 0; i < 10; i++) d[i] = 0.1 * i;
+ for(i = 0; i < 10; i++) d[i] = 0.1F * i;
H5Awrite(attr, H5T_NATIVE_DOUBLE, d);
H5Sclose(space);
@@ -952,16 +952,16 @@ static void gent_compound_dt(void) { /* test compound data type */
for(i = 0; i < (int)sdim; i++) {
dset1[i].a = i;
dset1[i].b = (float)(i*i);
- dset1[i].c = (float)(1./(i+1));
+ dset1[i].c = (float)(1.0F/(i+1));
dset2[i].a = i;
- dset2[i].b = (float)(i+ i*0.1);
+ dset2[i].b = (float)(i+ i*0.1F);
dset4[i].a = i;
dset4[i].b = (float)(i+3);
dset5[i].a = i;
- dset5[i].b = (float)(i*0.1);
+ dset5[i].b = (float)(i*0.1F);
}
@@ -1137,16 +1137,16 @@ static void gent_compound_dt2(void) { /* test compound data type */
for(i = 0; i < (int)sdim; i++) {
dset1[i].a = i;
dset1[i].b = (float)(i*i);
- dset1[i].c = (float)(1./(i+1));
+ dset1[i].c = (float)(1.0F/(i+1));
dset2[i].a = i;
- dset2[i].b = (float)(i+ i*0.1);
+ dset2[i].b = (float)(i+ i*0.1F);
dset4[i].a = i;
- dset4[i].b = (float)(i*1.0);
+ dset4[i].b = (float)(i*1.0F);
dset5[i].a = i;
- dset5[i].b = (float)(i*1.0);
+ dset5[i].b = (float)(i*1.0F);
}
fid = H5Fcreate(FILE9, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1386,7 +1386,7 @@ static void gent_all(void)
space = H5Screate_simple(1, dims, NULL);
dataset = H5Dcreate2(group, "dset2.1", H5T_IEEE_F32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 10; i++)
- dset2_1[i] = (float)(i * 0.1 + 1);
+ dset2_1[i] = (float)(i * 0.1F + 1);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_1);
H5Sclose(space);
H5Dclose(dataset);
@@ -1397,7 +1397,7 @@ static void gent_all(void)
dataset = H5Dcreate2(group, "dset2.2", H5T_IEEE_F32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 3; i++)
for(j = 0; j < 5; j++)
- dset2_2[i][j] = (float)((i + 1) * j * 0.1);
+ dset2_2[i][j] = (float)((i + 1) * j * 0.1F);
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_2);
H5Sclose(space);
H5Dclose(dataset);
@@ -1565,7 +1565,7 @@ gent_many(void)
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr3", H5T_IEEE_F64BE, space2, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 10; i++)
- d[i] = 0.1 * i;
+ d[i] = 0.1F * i;
H5Awrite(attr, H5T_NATIVE_DOUBLE, d);
H5Sclose(space2);
H5Aclose(attr);
@@ -2378,10 +2378,10 @@ static void gent_nestcomp(void)
for(i = 0; i< 10; i++) {
s1[i].a = i;
s1[i].b = (float)(i*i);
- s1[i].c = 1./(i+1);
+ s1[i].c = 1.0F/(i+1);
s1[i].d.a = 65 + i;
- s1[i].d.b[0] = -100.;
- s1[i].d.b[1] = 100.;
+ s1[i].d.b[0] = -100.0F;
+ s1[i].d.b[1] = 100.0F;
}
/*
@@ -2582,7 +2582,7 @@ static void gent_vldatatypes(void)
wdata[i].len = i + 1;
for(j = 0; j < i + 1; j++)
- ((float *)wdata[i].p)[j] = (float)(i * 10 + ((float)j) / 10.0);
+ ((float *)wdata[i].p)[j] = (float)(i * 10 + ((float)j) / 10.0F);
}
/* write out the floats in little-endian format */
@@ -2716,7 +2716,7 @@ static void gent_vldatatypes3(void)
/* Allocate and initialize VL data to write */
for(i=0; i<SPACE1_DIM1; i++) {
wdata[i].i=i*10;
- wdata[i].f=(float)((i*20)/3.0);
+ wdata[i].f=(float)((i*20)/3.0F);
wdata[i].v.p=HDmalloc((i+1)*sizeof(unsigned int));
wdata[i].v.len=i+1;
for(j=0; j<(i+1); j++)
@@ -2788,7 +2788,7 @@ static void gent_vldatatypes4(void)
wdata[i].len=i+1;
for(j=0; j<(i+1); j++) {
((s1 *)wdata[i].p)[j].i=i*10+j;
- ((s1 *)wdata[i].p)[j].f=(float)((i*20+j)/3.0);
+ ((s1 *)wdata[i].p)[j].f=(float)((i*20+j)/3.0F);
} /* end for */
} /* end for */
@@ -3159,7 +3159,7 @@ static void gent_array4(void)
for(i=0; i<SPACE1_DIM1; i++)
for(j=0; j<ARRAY1_DIM1; j++) {
wdata[i][j].i=i*10+j;
- wdata[i][j].f=(float)(i*2.5+j);
+ wdata[i][j].f=(float)(i*2.5F+j);
} /* end for */
/* Create file */
@@ -3227,7 +3227,7 @@ static void gent_array5(void)
for(j=0; j<ARRAY1_DIM1; j++) {
wdata[i][j].i=i*10+j;
for(k=0; k<ARRAY1_DIM1; k++)
- wdata[i][j].f[k]=(float)(i*10+j*2.5+k);
+ wdata[i][j].f[k]=(float)(i*10+j*2.5F+k);
} /* end for */
/* Create file */
@@ -4933,10 +4933,10 @@ static void gent_compound_complex(void)
}
}
- Array1[m].e = (float)( m * .96 );
+ Array1[m].e = (float)( m * 0.96F );
for(n = 0; n < F41_ARRAY_DIMf; n++) {
- Array1[m].f[n] = ( m * 1024.9637 );
+ Array1[m].f[n] = ( m * 1024.9637F );
}
Array1[m].g = 'm';
@@ -5433,7 +5433,7 @@ static void gent_filters(void)
* shuffle
*-------------------------------------------------------------------------
*/
-#if defined (H5_HAVE_FILTER_SHUFFLE)
+
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
HDassert(ret >= 0);
@@ -5444,14 +5444,13 @@ static void gent_filters(void)
ret=make_dset(fid,"shuffle",sid,H5T_NATIVE_INT,dcpl,buf1);
HDassert(ret >= 0);
-#endif
/*-------------------------------------------------------------------------
* checksum
*-------------------------------------------------------------------------
*/
-#if defined (H5_HAVE_FILTER_FLETCHER32)
+
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
HDassert(ret >= 0);
@@ -5462,13 +5461,12 @@ static void gent_filters(void)
ret=make_dset(fid,"fletcher32",sid,H5T_NATIVE_INT,dcpl,buf1);
HDassert(ret >= 0);
-#endif
/*-------------------------------------------------------------------------
* nbit
*-------------------------------------------------------------------------
*/
-#if defined (H5_HAVE_FILTER_NBIT)
+
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
HDassert(ret >= 0);
@@ -5481,13 +5479,12 @@ static void gent_filters(void)
H5Tset_precision(tid,H5Tget_size(tid)-1);
ret=make_dset(fid,"nbit",sid,tid,dcpl,buf1);
HDassert(ret >= 0);
-#endif
/*-------------------------------------------------------------------------
* scaleoffset
*-------------------------------------------------------------------------
*/
-#if defined (H5_HAVE_FILTER_SCALEOFFSET)
+
/* remove the filters from the dcpl */
ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
HDassert(ret >= 0);
@@ -5498,7 +5495,6 @@ static void gent_filters(void)
ret=make_dset(fid,"scaleoffset",sid,H5T_NATIVE_INT,dcpl,buf1);
HDassert(ret >= 0);
-#endif
/*-------------------------------------------------------------------------
* all filters
@@ -5508,11 +5504,9 @@ static void gent_filters(void)
ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
HDassert(ret >= 0);
-#if defined (H5_HAVE_FILTER_SHUFFLE)
/* set the shuffle filter */
ret = H5Pset_shuffle(dcpl);
HDassert(ret >= 0);
-#endif
#ifdef H5_HAVE_FILTER_SZIP
if(h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
@@ -5529,17 +5523,13 @@ static void gent_filters(void)
HDassert(ret >= 0);
#endif
-#if defined (H5_HAVE_FILTER_FLETCHER32)
/* set the checksum filter */
ret = H5Pset_fletcher32(dcpl);
HDassert(ret >= 0);
-#endif
-#if defined (H5_HAVE_FILTER_NBIT)
/* set the nbit filter */
ret = H5Pset_nbit(dcpl);
HDassert(ret >= 0);
-#endif
ret=make_dset(fid,"all",sid,H5T_NATIVE_INT,dcpl,buf1);
HDassert(ret >= 0);
@@ -6883,7 +6873,7 @@ gent_fpformat(void)
{
hid_t fid, sid, did;
hsize_t dims[1] = {6};
- double dbuf[6] = {-0.1234567, 0.1234567, 0, 0, 0, 0};
+ double dbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0};
float fbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0};
fid = H5Fcreate(FILE60, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -7203,7 +7193,7 @@ gent_packedbits(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
@@ -7393,7 +7383,7 @@ gent_attr_intsize(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
H5Awrite(attr, H5T_NATIVE_DOUBLE, dsetdbl);
@@ -7601,7 +7591,7 @@ static void gent_compound_intsizes(void) {
for(n = 0; n < dims[0]; n++)
for(o = 0; o < dims[1]; o++)
- Array1[m].dsetdbl[n][o] = 0.0001 * o + n;
+ Array1[m].dsetdbl[n][o] = 0.0001F * o + n;
}
/* Create the array data type for the 8 bits signed int array */
@@ -7876,7 +7866,7 @@ static void gent_compound_attr_intsizes(void) {
for(n = 0; n < dims[0]; n++)
for(o = 0; o < dims[1]; o++)
- Array1[m].dsetdbl[n][o] = 0.0001 * o + n;
+ Array1[m].dsetdbl[n][o] = 0.0001F * o + n;
}
/* Create the array data type for the 8 bits signed int array */
@@ -8044,17 +8034,17 @@ static void gent_nested_compound_dt(void) { /* test nested data type */
dset1[i].b = (float)(i*i);
dset2[i].a = i;
- dset2[i].b = (float)(i+i*0.1);
+ dset2[i].b = (float)(i+i*0.1F);
dset2[i].c = GREEN;
for(j = 0; j < 5; j++) {
dset3[i].a[j] = i*j;
for(k = 0; k < 6; k++) {
- dset3[i].b[j][k] = (float)(i*j*k*1.0);
+ dset3[i].b[j][k] = (float)(i*j*k*1.0F);
}
}
dset3[i].c.a = i;
- dset3[i].c.b = (float)(i*1.0);
+ dset3[i].c.b = (float)(i*1.0F);
}
fid = H5Fcreate(FILE72, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -8342,7 +8332,7 @@ gent_intscalars(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
@@ -8541,7 +8531,7 @@ gent_attr_intscalars(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
H5Awrite(attr, tid, dsetdbl);
@@ -8727,7 +8717,7 @@ static void gent_compound_int_array(void) {
dims[0] = F76_DIM8;
for(n = 0; n < dims[0]; n++)
- Cmpd1[m].dsetdbl[n] = 0.0001 + n;
+ Cmpd1[m].dsetdbl[n] = 0.0001F + n;
}
/* Create the array data type for the 8 bits signed int array */
@@ -8958,8 +8948,8 @@ static void gent_compound_ints(void) {
val64bits <<= 1;
/* Double Dummy set for failure tests */
- Cmpd1[m].dsetdbl = 0.0001 + m;
- Cmpd2[m].dsetdbl = 0.0001 + m;
+ Cmpd1[m].dsetdbl = 0.0001F + m;
+ Cmpd2[m].dsetdbl = 0.0001F + m;
}
/* Create the dataspace */
@@ -9296,7 +9286,7 @@ gent_intattrscalars(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
/* Attribute of double */
@@ -9561,7 +9551,7 @@ gent_intsattrs(void)
for(i = 0; i < dims[0]; i++)
for(j = 0; j < dims[1]; j++) {
- dsetdbl[i][j] = 0.0001 * j + i;
+ dsetdbl[i][j] = 0.0001F * j + i;
asetdbl[i*dims[1]+j] = dsetdbl[i][j];
}
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 0c72a8d..95f8091 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -19,10 +19,6 @@ srcdir=@srcdir@
USE_FILTER_SZIP="@USE_FILTER_SZIP@"
USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
-USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@"
-USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@"
-USE_FILTER_NBIT="@USE_FILTER_NBIT@"
-USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@"
TESTNAME=h5dump
EXIT_SUCCESS=0
@@ -440,8 +436,21 @@ TESTING() {
# the actual output file is calculated by replacing the `.ddl' with
# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a
# non-zero value.
+# If $1 == ignorecase then do caseless CMP and DIFF.
# ADD_H5_TEST
TOOLTEST() {
+ # check if caseless compare and diff requested
+ if [ "$1" = ignorecase ]; then
+ caseless="-i"
+ # replace cmp with diff which runs much longer.
+ xCMP="$DIFF -i"
+ shift
+ else
+ caseless=""
+ # stick with faster cmp if ignorecase is not requested.
+ xCMP="$CMP"
+ fi
+
expect="$TESTDIR/$1"
actual="$TESTDIR/`basename $1 .ddl`.out"
actual_err="$TESTDIR/`basename $1 .ddl`.err"
@@ -467,13 +476,13 @@ TOOLTEST() {
# Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
- elif $CMP $expect $actual; then
+ elif $xCMP $expect $actual > /dev/null 2>&1 ; then
echo " PASSED"
else
echo "*FAILED*"
echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
fi
# Clean up output file
@@ -1184,7 +1193,7 @@ TOOLTEST tallfilters.ddl --enable-error-stack -H -p -d all tfilters.h5
# user defined
TOOLTEST tuserfilter.ddl --enable-error-stack -H -p -d myfilter tfilters.h5
-if test $USE_FILTER_DEFLATE = "yes" -a $USE_FILTER_SHUFFLE = "yes" -a $USE_FILTER_FLETCHER32 = "yes" -a $USE_FILTER_NBIT = "yes" -a $USE_FILTER_SCALEOFFSET = "yes" ; then
+if test $USE_FILTER_DEFLATE = "yes" ; then
# data read internal filters
TOOLTEST treadintfilter.ddl --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5
if test $USE_FILTER_SZIP = "yes"; then
diff --git a/tools/h5dump/testh5dumppbits.sh.in b/tools/h5dump/testh5dumppbits.sh.in
index 0f6503d..6556ff5 100644
--- a/tools/h5dump/testh5dumppbits.sh.in
+++ b/tools/h5dump/testh5dumppbits.sh.in
@@ -20,10 +20,6 @@ srcdir=@srcdir@
# Determine which filters are available
USE_FILTER_SZIP="@USE_FILTER_SZIP@"
USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
-USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@"
-USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@"
-USE_FILTER_NBIT="@USE_FILTER_NBIT@"
-USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@"
TESTNAME=h5dump
EXIT_SUCCESS=0
diff --git a/tools/h5dump/testh5dumpxml.sh.in b/tools/h5dump/testh5dumpxml.sh.in
index 4dad9cd..1efde85 100644
--- a/tools/h5dump/testh5dumpxml.sh.in
+++ b/tools/h5dump/testh5dumpxml.sh.in
@@ -21,8 +21,6 @@ TESTNAME=h5dumpxml
EXIT_SUCCESS=0
EXIT_FAILURE=1
-H5_LONE_COLON="@H5_LONE_COLON@"
-
DUMPER=h5dump # The tool name
DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary
@@ -356,15 +354,7 @@ TOOLTEST tnamed_dtype_attr.h5.xml --xml tnamed_dtype_attr.h5
TOOLTEST tempty-dtd.h5.xml --xml --use-dtd tempty.h5
TOOLTEST tempty-dtd-2.h5.xml --xml -u tempty.h5
-
-# The lone colon here confuses some systems (Cray X1). Skip
-# it if configure detects that this is a problem.
-if test "X$H5_LONE_COLON" != "Xno"; then
- TOOLTEST tempty-nons.h5.xml --xml -X ":" tempty.h5
-else
- SKIP tempty-nons.h5.xml --xml -X ":" tempty.h5
-fi
-
+TOOLTEST tempty-nons.h5.xml --xml -X ":" tempty.h5
TOOLTEST tempty-nons-2.h5.xml --xml --xml-ns=":" tempty.h5
## Some of these combinations are syntactically correct but