summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-04-21 02:52:07 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-04-21 02:52:07 (GMT)
commit3f36df51d845a93e94fff264fa22ad60a71db754 (patch)
tree0183dbf4cf0e6fa3020c51c019c09023a5e48a99
parent76d509dd6f454de8b01d0116dc73e56ea5949aa8 (diff)
downloadhdf5-3f36df51d845a93e94fff264fa22ad60a71db754.zip
hdf5-3f36df51d845a93e94fff264fa22ad60a71db754.tar.gz
hdf5-3f36df51d845a93e94fff264fa22ad60a71db754.tar.bz2
[svn-r26859] Bring revisions #26324 - #26843 from trunk to revise_chunks.
h5committested.
-rw-r--r--CMakeFilters.cmake5
-rw-r--r--CMakeInstallation.cmake12
-rw-r--r--MANIFEST2
-rw-r--r--Makefile.in5
-rwxr-xr-xbin/chkmanifest9
-rwxr-xr-xbin/genltanalyze31
-rwxr-xr-xbin/h5vers14
-rw-r--r--c++/Makefile.in5
-rw-r--r--c++/examples/Makefile.in5
-rw-r--r--c++/src/Makefile.in5
-rw-r--r--c++/test/Makefile.in5
-rw-r--r--config/cmake/ConfigureChecks.cmake10
-rw-r--r--config/cmake/ConversionTests.c118
-rw-r--r--config/cmake/H5pubconf.h.in12
-rw-r--r--config/cmake/patch.xml11
-rwxr-xr-xconfigure105
-rw-r--r--configure.ac90
-rw-r--r--examples/Makefile.in5
-rw-r--r--fortran/Makefile.in5
-rw-r--r--fortran/examples/Makefile.in5
-rw-r--r--fortran/src/H5Af.c6
-rw-r--r--fortran/src/H5Df.c26
-rw-r--r--fortran/src/H5Gf.c37
-rw-r--r--fortran/src/H5Rf.c4
-rw-r--r--fortran/src/Makefile.in5
-rw-r--r--fortran/test/Makefile.in5
-rw-r--r--fortran/testpar/Makefile.in5
-rw-r--r--hl/Makefile.in5
-rw-r--r--hl/c++/Makefile.in5
-rw-r--r--hl/c++/examples/Makefile.in5
-rw-r--r--hl/c++/src/Makefile.in5
-rw-r--r--hl/c++/test/Makefile.in5
-rw-r--r--hl/examples/Makefile.in5
-rw-r--r--hl/fortran/Makefile.in5
-rw-r--r--hl/fortran/examples/Makefile.in5
-rw-r--r--hl/fortran/src/Makefile.in5
-rw-r--r--hl/fortran/test/Makefile.in5
-rw-r--r--hl/src/H5LTanalyze.c19
-rw-r--r--hl/src/H5LTparse.c19
-rw-r--r--hl/src/Makefile.in5
-rw-r--r--hl/test/Makefile.in5
-rw-r--r--hl/test/test_dset_opt.c2
-rw-r--r--hl/test/test_packet.c16
-rw-r--r--hl/test/test_table.c38
-rw-r--r--hl/tools/Makefile.in5
-rw-r--r--hl/tools/gif2h5/Makefile.in5
-rw-r--r--hl/tools/gif2h5/gif.h2
-rw-r--r--hl/tools/gif2h5/gif2hdf.c2
-rw-r--r--hl/tools/gif2h5/gif2mem.c20
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/H5.c89
-rw-r--r--src/H5HG.c7
-rw-r--r--src/H5HGpkg.h6
-rw-r--r--src/H5MFaggr.c2
-rw-r--r--src/H5MM.c104
-rw-r--r--src/H5MMprivate.h6
-rw-r--r--src/H5Oalloc.c2
-rw-r--r--src/H5PL.c83
-rw-r--r--src/H5PLextern.h12
-rw-r--r--src/H5PLprivate.h15
-rw-r--r--src/H5PLpublic.h53
-rw-r--r--src/H5R.c13
-rw-r--r--src/H5Z.c33
-rw-r--r--src/H5Zfletcher32.c7
-rw-r--r--src/H5Znbit.c4
-rw-r--r--src/H5Zpkg.h55
-rw-r--r--src/H5Zscaleoffset.c3
-rw-r--r--src/H5Zshuffle.c3
-rw-r--r--src/H5config.h.in12
-rw-r--r--src/H5detect.c41
-rw-r--r--src/H5private.h42
-rw-r--r--src/H5public.h2
-rw-r--r--src/H5timer.c89
-rw-r--r--src/H5trace.c14
-rw-r--r--src/Makefile.am2
-rw-r--r--src/Makefile.in7
-rw-r--r--src/hdf5.h3
-rw-r--r--src/libhdf5.settings.in1
-rw-r--r--test/Makefile.in5
-rw-r--r--test/cache.c7
-rw-r--r--test/cache_api.c8
-rw-r--r--test/cache_common.c4
-rw-r--r--test/cross_read.c98
-rw-r--r--test/dsets.c450
-rw-r--r--test/dt_arith.c4
-rw-r--r--test/dtransform.c2
-rw-r--r--test/fheap.c8
-rw-r--r--test/fillval.c8
-rw-r--r--test/flush2.c14
-rw-r--r--test/gen_cross.c84
-rw-r--r--test/gen_filters.c4
-rw-r--r--test/hyperslab.c6
-rw-r--r--test/links.c2
-rw-r--r--test/mtime.c2
-rw-r--r--test/objcopy.c20
-rw-r--r--test/plugin.c93
-rw-r--r--test/set_extent.c4
-rw-r--r--test/tarray.c10
-rw-r--r--test/tattr.c20
-rw-r--r--test/testhdf5.h12
-rw-r--r--test/tfile.c4
-rw-r--r--test/tgenprop.c4
-rw-r--r--test/th5s.c6
-rw-r--r--test/tmisc.c92
-rw-r--r--test/trefer.c75
-rw-r--r--test/tsohm.c4
-rw-r--r--test/tunicode.c4
-rw-r--r--test/tvltypes.c16
-rw-r--r--testpar/Makefile.in5
-rw-r--r--testpar/t_dset.c30
-rw-r--r--testpar/t_filter_read.c11
-rw-r--r--tools/Makefile.in5
-rw-r--r--tools/h5copy/Makefile.in5
-rw-r--r--tools/h5diff/Makefile.in5
-rw-r--r--tools/h5diff/h5diffgentest.c160
-rw-r--r--tools/h5dump/Makefile.in5
-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/h5dumpgentest.c92
-rw-r--r--tools/h5dump/testh5dump.sh.in6
-rw-r--r--tools/h5dump/testh5dumppbits.sh.in4
-rw-r--r--tools/h5import/Makefile.in5
-rw-r--r--tools/h5import/h5importtest.c12
-rw-r--r--tools/h5jam/Makefile.in5
-rw-r--r--tools/h5jam/h5jamgentest.c4
-rw-r--r--tools/h5jam/testh5jam.sh.in2
-rw-r--r--tools/h5ls/Makefile.in5
-rw-r--r--tools/h5repack/Makefile.in5
-rw-r--r--tools/h5repack/h5repack.sh.in94
-rw-r--r--tools/h5repack/h5repacktst.c107
-rw-r--r--tools/h5stat/Makefile.in5
-rw-r--r--tools/h5stat/testh5stat.sh.in4
-rw-r--r--tools/lib/Makefile.in5
-rw-r--r--tools/lib/h5tools_filters.c32
-rw-r--r--tools/lib/h5trav.c16
-rw-r--r--tools/lib/io_timer.c2
-rw-r--r--tools/misc/Makefile.in5
-rw-r--r--tools/perform/Makefile.in5
-rw-r--r--tools/perform/chunk.c16
-rw-r--r--tools/perform/iopipe.c18
-rw-r--r--tools/perform/overhead.c2
-rw-r--r--tools/perform/sio_perf.c20
-rw-r--r--tools/perform/zip_perf.c8
144 files changed, 1430 insertions, 1917 deletions
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index 3b9b4f7..bd39dd3 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -11,11 +11,6 @@ MACRO (HDF5_SETUP_FILTERS FILTER)
# message (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}")
ENDMACRO (HDF5_SETUP_FILTERS)
-HDF5_SETUP_FILTERS (SHUFFLE)
-HDF5_SETUP_FILTERS (FLETCHER32)
-HDF5_SETUP_FILTERS (NBIT)
-HDF5_SETUP_FILTERS (SCALEOFFSET)
-
include (ExternalProject)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)")
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index f5c2dda..1df5311 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -363,6 +363,8 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set(CPACK_WIX_PROPERTY_ARPCOMMENTS "HDF5 (Hierarchical Data Format 5) Software Library and Utilities")
set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT "${HDF5_PACKAGE_URL}")
set(CPACK_WIX_PROPERTY_ARPHELPLINK "${HDF5_PACKAGE_BUGREPORT}")
+
+ set(CPACK_WIX_PATCH_FILE "${HDF_RESOURCES_DIR}/patch.xml")
elseif (APPLE)
list (APPEND CPACK_GENERATOR "DragNDrop")
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
@@ -455,14 +457,10 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
if (HDF5_PACKAGE_EXTLIBS)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/")
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;ALL;/")
endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/")
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/")
endif (SZIP_FOUND AND SZIP_USE_EXTERNAL)
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
endif (HDF5_PACKAGE_EXTLIBS)
@@ -474,6 +472,8 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
cpack_add_component_group(Runtime)
+ cpack_add_component_group(Documents)
+
cpack_add_component_group(Development
EXPANDED
DESCRIPTION "All of the tools you'll need to develop HDF5 applications"
diff --git a/MANIFEST b/MANIFEST
index 0d11c5c..70394e7 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -860,6 +860,7 @@
./src/H5Ptest.c
./src/H5PL.c
./src/H5PLprivate.h
+./src/H5PLpublic.h
./src/H5PLextern.h
./src/H5R.c
./src/H5Rdeprec.c
@@ -2509,6 +2510,7 @@
./config/cmake/HDF5Macros.cmake
./config/cmake/libhdf5.settings.cmake.in
./config/cmake/mccacheinit.cmake
+./config/cmake/patch.xml
./config/cmake/PkgInfo.in
./config/cmake/README.txt.cmake.in
./config/cmake/userblockTest.cmake
diff --git a/Makefile.in b/Makefile.in
index 9c1d71e..1b6b590 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -296,7 +296,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -384,10 +383,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/bin/chkmanifest b/bin/chkmanifest
index 6188eab..8abd8ea 100755
--- a/bin/chkmanifest
+++ b/bin/chkmanifest
@@ -86,15 +86,18 @@ for file in $svn_stat; do
# The line listing them starts with 'A'.
letter="$(echo $file | head -c 1)"
if [ "$letter" = "A" ]; then
- # Convert 'A ' to './' so it matches
+ # Convert the seven Subversion status columns to './' so it matches
# the manifest file name.
- path=`echo $file | sed 's/^A\s*/\.\//g'`
+ #
+ # There is a space between the status columns and file name, hence
+ # the '8' instead of '7'.
+ path=`echo $file | sed 's/^.\{8\}/\.\//g'`
# Ignore directories
if [ ! -d $path ]; then
if (grep ^$path$ $MANIFEST >/dev/null); then
:
else
- echo "+ $path"
+ echo "- $path"
fail=yes
fi
fi
diff --git a/bin/genltanalyze b/bin/genltanalyze
index 0b1b1e5..1f56cc1 100755
--- a/bin/genltanalyze
+++ b/bin/genltanalyze
@@ -60,6 +60,37 @@ flex --nounistd -PH5LTyy -oH5LTanalyze.c H5LTanalyze.l
# H5LTparse.c.
perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' H5LTparse.c
perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' H5LTparse.c
+
+# Add code that disables warnings in the flex/bison-generated code.
+#
+# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions
+# will simply ignore them, but we want to avoid those warnings.
+for f in H5LTparse.c H5LTanalyze.c
+do
+ echo '#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2 ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wmissing-prototypes" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wnested-externs" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wold-style-definition" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wsign-compare" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out
+ echo '#pragma GCC diagnostic ignored "-Wunused-parameter" ' >> tmp.out
+ echo '#elif defined __SUNPRO_CC ' >> tmp.out
+ echo '#pragma disable_warn ' >> tmp.out
+ echo '#elif defined _MSC_VER ' >> tmp.out
+ echo '#pragma warning(push, 1) ' >> tmp.out
+ echo '#endif ' >> tmp.out
+
+ cat $f >> tmp.out
+ mv tmp.out $f
+done
+
cd ../..
exit 0
diff --git a/bin/h5vers b/bin/h5vers
index 475ff5a..cb4b9e0 100755
--- a/bin/h5vers
+++ b/bin/h5vers
@@ -159,10 +159,10 @@ while ($_ = shift) {
die "mutually exclusive options given\n" if $set && $inc;
# Determine file to use as H5public.h, README.txt,
-# release_docs/RELEASE.txt, configure.ac, windows/src/H5pubconf.h,
-# vms/src/h5pubconf.h and config/lt_vers.am.
+# release_docs/RELEASE.txt, configure.ac, windows/src/H5pubconf.h
+# and config/lt_vers.am.
# The README.txt, release_docs/RELEASE.txt, configure.ac,
-# vms/src/h5pubconf.h, windows/src/H5pubconf.h, and config/lt_vers.am
+# windows/src/H5pubconf.h, and config/lt_vers.am
# files are always in the directory above H5public.h
unless ($file) {
for (@files) {
@@ -187,10 +187,6 @@ die "unable to read file: $RELEASE\n" unless -r $file;
my $CONFIGURE = $file;
$CONFIGURE =~ s/[^\/]*$/..\/configure.ac/;
die "unable to read file: $CONFIGURE\n" unless -r $file;
-# vms/src/h5pubconf.h
-my $H5VMSPUBCONF = $file;
-$H5VMSPUBCONF =~ s/[^\/]*$/..\/vms\/src\/h5pubconf.h/;
-die "unable to read file: $H5VMSPUBCONF\n" unless -r $file;
# Get the current version number.
open FILE, $file or die "unable to open $file: $!\n";
@@ -238,7 +234,6 @@ if ($set) {
$README = "";
$RELEASE = "";
$CONFIGURE = "";
- $H5VMSPUBCONF = "";
$LT_VERS = "";
@newver = @curver;
}
@@ -387,9 +382,6 @@ sub gen_h5pubconf {
close FILE;
}
-# Update the VMS-maintained h5pubconf.h file
-gen_h5pubconf("HDF5", $H5VMSPUBCONF, @newver) if $H5VMSPUBCONF;
-
# Print the new version number
if ($verbose) {
printf("version %d.%d release %d%s\n", @newver[0,1,2],
diff --git a/c++/Makefile.in b/c++/Makefile.in
index 45aeb34..36364eb 100644
--- a/c++/Makefile.in
+++ b/c++/Makefile.in
@@ -456,7 +456,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -544,10 +543,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/c++/examples/Makefile.in b/c++/examples/Makefile.in
index d4a652f..734fdc8 100644
--- a/c++/examples/Makefile.in
+++ b/c++/examples/Makefile.in
@@ -404,7 +404,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -492,10 +491,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/c++/src/Makefile.in b/c++/src/Makefile.in
index a55cfac..bc39d22 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -470,7 +470,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -558,10 +557,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/c++/test/Makefile.in b/c++/test/Makefile.in
index 8b0b90f..709a97e 100644
--- a/c++/test/Makefile.in
+++ b/c++/test/Makefile.in
@@ -461,7 +461,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -549,10 +548,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/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index a709a4d..80b44cb 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -370,10 +370,7 @@ H5ConversionTests (H5_FP_TO_INTEGER_OVERFLOW_WORKS "Checking IF overflows norma
# The machine's conversion gets the correct value. We define the macro and disable
# this kind of test until we figure out what algorithm they use.
#
-if (H5_LDOUBLE_TO_LONG_SPECIAL MATCHES ^H5_LDOUBLE_TO_LONG_SPECIAL$)
- set (H5_LDOUBLE_TO_LONG_SPECIAL 0 CACHE INTERNAL "Define if your system converts long double to (unsigned) long values with special algorithm")
- message (STATUS "Checking IF your system converts long double to (unsigned) long values with special algorithm... no")
-endif (H5_LDOUBLE_TO_LONG_SPECIAL MATCHES ^H5_LDOUBLE_TO_LONG_SPECIAL$)
+H5ConversionTests (H5_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts long double to (unsigned) long values with special algorithm")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm
# to convert some values of '(unsigned) long' to 'long double' values.
@@ -382,10 +379,7 @@ endif (H5_LDOUBLE_TO_LONG_SPECIAL MATCHES ^H5_LDOUBLE_TO_LONG_SPECIAL$)
# ..., 7fffff..., the compiler uses a unknown algorithm. We define a
# macro and skip the test for now until we know about the algorithm.
#
-if (H5_LONG_TO_LDOUBLE_SPECIAL MATCHES ^H5_LONG_TO_LDOUBLE_SPECIAL$)
- set (H5_LONG_TO_LDOUBLE_SPECIAL 0 CACHE INTERNAL "Define if your system can convert (unsigned) long to long double values with special algorithm")
- message (STATUS "Checking IF your system can convert (unsigned) long to long double values with special algorithm... no")
-endif (H5_LONG_TO_LDOUBLE_SPECIAL MATCHES ^H5_LONG_TO_LDOUBLE_SPECIAL$)
+H5ConversionTests (H5_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
# 'long double' to '(unsigned) long long' values. (This flag should be set for
diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c
index 1ee9842..010ee32 100644
--- a/config/cmake/ConversionTests.c
+++ b/config/cmake/ConversionTests.c
@@ -90,6 +90,124 @@ done:
#endif
+#ifdef H5_LDOUBLE_TO_LONG_SPECIAL_TEST
+
+int main(void)
+{
+ long double ld = 20041683600089727.779961L;
+ long ll;
+ unsigned long ull;
+ unsigned char s[16];
+ unsigned char s2[8];
+ int ret = 1;
+
+ if(sizeof(long double) == 16 && sizeof(long) == 8) {
+ /*make sure the long double type has 16 bytes in size and
+ * 11 bits of exponent. If it is,
+ *the bit sequence should be like below. It's not
+ *a decent way to check but this info isn't available. */
+ memcpy(s, &ld, 16);
+ if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
+ s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
+ s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) {
+
+ /* Assign the hexadecimal value of long double type. */
+ s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
+ s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
+ s[8]=0xbf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
+ s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20;
+
+ memcpy(&ld, s, 16);
+
+ ll = (long)ld;
+ memcpy(s2, &ll, 8);
+
+ /* The library's algorithm converts it to 0x 00 47 33 ce 17 af 22 82
+ * and gets wrong value 20041683600089730 on the IBM Power6 Linux.
+ * But the IBM Power6 Linux converts it to 0x00 47 33 ce 17 af 22 7f
+ * and gets the correct value 20041683600089727. It uses some special
+ * algorithm. We're going to define the macro and skip the test until
+ * we can figure out how they do it. */
+ if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
+ s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
+ ret = 0;
+
+ ull = (unsigned long)ld;
+ memcpy(s2, &ull, 8);
+
+ /* The unsigned long is the same as signed long. */
+ if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
+ s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
+ ret = 0;
+ }
+ }
+
+done:
+ exit(ret);
+}
+
+#endif
+
+#ifdef H5_LONG_TO_LDOUBLE_SPECIAL_TEST
+
+int main(void)
+{
+ long double ld;
+ long ll;
+ unsigned long ull;
+ unsigned char s[16];
+ int flag=0, ret=1;
+
+ /*Determine if long double has 16 byte in size, 11 bit exponent, and
+ *the bias is 0x3ff */
+ if(sizeof(long double) == 16) {
+ ld = 1.0L;
+ memcpy(s, &ld, 16);
+ if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
+ s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
+ flag = 1;
+ }
+
+ if(flag==1 && sizeof(long)==8) {
+ ll = 0x003fffffffffffffL;
+ ld = (long double)ll;
+ memcpy(s, &ld, 16);
+ /* The library converts the value to 0x434fffffffffffff8000000000000000.
+ * In decimal it is 18014398509481982.000000, one value short of the original.
+ * The IBM Power6 Linux converts it to 0x4350000000000000bff0000000000000.
+ * The value is correct in decimal. It uses some special
+ * algorithm. We're going to define the macro and skip the test until
+ * we can figure out how they do it. */
+ if(s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 &&
+ s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
+ s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
+ s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
+ ret = 0;
+ }
+ if(flag==1 && sizeof(unsigned long)==8) {
+ ull = 0xffffffffffffffffUL;
+ ld = (long double)ull;
+ memcpy(s, &ld, 16);
+ /* Use a different value from signed long to test. The problem is the same
+ * for both long and unsigned long. The value is 18446744073709551615.
+ * The library converts the value to 0x43effffffffffffffe000000000000000.
+ * In decimal it's 18446744073709548544.000000, very different from the original.
+ * The IBM Power6 Linux converts it to 0x43f0000000000000bff0000000000000.
+ * The value is correct in decimal. It uses some special
+ * algorithm. We're going to define the macro and skip the test until
+ * we can figure out how they do it. */
+ if(s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
+ s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
+ s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
+ s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
+ ret = 0;
+ }
+done:
+ exit(ret);
+}
+
+#endif
+
#ifdef H5_LDOUBLE_TO_LLONG_ACCURATE_TEST
int main(void)
{
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index a557364..ff05373 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -139,18 +139,6 @@
/* Define if support for deflate (zlib) filter is enabled */
#cmakedefine H5_HAVE_FILTER_DEFLATE @H5_HAVE_FILTER_DEFLATE@
-/* Define if support for Fletcher32 checksum is enabled */
-#cmakedefine H5_HAVE_FILTER_FLETCHER32 @H5_HAVE_FILTER_FLETCHER32@
-
-/* Define if support for nbit filter is enabled */
-#cmakedefine H5_HAVE_FILTER_NBIT @H5_HAVE_FILTER_NBIT@
-
-/* Define if support for scaleoffset filter is enabled */
-#cmakedefine H5_HAVE_FILTER_SCALEOFFSET @H5_HAVE_FILTER_SCALEOFFSET@
-
-/* Define if support for shuffle filter is enabled */
-#cmakedefine H5_HAVE_FILTER_SHUFFLE @H5_HAVE_FILTER_SHUFFLE@
-
/* Define if support for szip filter is enabled */
#cmakedefine H5_HAVE_FILTER_SZIP @H5_HAVE_FILTER_SZIP@
diff --git a/config/cmake/patch.xml b/config/cmake/patch.xml
new file mode 100644
index 0000000..70571c5
--- /dev/null
+++ b/config/cmake/patch.xml
@@ -0,0 +1,11 @@
+<CPackWiXPatch>
+ <CPackWiXFragment Id="CM_CP_libraries.bin.hdf5.dll">
+ <Environment Id="PATH"
+ Name="PATH"
+ Value="[CM_DP_libraries.bin]"
+ Permanent="no"
+ Part="last"
+ Action="set"
+ System="yes"/>
+ </CPackWiXFragment>
+</CPackWiXPatch>
diff --git a/configure b/configure
index 7daf063..fe48be4 100755
--- a/configure
+++ b/configure
@@ -668,11 +668,6 @@ CONFIG_DATE
H5_VERSION
DIRECT_VFD_CONDITIONAL_FALSE
DIRECT_VFD_CONDITIONAL_TRUE
-USE_FILTER_SCALEOFFSET
-USE_FILTER_NBIT
-USE_FILTER_FLETCHER32
-USE_FILTER_SHUFFLE
-FILTERS
ADD_PARALLEL_FILES
USINGMEMCHECKER
CLEARFILEBUF
@@ -920,7 +915,6 @@ enable_clear_file_buffers
enable_using_memchecker
enable_parallel
with_mpe
-enable_filters
enable_direct_vfd
with_default_plugindir
enable_dconv_exception
@@ -1613,9 +1607,6 @@ Optional Features:
picky about it's memory operations and also disables
the library's free space manager code. Default=no.
--enable-parallel Search for MPI-IO and MPI support files
- --enable-filters=all Turn on all internal I/O filters. One may also
- specify a comma-separated list of filters or the
- word no. The default is all internal I/O filters.
--enable-direct-vfd Build the direct I/O virtual file driver (VFD). This
is based on the POSIX (sec2) VFD and requires the
open() call to take the O_DIRECT flag. [default=no]
@@ -22941,7 +22932,7 @@ case "$host_cpu-$host_vendor-$host_os" in
## Need to add this so that O_DIRECT is visible for the direct
## VFD on Linux systems.
- AM_CPPFLAGS="-D_GNU_SOURCE $AM_CPPFLAGS"
+ H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS"
## Also add BSD support on Linux systems, so <features.h> defines
## __USE_BSD, which is required to get the prototype for strdup
@@ -22951,7 +22942,7 @@ case "$host_cpu-$host_vendor-$host_os" in
## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
## however, we do not do this since it breaks the big test on some
## older platforms.
- AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS"
+ H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS"
;;
esac
@@ -27913,81 +27904,6 @@ $as_echo "#define HAVE_MPE 1" >>confdefs.h
fi
fi
-
-## ----------------------------------------------------------------------
-## Turn on internal I/O filters by setting macros in header files
-## Internal I/O filters are contained entirely within the library and do
-## not depend on external headers or libraries. The shuffle filter is
-## an example of an internal filter, while the gzip filter is an example of
-## an external filter. Each external filter is controlled with an
-## "--with-foo=" configure flag.
-##
-
- USE_FILTER_SHUFFLE="no"
- USE_FILTER_FLETCHER32="no"
- USE_FILTER_NBIT="no"
- USE_FILTER_SCALEOFFSET="no"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for I/O filters" >&5
-$as_echo_n "checking for I/O filters... " >&6; }
-# Check whether --enable-filters was given.
-if test "${enable_filters+set}" = set; then :
- enableval=$enable_filters; FILTERS=$enableval
-fi
-
-
-## Eventually: all_filters="shuffle,foo,bar,baz"
-all_filters="shuffle,fletcher32,nbit,scaleoffset"
-case "X-$FILTERS" in
- X-|X-all)
- FILTERS=$all_filters
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: all ($FILTERS)" >&5
-$as_echo "all ($FILTERS)" >&6; }
- ;;
- X-no|X-none)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
- FILTERS="none"
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILTERS" >&5
-$as_echo "$FILTERS" >&6; }
- ;;
-esac
-
-if test -n "$FILTERS"; then
- for filter in `echo $FILTERS | tr ${as_cr_letters}',' ${as_cr_LETTERS}' '`; do
- ## ------------------------------------------------------------------
- ## Have to use separate 'if' construct for each filter, so that
- ## autoheader can detect the AC_DEFINE for each one...
- ##
- if test $filter = "SHUFFLE"; then
-
-$as_echo "#define HAVE_FILTER_SHUFFLE 1" >>confdefs.h
-
- USE_FILTER_SHUFFLE="yes"
- fi
- if test $filter = "FLETCHER32"; then
-
-$as_echo "#define HAVE_FILTER_FLETCHER32 1" >>confdefs.h
-
- USE_FILTER_FLETCHER32="yes"
- fi
- if test $filter = "NBIT"; then
-
-$as_echo "#define HAVE_FILTER_NBIT 1" >>confdefs.h
-
- USE_FILTER_NBIT="yes"
- fi
- if test $filter = "SCALEOFFSET"; then
-
-$as_echo "#define HAVE_FILTER_SCALEOFFSET 1" >>confdefs.h
-
- USE_FILTER_SCALEOFFSET="yes"
- fi
- done
-fi
-
-
## ----------------------------------------------------------------------
## Check if Direct I/O driver is enabled by --enable-direct-vfd
##
@@ -31785,23 +31701,6 @@ touch ./config/stamp2
## Finally the makefiles
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-## Post processing to patch up some deficiencies in libtool
-case $host_os in
- linux* | freebsd* )
- ## If gcc is not used, need to set $wl to use "-Wl,"
- if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then
- : using gcc
- else
- echo 'fixing $wl in' $ofile
-ed - $ofile <<EOF 2> /dev/null
-g/^wl=""/s//wl="-Wl,"/
-w
-q
-EOF
- fi
- ;;
-esac
-
## Are we compiling static libraries, shared libraries, or both? This
## is only used for the libhdf5.settings file. We can't just look at
## $enable_static and $enable_shared because if they're yes the ltconfig
diff --git a/configure.ac b/configure.ac
index aea5a58..9f31b19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1121,7 +1121,7 @@ case "$host_cpu-$host_vendor-$host_os" in
## Need to add this so that O_DIRECT is visible for the direct
## VFD on Linux systems.
- AM_CPPFLAGS="-D_GNU_SOURCE $AM_CPPFLAGS"
+ H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS"
## Also add BSD support on Linux systems, so <features.h> defines
## __USE_BSD, which is required to get the prototype for strdup
@@ -1131,7 +1131,7 @@ case "$host_cpu-$host_vendor-$host_os" in
## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
## however, we do not do this since it breaks the big test on some
## older platforms.
- AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS"
+ H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS"
;;
esac
@@ -2412,75 +2412,6 @@ if test -n "$PARALLEL"; then
fi
fi
-
-## ----------------------------------------------------------------------
-## Turn on internal I/O filters by setting macros in header files
-## Internal I/O filters are contained entirely within the library and do
-## not depend on external headers or libraries. The shuffle filter is
-## an example of an internal filter, while the gzip filter is an example of
-## an external filter. Each external filter is controlled with an
-## "--with-foo=" configure flag.
-##
-AC_SUBST([FILTERS])
-AC_SUBST([USE_FILTER_SHUFFLE]) USE_FILTER_SHUFFLE="no"
-AC_SUBST([USE_FILTER_FLETCHER32]) USE_FILTER_FLETCHER32="no"
-AC_SUBST([USE_FILTER_NBIT]) USE_FILTER_NBIT="no"
-AC_SUBST([USE_FILTER_SCALEOFFSET]) USE_FILTER_SCALEOFFSET="no"
-AC_MSG_CHECKING([for I/O filters])
-AC_ARG_ENABLE([filters],
- [AS_HELP_STRING([--enable-filters=all],
- [Turn on all internal I/O filters. One may
- also specify a comma-separated list of filters
- or the word no. The default is all internal
- I/O filters.])],
- [FILTERS=$enableval])
-
-## Eventually: all_filters="shuffle,foo,bar,baz"
-all_filters="shuffle,fletcher32,nbit,scaleoffset"
-case "X-$FILTERS" in
- X-|X-all)
- FILTERS=$all_filters
- AC_MSG_RESULT([all ($FILTERS)])
- ;;
- X-no|X-none)
- AC_MSG_RESULT([none])
- FILTERS="none"
- ;;
- *)
- AC_MSG_RESULT([$FILTERS])
- ;;
-esac
-
-if test -n "$FILTERS"; then
- for filter in `echo $FILTERS | tr ${as_cr_letters}',' ${as_cr_LETTERS}' '`; do
- ## ------------------------------------------------------------------
- ## Have to use separate 'if' construct for each filter, so that
- ## autoheader can detect the AC_DEFINE for each one...
- ##
- if test $filter = "SHUFFLE"; then
- AC_DEFINE([HAVE_FILTER_SHUFFLE], [1],
- [Define if support for shuffle filter is enabled])
- USE_FILTER_SHUFFLE="yes"
- fi
- if test $filter = "FLETCHER32"; then
- AC_DEFINE([HAVE_FILTER_FLETCHER32], [1],
- [Define if support for Fletcher32 checksum is enabled])
- USE_FILTER_FLETCHER32="yes"
- fi
- if test $filter = "NBIT"; then
- AC_DEFINE([HAVE_FILTER_NBIT], [1],
- [Define if support for nbit filter is enabled])
- USE_FILTER_NBIT="yes"
- fi
- if test $filter = "SCALEOFFSET"; then
- AC_DEFINE([HAVE_FILTER_SCALEOFFSET], [1],
- [Define if support for scaleoffset filter is enabled])
- USE_FILTER_SCALEOFFSET="yes"
- fi
- done
-fi
-
-
## ----------------------------------------------------------------------
## Check if Direct I/O driver is enabled by --enable-direct-vfd
##
@@ -3866,23 +3797,6 @@ touch ./config/stamp2
## Finally the makefiles
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-## Post processing to patch up some deficiencies in libtool
-case $host_os in
- linux* | freebsd* )
- ## If gcc is not used, need to set $wl to use "-Wl,"
- if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then
- : using gcc
- else
- echo 'fixing $wl in' $ofile
-ed - $ofile <<EOF 2> /dev/null
-g/^wl=""/s//wl="-Wl,"/
-w
-q
-EOF
- fi
- ;;
-esac
-
## Are we compiling static libraries, shared libraries, or both? This
## is only used for the libhdf5.settings file. We can't just look at
## $enable_static and $enable_shared because if they're yes the ltconfig
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 7400481..d0b3423 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -404,7 +404,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -492,10 +491,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/fortran/Makefile.in b/fortran/Makefile.in
index 74914fb..9812745 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -460,7 +460,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -548,10 +547,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/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index eca49ec..fb56b0d 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -412,7 +412,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -500,10 +499,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/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 8291320..240fbc3 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -1652,7 +1652,7 @@ nh5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder,
*corder = (int_f)ainfo.corder;
*cset = (int_f)ainfo.cset;
- *data_size = (hsize_t)ainfo.data_size;
+ *data_size = (hsize_t_f)ainfo.data_size;
done:
return ret_value;
@@ -1728,7 +1728,7 @@ nh5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
*corder_valid = 1;
*corder = (int_f)ainfo.corder;
*cset = (int_f)ainfo.cset;
- *data_size = (hsize_t)ainfo.data_size;
+ *data_size = (hsize_t_f)ainfo.data_size;
done:
if(c_obj_name)
@@ -1797,7 +1797,7 @@ nh5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
*corder_valid = 1;
*corder = (int_f)ainfo.corder;
*cset = (int_f)ainfo.cset;
- *data_size = (hsize_t)ainfo.data_size;
+ *data_size = (hsize_t_f)ainfo.data_size;
done:
if(c_obj_name)
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index ecfa946..a108384 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -621,7 +621,7 @@ nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
hid_t c_file_space_id;
hid_t c_xfer_prp;
hobj_ref_t *buf_c;
- int i, n;
+ unsigned int i, n;
/*
* Define transfer property
@@ -631,7 +631,7 @@ nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
/*
* Allocate temporary buffer and copy references from Fortran.
*/
- n = (int)*dims;
+ n = (unsigned int)*dims;
buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(n));
if ( buf_c != NULL ) {
for (i = 0; i < n; i++)
@@ -688,9 +688,9 @@ nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
hid_t c_file_space_id;
hid_t c_xfer_prp;
hdset_reg_ref_t *buf_c = NULL;
- int i, n;
+ unsigned int i, n;
- n = (int)*dims;
+ n = (unsigned int)*dims;
/*
* Define transfer property
*/
@@ -1494,7 +1494,7 @@ nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims)
* Reverse dimensions due to C-FORTRAN storage order.
*/
for(i = 0; i < rank; i++)
- c_dims[i] = dims[rank - i - 1];
+ c_dims[i] = (hsize_t)dims[rank - i - 1];
status = H5Dset_extent((hid_t)*dset_id, c_dims);
@@ -1642,7 +1642,7 @@ nh5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_
hsize_t num_elem;
max_len = (size_t)dims[0];
- num_elem = dims[1];
+ num_elem = (hsize_t)dims[1];
c_dset_id = (hid_t)*dset_id;
c_mem_type_id = (hid_t)*mem_type_id;
@@ -1711,7 +1711,7 @@ nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_s
size_t max_len;
hvl_t *c_buf;
- hssize_t i;
+ hsize_t i;
hssize_t num_elem;
c_dset_id = (hid_t)*dset_id;
@@ -1731,7 +1731,7 @@ nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_s
*/
status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
if ( status < 0 ) goto DONE;
- for (i=0; i < num_elem; i++) {
+ for (i=0; i < (hsize_t)num_elem; i++) {
len[i] = (size_t_f)c_buf[i].len;
memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(int_f));
}
@@ -1786,7 +1786,7 @@ nh5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_sp
hsize_t num_elem;
max_len = (size_t)dims[0];
- num_elem = dims[1];
+ num_elem = (hsize_t)dims[1];
c_dset_id = (hid_t)*dset_id;
c_mem_type_id = (hid_t)*mem_type_id;
@@ -1873,7 +1873,7 @@ nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
hsize_t num_elem;
max_len = (size_t)dims[0];
- num_elem = dims[1];
+ num_elem = (hsize_t)dims[1];
c_dset_id = (hid_t)*dset_id;
c_mem_type_id = (hid_t)*mem_type_id;
@@ -1957,7 +1957,7 @@ nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
hsize_t num_elem;
max_len = (size_t)dims[0];
- num_elem = dims[1];
+ num_elem = (hsize_t)dims[1];
c_dset_id = (hid_t)*dset_id;
c_mem_type_id = (hid_t)*mem_type_id;
@@ -2026,7 +2026,7 @@ nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac
size_t max_len;
hvl_t *c_buf;
- hssize_t i;
+ hsize_t i;
hssize_t num_elem;
c_dset_id = (hid_t)*dset_id;
@@ -2046,7 +2046,7 @@ nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac
*/
status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
if ( status <0 ) goto DONE;
- for (i=0; i < num_elem; i++) {
+ for (i=0; i < (hsize_t)num_elem; i++) {
len[i] = (size_t_f)c_buf[i].len;
memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(real_f));
}
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index 5ebb3e7..ad3ea49 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -178,7 +178,7 @@ nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
char *c_name = NULL;
size_t c_obj_namelen;
char *c_obj_name = NULL;
- hsize_t c_idx = *idx;
+ hsize_t c_idx = (hsize_t)*idx;
hid_t gid = (-1); /* Temporary group ID */
int ret_value = -1;
@@ -191,7 +191,7 @@ nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
/*
* Allocate buffer to hold name of the object
*/
- c_obj_namelen = *obj_namelen;
+ c_obj_namelen = (size_t)*obj_namelen;
if(c_obj_namelen)
if(NULL == (c_obj_name = (char *)HDmalloc(c_obj_namelen + 1)))
goto DONE;
@@ -352,6 +352,23 @@ nh5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name,
goto DONE;
break;
+ /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
+ case H5L_TYPE_EXTERNAL:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_MAX:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_ERROR:
+ ret_value = -1;
+ goto DONE;
+ break;
+ /* End of the warnings fix */
+
default: /* Unknown/unhandled link type */
goto DONE;
} /* end switch */
@@ -421,6 +438,22 @@ nh5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen,
if(H5Lcreate_soft(c_cur_name, (hid_t)*new_loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto DONE;
break;
+ /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
+ case H5L_TYPE_EXTERNAL:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_MAX:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_ERROR:
+ ret_value = -1;
+ goto DONE;
+ break;
+ /* End of the warnings fix */
default: /* Unknown/unhandled link type */
goto DONE;
diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c
index e35de21..19fa6b1 100644
--- a/fortran/src/H5Rf.c
+++ b/fortran/src/H5Rf.c
@@ -153,7 +153,7 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r
/*
* Convert FORTRAN name to C name
*/
- c_namelen = *namelen;
+ c_namelen = (size_t)*namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
if (c_name == NULL) return ret_value;
@@ -567,7 +567,7 @@ h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_
/*
* Allocate buffer to hold name of an attribute
*/
- if ((c_buf = HDmalloc(c_bufsize)) == NULL)
+ if ((c_buf = (char *)HDmalloc(c_bufsize)) == NULL)
return ret_value;
/*
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index cf29fed..c776a44 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -521,7 +521,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -609,10 +608,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/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 4d1e458..2be9485 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -530,7 +530,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -618,10 +617,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/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index fb38854..9a30c6e 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -456,7 +456,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -544,10 +543,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/hl/Makefile.in b/hl/Makefile.in
index f3d6c04..a4464b7 100644
--- a/hl/Makefile.in
+++ b/hl/Makefile.in
@@ -460,7 +460,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -548,10 +547,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/hl/c++/Makefile.in b/hl/c++/Makefile.in
index 0367469..f20104d 100644
--- a/hl/c++/Makefile.in
+++ b/hl/c++/Makefile.in
@@ -456,7 +456,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -544,10 +543,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/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in
index a9ecd9e..6421eda 100644
--- a/hl/c++/examples/Makefile.in
+++ b/hl/c++/examples/Makefile.in
@@ -403,7 +403,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -491,10 +490,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/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index 7e8c4ba..783861d 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -462,7 +462,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -550,10 +549,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/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in
index 1160548..df525e5 100644
--- a/hl/c++/test/Makefile.in
+++ b/hl/c++/test/Makefile.in
@@ -459,7 +459,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -547,10 +546,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/hl/examples/Makefile.in b/hl/examples/Makefile.in
index 92a8301..af1c2de 100644
--- a/hl/examples/Makefile.in
+++ b/hl/examples/Makefile.in
@@ -403,7 +403,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -491,10 +490,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/hl/fortran/Makefile.in b/hl/fortran/Makefile.in
index 7c6f2e2..14eb219 100644
--- a/hl/fortran/Makefile.in
+++ b/hl/fortran/Makefile.in
@@ -460,7 +460,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -548,10 +547,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/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in
index af5a18a..e2bbddc 100644
--- a/hl/fortran/examples/Makefile.in
+++ b/hl/fortran/examples/Makefile.in
@@ -403,7 +403,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -491,10 +490,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/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index 3ccfb9d..5b43512 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -477,7 +477,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -565,10 +564,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/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in
index e1b28a5..baa8eb2 100644
--- a/hl/fortran/test/Makefile.in
+++ b/hl/fortran/test/Makefile.in
@@ -468,7 +468,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -556,10 +555,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/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c
index d9ffb36..54e443d 100644
--- a/hl/src/H5LTanalyze.c
+++ b/hl/src/H5LTanalyze.c
@@ -1,3 +1,22 @@
+#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2
+#pragma GCC diagnostic ignored "-Wconversion"
+#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
+#pragma GCC diagnostic ignored "-Wlarger-than="
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+#pragma GCC diagnostic ignored "-Wnested-externs"
+#pragma GCC diagnostic ignored "-Wold-style-definition"
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#pragma GCC diagnostic ignored "-Wsign-conversion"
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#pragma GCC diagnostic ignored "-Wswitch-default"
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-macros"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#elif defined __SUNPRO_CC
+#pragma disable_warn
+#elif defined _MSC_VER
+#pragma warning(push, 1)
+#endif
#line 2 "H5LTanalyze.c"
#line 4 "H5LTanalyze.c"
diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c
index aa12185..6ca95c54 100644
--- a/hl/src/H5LTparse.c
+++ b/hl/src/H5LTparse.c
@@ -1,3 +1,22 @@
+#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2
+#pragma GCC diagnostic ignored "-Wconversion"
+#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
+#pragma GCC diagnostic ignored "-Wlarger-than="
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+#pragma GCC diagnostic ignored "-Wnested-externs"
+#pragma GCC diagnostic ignored "-Wold-style-definition"
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#pragma GCC diagnostic ignored "-Wsign-conversion"
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#pragma GCC diagnostic ignored "-Wswitch-default"
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-macros"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#elif defined __SUNPRO_CC
+#pragma disable_warn
+#elif defined _MSC_VER
+#pragma warning(push, 1)
+#endif
/* A Bison parser, made by GNU Bison 2.7. */
/* Bison implementation for Yacc-like parsers in C
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index 490f639..8383bd4 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -458,7 +458,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -546,10 +545,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/hl/test/Makefile.in b/hl/test/Makefile.in
index 9bb1593..c98ed35 100644
--- a/hl/test/Makefile.in
+++ b/hl/test/Makefile.in
@@ -509,7 +509,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -597,10 +596,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/hl/test/test_dset_opt.c b/hl/test/test_dset_opt.c
index bddd162..b0800a0 100644
--- a/hl/test/test_dset_opt.c
+++ b/hl/test/test_dset_opt.c
@@ -41,7 +41,7 @@
#define CHUNK_NX 4
#define CHUNK_NY 4
-#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*1.001)+12)
+#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*1.001F)+12)
/* Temporary filter IDs used for testing */
#define H5Z_FILTER_BOGUS1 305
diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c
index c7a1c27..62e9ae3 100644
--- a/hl/test/test_packet.c
+++ b/hl/test/test_packet.c
@@ -54,14 +54,14 @@ typedef struct particle_t
*-------------------------------------------------------------------------
*/
static particle_t testPart[NRECORDS] = {
- {"zero", 0,0, 0.0f, 0.0},
- {"one", 10,10, 1.0f, 10.0},
- {"two", 20,20, 2.0f, 20.0},
- {"three",30,30, 3.0f, 30.0},
- {"four", 40,40, 4.0f, 40.0},
- {"five", 50,50, 5.0f, 50.0},
- {"six", 60,60, 6.0f, 60.0},
- {"seven",70,70, 7.0f, 70.0}
+ {"zero", 0,0, 0.0f, 0.0f},
+ {"one", 10,10, 1.0f, 10.0f},
+ {"two", 20,20, 2.0f, 20.0f},
+ {"three",30,30, 3.0f, 30.0f},
+ {"four", 40,40, 4.0f, 40.0f},
+ {"five", 50,50, 5.0f, 50.0f},
+ {"six", 60,60, 6.0f, 60.0f},
+ {"seven",70,70, 7.0f, 70.0f}
};
/*-------------------------------------------------------------------------
diff --git a/hl/test/test_table.c b/hl/test/test_table.c
index c312296..8af6d28 100644
--- a/hl/test/test_table.c
+++ b/hl/test/test_table.c
@@ -218,7 +218,7 @@ static int test_table(hid_t fid, int do_write)
hsize_t chunk_size=10;
int compress=0;
int *fill=NULL;
- particle_t fill1[1] = { {"no data",-1, -99.0f, -99.0, -1} };
+ particle_t fill1[1] = { {"no data",-1, -99.0f, -99.0f, -1} };
int fill1_new[1] = { -100 };
hsize_t position;
char tname[20];
@@ -246,18 +246,18 @@ static int test_table(hid_t fid, int do_write)
particle2_t rbuf2[NRECORDS];
particle3_t rbuf3[NRECORDS];
particle_t rbufc[NRECORDS*2];
- particle_t abuf[2]={{"eight",80,8.0f,80.0,80},{"nine",90,9.0f,90.0,90}};
- particle_t ibuf[2]={{"zero", 0, 0.0f, 0.0, 0},{"zero", 0, 0.0f, 0.0, 0}};
+ particle_t abuf[2]={{"eight",80,8.0f,80.0f,80},{"nine",90,9.0f,90.0f,90}};
+ particle_t ibuf[2]={{"zero", 0, 0.0f, 0.0f, 0},{"zero", 0, 0.0f, 0.0f, 0}};
particle_t wbufd[NRECORDS];
particle_t wbuf[NRECORDS] = {
- {"zero", 0, 0.0f, 0.0, 0,},
- {"one", 10, 1.0f, 10.0, 10},
- {"two", 20, 2.0f, 20.0, 20},
- {"three",30, 3.0f, 30.0, 30},
- {"four", 40, 4.0f, 40.0, 40},
- {"five", 50, 5.0f, 50.0, 50},
- {"six", 60, 6.0f, 60.0, 60},
- {"seven",70, 7.0f, 70.0, 70}
+ {"zero", 0, 0.0f, 0.0f, 0,},
+ {"one", 10, 1.0f, 10.0f, 10},
+ {"two", 20, 2.0f, 20.0f, 20},
+ {"three",30, 3.0f, 30.0f, 30},
+ {"four", 40, 4.0f, 40.0f, 40},
+ {"five", 50, 5.0f, 50.0f, 50},
+ {"six", 60, 6.0f, 60.0f, 60},
+ {"seven",70, 7.0f, 70.0f, 70}
};
/* buffers for the field "Pressure" and "New_field" */
float pressure_in [NRECORDS] = { 0.0f,1.0f,2.0f,3.0f,4.0f,5.0f,6.0f,7.0f };
@@ -390,14 +390,14 @@ static int test_table(hid_t fid, int do_write)
/* Define an array of Particles */
particle4_t p_data[NRECORDS] = {
- {12112, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12113, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12114, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12115, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12116, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12117, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12118, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12119, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}}
+ {12112, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12113, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12114, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12115, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12116, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12117, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12118, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12119, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}}
};
/*-------------------------------------------------------------------------
diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in
index 60ed15793..097cd1e 100644
--- a/hl/tools/Makefile.in
+++ b/hl/tools/Makefile.in
@@ -457,7 +457,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -545,10 +544,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/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in
index b8fdd3a..d3245ed 100644
--- a/hl/tools/gif2h5/Makefile.in
+++ b/hl/tools/gif2h5/Makefile.in
@@ -471,7 +471,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -559,10 +558,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/hl/tools/gif2h5/gif.h b/hl/tools/gif2h5/gif.h
index 5334919..f34a111 100644
--- a/hl/tools/gif2h5/gif.h
+++ b/hl/tools/gif2h5/gif.h
@@ -143,7 +143,7 @@ typedef struct _GifToMem {
*/
/* GIF2MEM.C */
-GIFTOMEM Gif2Mem(BYTE *);
+int Gif2Mem(BYTE *, GIFTOMEM *);
/* GIFREAD.C */
int ReadGifHeader(GIFHEAD *, BYTE **);
diff --git a/hl/tools/gif2h5/gif2hdf.c b/hl/tools/gif2h5/gif2hdf.c
index 810be78..8a9e971 100644
--- a/hl/tools/gif2h5/gif2hdf.c
+++ b/hl/tools/gif2h5/gif2hdf.c
@@ -99,7 +99,7 @@ main(int argv , char *argc[])
* Call Gif2Mem and break the whole file into parts. Gif2Mem also calls
* decompresses the images so we don't have to worry about that
*/
- GifMemoryStruct = Gif2Mem(MemGif);
+ Gif2Mem(MemGif, &GifMemoryStruct);
if (ferror(fpGif)) {
printf("File Stream Error\n\n");
diff --git a/hl/tools/gif2h5/gif2mem.c b/hl/tools/gif2h5/gif2mem.c
index ac4b0ec..a2e4893 100644
--- a/hl/tools/gif2h5/gif2mem.c
+++ b/hl/tools/gif2h5/gif2mem.c
@@ -37,8 +37,8 @@
#include "gif.h"
-GIFTOMEM
-Gif2Mem(BYTE *MemGif)
+int
+Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
{
/*
* The gif structure outline for passing data to memory is given in gif.h.
@@ -51,8 +51,6 @@ Gif2Mem(BYTE *MemGif)
GIFCOMMENT **gifComment; /* Comment Extension structure */
GIFGRAPHICCONTROL **gifGraphicControl; /* Graphic Control Extension strct */
- GIFTOMEM GifMemoryStruct;
-
register WORD i; /* Loop counter */
BYTE Identifier; /* Extension block identifier holder */
BYTE Label; /* Extension block label holder */
@@ -133,15 +131,15 @@ Gif2Mem(BYTE *MemGif)
gifHead->PlainTextCount = PlainTextCount;
/* putting stuff into the gif2mem structure */
- GifMemoryStruct.GifHeader = gifHead;
- GifMemoryStruct.GifImageDesc = gifImageDesc;
- GifMemoryStruct.GifPlainTextExtension = gifPlainText;
- GifMemoryStruct.GifApplicationExtension = gifApplication;
- GifMemoryStruct.GifCommentExtension = gifComment;
- GifMemoryStruct.GifGraphicControlExtension = gifGraphicControl;
+ GifMemoryStruct->GifHeader = gifHead;
+ GifMemoryStruct->GifImageDesc = gifImageDesc;
+ GifMemoryStruct->GifPlainTextExtension = gifPlainText;
+ GifMemoryStruct->GifApplicationExtension = gifApplication;
+ GifMemoryStruct->GifCommentExtension = gifComment;
+ GifMemoryStruct->GifGraphicControlExtension = gifGraphicControl;
/* return the struct */
- return GifMemoryStruct;
+ return 0;
case 0x2C: /* Image Descriptor */
/*
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0e760a5..d6368cd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -495,6 +495,7 @@ set (H5PL_SRCS
set (H5PL_HDRS
${HDF5_SRC_DIR}/H5PLextern.h
+ ${HDF5_SRC_DIR}/H5PLpublic.h
)
IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SRCS}" )
diff --git a/src/H5.c b/src/H5.c
index 52dc566..68b339a 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -860,27 +860,109 @@ H5close(void)
/*-------------------------------------------------------------------------
+ * Function: H5allocate_memory
+ *
+ * Purpose: Allocate a memory buffer with the semantics of malloc().
+ *
+ * NOTE: This function is intended for use with filter
+ * plugins so that all allocation and free operations
+ * use the same memory allocator. It is not intended for
+ * use as a general memory allocator in applications.
+ *
+ * Parameters:
+ *
+ * size: The size of the buffer.
+ *
+ * clear: Whether or not to memset the buffer to 0.
+ *
+ * Return:
+ *
+ * Success: A pointer to the allocated buffer.
+ *
+ * Failure: NULL
+ *
+ *-------------------------------------------------------------------------
+ */
+void *
+H5allocate_memory(size_t size, hbool_t clear)
+{
+ void *ret_value = NULL;
+
+ FUNC_ENTER_API_NOINIT;
+ H5TRACE2("*x", "zb", size, clear);
+
+ if(clear)
+ ret_value = H5MM_calloc(size);
+ else
+ ret_value = H5MM_malloc(size);
+
+ FUNC_LEAVE_API(ret_value)
+
+} /* end H5allocate_memory() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5resize_memory
+ *
+ * Purpose: Resize a memory buffer with the semantics of realloc().
+ *
+ * NOTE: This function is intended for use with filter
+ * plugins so that all allocation and free operations
+ * use the same memory allocator. It is not intended for
+ * use as a general memory allocator in applications.
+ *
+ * Parameters:
+ *
+ * mem: The buffer to be resized.
+ *
+ * size: The size of the buffer.
+ *
+ * Return:
+ *
+ * Success: A pointer to the resized buffer.
+ *
+ * Failure: NULL (the input buffer will be unchanged)
+ *
+ *-------------------------------------------------------------------------
+ */
+void *
+H5resize_memory(void *mem, size_t size)
+{
+ void *ret_value = NULL;
+
+ FUNC_ENTER_API_NOINIT;
+ H5TRACE2("*x", "*xz", mem, size);
+
+ ret_value = H5MM_realloc(mem, size);
+
+ FUNC_LEAVE_API(ret_value)
+
+} /* end H5resize_memory() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5free_memory
*
- * Purpose: Frees memory allocated by the library that it is the user's
+ * Purpose: Frees memory allocated by the library that it is the user's
* responsibility to free. Ensures that the same library
* that was used to allocate the memory frees it. Passing
* NULL pointers is allowed.
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
H5free_memory(void *mem)
{
- FUNC_ENTER_API_NOINIT
+ FUNC_ENTER_API_NOINIT;
H5TRACE1("e", "*x", mem);
/* At this time, it is impossible for this to fail. */
HDfree(mem);
FUNC_LEAVE_API(SUCCEED)
+
} /* end H5free_memory() */
@@ -944,3 +1026,4 @@ DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved)
return fOkay;
}
#endif /* H5_HAVE_WIN32_API && H5_BUILT_AS_DYNAMIC_LIB && H5_HAVE_WIN_THREADS && H5_HAVE_THREADSAFE*/
+
diff --git a/src/H5HG.c b/src/H5HG.c
index 4bb8670..7127a72 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -182,7 +182,7 @@ HDmemset(heap->chunk, 0, size);
* which was always at least H5HG_ALIGNMENT aligned then we could just
* align the pointer, but this might not be the case.
*/
- n = H5HG_ALIGN(p - heap->chunk) - (p - heap->chunk);
+ n = H5HG_ALIGN(p - heap->chunk) - (size_t)(p - heap->chunk);
#ifdef OLD_WAY
/* Don't bother zeroing out the rest of the info in the heap -QAK */
HDmemset(p, 0, n);
@@ -775,8 +775,9 @@ H5HG_remove (H5F_t *f, hid_t dxpl_id, H5HG_t *hobj)
} /* end if */
else
heap->obj[0].size += need;
- HDmemmove(obj_start, obj_start + need, heap->size - ((obj_start + need) - heap->chunk));
- if(heap->obj[0].size >= (size_t)H5HG_SIZEOF_OBJHDR(f)) {
+ HDmemmove(obj_start, obj_start + need,
+ heap->size - (size_t)((obj_start + need) - heap->chunk));
+ if(heap->obj[0].size >= H5HG_SIZEOF_OBJHDR(f)) {
p = heap->obj[0].begin;
UINT16ENCODE(p, 0); /*id*/
UINT16ENCODE(p, 0); /*nrefs*/
diff --git a/src/H5HGpkg.h b/src/H5HGpkg.h
index eea110b..ebba8e5 100644
--- a/src/H5HGpkg.h
+++ b/src/H5HGpkg.h
@@ -77,7 +77,7 @@ H5FL_BLK_EXTERN(gheap_chunk);
* largest data type is eight bytes.
*/
#define H5HG_ALIGNMENT 8
-#define H5HG_ALIGN(X) (H5HG_ALIGNMENT*(((X)+H5HG_ALIGNMENT-1)/ \
+#define H5HG_ALIGN(X) (size_t)(H5HG_ALIGNMENT*(((X)+H5HG_ALIGNMENT-1)/ \
H5HG_ALIGNMENT))
#define H5HG_ISALIGNED(X) ((X)==H5HG_ALIGN(X))
@@ -108,8 +108,8 @@ H5FL_BLK_EXTERN(gheap_chunk);
* some overhead and each message has some overhead. The `+2' accounts for
* rounding and for the free space object.
*/
-#define H5HG_NOBJS(f,z) (int)((((z)-H5HG_SIZEOF_HDR(f))/ \
- H5HG_SIZEOF_OBJHDR(f)+2))
+#define H5HG_NOBJS(f,z) ((((z)-H5HG_SIZEOF_HDR(f))/ \
+ H5HG_SIZEOF_OBJHDR(f)+2))
/****************************/
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c
index f015b19..29d21fd 100644
--- a/src/H5MFaggr.c
+++ b/src/H5MFaggr.c
@@ -46,7 +46,7 @@
/******************/
/* Local Typedefs */
/******************/
-#define EXTEND_THRESHOLD .10
+#define EXTEND_THRESHOLD 0.10F
/********************/
diff --git a/src/H5MM.c b/src/H5MM.c
index c44222c..a37bbff 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -29,21 +29,23 @@
#include "H5Eprivate.h"
#include "H5MMprivate.h"
-#ifndef NDEBUG
/*-------------------------------------------------------------------------
* Function: H5MM_malloc
*
- * Purpose: Just like the POSIX version of malloc(3). This routine
- * specifically checks for allocations of 0 bytes and fails
- * in that case. This routine is not called when NDEBUG is
- * defined.
+ * Purpose: Similar to the C89 version of malloc().
*
- * Return: Success: Ptr to new memory
- * Failure: NULL
+ * On size of 0, we return a NULL pointer instead of the
+ * standard-allowed 'special' pointer since that's more
+ * difficult to check as a return value. This is still
+ * considered an error condition since allocations of zero
+ * bytes usually indicate problems.
+ *
+ * Return: Success: Pointer new memory
+ *
+ * Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 8 2003
*
*-------------------------------------------------------------------------
@@ -51,29 +53,40 @@
void *
H5MM_malloc(size_t size)
{
+ void *ret_value;
+
+ HDassert(size);
+
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(size);
+ if(size)
+ ret_value = HDmalloc(size);
+ else
+ ret_value = NULL;
- FUNC_LEAVE_NOAPI(HDmalloc(size));
+ FUNC_LEAVE_NOAPI(ret_value);
} /* end H5MM_malloc() */
/*-------------------------------------------------------------------------
* Function: H5MM_calloc
*
- * Purpose: Similar to the POSIX version of calloc(3), except this routine
- * just takes a 'size' parameter. This routine
- * specifically checks for allocations of 0 bytes and fails
- * in that case. This routine is not called when NDEBUG is
- * defined.
+ * Purpose: Similar to the C89 version of calloc(), except this
+ * routine just takes a 'size' parameter.
*
- * Return: Success: Ptr to new memory
- * Failure: NULL
+ * On size of 0, we return a NULL pointer instead of the
+ * standard-allowed 'special' pointer since that's more
+ * difficult to check as a return value. This is still
+ * considered an error condition since allocations of zero
+ * bytes usually indicate problems.
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
+ *
+ * Return: Success: Pointer new memory
+ *
+ * Failure: NULL
+ *
+ * Programmer: Quincey Koziol
* Nov 8 2003
*
*-------------------------------------------------------------------------
@@ -81,33 +94,41 @@ H5MM_malloc(size_t size)
void *
H5MM_calloc(size_t size)
{
+ void *ret_value;
+
+ HDassert(size);
+
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(size);
+ if(size)
+ ret_value = HDcalloc((size_t)1, size);
+ else
+ ret_value = NULL;
- FUNC_LEAVE_NOAPI(HDcalloc(1,size));
+ FUNC_LEAVE_NOAPI(ret_value);
} /* end H5MM_calloc() */
-#endif /* NDEBUG */
/*-------------------------------------------------------------------------
* Function: H5MM_realloc
*
- * Purpose: Just like the POSIX version of realloc(3). Specifically, the
- * following calls are equivalent
+ * Purpose: Similar semantics as C89's realloc(). Specifically, the
+ * following calls are equivalent:
*
- * H5MM_realloc (NULL, size) <==> H5MM_malloc (size)
- * H5MM_realloc (ptr, 0) <==> H5MM_xfree (ptr)
- * H5MM_realloc (NULL, 0) <==> NULL
+ * H5MM_realloc(NULL, size) <==> H5MM_malloc(size)
+ * H5MM_realloc(ptr, 0) <==> H5MM_xfree(ptr)
+ * H5MM_realloc(NULL, 0) <==> NULL
*
- * Return: Success: Ptr to new memory or NULL if the memory
- * was freed or HDrealloc couldn't allocate
- * memory.
- * Failure: NULL
+ * Note that the (NULL, 0) combination is undefined behavior
+ * in the C standard.
+ *
+ * Return: Success: Ptr to new memory if size > 0
+ * NULL if size is zero
+ *
+ * Failure: NULL (input buffer is unchanged on failure)
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 10 1997
*
*-------------------------------------------------------------------------
@@ -120,16 +141,19 @@ H5MM_realloc(void *mem, size_t size)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(NULL == mem) {
+ HDassert(mem || size);
+
+ if(NULL == mem && 0 == size) {
+ /* Not defined in the standard, return NULL */
+ ret_value = NULL;
+ }
+ else {
+ ret_value = HDrealloc(mem, size);
+
+ /* Some platforms do not return NULL if size is zero. */
if(0 == size)
ret_value = NULL;
- else
- ret_value = H5MM_malloc(size);
- } /* end if */
- else if(0 == size)
- ret_value = H5MM_xfree(mem);
- else
- ret_value = HDrealloc(mem, size);
+ }
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MM_realloc() */
diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h
index a3c39f0..0d608b2 100644
--- a/src/H5MMprivate.h
+++ b/src/H5MMprivate.h
@@ -33,19 +33,13 @@
/* Private headers needed by this file */
#include "H5private.h"
-#ifdef NDEBUG
-#define H5MM_malloc(Z) HDmalloc(Z)
-#define H5MM_calloc(Z) HDcalloc((size_t)1,Z)
-#endif /* NDEBUG */
#define H5MM_free(Z) HDfree(Z)
/*
* Library prototypes...
*/
-#ifndef NDEBUG
H5_DLL void *H5MM_malloc(size_t size);
H5_DLL void *H5MM_calloc(size_t size);
-#endif /* NDEBUG */
H5_DLL void *H5MM_realloc(void *mem, size_t size);
H5_DLL char *H5MM_xstrdup(const char *s);
H5_DLL char *H5MM_strdup(const char *s);
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index c889abb..ff9e6f1 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -762,7 +762,7 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
size_t idx; /* Message number */
uint8_t *p = NULL; /*ptr into new chunk */
H5O_cont_t *cont = NULL; /*native continuation message */
- unsigned chunkno; /* Chunk allocated */
+ size_t chunkno; /* Chunk allocated */
haddr_t new_chunk_addr;
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5PL.c b/src/H5PL.c
index 1806ea6..619dd84 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -97,6 +97,7 @@ typedef const void *(__cdecl *H5PL_get_plugin_info_t)(void);
typedef const void *(*H5PL_get_plugin_info_t)(void);
#endif /* H5_HAVE_WIN32_API */
+/* Whether to preload pathnames for plugin libraries */
#define H5PL_DEFAULT_PATH H5_DEFAULT_PLUGINDIR
/* Special symbol to indicate no plugin loading */
@@ -149,8 +150,8 @@ static char *H5PL_path_table_g[H5PL_MAX_PATH_NUM];
static size_t H5PL_num_paths_g = 0;
static hbool_t H5PL_path_found_g = FALSE;
-/* Whether to preload pathnames for plugin libraries */
-static hbool_t H5PL_no_plugin_g = FALSE;
+/* Enable all plugin libraries */
+static unsigned int H5PL_plugin_g = H5PL_ALL_PLUGIN;
/*--------------------------------------------------------------------------
@@ -177,7 +178,7 @@ H5PL__init_interface(void)
if(NULL != (preload_path = HDgetenv("HDF5_PLUGIN_PRELOAD"))) {
/* Special symbal "::" means no plugin during data reading. */
if(!HDstrcmp(preload_path, H5PL_NO_PLUGIN))
- H5PL_no_plugin_g = TRUE;
+ H5PL_plugin_g = 0;
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -185,31 +186,68 @@ H5PL__init_interface(void)
/*-------------------------------------------------------------------------
- * Function: H5PL_no_plugin
+ * Function: H5PLset_loading_state
*
- * Purpose: Quick way for filter module to query whether to load plugin
+ * Purpose: Control the loading of dynamic plugin types.
*
- * Return: TRUE: No plugin loading during data reading
+ * This function will not allow plugin types if the pathname from the HDF5_PLUGIN_PRELOAD
+ * environment variable is set to the special "::" string.
*
- * FALSE: Load plugin during data reading
+ * plugin bit = 0, will prevent the use of that dynamic plugin type.
+ * plugin bit = 1, will allow the use of that dynamic plugin type.
*
- * Programmer: Raymond Lu
- * 20 February 2013
+ * H5PL_TYPE_FILTER changes just dynamic filters
+ * A H5PL_ALL_PLUGIN will enable all dynamic plugin types
+ * A zero value will disable all dynamic plugin types
+ *
+ * Return: Non-negative or success
*
*-------------------------------------------------------------------------
*/
-htri_t
-H5PL_no_plugin(void)
+herr_t
+H5PLset_loading_state(unsigned int plugin_type)
{
- htri_t ret_value;
+ char *preload_path;
+ herr_t ret_value = SUCCEED; /* Return value */
+ FUNC_ENTER_API(FAIL)
+ H5TRACE1("e", "Iu", plugin_type);
+ /* change the bit value of the requested plugin type(s) */
+ H5PL_plugin_g = plugin_type;
+ /* check if special ENV variable is set and disable all plugin types */
+ if(NULL != (preload_path = HDgetenv("HDF5_PLUGIN_PRELOAD"))) {
+ /* Special symbol "::" means no plugin during data reading. */
+ if(!HDstrcmp(preload_path, H5PL_NO_PLUGIN))
+ H5PL_plugin_g = 0;
+ }
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5PLset_loading_state() */
- FUNC_ENTER_NOAPI(FAIL)
- ret_value = (htri_t)H5PL_no_plugin_g;
+/*-------------------------------------------------------------------------
+ * Function: H5PLget_loading_state
+ *
+ * Purpose: Query state of the loading of dynamic plugin types.
+ *
+ * This function will return the state of the global flag.
+ *
+ * Return: Zero if all plugin types are disabled, negative if all
+ * plugin types are enabled, positive if one or more of the plugin types are enabled.
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5PLget_loading_state(unsigned int* plugin_type)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+ FUNC_ENTER_API(FAIL)
+
+ if(plugin_type)
+ *plugin_type = H5PL_plugin_g;
+ done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5PLget_loading_state() */
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5PL_no_plugin() */
/*-------------------------------------------------------------------------
@@ -285,9 +323,14 @@ H5PL_load(H5PL_type_t type, int id)
FUNC_ENTER_NOAPI(NULL)
- /* Check for "no plugins" indicated" */
- if(H5PL_no_plugin_g)
- HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "required dynamically loaded plugin filter '%d' is not available", id)
+ switch (type) {
+ case H5PL_TYPE_FILTER:
+ if((H5PL_plugin_g & H5PL_FILTER_PLUGIN) == 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "required dynamically loaded plugin filter '%d' is not available", id)
+ break;
+ default:
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "required dynamically loaded plugin '%d' is not valid", id)
+ }
/* Initialize the location paths for dynamic libraries, if they aren't
* already set up.
diff --git a/src/H5PLextern.h b/src/H5PLextern.h
index 8ad19e7..3264435 100644
--- a/src/H5PLextern.h
+++ b/src/H5PLextern.h
@@ -22,18 +22,6 @@
/* Include HDF5 header */
#include "hdf5.h"
-/*******************/
-/* Public Typedefs */
-/*******************/
-
-/* Plugin type */
-typedef enum H5PL_type_t {
- H5PL_TYPE_ERROR = -1, /*error */
- H5PL_TYPE_FILTER = 0, /*filter */
- H5PL_TYPE_NONE = 1 /*this must be last! */
-} H5PL_type_t;
-
-
/* plugins always export */
#if defined (_MSC_VER) /* MSVC Compiler Case */
#define H5PLUGIN_DLL __declspec(dllexport)
diff --git a/src/H5PLprivate.h b/src/H5PLprivate.h
index 587a51b..77e115b 100644
--- a/src/H5PLprivate.h
+++ b/src/H5PLprivate.h
@@ -19,18 +19,8 @@
#ifndef _H5PLprivate_H
#define _H5PLprivate_H
-/* Keep the following in sync with the package's "external" header */
-
-/*******************/
-/* Public Typedefs */
-/*******************/
-
-/* Plugin type */
-typedef enum H5PL_type_t {
- H5PL_TYPE_ERROR = -1, /*error */
- H5PL_TYPE_FILTER = 0, /*filter */
- H5PL_TYPE_NONE = 1 /*this must be last! */
-} H5PL_type_t;
+/* Include package's public header */
+#include "H5PLpublic.h"
/* Private headers needed by this file */
#include "H5private.h" /* Generic Functions */
@@ -57,7 +47,6 @@ typedef enum H5PL_type_t {
/* Internal API routines */
H5_DLL const void *H5PL_load(H5PL_type_t plugin_type, int type_id);
-H5_DLL htri_t H5PL_no_plugin(void);
#endif /* _H5PLprivate_H */
diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h
new file mode 100644
index 0000000..1dae3b7
--- /dev/null
+++ b/src/H5PLpublic.h
@@ -0,0 +1,53 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* Programmer: Raymond Lu <songyulu@hdfgroup.org>
+ * 13 February 2013
+ */
+
+#ifndef _H5PLpublic_H
+#define _H5PLpublic_H
+
+/* Public headers needed by this file */
+#include "H5public.h" /* Generic Functions */
+
+/*******************/
+/* Public Typedefs */
+/*******************/
+
+/* Plugin type */
+typedef enum H5PL_type_t {
+ H5PL_TYPE_ERROR = -1, /*error */
+ H5PL_TYPE_FILTER = 0, /*filter */
+ H5PL_TYPE_NONE = 1 /*this must be last! */
+} H5PL_type_t;
+
+/* Common dynamic plugin type flags */
+#define H5PL_FILTER_PLUGIN 0x0001
+#define H5PL_ALL_PLUGIN 0xFFFF
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* plugin state */
+H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_type);
+H5_DLL herr_t H5PLget_loading_state(unsigned int* plugin_type/*out*/);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H5PLpublic_H */
+
diff --git a/src/H5R.c b/src/H5R.c
index 26f4b9d..9b99914 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -411,6 +411,10 @@ done:
13 July 2011
I added the OAPL_ID parameter for the object being referenced. It only
supports dataset access property list currently.
+
+ M. Scot Breitenfeld
+ 3 March 2015
+ Added a check for undefined reference pointer.
--------------------------------------------------------------------------*/
hid_t
H5R_dereference(H5F_t *file, hid_t oapl_id, hid_t dxpl_id, H5R_type_t ref_type, const void *_ref, hbool_t app_ref)
@@ -435,8 +439,10 @@ H5R_dereference(H5F_t *file, hid_t oapl_id, hid_t dxpl_id, H5R_type_t ref_type,
switch(ref_type) {
case H5R_OBJECT:
oloc.addr = *(const hobj_ref_t *)_ref; /* Only object references currently supported */
- break;
-
+ if(!H5F_addr_defined(oloc.addr) || oloc.addr == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Undefined reference pointer")
+ break;
+
case H5R_DATASET_REGION:
{
H5HG_t hobjid; /* Heap object ID */
@@ -448,6 +454,9 @@ H5R_dereference(H5F_t *file, hid_t oapl_id, hid_t dxpl_id, H5R_type_t ref_type,
H5F_addr_decode(oloc.file, &p, &(hobjid.addr));
UINT32DECODE(p, hobjid.idx);
+ if(!H5F_addr_defined(hobjid.addr) || hobjid.addr == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Undefined reference pointer")
+
/* Get the dataset region from the heap (allocate inside routine) */
if(NULL == (buf = (uint8_t *)H5HG_read(oloc.file, dxpl_id, &hobjid, NULL, NULL)))
HGOTO_ERROR(H5E_REFERENCE, H5E_READERROR, FAIL, "Unable to read dataset region information")
diff --git a/src/H5Z.c b/src/H5Z.c
index 8a3315e..5dca3b4 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -93,35 +93,28 @@ H5Z_init_interface (void)
FUNC_ENTER_NOAPI_NOINIT
+ /* Internal filters */
+ if (H5Z_register (H5Z_SHUFFLE)<0)
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register shuffle filter")
+ if (H5Z_register (H5Z_FLETCHER32)<0)
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter")
+ if (H5Z_register (H5Z_NBIT)<0)
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register nbit filter")
+ if (H5Z_register (H5Z_SCALEOFFSET)<0)
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register scaleoffset filter")
+
+ /* External filters */
#ifdef H5_HAVE_FILTER_DEFLATE
if (H5Z_register (H5Z_DEFLATE)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register deflate filter")
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register deflate filter")
#endif /* H5_HAVE_FILTER_DEFLATE */
-#ifdef H5_HAVE_FILTER_SHUFFLE
- if (H5Z_register (H5Z_SHUFFLE)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register shuffle filter")
-#endif /* H5_HAVE_FILTER_SHUFFLE */
-#ifdef H5_HAVE_FILTER_FLETCHER32
- if (H5Z_register (H5Z_FLETCHER32)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter")
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
#ifdef H5_HAVE_FILTER_SZIP
H5Z_SZIP->encoder_present = SZ_encoder_enabled();
if (H5Z_register (H5Z_SZIP)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter")
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter")
#endif /* H5_HAVE_FILTER_SZIP */
-#ifdef H5_HAVE_FILTER_NBIT
- if (H5Z_register (H5Z_NBIT)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register nbit filter")
-#endif /* H5_HAVE_FILTER_NBIT */
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (H5Z_register (H5Z_SCALEOFFSET)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register scaleoffset filter")
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
-#if (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_FLETCHER32 | defined H5_HAVE_FILTER_SHUFFLE | defined H5_HAVE_FILTER_SZIP | defined H5_HAVE_FILTER_NBIT | defined H5_HAVE_FILTER_SCALEOFFSET)
done:
-#endif /* (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_FLETCHER32 | defined H5_HAVE_FILTER_SHUFFLE | defined H5_HAVE_FILTER_SZIP | defined H5_HAVE_FILTER_NBIT | defined H5_HAVE_FILTER_SCALEOFFSET) */
FUNC_LEAVE_NOAPI(ret_value)
}
diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c
index 8d2643d..2ee69d1 100644
--- a/src/H5Zfletcher32.c
+++ b/src/H5Zfletcher32.c
@@ -27,8 +27,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Zpkg.h" /* Data filters */
-#ifdef H5_HAVE_FILTER_FLETCHER32
-
/* Local function prototypes */
static size_t H5Z_filter_fletcher32 (unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
@@ -139,9 +137,11 @@ H5Z_filter_fletcher32 (unsigned flags, size_t UNUSED cd_nelmts, const unsigned U
/* Compute checksum (can't fail) */
fletcher = H5_checksum_fletcher32(src, nbytes);
- if (NULL==(dst=outbuf=H5MM_malloc(nbytes+FLETCHER_LEN)))
+ if (NULL == (outbuf = H5MM_malloc(nbytes + FLETCHER_LEN)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "unable to allocate Fletcher32 checksum destination buffer")
+ dst = (unsigned char *) outbuf;
+
/* Copy raw data */
HDmemcpy((void*)dst, (void*)(*buf), nbytes);
@@ -164,5 +164,4 @@ done:
H5MM_xfree(outbuf);
FUNC_LEAVE_NOAPI(ret_value)
}
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index ebb534b..9506ace 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -25,8 +25,6 @@
#include "H5Tprivate.h" /* Datatypes */
#include "H5Zpkg.h" /* Data filters */
-#ifdef H5_HAVE_FILTER_NBIT
-
/* Struct of parameters needed for compressing/decompressing
* one nbit atomic datatype: integer or floating-point
*/
@@ -1424,4 +1422,4 @@ static void H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned c
* the last byte, increment the value by 1. */
*buffer_size = new_size + 1;
}
-#endif /* H5_HAVE_FILTER_NBIT */
+
diff --git a/src/H5Zpkg.h b/src/H5Zpkg.h
index b0df856..e2cec89 100644
--- a/src/H5Zpkg.h
+++ b/src/H5Zpkg.h
@@ -23,48 +23,35 @@
/* Include private header file */
#include "H5Zprivate.h" /* Filter functions */
+/********************/
+/* Internal filters */
+/********************/
-#ifdef H5_HAVE_FILTER_DEFLATE
-/*
- * Deflate filter
- */
-H5_DLLVAR const H5Z_class2_t H5Z_DEFLATE[1];
-#endif /* H5_HAVE_FILTER_DEFLATE */
-
-#ifdef H5_HAVE_FILTER_SHUFFLE
-/*
- * Shuffle filter
- */
+/* Shuffle filter */
H5_DLLVAR const H5Z_class2_t H5Z_SHUFFLE[1];
-#endif /* H5_HAVE_FILTER_SHUFFLE */
-#ifdef H5_HAVE_FILTER_FLETCHER32
-/*
- * Fletcher32 filter
- */
+/* Fletcher32 filter */
H5_DLLVAR const H5Z_class2_t H5Z_FLETCHER32[1];
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
-#ifdef H5_HAVE_FILTER_SZIP
-/*
- * szip filter
- */
-H5_DLLVAR H5Z_class2_t H5Z_SZIP[1];
-#endif /* H5_HAVE_FILTER_SZIP */
-
-#ifdef H5_HAVE_FILTER_NBIT
-/*
- * nbit filter
- */
+/* n-bit filter */
H5_DLLVAR H5Z_class2_t H5Z_NBIT[1];
-#endif /* H5_HAVE_FILTER_NBIT */
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
-/*
- * scaleoffset filter
- */
+/* Scale/offset filter */
H5_DLLVAR H5Z_class2_t H5Z_SCALEOFFSET[1];
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
+
+/********************/
+/* External filters */
+/********************/
+
+/* Deflate filter */
+#ifdef H5_HAVE_FILTER_DEFLATE
+H5_DLLVAR const H5Z_class2_t H5Z_DEFLATE[1];
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+/* szip filter */
+#ifdef H5_HAVE_FILTER_SZIP
+H5_DLLVAR H5Z_class2_t H5Z_SZIP[1];
+#endif /* H5_HAVE_FILTER_SZIP */
#endif /* _H5Zpkg_H */
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 83864b9..38e2986 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -26,8 +26,6 @@
#include "H5Tprivate.h" /* Datatypes */
#include "H5Zpkg.h" /* Data filters */
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
-
/* Struct of parameters needed for compressing/decompressing one atomic datatype */
typedef struct {
size_t size; /* datatype size */
@@ -1722,5 +1720,4 @@ H5Z_scaleoffset_compress(unsigned char *data, unsigned d_nelmts,
for(i = 0; i < d_nelmts; i++)
H5Z_scaleoffset_compress_one_atomic(data, i * p.size, buffer, &j, &buf_len, p);
}
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c
index 4a67839..4138bf1 100644
--- a/src/H5Zshuffle.c
+++ b/src/H5Zshuffle.c
@@ -24,8 +24,6 @@
#include "H5Tprivate.h" /* Datatypes */
#include "H5Zpkg.h" /* Data filters */
-#ifdef H5_HAVE_FILTER_SHUFFLE
-
/* Local function prototypes */
static herr_t H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t space_id);
static size_t H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts,
@@ -291,5 +289,4 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
done:
FUNC_LEAVE_NOAPI(ret_value)
}
-#endif /*H5_HAVE_FILTER_SHUFFLE */
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 42dfcfb..a2fa0ad 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -98,18 +98,6 @@
/* Define if support for deflate (zlib) filter is enabled */
#undef HAVE_FILTER_DEFLATE
-/* Define if support for Fletcher32 checksum is enabled */
-#undef HAVE_FILTER_FLETCHER32
-
-/* Define if support for nbit filter is enabled */
-#undef HAVE_FILTER_NBIT
-
-/* Define if support for scaleoffset filter is enabled */
-#undef HAVE_FILTER_SCALEOFFSET
-
-/* Define if support for shuffle filter is enabled */
-#undef HAVE_FILTER_SHUFFLE
-
/* Define if support for szip filter is enabled */
#undef HAVE_FILTER_SZIP
diff --git a/src/H5detect.c b/src/H5detect.c
index aed7514..fc0570c 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -323,7 +323,7 @@ precision (detected_t *d)
* steps). This is necessary because padding bits can change arbitrarily \
* and interfere with detection of the various properties below unless we \
* know to ignore them. */ \
- _v1 = 4.0; \
+ _v1 = (TYPE)4.0L; \
HDmemcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
for(_i = 0; _i < (int)sizeof(TYPE); _i++) \
for(_byte_mask = (unsigned char)1; _byte_mask; _byte_mask <<= 1) { \
@@ -335,10 +335,10 @@ precision (detected_t *d)
} /* end for */ \
\
/* Byte Order */ \
- for(_i = 0, _v1 = 0.0, _v2 = 1.0; _i < (int)sizeof(TYPE); _i++) { \
+ for(_i = 0, _v1 = (TYPE)0.0L, _v2 = (TYPE)1.0L; _i < (int)sizeof(TYPE); _i++) { \
_v3 = _v1; \
_v1 += _v2; \
- _v2 /= 256.0; \
+ _v2 /= (TYPE)256.0L; \
HDmemcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
HDmemcpy(_buf3, (const void *)&_v3, sizeof(TYPE)); \
_j = byte_cmp(sizeof(TYPE), _buf3, _buf1, _pad_mask); \
@@ -353,20 +353,20 @@ precision (detected_t *d)
INFO.is_vax = TRUE; \
\
/* Implicit mantissa bit */ \
- _v1 = 0.5; \
- _v2 = 1.0; \
+ _v1 = (TYPE)0.5L; \
+ _v2 = (TYPE)1.0L; \
INFO.imp = imp_bit (sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask); \
\
/* Sign bit */ \
- _v1 = 1.0; \
- _v2 = -1.0; \
+ _v1 = (TYPE)1.0L; \
+ _v2 = (TYPE)-1.0L; \
INFO.sign = bit_cmp (sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask); \
\
/* Mantissa */ \
INFO.mpos = 0; \
\
- _v1 = 1.0; \
- _v2 = 1.5; \
+ _v1 = (TYPE)1.0L; \
+ _v2 = (TYPE)1.5L; \
INFO.msize = bit_cmp (sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask); \
INFO.msize += 1 + (INFO.imp?0:1) - INFO.mpos; \
\
@@ -375,7 +375,7 @@ precision (detected_t *d)
\
INFO.esize = INFO.sign - INFO.epos; \
\
- _v1 = 1.0; \
+ _v1 = (TYPE)1.0L; \
INFO.bias = find_bias (INFO.epos, INFO.esize, INFO.perm, &_v1); \
precision (&(INFO)); \
ALIGNMENT(TYPE, INFO); \
@@ -858,6 +858,7 @@ done:\n\
printf("/* signal_handlers tested: %d times */\n", signal_handler_tested_g);
printf("/* sigbus_handler called: %d times */\n", sigbus_handler_called_g);
printf("/* sigsegv_handler called: %d times */\n", sigsegv_handler_called_g);
+ printf("/* sigill_handler called: %d times */\n", sigill_handler_called_g);
} /* end print_results() */
@@ -1381,8 +1382,8 @@ detect_C89_integers(void)
static void
detect_C89_floats(void)
{
- DETECT_F(float, FLOAT, d_g[nd_g]); nd_g++;
- DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++;
+ DETECT_F(float, FLOAT, d_g[nd_g]); nd_g++;
+ DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++;
}
@@ -1750,13 +1751,17 @@ main(void)
#if defined(H5SETJMP) && defined(H5_HAVE_SIGNAL)
/* verify the SIGBUS and SIGSEGV handlers work properly */
- if (verify_signal_handlers (SIGBUS, sigbus_handler) != 0){
- fprintf(stderr, "Signal handler %s for signal %d failed\n",
- "sigbus_handler", SIGBUS);
+ if (verify_signal_handlers(SIGBUS, sigbus_handler) != 0) {
+ fprintf(stderr, "Signal handler %s for signal %d failed\n",
+ "sigbus_handler", SIGBUS);
}
- if (verify_signal_handlers (SIGSEGV, sigsegv_handler) != 0){
- fprintf(stderr, "Signal handler %s for signal %d failed\n",
- "sigsegv_handler", SIGSEGV);
+ if (verify_signal_handlers(SIGSEGV, sigsegv_handler) != 0) {
+ fprintf(stderr, "Signal handler %s for signal %d failed\n",
+ "sigsegv_handler", SIGSEGV);
+ }
+ if (verify_signal_handlers(SIGILL, sigill_handler) != 0) {
+ fprintf(stderr, "Signal handler %s for signal %d failed\n",
+ "sigill_handler", SIGILL);
}
#else
align_status_g |= STA_NoHandlerVerify;
diff --git a/src/H5private.h b/src/H5private.h
index 336d84a..3ac8633 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -480,6 +480,48 @@
# define H5_DEC_ENUM(TYPE,VAR) (VAR)=((TYPE)((VAR)-1))
#endif
+/* Double constant wrapper
+ *
+ * Quiets gcc warnings from -Wunsuffixed-float-constants.
+ *
+ * This is a really annoying warning since the standard specifies that
+ * constants of type double do NOT get a suffix so there's no way
+ * to specify a constant of type double. To quiet gcc, we specify floating
+ * point constants as type long double and cast to double.
+ *
+ * Note that this macro only needs to be used where using a double
+ * is important. For most code, suffixing constants with F will quiet the
+ * compiler and not produce erroneous code.
+ */
+#define H5_DOUBLE(S) ((double) S ## L)
+
+/*
+ * Methods to compare the equality of floating-point values:
+ *
+ * 1. H5_XXX_ABS_EQUAL - check if the difference is smaller than the
+ * Epsilon value. The Epsilon values, FLT_EPSILON, DBL_EPSILON,
+ * and LDBL_EPSILON, are defined by compiler in float.h.
+ *
+ * 2. H5_XXX_REL_EQUAL - check if the relative difference is smaller than a
+ * predefined value M. See if two values are relatively equal.
+ * It's the developer's responsibility not to pass in the value 0, which
+ * may cause the equation to fail.
+ */
+#define H5_FLT_ABS_EQUAL(X,Y) (HDfabsf(X-Y) < FLT_EPSILON)
+#define H5_DBL_ABS_EQUAL(X,Y) (HDfabs (X-Y) < DBL_EPSILON)
+#define H5_LDBL_ABS_EQUAL(X,Y) (HDfabsl(X-Y) < LDBL_EPSILON)
+
+#define H5_FLT_REL_EQUAL(X,Y,M) (HDfabsf((Y-X) / X) < M)
+#define H5_DBL_REL_EQUAL(X,Y,M) (HDfabs ((Y-X) / X) < M)
+#define H5_LDBL_REL_EQUAL(X,Y,M) (HDfabsl((Y-X) / X) < M)
+
+/* KiB, MiB, GiB, TiB, EiB - Used in profiling and timing code */
+#define H5_KB (1024.0F)
+#define H5_MB (1024.0F * 1024.0F)
+#define H5_GB (1024.0F * 1024.0F * 1024.0F)
+#define H5_TB (1024.0F * 1024.0F * 1024.0F * 1024.0F)
+#define H5_EB (1024.0F * 1024.0F * 1024.0F * 1024.0F * 1024.0F)
+
/*
* Data types and functions for timing certain parts of the library.
*/
diff --git a/src/H5public.h b/src/H5public.h
index e98b2ff..9c27159 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -332,6 +332,8 @@ H5_DLL herr_t H5get_libversion(unsigned *majnum, unsigned *minnum,
H5_DLL herr_t H5check_version(unsigned majnum, unsigned minnum,
unsigned relnum);
H5_DLL herr_t H5free_memory(void *mem);
+H5_DLL void *H5allocate_memory(size_t size, hbool_t clear);
+H5_DLL void *H5resize_memory(void *mem, size_t size);
#ifdef __cplusplus
}
diff --git a/src/H5timer.c b/src/H5timer.c
index 301d98b..94f2883 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -90,8 +90,6 @@
* Programmer: Robb Matzke
* Thursday, April 16, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
@@ -112,8 +110,6 @@ H5_timer_reset (H5_timer_t *timer)
* Programmer: Robb Matzke
* Thursday, April 16, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
@@ -131,18 +127,18 @@ H5_timer_begin (H5_timer_t *timer)
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage (RUSAGE_SELF, &rusage);
timer->utime = (double)rusage.ru_utime.tv_sec +
- ((double)rusage.ru_utime.tv_usec / 1e6);
+ ((double)rusage.ru_utime.tv_usec / 1e6F);
timer->stime = (double)rusage.ru_stime.tv_sec +
- ((double)rusage.ru_stime.tv_usec / 1e6);
+ ((double)rusage.ru_stime.tv_usec / 1e6F);
#else
- timer->utime = 0.0;
- timer->stime = 0.0;
+ timer->utime = 0.0F;
+ timer->stime = 0.0F;
#endif
#ifdef H5_HAVE_GETTIMEOFDAY
HDgettimeofday (&etime, NULL);
- timer->etime = (double)etime.tv_sec + ((double)etime.tv_usec / 1e6);
+ timer->etime = (double)etime.tv_sec + ((double)etime.tv_usec / 1e6F);
#else
- timer->etime = 0.0;
+ timer->etime = 0.0F;
#endif
} /* end H5_timer_begin() */
@@ -160,8 +156,6 @@ H5_timer_begin (H5_timer_t *timer)
* Programmer: Robb Matzke
* Thursday, April 16, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
@@ -170,16 +164,16 @@ H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/)
H5_timer_t now;
HDassert(timer);
- H5_timer_begin (&now);
+ H5_timer_begin(&now);
- timer->utime = MAX(0.0, now.utime - timer->utime);
- timer->stime = MAX(0.0, now.stime - timer->stime);
- timer->etime = MAX(0.0, now.etime - timer->etime);
+ timer->utime = MAX(0.0F, now.utime - timer->utime);
+ timer->stime = MAX(0.0F, now.stime - timer->stime);
+ timer->etime = MAX(0.0F, now.etime - timer->etime);
if (sum) {
- sum->utime += timer->utime;
- sum->stime += timer->stime;
- sum->etime += timer->etime;
+ sum->utime += timer->utime;
+ sum->stime += timer->stime;
+ sum->etime += timer->etime;
}
} /* end H5_timer_end() */
@@ -207,8 +201,6 @@ H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/)
* Programmer: Robb Matzke
* Wednesday, August 5, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
@@ -216,35 +208,34 @@ H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds)
{
double bw;
- if(nseconds <= 0.0)
- HDstrcpy(buf, " NaN");
+ if(nseconds <= 0.0F)
+ HDstrcpy(buf, " NaN");
else {
- bw = nbytes/nseconds;
- if(HDfabs(bw) < 0.0000000001)
- /* That is == 0.0, but direct comparison between floats is bad */
- HDstrcpy(buf, "0.000 B/s");
- else if(bw < 1.0)
- sprintf(buf, "%10.4e", bw);
- else if(bw < 1024.0) {
- sprintf(buf, "%05.4f", bw);
- HDstrcpy(buf+5, " B/s");
- } else if(bw < (1024.0 * 1024.0)) {
- sprintf(buf, "%05.4f", bw / 1024.0);
- HDstrcpy(buf+5, " kB/s");
- } else if(bw < (1024.0 * 1024.0 * 1024.0)) {
- sprintf(buf, "%05.4f", bw / (1024.0 * 1024.0));
- HDstrcpy(buf+5, " MB/s");
- } else if(bw < (1024.0 * 1024.0 * 1024.0 * 1024.0)) {
- sprintf(buf, "%05.4f", bw / (1024.0 * 1024.0 * 1024.0));
- HDstrcpy(buf+5, " GB/s");
- } else if(bw < (1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0)) {
- sprintf(buf, "%05.4f", bw / (1024.0 * 1024.0 * 1024.0 * 1024.0));
- HDstrcpy(buf+5, " TB/s");
- } else {
- sprintf(buf, "%10.4e", bw);
- if(HDstrlen(buf) > 10)
- sprintf(buf, "%10.3e", bw);
- }
+ bw = nbytes/nseconds;
+ if(H5_DBL_ABS_EQUAL(bw, 0.0F))
+ HDstrcpy(buf, "0.000 B/s");
+ else if(bw < 1.0F)
+ sprintf(buf, "%10.4e", bw);
+ else if(bw < H5_KB) {
+ sprintf(buf, "%05.4f", bw);
+ HDstrcpy(buf+5, " B/s");
+ } else if(bw < H5_MB) {
+ sprintf(buf, "%05.4f", bw / H5_KB);
+ HDstrcpy(buf+5, " kB/s");
+ } else if(bw < H5_GB) {
+ sprintf(buf, "%05.4f", bw / H5_MB);
+ HDstrcpy(buf+5, " MB/s");
+ } else if(bw < H5_TB) {
+ sprintf(buf, "%05.4f", bw / H5_GB);
+ HDstrcpy(buf+5, " GB/s");
+ } else if(bw < H5_EB) {
+ sprintf(buf, "%05.4f", bw / H5_TB);
+ HDstrcpy(buf+5, " TB/s");
+ } else {
+ sprintf(buf, "%10.4e", bw);
+ if(HDstrlen(buf) > 10)
+ sprintf(buf, "%10.3e", bw);
+ }
}
} /* end H5_bandwidth() */
diff --git a/src/H5trace.c b/src/H5trace.c
index 3a84489..6634a2a 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -110,7 +110,7 @@
* SO MAY CAUSE H5_trace() TO BE INVOKED RECURSIVELY OR MAY
* CAUSE LIBRARY INITIALIZATIONS THAT ARE NOT DESIRED.
*
- * Return: void
+ * Return: Execution time for an API call
*
* Programmer: Robb Matzke
* Tuesday, June 16, 1998
@@ -129,34 +129,34 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
void *vp = NULL;
FILE *out = H5_debug_g.trace;
H5_timer_t event_time;
- static H5_timer_t first_time = {0.0, 0.0, 0.0};
+ static H5_timer_t first_time = {0.0F, 0.0F, 0.0F};
static int current_depth = 0;
static int last_call_depth = 0;
/* FUNC_ENTER() should not be called */
if(!out)
- return 0.0; /*tracing is off*/
+ return 0.0F; /*tracing is off*/
va_start(ap, type);
if(H5_debug_g.ttop) {
if(returning) {
if(current_depth > 1) {
--current_depth;
- return 0.0;
+ return 0.0F;
} /* end if */
} /* end if */
else {
if(current_depth > 0) {
/*do not update last_call_depth*/
current_depth++;
- return 0.0;
+ return 0.0F;
} /* end if */
} /* end else */
} /* end if */
- /* Get tim for event */
- if(HDfabs(first_time.etime) < 0.0000000001)
+ /* Get time for event */
+ if(HDfabs(first_time.etime) < 0.0000000001F)
/* That is == 0.0, but direct comparison between floats is bad */
H5_timer_begin(&first_time);
if(H5_debug_g.ttimes)
diff --git a/src/Makefile.am b/src/Makefile.am
index b5342cb..d92c0c8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -123,7 +123,7 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers
H5FDmulti.h H5FDsec2.h H5FDstdio.h \
H5Gpublic.h H5Ipublic.h H5Lpublic.h \
H5MMpublic.h H5Opublic.h H5Ppublic.h \
- H5PLextern.h \
+ H5PLextern.h H5PLpublic.h \
H5Rpublic.h H5Spublic.h \
H5Tpublic.h H5Zpublic.h
diff --git a/src/Makefile.in b/src/Makefile.in
index 6c01edd..1698c29 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -523,7 +523,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -611,10 +610,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@
@@ -834,7 +829,7 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers
H5FDmulti.h H5FDsec2.h H5FDstdio.h \
H5Gpublic.h H5Ipublic.h H5Lpublic.h \
H5MMpublic.h H5Opublic.h H5Ppublic.h \
- H5PLextern.h \
+ H5PLextern.h H5PLpublic.h \
H5Rpublic.h H5Spublic.h \
H5Tpublic.h H5Zpublic.h
diff --git a/src/hdf5.h b/src/hdf5.h
index a37329d..7a10507 100644
--- a/src/hdf5.h
+++ b/src/hdf5.h
@@ -33,7 +33,8 @@
#include "H5Lpublic.h" /* Links */
#include "H5MMpublic.h" /* Memory management */
#include "H5Opublic.h" /* Object headers */
-#include "H5Ppublic.h" /* Property lists */
+#include "H5Ppublic.h" /* Property lists */
+#include "H5PLpublic.h" /* Plugins */
#include "H5Rpublic.h" /* References */
#include "H5Spublic.h" /* Dataspaces */
#include "H5Tpublic.h" /* Datatypes */
diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in
index 424334d..1b1ae96 100644
--- a/src/libhdf5.settings.in
+++ b/src/libhdf5.settings.in
@@ -62,7 +62,6 @@ Features:
Default API Mapping: @DEFAULT_API_VERSION@
With Deprecated Public Symbols: @DEPRECATED_SYMBOLS@
I/O filters (external): @EXTERNAL_FILTERS@
- I/O filters (internal): @FILTERS@
MPE: @MPE@
Direct VFD: @DIRECT_VFD@
dmalloc: @HAVE_DMALLOC@
diff --git a/test/Makefile.in b/test/Makefile.in
index a24232e..dedc262 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -951,7 +951,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -1039,10 +1038,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/test/cache.c b/test/cache.c
index e5c6e18..6c4bbda 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -20340,7 +20340,10 @@ check_auto_cache_resize(void)
auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold;
- auto_size_ctl.upper_hr_threshold = 0.999; /* for ease of testing */
+ /* NOTE: upper_hr_threshold MUST be type double (not float)
+ * or the cache test will fail on 64-bit systems.
+ */
+ auto_size_ctl.upper_hr_threshold = H5_DOUBLE(0.999); /* for ease of testing */
auto_size_ctl.decrement = 0.5f;
@@ -28353,7 +28356,7 @@ check_auto_cache_resize_aux_fcns(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
- } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */
+ } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5F, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */
pass = FALSE;
failure_mssg =
diff --git a/test/cache_api.c b/test/cache_api.c
index b1ccef1..8f556be 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -2173,7 +2173,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 0.999999999999,
+ /* double increment = */ H5_DOUBLE(0.999999999999),
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
@@ -2532,7 +2532,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* double flash_threshold = */ 0.5f,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
/* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 1.0000000001,
+ /* double decrement = */ H5_DOUBLE(1.0000000001),
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
@@ -2712,7 +2712,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 1.00000000001,
+ /* double empty_reserve = */ H5_DOUBLE(1.00000000001),
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
@@ -2776,7 +2776,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* double flash_multiple = */ 2.0f,
/* double flash_threshold = */ 0.5f,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 1.00000001,
+ /* double upper_hr_threshold = */ H5_DOUBLE(1.00000001),
/* double decrement = */ 0.9f,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024),
diff --git a/test/cache_common.c b/test/cache_common.c
index c9c1675..f707f98 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -5287,7 +5287,7 @@ check_and_validate_cache_hit_rate(hid_t file_id,
} else {
- expected_hit_rate = 0.0;
+ expected_hit_rate = 0.0F;
}
result = H5Fget_mdc_hit_rate(file_id, &hit_rate);
@@ -5297,7 +5297,7 @@ check_and_validate_cache_hit_rate(hid_t file_id,
pass = FALSE;
failure_mssg = "H5Fget_mdc_hit_rate() failed.";
- } else if ( ! DBL_REL_EQUAL(hit_rate, expected_hit_rate, 0.00001) ) {
+ } else if ( ! DBL_REL_EQUAL(hit_rate, expected_hit_rate, 0.00001F) ) {
pass = FALSE;
failure_mssg = "unexpected hit rate.";
diff --git a/test/cross_read.c b/test/cross_read.c
index ba99c9e..35dd2ce 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -100,15 +100,15 @@ static int check_data(const char *dsetname, hid_t fid, hbool_t floating_number)
for (j = 0; j < NX; j++) {
for (i = 0; i < NY; i++) {
data_in[j][i] = ((double)(i + j + 1))/3;
- data_out[j][i] = 0;
+ data_out[j][i] = 0.0F;
int_data_in[j][i] = i + j;
int_data_out[j][i] = 0;
}
}
for (i = 0; i < NY; i++) {
- data_in[NX][i] = -2.2;
- data_out[NX][i] = 0;
+ data_in[NX][i] = -2.2F;
+ data_out[NX][i] = 0.0F;
int_data_in[NX][i] = -2;
int_data_out[NX][i] = 0;
@@ -126,7 +126,7 @@ static int check_data(const char *dsetname, hid_t fid, hbool_t floating_number)
/* Check results */
for (j=0; j<(NX+1); j++) {
for (i=0; i<NY; i++) {
- if (!DBL_REL_EQUAL(data_out[j][i], data_in[j][i], 0.001)) {
+ if (!DBL_REL_EQUAL(data_out[j][i], data_in[j][i], 0.001F)) {
if (!nerrors++) {
H5_FAILED();
printf("element [%d][%d] is %g but should have been %g\n",
@@ -213,116 +213,46 @@ static int open_dataset(char *fname)
nerrors += check_data(DATASETNAME1, file, TRUE);
TESTING("dataset of LE FLOAT with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME2, file, TRUE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of BE FLOAT with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME3, file, TRUE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of LE DOUBLE with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME4, file, TRUE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of BE DOUBLE with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME5, file, TRUE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of LE CHAR with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME6, file, FALSE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of BE CHAR with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME7, file, FALSE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of LE SHORT with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME8, file, FALSE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of BE SHORT with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME9, file, FALSE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of LE INT with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME10, file, FALSE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of BE INT with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME11, file, FALSE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of LE LONG LONG with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME12, file, FALSE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of BE LONG LONG with scale-offset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
nerrors += check_data(DATASETNAME13, file, FALSE);
-#else /*H5_HAVE_FILTER_SCALEOFFSET*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SCALEOFFSET*/
TESTING("dataset of LE FLOAT with Fletcher32 filter");
-#ifdef H5_HAVE_FILTER_FLETCHER32
nerrors += check_data(DATASETNAME14, file, TRUE);
-#else /*H5_HAVE_FILTER_FLETCHER32*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_FLETCHER32*/
TESTING("dataset of BE FLOAT with Fletcher32 filter");
-#ifdef H5_HAVE_FILTER_FLETCHER32
nerrors += check_data(DATASETNAME15, file, TRUE);
-#else /*H5_HAVE_FILTER_FLETCHER32*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_FLETCHER32*/
TESTING("dataset of LE FLOAT with Deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
@@ -357,36 +287,16 @@ static int open_dataset(char *fname)
#endif /*H5_HAVE_FILTER_SZIP*/
TESTING("dataset of LE FLOAT with Shuffle filter");
-#ifdef H5_HAVE_FILTER_SHUFFLE
nerrors += check_data(DATASETNAME20, file, TRUE);
-#else /*H5_HAVE_FILTER_SHUFFLE*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SHUFFLE*/
TESTING("dataset of BE FLOAT with Shuffle filter");
-#ifdef H5_HAVE_FILTER_SHUFFLE
nerrors += check_data(DATASETNAME21, file, TRUE);
-#else /*H5_HAVE_FILTER_SHUFFLE*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_SHUFFLE*/
TESTING("dataset of LE FLOAT with Nbit filter");
-#ifdef H5_HAVE_FILTER_NBIT
nerrors += check_data(DATASETNAME22, file, TRUE);
-#else /*H5_HAVE_FILTER_NBIT*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_NBIT*/
TESTING("dataset of BE FLOAT with Nbit filter");
-#ifdef H5_HAVE_FILTER_NBIT
nerrors += check_data(DATASETNAME23, file, TRUE);
-#else /*H5_HAVE_FILTER_NBIT*/
- SKIPPED();
- puts(not_supported);
-#endif /*H5_HAVE_FILTER_NBIT*/
if(H5Fclose(file))
TEST_ERROR
diff --git a/test/dsets.c b/test/dsets.c
index ffee6af..7f32e1d 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -83,19 +83,17 @@ const char *FILENAME[] = {
#define DSET_CONV_BUF_NAME "conv_buf"
#define DSET_TCONV_NAME "tconv"
#define DSET_DEFLATE_NAME "deflate"
-#ifdef H5_HAVE_FILTER_SZIP
-#define DSET_SZIP_NAME "szip"
-#endif /* H5_HAVE_FILTER_SZIP */
#define DSET_SHUFFLE_NAME "shuffle"
#define DSET_FLETCHER32_NAME "fletcher32"
#define DSET_FLETCHER32_NAME_2 "fletcher32_2"
#define DSET_FLETCHER32_NAME_3 "fletcher32_3"
#define DSET_SHUF_DEF_FLET_NAME "shuffle+deflate+fletcher32"
#define DSET_SHUF_DEF_FLET_NAME_2 "shuffle+deflate+fletcher32_2"
-#if defined H5_HAVE_FILTER_SZIP && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
+#ifdef H5_HAVE_FILTER_SZIP
+#define DSET_SZIP_NAME "szip"
#define DSET_SHUF_SZIP_FLET_NAME "shuffle+szip+fletcher32"
#define DSET_SHUF_SZIP_FLET_NAME_2 "shuffle+szip+fletcher32_2"
-#endif /* defined H5_HAVE_FILTER_SZIP && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32 */
+#endif /* H5_HAVE_FILTER_SZIP */
#define DSET_BOGUS_NAME "bogus"
#define DSET_MISSING_NAME "missing"
@@ -2094,21 +2092,17 @@ test_get_filter_info(void)
/* Verify that each filter is reported as having the right combination
* of encoder and decoder.
*/
-#ifdef H5_HAVE_FILTER_FLETCHER32
if(H5Zget_filter_info(H5Z_FILTER_FLETCHER32, &flags) < 0) TEST_ERROR
if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
TEST_ERROR
-#endif
-#ifdef H5_HAVE_FILTER_SHUFFLE
if(H5Zget_filter_info(H5Z_FILTER_SHUFFLE, &flags) < 0) TEST_ERROR
if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
TEST_ERROR
-#endif
#ifdef H5_HAVE_FILTER_DEFLATE
if(H5Zget_filter_info(H5Z_FILTER_DEFLATE, &flags) < 0) TEST_ERROR
@@ -2171,10 +2165,8 @@ UNUSED
const hsize_t chunk_size[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2}; /* Chunk dimensions */
hsize_t null_size; /* Size of dataset with null filter */
-#ifdef H5_HAVE_FILTER_FLETCHER32
hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */
unsigned data_corrupt[3]; /* position and length of data to be corrupted */
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
#ifdef H5_HAVE_FILTER_DEFLATE
hsize_t deflate_size; /* Size of dataset with deflate filter */
@@ -2186,13 +2178,11 @@ UNUSED
unsigned szip_pixels_per_block=4;
#endif /* H5_HAVE_FILTER_SZIP */
-#ifdef H5_HAVE_FILTER_SHUFFLE
hsize_t shuffle_size; /* Size of dataset with shuffle filter */
-#endif /* H5_HAVE_FILTER_SHUFFLE */
-#if(defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP) && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
- hsize_t combo_size; /* Size of dataset with shuffle+deflate filter */
-#endif /* H5_HAVE_FILTER_DEFLATE && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */
+#if(defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP)
+ hsize_t combo_size; /* Size of dataset with multiple filters */
+#endif /* defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP */
/* test the H5Zget_filter_info function */
if(test_get_filter_info() < 0) goto error;
@@ -2216,7 +2206,6 @@ UNUSED
* STEP 1: Test Fletcher32 Checksum by itself.
*----------------------------------------------------------
*/
-#ifdef H5_HAVE_FILTER_FLETCHER32
puts("Testing Fletcher32 checksum(enabled for read)");
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
@@ -2257,11 +2246,6 @@ UNUSED
/* Clean up objects used for this test */
if(H5Pclose (dc) < 0) goto error;
-#else /* H5_HAVE_FILTER_FLETCHER32 */
- TESTING("fletcher32 checksum");
- SKIPPED();
- puts(" Fletcher32 checksum not enabled");
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
/*----------------------------------------------------------
* STEP 2: Test deflation by itself.
@@ -2319,7 +2303,6 @@ UNUSED
* STEP 4: Test shuffling by itself.
*----------------------------------------------------------
*/
-#ifdef H5_HAVE_FILTER_SHUFFLE
puts("Testing shuffle filter");
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
@@ -2334,17 +2317,12 @@ UNUSED
/* Clean up objects used for this test */
if(H5Pclose (dc) < 0) goto error;
-#else /* H5_HAVE_FILTER_SHUFFLE */
- TESTING("shuffle filter");
- SKIPPED();
- puts(" Shuffle filter not enabled");
-#endif /* H5_HAVE_FILTER_SHUFFLE */
/*----------------------------------------------------------
* STEP 5: Test shuffle + deflate + checksum in any order.
*----------------------------------------------------------
*/
-#if defined H5_HAVE_FILTER_DEFLATE && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
+#ifdef H5_HAVE_FILTER_DEFLATE
puts("Testing shuffle+deflate+checksum filters(checksum first)");
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
@@ -2368,17 +2346,17 @@ UNUSED
/* Clean up objects used for this test */
if(H5Pclose (dc) < 0) goto error;
-#else /* H5_HAVE_FILTER_DEFLATE && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */
+#else /* H5_HAVE_FILTER_DEFLATE */
TESTING("shuffle+deflate+fletcher32 filters");
SKIPPED();
- puts(" Deflate, shuffle, or fletcher32 checksum filter not enabled");
-#endif /* H5_HAVE_FILTER_DEFLATE && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */
+ puts(" Deflate filter not enabled");
+#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
* STEP 6: Test shuffle + szip + checksum in any order.
*----------------------------------------------------------
*/
-#if defined H5_HAVE_FILTER_SZIP && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
+#ifdef H5_HAVE_FILTER_SZIP
TESTING("shuffle+szip+checksum filters(checksum first, with encoder)");
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
@@ -2427,11 +2405,11 @@ UNUSED
SKIPPED();
}
-#else /* H5_HAVE_FILTER_SZIP && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */
+#else /* H5_HAVE_FILTER_SZIP */
TESTING("shuffle+szip+fletcher32 filters");
SKIPPED();
- puts(" Szip, shuffle, or fletcher32 checksum filter not enabled");
-#endif /* H5_HAVE_FILTER_SZIP && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */
+ puts(" szip filter not enabled");
+#endif /* H5_HAVE_FILTER_SZIP */
return 0;
error:
@@ -2698,20 +2676,15 @@ error:
static herr_t
test_onebyte_shuffle(hid_t file)
{
-#ifdef H5_HAVE_FILTER_SHUFFLE
hid_t dataset, space,dc;
const hsize_t size[2] = {10, 20};
const hsize_t chunk_size[2] = {10, 20};
unsigned char orig_data[10][20];
unsigned char new_data[10][20];
size_t i, j;
-#else /* H5_HAVE_FILTER_SHUFFLE */
- const char *not_supported= " Data shuffling is not enabled.";
-#endif /* H5_HAVE_FILTER_SHUFFLE */
TESTING("8-bit shuffling (setup)");
-#ifdef H5_HAVE_FILTER_SHUFFLE
/* Create the data space */
if((space = H5Screate_simple(2, size, NULL)) < 0) goto error;
@@ -2729,10 +2702,6 @@ test_onebyte_shuffle(hid_t file)
orig_data[i][j] = (unsigned char)HDrandom();
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test shuffling by setting up a chunked dataset and writing
@@ -2741,16 +2710,11 @@ test_onebyte_shuffle(hid_t file)
*/
TESTING("8-bit shuffling (write)");
-#ifdef H5_HAVE_FILTER_SHUFFLE
if(H5Dwrite(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT,
orig_data) < 0)
goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -2758,7 +2722,6 @@ test_onebyte_shuffle(hid_t file)
*/
TESTING("8-bit shuffling (read)");
-#ifdef H5_HAVE_FILTER_SHUFFLE
/* Read the dataset back */
if(H5Dread(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT,
new_data) < 0)
@@ -2785,10 +2748,6 @@ test_onebyte_shuffle(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
return 0;
@@ -2814,7 +2773,6 @@ error:
static herr_t
test_nbit_int(hid_t file)
{
-#ifdef H5_HAVE_FILTER_NBIT
hid_t dataset, datatype, mem_datatype, space, dc;
hsize_t size[2] = {2, 5};
hsize_t chunk_size[2] = {2,5};
@@ -2823,13 +2781,10 @@ test_nbit_int(hid_t file)
unsigned int mask;
size_t precision, offset;
size_t i, j;
-#else /* H5_HAVE_FILTER_NBIT */
- const char *not_supported= " Nbit is not enabled.";
-#endif /* H5_HAVE_FILTER_NBIT */
puts("Testing nbit filter");
TESTING(" nbit int (setup)");
-#ifdef H5_HAVE_FILTER_NBIT
+
/* Define dataset datatype (integer), and set precision, offset */
datatype = H5Tcopy(H5T_NATIVE_INT);
precision = 17; /* precision includes sign bit */
@@ -2867,10 +2822,6 @@ test_nbit_int(hid_t file)
}
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test nbit by setting up a chunked dataset and writing
@@ -2879,15 +2830,10 @@ test_nbit_int(hid_t file)
*/
TESTING(" nbit int (write)");
-#ifdef H5_HAVE_FILTER_NBIT
if(H5Dwrite(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT,
orig_data) < 0)
goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -2895,7 +2841,6 @@ test_nbit_int(hid_t file)
*/
TESTING(" nbit int (read)");
-#ifdef H5_HAVE_FILTER_NBIT
/* Read the dataset back */
if(H5Dread(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT,
new_data) < 0)
@@ -2927,10 +2872,7 @@ test_nbit_int(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
+
return 0;
error:
return -1;
@@ -2954,24 +2896,20 @@ error:
static herr_t
test_nbit_float(hid_t file)
{
-#ifdef H5_HAVE_FILTER_NBIT
hid_t dataset, datatype, space, dc;
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2, 5};
/* orig_data[] are initialized to be within the range that can be represented by
* dataset datatype (no precision loss during datatype conversion)
*/
- float orig_data[2][5] = {{(float)188384.00f, (float)19.103516f, (float)-1.0831790e9f, (float)-84.242188f,
- (float)5.2045898f}, {(float)-49140.000f, (float)2350.2500f, (float)-3.2110596e-1f, (float)6.4998865e-5f, (float)-0.0000000f}};
+ float orig_data[2][5] = {{188384.0f, 19.103516f, -1.0831790e9f, -84.242188f, 5.2045898f},
+ {-49140.0f, 2350.25f, -3.2110596e-1f, 6.4998865e-5f, -0.0f}};
float new_data[2][5];
size_t precision, offset;
size_t i, j;
-#else /* H5_HAVE_FILTER_NBIT */
- const char *not_supported= " Nbit is not enabled.";
-#endif /* H5_HAVE_FILTER_NBIT */
TESTING(" nbit float (setup)");
-#ifdef H5_HAVE_FILTER_NBIT
+
/* Define user-defined single-precision floating-point type for dataset */
datatype = H5Tcopy(H5T_IEEE_F32BE);
if(H5Tset_fields(datatype, (size_t)26, (size_t)20, (size_t)6, (size_t)7, (size_t)13) < 0) goto error;
@@ -2994,10 +2932,6 @@ test_nbit_float(hid_t file)
if((dataset = H5Dcreate2(file, DSET_NBIT_FLOAT_NAME, datatype,
space, H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test nbit by setting up a chunked dataset and writing
@@ -3006,16 +2940,11 @@ test_nbit_float(hid_t file)
*/
TESTING(" nbit float (write)");
-#ifdef H5_HAVE_FILTER_NBIT
if(H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
orig_data) < 0)
goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -3023,7 +2952,6 @@ test_nbit_float(hid_t file)
*/
TESTING(" nbit float (read)");
-#ifdef H5_HAVE_FILTER_NBIT
/* Read the dataset back */
if(H5Dread(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
new_data) < 0)
@@ -3054,10 +2982,6 @@ test_nbit_float(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
return 0;
@@ -3084,25 +3008,33 @@ static herr_t
test_nbit_double(hid_t file)
{
/* assume unsigned int and float has the same number of bytes */
-#ifdef H5_HAVE_FILTER_NBIT
hid_t dataset, datatype, space, dc;
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2, 5};
/* orig_data[] are initialized to be within the range that can be represented by
* dataset datatype (no precision loss during datatype conversion)
*/
- double orig_data[2][5] = {{1.6081706885101836e+60, -255.32099170994480,
- 1.2677579992621376e-61, 64568.289448797700, -1.0619721778839084e-75}, {2.1499497833454840e+56,
- 6.6562295504670740e-3, -1.5747263393432150, 1.0711093225222612, -9.8971679387636870e-1}};
+ double orig_data[2][5] = {
+ {
+ H5_DOUBLE(1.6081706885101836e+60),
+ H5_DOUBLE(-255.32099170994480),
+ H5_DOUBLE(1.2677579992621376e-61),
+ H5_DOUBLE(64568.289448797700),
+ H5_DOUBLE(-1.0619721778839084e-75)
+ },
+ {
+ H5_DOUBLE(2.1499497833454840e+56),
+ H5_DOUBLE(6.6562295504670740e-3),
+ H5_DOUBLE(-1.5747263393432150),
+ H5_DOUBLE(1.0711093225222612),
+ H5_DOUBLE(-9.8971679387636870e-1)
+ }};
double new_data[2][5];
size_t precision, offset;
size_t i, j;
-#else /* H5_HAVE_FILTER_NBIT */
- const char *not_supported= " Nbit is not enabled.";
-#endif /* H5_HAVE_FILTER_NBIT */
TESTING(" nbit double (setup)");
-#ifdef H5_HAVE_FILTER_NBIT
+
/* Define user-defined doule-precision floating-point type for dataset */
datatype = H5Tcopy(H5T_IEEE_F64BE);
if(H5Tset_fields(datatype, (size_t)55, (size_t)46, (size_t)9, (size_t)5, (size_t)41) < 0) goto error;
@@ -3126,10 +3058,6 @@ test_nbit_double(hid_t file)
space, H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test nbit by setting up a chunked dataset and writing
@@ -3138,15 +3066,10 @@ test_nbit_double(hid_t file)
*/
TESTING(" nbit double (write)");
-#ifdef H5_HAVE_FILTER_NBIT
if(H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
orig_data) < 0)
goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -3154,7 +3077,6 @@ test_nbit_double(hid_t file)
*/
TESTING(" nbit double (read)");
-#ifdef H5_HAVE_FILTER_NBIT
/* Read the dataset back */
if(H5Dread(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
new_data) < 0)
@@ -3185,10 +3107,6 @@ test_nbit_double(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
return 0;
@@ -3214,7 +3132,6 @@ error:
static herr_t
test_nbit_array(hid_t file)
{
-#ifdef H5_HAVE_FILTER_NBIT
hid_t dataset, base_datatype, array_datatype, space, dc;
hid_t mem_base_datatype, mem_array_datatype;
const hsize_t size[2] = {2, 5};
@@ -3224,12 +3141,9 @@ test_nbit_array(hid_t file)
unsigned int new_data[2][5][3][2];
size_t precision, offset;
size_t i, j, m, n;
-#else /* H5_HAVE_FILTER_NBIT */
- const char *not_supported= " Nbit is not enabled.";
-#endif /* H5_HAVE_FILTER_NBIT */
TESTING(" nbit array (setup)");
-#ifdef H5_HAVE_FILTER_NBIT
+
/* Define dataset array datatype's base datatype and set precision, offset */
base_datatype = H5Tcopy(H5T_NATIVE_UINT);
precision = 22;
@@ -3267,12 +3181,8 @@ test_nbit_array(hid_t file)
for(m = 0; m < (size_t)adims[0]; m++)
for(n = 0; n < (size_t)adims[1]; n++)
orig_data[i][j][m][n] = (unsigned int)(((long long)HDrandom() %
- (long long)HDpow(2.0, (double)precision)) << offset);
+ (long long)HDpow(2.0F, (double)precision)) << offset);
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test nbit by setting up a chunked dataset and writing
@@ -3281,16 +3191,11 @@ test_nbit_array(hid_t file)
*/
TESTING(" nbit array (write)");
-#ifdef H5_HAVE_FILTER_NBIT
if(H5Dwrite(dataset, mem_array_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT,
orig_data) < 0)
goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -3298,7 +3203,6 @@ test_nbit_array(hid_t file)
*/
TESTING(" nbit array (read)");
-#ifdef H5_HAVE_FILTER_NBIT
/* Read the dataset back */
if(H5Dread(dataset, mem_array_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT,
new_data) < 0)
@@ -3332,10 +3236,7 @@ test_nbit_array(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
+
return 0;
error:
@@ -3360,7 +3261,6 @@ error:
static herr_t
test_nbit_compound(hid_t file)
{
-#ifdef H5_HAVE_FILTER_NBIT
typedef struct { /* Struct with atomic fields */
int i;
char c;
@@ -3375,19 +3275,16 @@ test_nbit_compound(hid_t file)
hid_t dataset, space, dc;
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2, 5};
- const float float_val[2][5] = {{(float)188384.00, (float)19.103516, (float)-1.0831790e9, (float)-84.242188,
- (float)5.2045898}, {(float)-49140.000, (float)2350.2500, (float)-3.2110596e-1, (float)6.4998865e-5, (float)-0.0000000}};
+ const float float_val[2][5] = {{188384.0F, 19.103516F, -1.0831790e9F, -84.242188F, 5.2045898F},
+ {-49140.0F, 2350.25F, -3.2110596e-1F, 6.4998865e-5F, -0.0F}};
atomic orig_data[2][5];
atomic new_data[2][5];
unsigned int i_mask, s_mask, c_mask;
size_t i, j;
-#else /* H5_HAVE_FILTER_NBIT */
- const char *not_supported= " Nbit is not enabled.";
-#endif /* H5_HAVE_FILTER_NBIT */
TESTING(" nbit compound (setup)");
-#ifdef H5_HAVE_FILTER_NBIT
+
/* Define datatypes of members of compound datatype */
i_tid=H5Tcopy(H5T_NATIVE_INT);
c_tid=H5Tcopy(H5T_NATIVE_CHAR);
@@ -3443,11 +3340,11 @@ test_nbit_compound(hid_t file)
for(i= 0;i< (size_t)size[0]; i++)
for(j = 0; j < (size_t)size[1]; j++) {
orig_data[i][j].i = (int)(((long long)HDrandom() %
- (long long)HDpow(2.0, (double)(precision[0]-1))) << offset[0]);
+ (long long)HDpow(2.0F, (double)(precision[0]-1))) << offset[0]);
orig_data[i][j].c = (char)(((long long)HDrandom() %
- (long long)HDpow(2.0, (double)(precision[1]-1))) << offset[1]);
+ (long long)HDpow(2.0F, (double)(precision[1]-1))) << offset[1]);
orig_data[i][j].s = (short)(((long long)HDrandom() %
- (long long)HDpow(2.0, (double)(precision[2]-1))) << offset[2]);
+ (long long)HDpow(2.0F, (double)(precision[2]-1))) << offset[2]);
orig_data[i][j].f = float_val[i][j];
/* some even-numbered integer values are negtive */
@@ -3458,10 +3355,6 @@ test_nbit_compound(hid_t file)
}
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test nbit by setting up a chunked dataset and writing
@@ -3470,15 +3363,10 @@ test_nbit_compound(hid_t file)
*/
TESTING(" nbit compound (write)");
-#ifdef H5_HAVE_FILTER_NBIT
if(H5Dwrite(dataset, mem_cmpd_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT,
orig_data) < 0)
goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -3486,7 +3374,6 @@ test_nbit_compound(hid_t file)
*/
TESTING(" nbit compound (read)");
-#ifdef H5_HAVE_FILTER_NBIT
/* Read the dataset back */
if(H5Dread(dataset, mem_cmpd_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT,
new_data) < 0)
@@ -3528,10 +3415,7 @@ test_nbit_compound(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
+
return 0;
error:
@@ -3556,7 +3440,6 @@ error:
static herr_t
test_nbit_compound_2(hid_t file)
{
-#ifdef H5_HAVE_FILTER_NBIT
typedef struct { /* Struct with atomic fields */
int i;
char c;
@@ -3586,19 +3469,16 @@ test_nbit_compound_2(hid_t file)
hid_t dataset, space, dc;
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2, 5};
- const float float_val[2][5] = {{(float)188384.00, (float)19.103516, (float)-1.0831790e9, (float)-84.242188,
- (float)5.2045898}, {(float)-49140.000, (float)2350.2500, (float)-3.2110596e-1, (float)6.4998865e-5, (float)-0.0000000}};
+ const float float_val[2][5] = {{188384.0F, 19.103516F, -1.0831790e9F, -84.242188F, 5.2045898F},
+ {-49140.0F, 2350.25F, -3.2110596e-1F, 6.4998865e-5F, -0.0F}};
complex orig_data[2][5];
complex new_data[2][5];
unsigned int i_mask, s_mask, c_mask, b_mask;
size_t i, j, m, n, b_failed, d_failed;
-#else /* H5_HAVE_FILTER_NBIT */
- const char *not_supported= " Nbit is not enabled.";
-#endif /* H5_HAVE_FILTER_NBIT */
TESTING(" nbit compound complex (setup)");
-#ifdef H5_HAVE_FILTER_NBIT
+
/* Define datatypes of members of compound datatype */
i_tid=H5Tcopy(H5T_NATIVE_INT);
c_tid=H5Tcopy(H5T_NATIVE_CHAR);
@@ -3686,38 +3566,34 @@ test_nbit_compound_2(hid_t file)
for(i= 0;i< (size_t)size[0]; i++)
for(j = 0; j < (size_t)size[1]; j++) {
orig_data[i][j].a.i = (int)(((long long)HDrandom() %
- (long long)HDpow(2.0, (double)(precision[0]-1))) << offset[0]);
+ (long long)HDpow(2.0F, (double)(precision[0]-1))) << offset[0]);
orig_data[i][j].a.c = (char)(((long long)HDrandom() %
- (long long)HDpow(2.0, (double)(precision[1]-1))) << offset[1]);
+ (long long)HDpow(2.0F, (double)(precision[1]-1))) << offset[1]);
orig_data[i][j].a.s = (short)(-((long long)HDrandom() %
- (long long)HDpow(2.0, (double)(precision[2]-1))) << offset[2]);
+ (long long)HDpow(2.0F, (double)(precision[2]-1))) << offset[2]);
orig_data[i][j].a.f = float_val[i][j];
orig_data[i][j].v = (unsigned int)(((long long)HDrandom() %
- (long long)HDpow(2.0, (double)precision[3])) << offset[3]);
+ (long long)HDpow(2.0F, (double)precision[3])) << offset[3]);
for(m = 0; m < (size_t)array_dims[0]; m++)
for(n = 0; n < (size_t)array_dims[1]; n++)
orig_data[i][j].b[m][n] = (char)(((long long)HDrandom() %
- (long long)HDpow(2.0, (double)(precision[4]-1))) << offset[4]);
+ (long long)HDpow(2.0F, (double)(precision[4]-1))) << offset[4]);
for(m = 0; m < (size_t)array_dims[0]; m++)
for(n = 0; n < (size_t)array_dims[1]; n++) {
orig_data[i][j].d[m][n].i = (int)(-((long long)HDrandom() %
- (long long)HDpow(2.0, (double)(precision[0]-1))) << offset[0]);
+ (long long)HDpow(2.0F, (double)(precision[0]-1))) << offset[0]);
orig_data[i][j].d[m][n].c = (char)(((long long)HDrandom() %
- (long long)HDpow(2.0, (double)(precision[1]-1))) << offset[1]);
+ (long long)HDpow(2.0F, (double)(precision[1]-1))) << offset[1]);
orig_data[i][j].d[m][n].s = (short)(((long long)HDrandom() %
- (long long)HDpow(2.0, (double)(precision[2]-1))) << offset[2]);
+ (long long)HDpow(2.0F, (double)(precision[2]-1))) << offset[2]);
orig_data[i][j].d[m][n].f = float_val[i][j];
}
}
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test nbit by setting up a chunked dataset and writing
@@ -3726,15 +3602,10 @@ test_nbit_compound_2(hid_t file)
*/
TESTING(" nbit compound complex (write)");
-#ifdef H5_HAVE_FILTER_NBIT
if(H5Dwrite(dataset, mem_cmpd_tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT,
orig_data) < 0)
goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -3742,7 +3613,6 @@ test_nbit_compound_2(hid_t file)
*/
TESTING(" nbit compound complex (read)");
-#ifdef H5_HAVE_FILTER_NBIT
/* Read the dataset back */
if(H5Dread(dataset, mem_cmpd_tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT,
new_data) < 0)
@@ -3826,10 +3696,7 @@ test_nbit_compound_2(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
+
return 0;
error:
@@ -3854,7 +3721,6 @@ error:
static herr_t
test_nbit_compound_3(hid_t file)
{
-#ifdef H5_HAVE_FILTER_NBIT
typedef struct { /* Struct with some no-op type fields */
int i; /* integer field, NOT a no-op type */
char str[30]; /* fixed-length string, no-op type */
@@ -3872,12 +3738,8 @@ test_nbit_compound_3(hid_t file)
atomic new_data[5];
size_t i, k, j;
-#else /* H5_HAVE_FILTER_NBIT */
- const char *not_supported= " Nbit is not enabled.";
-#endif /* H5_HAVE_FILTER_NBIT */
TESTING(" nbit compound with no-op type (setup)");
-#ifdef H5_HAVE_FILTER_NBIT
/* Define datatypes of members of compound datatype */
i_tid=H5Tcopy(H5T_NATIVE_INT);
@@ -3922,7 +3784,7 @@ test_nbit_compound_3(hid_t file)
/* Initialize data */
for(i = 0; i < (size_t)size[0]; i++) {
HDmemset(&orig_data[i], 0, sizeof(orig_data[i]));
- orig_data[i].i = HDrandom() % (long)HDpow(2.0, 17.0 - 1.0);
+ orig_data[i].i = HDrandom() % (long)HDpow(2.0F, 17.0F - 1.0F);
HDstrcpy(orig_data[i].str, "fixed-length C string");
orig_data[i].vl_str = HDstrdup("variable-length C string");
@@ -3937,10 +3799,6 @@ test_nbit_compound_3(hid_t file)
}
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test nbit by setting up a chunked dataset and writing
@@ -3949,15 +3807,10 @@ test_nbit_compound_3(hid_t file)
*/
TESTING(" nbit compound with no-op type (write)");
-#ifdef H5_HAVE_FILTER_NBIT
if(H5Dwrite(dataset, cmpd_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT,
orig_data) < 0)
goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -3965,7 +3818,6 @@ test_nbit_compound_3(hid_t file)
*/
TESTING(" nbit compound with no-op type (read)");
-#ifdef H5_HAVE_FILTER_NBIT
/* Read the dataset back */
if(H5Dread(dataset, cmpd_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT,
new_data) < 0)
@@ -4022,10 +3874,7 @@ test_nbit_compound_3(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
+
return 0;
error:
@@ -4050,19 +3899,14 @@ error:
static herr_t
test_nbit_int_size(hid_t file)
{
-#ifdef H5_HAVE_FILTER_NBIT
hid_t dataspace, dataset, datatype, mem_datatype, dset_create_props;
hsize_t dims[2], chunk_size[2];
hsize_t dset_size = 0;
int orig_data[DSET_DIM1][DSET_DIM2];
int i, j;
size_t precision, offset;
-#else /* H5_HAVE_FILTER_NBIT */
- const char *not_supported= " Nbit is not enabled.";
-#endif /* H5_HAVE_FILTER_NBIT */
TESTING(" nbit integer dataset size");
-#ifdef H5_HAVE_FILTER_NBIT
/* Define dataset datatype (integer), and set precision, offset */
if((datatype = H5Tcopy(H5T_NATIVE_INT)) < 0) {
@@ -4195,10 +4039,6 @@ test_nbit_int_size(hid_t file)
H5Pclose (dset_create_props);
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
return 0;
error:
@@ -4224,7 +4064,6 @@ error:
static herr_t
test_nbit_flt_size(hid_t file)
{
-#ifdef H5_HAVE_FILTER_NBIT
hid_t dataspace, dataset, datatype, dset_create_props;
hsize_t dims[2], chunk_size[2];
hsize_t dset_size = 0;
@@ -4232,12 +4071,8 @@ test_nbit_flt_size(hid_t file)
int i, j;
size_t precision, offset;
size_t spos, epos, esize, mpos, msize;
-#else /* H5_HAVE_FILTER_NBIT */
- const char *not_supported= " Nbit is not enabled.";
-#endif /* H5_HAVE_FILTER_NBIT */
TESTING(" nbit floating-number dataset size");
-#ifdef H5_HAVE_FILTER_NBIT
/* Define floating-point type for dataset
*-------------------------------------------------------------------
@@ -4401,10 +4236,6 @@ test_nbit_flt_size(hid_t file)
H5Pclose (dset_create_props);
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
return 0;
error:
@@ -4429,20 +4260,16 @@ error:
static herr_t
test_scaleoffset_int(hid_t file)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset, datatype, space, dc;
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2,5};
int orig_data[2][5];
int new_data[2][5];
size_t i, j;
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= " Scaleoffset is not enabled.";
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
puts("Testing scaleoffset filter");
TESTING(" scaleoffset int without fill value (setup)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
+
datatype = H5Tcopy(H5T_NATIVE_INT);
/* Set order of dataset datatype */
@@ -4476,10 +4303,6 @@ test_scaleoffset_int(hid_t file)
}
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test scaleoffset by setting up a chunked dataset and writing
@@ -4488,14 +4311,9 @@ test_scaleoffset_int(hid_t file)
*/
TESTING(" scaleoffset int without fill value (write)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
orig_data) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -4503,7 +4321,6 @@ test_scaleoffset_int(hid_t file)
*/
TESTING(" scaleoffset int without fill value (read)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* Read the dataset back */
if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
new_data) < 0) goto error;
@@ -4530,10 +4347,7 @@ test_scaleoffset_int(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
+
return 0;
error:
return -1;
@@ -4558,7 +4372,6 @@ error:
static herr_t
test_scaleoffset_int_2(hid_t file)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset, datatype, space, mspace, dc;
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2,5};
@@ -4570,12 +4383,9 @@ test_scaleoffset_int_2(hid_t file)
hsize_t block[2]; /* Block sizes */
int fillval;
size_t j;
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= " Scaleoffset is not enabled.";
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
TESTING(" scaleoffset int with fill value (setup)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
+
datatype = H5Tcopy(H5T_NATIVE_INT);
/* Set order of dataset datatype */
@@ -4622,10 +4432,6 @@ test_scaleoffset_int_2(hid_t file)
}
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test scaleoffset by setting up a chunked dataset and writing
@@ -4634,15 +4440,10 @@ test_scaleoffset_int_2(hid_t file)
*/
TESTING(" scaleoffset int with fill value (write)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* only data in the hyperslab will be written, other value should be fill value */
if(H5Dwrite(dataset, H5T_NATIVE_INT, mspace, mspace, H5P_DEFAULT,
orig_data) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -4650,7 +4451,6 @@ test_scaleoffset_int_2(hid_t file)
*/
TESTING(" scaleoffset int with fill value (read)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* Read the dataset back */
if(H5Dread(dataset, H5T_NATIVE_INT, mspace, mspace, H5P_DEFAULT,
new_data) < 0) goto error;
@@ -4675,10 +4475,7 @@ test_scaleoffset_int_2(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
+
return 0;
error:
return -1;
@@ -4703,19 +4500,15 @@ error:
static herr_t
test_scaleoffset_float(hid_t file)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset, datatype, space, dc;
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2,5};
float orig_data[2][5];
float new_data[2][5];
size_t i, j;
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= " Scaleoffset is not enabled.";
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
TESTING(" scaleoffset float without fill value, D-scaling (setup)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
+
datatype = H5Tcopy(H5T_NATIVE_FLOAT);
/* Set order of dataset datatype */
@@ -4743,7 +4536,7 @@ test_scaleoffset_float(hid_t file)
/* Initialize data */
for(i= 0;i< (size_t)size[0]; i++)
for(j = 0; j < (size_t)size[1]; j++) {
- orig_data[i][j] = (float)((HDrandom() % 100000) / (float)1000.0);
+ orig_data[i][j] = (float)((HDrandom() % 100000) / 1000.0F);
/* even-numbered values are negtive */
if((i*size[1]+j+1)%2 == 0)
@@ -4751,10 +4544,6 @@ test_scaleoffset_float(hid_t file)
}
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test scaleoffset by setting up a chunked dataset and writing
@@ -4763,14 +4552,9 @@ test_scaleoffset_float(hid_t file)
*/
TESTING(" scaleoffset float without fill value, D-scaling (write)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
if(H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
orig_data) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -4778,7 +4562,6 @@ test_scaleoffset_float(hid_t file)
*/
TESTING(" scaleoffset float without fill value, D-scaling (read)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* Read the dataset back */
if(H5Dread(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
new_data) < 0) goto error;
@@ -4786,7 +4569,7 @@ test_scaleoffset_float(hid_t file)
/* Check that the values read are the same as the values written */
for(i=0; i<(size_t)size[0]; i++) {
for(j=0; j<(size_t)size[1]; j++) {
- if(HDfabs(new_data[i][j]-orig_data[i][j]) > HDpow(10.0, -3.0)) {
+ if(HDfabs(new_data[i][j]-orig_data[i][j]) > HDpow(10.0F, -3.0F)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -4805,10 +4588,7 @@ test_scaleoffset_float(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
+
return 0;
error:
return -1;
@@ -4833,7 +4613,6 @@ error:
static herr_t
test_scaleoffset_float_2(hid_t file)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset, datatype, space, mspace, dc;
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2,5};
@@ -4845,12 +4624,9 @@ test_scaleoffset_float_2(hid_t file)
hsize_t count[2]; /* Block count */
hsize_t block[2]; /* Block sizes */
size_t j;
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= " Scaleoffset is not enabled.";
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
TESTING(" scaleoffset float with fill value, D-scaling (setup)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
+
datatype = H5Tcopy(H5T_NATIVE_FLOAT);
/* Set order of dataset datatype */
@@ -4863,7 +4639,7 @@ test_scaleoffset_float_2(hid_t file)
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
/* Set fill value */
- fillval = 10000.0;
+ fillval = 10000.0F;
if(H5Pset_fill_value(dc, H5T_NATIVE_FLOAT, &fillval) < 0) goto error;
/* Set up to use scaleoffset filter, decimal scale factor is 3,
@@ -4891,7 +4667,7 @@ test_scaleoffset_float_2(hid_t file)
/* Initialize data of hyperslab */
for(j = 0; j < (size_t)size[1]; j++) {
- orig_data[0][j] = (float)((HDrandom() % 100000) / (float)1000.0);
+ orig_data[0][j] = (float)((HDrandom() % 100000) / 1000.0F);
/* even-numbered values are negtive */
if((j+1)%2 == 0)
@@ -4899,10 +4675,6 @@ test_scaleoffset_float_2(hid_t file)
}
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test scaleoffset by setting up a chunked dataset and writing
@@ -4911,15 +4683,10 @@ test_scaleoffset_float_2(hid_t file)
*/
TESTING(" scaleoffset float with fill value, D-scaling (write)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* only data in the hyperslab will be written, other value should be fill value */
if(H5Dwrite(dataset, H5T_NATIVE_FLOAT, mspace, mspace, H5P_DEFAULT,
orig_data) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -4927,14 +4694,13 @@ test_scaleoffset_float_2(hid_t file)
*/
TESTING(" scaleoffset float with fill value, D-scaling (read)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* Read the dataset back */
if(H5Dread(dataset, H5T_NATIVE_FLOAT, mspace, mspace, H5P_DEFAULT,
new_data) < 0) goto error;
/* Check that the values read are the same as the values written */
for(j=0; j<(size_t)size[1]; j++) {
- if(HDfabs(new_data[0][j]-orig_data[0][j]) > HDpow(10.0, -3.0)) {
+ if(HDfabs(new_data[0][j]-orig_data[0][j]) > HDpow(10.0F, -3.0F)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
@@ -4951,10 +4717,7 @@ test_scaleoffset_float_2(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
+
return 0;
error:
return -1;
@@ -4979,19 +4742,15 @@ error:
static herr_t
test_scaleoffset_double(hid_t file)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset, datatype, space, dc;
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2,5};
double orig_data[2][5];
double new_data[2][5];
size_t i, j;
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= " Scaleoffset is not enabled.";
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
TESTING(" scaleoffset double without fill value, D-scaling (setup)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
+
datatype = H5Tcopy(H5T_NATIVE_DOUBLE);
/* Set order of dataset datatype */
@@ -5019,7 +4778,7 @@ test_scaleoffset_double(hid_t file)
/* Initialize data */
for(i= 0;i< (size_t)size[0]; i++)
for(j = 0; j < (size_t)size[1]; j++) {
- orig_data[i][j] = (HDrandom() % 10000000) / 10000000.0;
+ orig_data[i][j] = (HDrandom() % 10000000) / 10000000.0F;
/* even-numbered values are negtive */
if((i*size[1]+j+1)%2 == 0)
@@ -5027,10 +4786,6 @@ test_scaleoffset_double(hid_t file)
}
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test scaleoffset by setting up a chunked dataset and writing
@@ -5039,14 +4794,9 @@ test_scaleoffset_double(hid_t file)
*/
TESTING(" scaleoffset double without fill value, D-scaling (write)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
if(H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
orig_data) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -5054,7 +4804,6 @@ test_scaleoffset_double(hid_t file)
*/
TESTING(" scaleoffset double without fill value, D-scaling (read)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* Read the dataset back */
if(H5Dread(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT,
new_data) < 0) goto error;
@@ -5062,7 +4811,7 @@ test_scaleoffset_double(hid_t file)
/* Check that the values read are the same as the values written */
for(i=0; i<(size_t)size[0]; i++) {
for(j=0; j<(size_t)size[1]; j++) {
- if(HDfabs(new_data[i][j]-orig_data[i][j]) > HDpow(10.0, -7.0)) {
+ if(HDfabs(new_data[i][j]-orig_data[i][j]) > HDpow(10.0F, -7.0F)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -5081,10 +4830,7 @@ test_scaleoffset_double(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
+
return 0;
error:
return -1;
@@ -5109,7 +4855,6 @@ error:
static herr_t
test_scaleoffset_double_2(hid_t file)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset, datatype, space, mspace, dc;
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2,5};
@@ -5121,12 +4866,9 @@ test_scaleoffset_double_2(hid_t file)
hsize_t count[2]; /* Block count */
hsize_t block[2]; /* Block sizes */
size_t j;
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= " Scaleoffset is not enabled.";
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
TESTING(" scaleoffset double with fill value, D-scaling (setup)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
+
datatype = H5Tcopy(H5T_NATIVE_DOUBLE);
/* Set order of dataset datatype */
@@ -5139,7 +4881,7 @@ test_scaleoffset_double_2(hid_t file)
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
/* Set fill value */
- fillval = 10000.0;
+ fillval = 10000.0F;
if(H5Pset_fill_value(dc, H5T_NATIVE_DOUBLE, &fillval) < 0) goto error;
/* Set up to use scaleoffset filter, decimal scale factor is 7,
@@ -5167,7 +4909,7 @@ test_scaleoffset_double_2(hid_t file)
/* Initialize data of hyperslab */
for(j = 0; j < (size_t)size[1]; j++) {
- orig_data[0][j] = (HDrandom() % 10000000) / 10000000.0;
+ orig_data[0][j] = (HDrandom() % 10000000) / 10000000.0F;
/* even-numbered values are negtive */
if((j+1)%2 == 0)
@@ -5175,10 +4917,6 @@ test_scaleoffset_double_2(hid_t file)
}
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 1: Test scaleoffset by setting up a chunked dataset and writing
@@ -5187,15 +4925,10 @@ test_scaleoffset_double_2(hid_t file)
*/
TESTING(" scaleoffset double with fill value, D-scaling (write)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* only data in the hyperslab will be written, other value should be fill value */
if(H5Dwrite(dataset, H5T_NATIVE_DOUBLE, mspace, mspace, H5P_DEFAULT,
orig_data) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
@@ -5203,14 +4936,13 @@ test_scaleoffset_double_2(hid_t file)
*/
TESTING(" scaleoffset double with fill value, D-scaling (read)");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* Read the dataset back */
if(H5Dread(dataset, H5T_NATIVE_DOUBLE, mspace, mspace, H5P_DEFAULT,
new_data) < 0) goto error;
/* Check that the values read are the same as the values written */
for(j=0; j<(size_t)size[1]; j++) {
- if(HDfabs(new_data[0][j]-orig_data[0][j]) > HDpow(10.0, -7.0)) {
+ if(HDfabs(new_data[0][j]-orig_data[0][j]) > HDpow(10.0F, -7.0F)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
@@ -5228,10 +4960,7 @@ test_scaleoffset_double_2(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
PASSED();
-#else
- SKIPPED();
- puts(not_supported);
-#endif
+
return 0;
error:
return -1;
@@ -5980,11 +5709,11 @@ test_set_local(hid_t fapl)
h5_fixname(FILENAME[5], fapl, filename, sizeof filename);
/* Initialize the integer & floating-point dataset */
- n=1.0;
+ n=1.0F;
for(i = 0; i < DSET_DIM1; i++)
for(j = 0; j < DSET_DIM2; j++) {
points[i][j] = (int)n++;
- points_dbl[i][j] = (double)1.5*n++;
+ points_dbl[i][j] = (double)1.5F*n++;
}
/* Open file */
@@ -6178,7 +5907,7 @@ test_set_local(hid_t fapl)
for(j=0; j<dims[1]; j++) {
/* If the difference between two values is greater than 0.001%, they're
* considered not equal. */
- if(!DBL_REL_EQUAL(points_dbl[i][j],check_dbl[i][j],0.00001)) {
+ if(!DBL_REL_EQUAL(points_dbl[i][j],check_dbl[i][j],0.00001F)) {
H5_FAILED();
printf(" Line %d: Read different values than written.\n",__LINE__);
printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
@@ -6459,7 +6188,7 @@ test_filter_delete(hid_t file)
TESTING("filter deletion");
-#if defined H5_HAVE_FILTER_DEFLATE && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
+#ifdef H5_HAVE_FILTER_DEFLATE
/* create the data space */
if((sid = H5Screate_simple(2, dims, NULL)) < 0) goto error;
@@ -6664,7 +6393,6 @@ test_filters_endianess(void)
TESTING("filters with big-endian/little-endian data");
-#if defined H5_HAVE_FILTER_FLETCHER32
/*-------------------------------------------------------------------------
* step 1: open a file written on a little-endian machine
*-------------------------------------------------------------------------
@@ -6697,9 +6425,7 @@ test_filters_endianess(void)
if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
PASSED();
-#else
- SKIPPED();
-#endif
+
return 0;
error:
@@ -7848,7 +7574,7 @@ test_chunk_cache(hid_t fapl)
/* Set new rdcc settings on fapl */
nslots_2 = nslots_1 * 2;
nbytes_2 = nbytes_1 * 2;
- w0_2 = w0_1 / 2.;
+ w0_2 = w0_1 / 2.0F;
if (H5Pset_cache(fapl_local, 0, nslots_2, nbytes_2, w0_2) < 0) FAIL_STACK_ERROR
h5_fixname(FILENAME[8], fapl, filename, sizeof filename);
@@ -8056,7 +7782,7 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Define cache size to be smaller than chunk size */
rdcc_nelmts = BYPASS_CHUNK_DIM/5;
rdcc_nbytes = sizeof(int)*BYPASS_CHUNK_DIM/5;
- if(H5Pset_cache(fapl_local, 0, rdcc_nelmts, rdcc_nbytes, (double)0.0) < 0) FAIL_STACK_ERROR
+ if(H5Pset_cache(fapl_local, 0, rdcc_nelmts, rdcc_nbytes, 0.0F) < 0) FAIL_STACK_ERROR
/* Create file */
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_local)) < 0) FAIL_STACK_ERROR
diff --git a/test/dt_arith.c b/test/dt_arith.c
index a93d1b8..17f8e55 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -28,7 +28,7 @@
#define NTESTELEM 10000
/* Epsilon for floating-point comparisons */
-#define FP_EPSILON 0.000001
+#define FP_EPSILON 0.000001F
/*
* Offset from alinged memory returned by malloc(). This can be used to test
@@ -3299,7 +3299,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
if(check_expo[0]<(-(int)dst_ebias) || check_expo[1]<(-(int)dst_ebias)) {
int expo_diff=check_expo[0]-check_expo[1];
int valid_bits=(int)((dst_ebias+dst_msize)+MIN(check_expo[0],check_expo[1]))-1;
- double epsilon=1.0;
+ double epsilon=1.0F;
/* Re-scale the mantissas based on any exponent difference */
if(expo_diff!=0)
diff --git a/test/dtransform.c b/test/dtransform.c
index 9c78043..d80c21a 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -17,7 +17,7 @@
#define ROWS 12
#define COLS 18
-#define FLOAT_TOL 0.0001
+#define FLOAT_TOL 0.0001F
static int init_test(hid_t file_id);
static int test_copy(const hid_t dxpl_id_c_to_f_copy, const hid_t dxpl_id_polynomial_copy);
diff --git a/test/fheap.c b/test/fheap.c
index 96b0673..6bcd8bf 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -16061,9 +16061,9 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
/* Change size of data to write */
if(u < 20)
- obj_size = (size_t)(obj_size * 1.3);
+ obj_size = (size_t)(obj_size * 1.3F);
else
- obj_size = (size_t)(obj_size / 1.3);
+ obj_size = (size_t)(obj_size / 1.3F);
} /* end for */
/* Close the fractal heap */
@@ -16110,9 +16110,9 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
/* Change size of data to write */
if(u < 20)
- obj_size = (size_t)(obj_size * 1.3);
+ obj_size = (size_t)(obj_size * 1.3F);
else
- obj_size = (size_t)(obj_size / 1.3);
+ obj_size = (size_t)(obj_size / 1.3F);
} /* end for */
/* Close the fractal heap */
diff --git a/test/fillval.c b/test/fillval.c
index 459620d..e6e8f8e 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -909,9 +909,9 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
else if(datatype == H5T_COMPOUND) {
HDmemset(buf_c, 0, ((size_t)nelmts * sizeof(comp_datatype)));
for(u = 0; u < nelmts; u++) {
- buf_c[u].a = (float)1111.11;
+ buf_c[u].a = 1111.11F;
buf_c[u].x = 2222;
- buf_c[u].y = 3333.3333;
+ buf_c[u].y = 3333.3333F;
buf_c[u].z = 'd';
}
if(H5Dwrite(dset2, ctype_id, mspace, fspace, H5P_DEFAULT, buf_c) < 0)
@@ -1144,7 +1144,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
* as compound type */
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
HDmemset(&fill_ctype, 0, sizeof(fill_ctype));
- fill_ctype.y = 4444.4444;
+ fill_ctype.y = 4444.4444F;
if(H5Pset_fill_value(dcpl, ctype_id, &fill_ctype) < 0) goto error;
nerrors += test_rdwr_cases(file, dcpl, "dset11", &fill_ctype, H5D_FILL_TIME_ALLOC,
layout, H5T_COMPOUND, ctype_id);
@@ -1197,7 +1197,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
* as compound type */
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
HDmemset(&fill_ctype, 0, sizeof(fill_ctype));
- fill_ctype.y = 4444.4444;
+ fill_ctype.y = 4444.4444F;
if(H5Pset_fill_value(dcpl, ctype_id, &fill_ctype) < 0) goto error;
nerrors += test_rdwr_cases(file, dcpl, "dset12", &fill_ctype, H5D_FILL_TIME_ALLOC,
layout, H5T_COMPOUND, ctype_id);
diff --git a/test/flush2.c b/test/flush2.c
index 06dd086..8108bba 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -73,13 +73,13 @@ check_dset(hid_t file, const char* name)
* 1998-11-06 ptl
*/
error = fabs(the_data[i][j] - (double)(hssize_t)i / ((hssize_t)j + 1));
- if(error > 0.0001) {
- H5_FAILED();
- printf(" dset[%lu][%lu] = %g\n",
- (unsigned long)i, (unsigned long)j, the_data[i][j]);
- printf(" should be %g\n",
- (double)(hssize_t)i/(hssize_t)(j+1));
- goto error;
+ if(error > 0.0001F) {
+ H5_FAILED();
+ printf(" dset[%lu][%lu] = %g\n",
+ (unsigned long)i, (unsigned long)j, the_data[i][j]);
+ printf(" should be %g\n",
+ (double)(hssize_t)i/(hssize_t)(j+1));
+ goto error;
}
}
if(H5Dclose(dset) < 0) goto error;
diff --git a/test/gen_cross.c b/test/gen_cross.c
index 3b0a56f..1c73016 100644
--- a/test/gen_cross.c
+++ b/test/gen_cross.c
@@ -175,7 +175,6 @@ create_normal_dset(hid_t fid, hid_t fsid, hid_t msid)
return 0;
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -183,7 +182,6 @@ error:
} H5E_END_TRY;
return -1;
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
}
@@ -205,7 +203,6 @@ error:
int
create_scale_offset_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset; /* dataset handles */
hid_t dcpl;
float data[NX][NY]; /* data to write */
@@ -267,15 +264,8 @@ create_scale_offset_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
if(H5Pclose(dcpl) < 0)
TEST_ERROR
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset.";
-
- puts(not_supported);
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
-
return 0;
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -283,7 +273,6 @@ error:
} H5E_END_TRY;
return -1;
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
}
@@ -305,7 +294,6 @@ error:
int
create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset; /* dataset handles */
hid_t dcpl;
double data[NX][NY]; /* data to write */
@@ -367,15 +355,8 @@ create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid)
if(H5Pclose(dcpl) < 0)
TEST_ERROR
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset.";
-
- puts(not_supported);
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
-
return 0;
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -383,7 +364,6 @@ error:
} H5E_END_TRY;
return -1;
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
}
@@ -405,7 +385,6 @@ error:
int
create_scale_offset_dsets_char(hid_t fid, hid_t fsid, hid_t msid)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset; /* dataset handles */
hid_t dcpl;
char data[NX][NY]; /* data to write */
@@ -475,15 +454,8 @@ create_scale_offset_dsets_char(hid_t fid, hid_t fsid, hid_t msid)
if(H5Pclose(dcpl) < 0)
TEST_ERROR
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset.";
-
- puts(not_supported);
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
-
return 0;
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -491,7 +463,6 @@ error:
} H5E_END_TRY;
return -1;
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
}
@@ -513,7 +484,6 @@ error:
int
create_scale_offset_dsets_short(hid_t fid, hid_t fsid, hid_t msid)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset; /* dataset handles */
hid_t dcpl;
short data[NX][NY]; /* data to write */
@@ -583,15 +553,8 @@ create_scale_offset_dsets_short(hid_t fid, hid_t fsid, hid_t msid)
if(H5Pclose(dcpl) < 0)
TEST_ERROR
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset.";
-
- puts(not_supported);
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
-
return 0;
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -599,7 +562,6 @@ error:
} H5E_END_TRY;
return -1;
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
}
@@ -621,7 +583,6 @@ error:
int
create_scale_offset_dsets_int(hid_t fid, hid_t fsid, hid_t msid)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset; /* dataset handles */
hid_t dcpl;
int data[NX][NY]; /* data to write */
@@ -691,15 +652,8 @@ create_scale_offset_dsets_int(hid_t fid, hid_t fsid, hid_t msid)
if(H5Pclose(dcpl) < 0)
TEST_ERROR
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset.";
-
- puts(not_supported);
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
-
return 0;
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -707,7 +661,6 @@ error:
} H5E_END_TRY;
return -1;
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
}
@@ -730,7 +683,6 @@ error:
int
create_scale_offset_dsets_long_long(hid_t fid, hid_t fsid, hid_t msid)
{
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
hid_t dataset; /* dataset handles */
hid_t dcpl;
long long data[NX][NY]; /* data to write */
@@ -800,15 +752,8 @@ create_scale_offset_dsets_long_long(hid_t fid, hid_t fsid, hid_t msid)
if(H5Pclose(dcpl) < 0)
TEST_ERROR
-#else /* H5_HAVE_FILTER_SCALEOFFSET */
- const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset.";
-
- puts(not_supported);
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
-
return 0;
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -816,7 +761,6 @@ error:
} H5E_END_TRY;
return -1;
-#endif /* H5_HAVE_FILTER_SCALEOFFSET */
}
@@ -838,7 +782,6 @@ error:
int
create_fletcher_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
-#ifdef H5_HAVE_FILTER_FLETCHER32
hid_t dataset; /* dataset handles */
hid_t dcpl;
float data[NX][NY]; /* data to write */
@@ -900,15 +843,8 @@ create_fletcher_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
if(H5Pclose(dcpl) < 0)
TEST_ERROR
-#else /* H5_HAVE_FILTER_FLETCHER32 */
- const char *not_supported= "Fletcher filter is not enabled. Can't create the dataset.";
-
- puts(not_supported);
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
-
return 0;
-#ifdef H5_HAVE_FILTER_FLETCHER32
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -916,7 +852,6 @@ error:
} H5E_END_TRY;
return -1;
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
}
@@ -1131,7 +1066,6 @@ error:
int
create_shuffle_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
-#ifdef H5_HAVE_FILTER_SHUFFLE
hid_t dataset; /* dataset handles */
hid_t dcpl;
float data[NX][NY]; /* data to write */
@@ -1193,15 +1127,8 @@ create_shuffle_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
if(H5Pclose(dcpl) < 0)
TEST_ERROR
-#else /* H5_HAVE_FILTER_SHUFFLE */
- const char *not_supported= "Shuffle filter is not enabled. Can't create the dataset.";
-
- puts(not_supported);
-#endif /* H5_HAVE_FILTER_SHUFFLE */
-
return 0;
-#ifdef H5_HAVE_FILTER_SHUFFLE
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -1209,7 +1136,6 @@ error:
} H5E_END_TRY;
return -1;
-#endif /* H5_HAVE_FILTER_SHUFFLE */
}
@@ -1231,7 +1157,6 @@ error:
int
create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
{
-#ifdef H5_HAVE_FILTER_NBIT
hid_t dataset; /* dataset handles */
hid_t datatype;
hid_t dcpl;
@@ -1314,15 +1239,8 @@ create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
if(H5Pclose(dcpl) < 0)
TEST_ERROR
-#else /* H5_HAVE_FILTER_NBIT */
- const char *not_supported= "Nbit filter is not enabled. Can't create the dataset.";
-
- puts(not_supported);
-#endif /* H5_HAVE_FILTER_NBIT */
-
return 0;
-#ifdef H5_HAVE_FILTER_NBIT
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -1330,7 +1248,6 @@ error:
} H5E_END_TRY;
return -1;
-#endif /* H5_HAVE_FILTER_NBIT */
}
@@ -1451,3 +1368,4 @@ main (void)
return 0;
}
+
diff --git a/test/gen_filters.c b/test/gen_filters.c
index 58400d5..b44339d 100644
--- a/test/gen_filters.c
+++ b/test/gen_filters.c
@@ -48,7 +48,6 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
static herr_t
test_filters_endianess(void)
{
-#if defined H5_HAVE_FILTER_FLETCHER32
hid_t fid = -1; /* file ID */
hid_t dsid = -1; /* dataset ID */
hid_t sid = -1; /* dataspace ID */
@@ -85,10 +84,8 @@ test_filters_endianess(void)
if(H5Sclose(sid) < 0) goto error;
if(H5Fclose(fid) < 0) goto error;
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
return 0;
-#if defined H5_HAVE_FILTER_FLETCHER32
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -97,7 +94,6 @@ error:
H5Fclose(fid);
} H5E_END_TRY;
return -1;
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
} /* end test_filters_endianess() */
/* This message derives from H5Z */
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 5e2c109..9bc085c 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -609,10 +609,10 @@ test_multifill(size_t nx)
for(i = 0; i < nx; i++) {
src[i].left = 1111111;
- src[i].mid = 12345.6789;
+ src[i].mid = 12345.6789F;
src[i].right = 2222222;
dst[i].left = 3333333;
- dst[i].mid = 98765.4321;
+ dst[i].mid = 98765.4321F;
dst[i].right = 4444444;
} /* end for */
@@ -621,7 +621,7 @@ test_multifill(size_t nx)
* over and over again.
*/
fill.left = 55555555;
- fill.mid = 3.1415927;
+ fill.mid = 3.1415927F;
fill.right = 66666666;
src_stride = 0;
diff --git a/test/links.c b/test/links.c
index 9e61392..d02181e 100644
--- a/test/links.c
+++ b/test/links.c
@@ -141,7 +141,7 @@ const char *FILENAME[] = {
#define H5L_DIM1 100
#define H5L_DIM2 100
-#define FILTER_FILESIZE_MAX_FRACTION .9
+#define FILTER_FILESIZE_MAX_FRACTION 0.9F
/* Creation order macros */
#define CORDER_GROUP_NAME "corder_group"
diff --git a/test/mtime.c b/test/mtime.c
index 6e00fe0..0c0c923 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -114,7 +114,7 @@ main(void)
puts(" Modification times will be mantained in the file but");
puts(" cannot be queried on this system. See H5O_mtime_decode().");
return 0;
- } else if(HDfabs(HDdifftime(now, oi1.ctime)) > 60.0) {
+ } else if(HDfabs(HDdifftime(now, oi1.ctime)) > 60.0F) {
H5_FAILED();
tm = HDlocaltime(&(oi1.ctime));
HDstrftime((char*)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
diff --git a/test/objcopy.c b/test/objcopy.c
index d7b111f..6684bae 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -2387,7 +2387,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
#endif /* H5_CLEAR_MEMORY */
for(i = 0; i < DIM_SIZE_1; i++) {
buf[i].a = i;
- buf[i].d = 1. / (i + 1);
+ buf[i].d = 1.0F / (i + 1);
} /* end for */
/* Initialize the filenames */
@@ -2519,9 +2519,9 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* set initial data values */
for(i = 0; i < DIM_SIZE_1; i++) {
- buf1d[i] = (float)(i / 2.0);
+ buf1d[i] = (float)(i / 2.0F);
for(j = 0; j < DIM_SIZE_2; j++)
- buf2d[i][j] = (float)(i + (j / 100.0));
+ buf2d[i][j] = (float)(i + (j / 100.0F));
} /* end for */
/* Initialize the filenames */
@@ -2956,9 +2956,9 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* set initial data values */
for(i = 0; i < DIM_SIZE_1; i++) {
- buf1d[i] = (float)(i / 10.0);
+ buf1d[i] = (float)(i / 10.0F);
for(j = 0; j < DIM_SIZE_2; j++)
- buf2d[i][j] = (float)(i + (j / 100.0));
+ buf2d[i][j] = (float)(i + (j / 100.0F));
} /* end for */
/* Initialize the filenames */
@@ -3272,7 +3272,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* set initial data values */
for (i=0; i<DIM_SIZE_1; i++)
for (j=0; j<DIM_SIZE_2; j++)
- buf[i][j] = (float)(100.0); /* Something easy to compress */
+ buf[i][j] = 100.0F; /* Something easy to compress */
/* Initialize the filenames */
h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
@@ -3586,7 +3586,7 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* set initial data values */
for (i=0; i<DIM_SIZE_1; i++)
for (j=0; j<DIM_SIZE_2; j++)
- buf[i][j] = (float)(i+j/100.0);
+ buf[i][j] = (float)(i+j/100.0F);
/* Initialize the filenames */
h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
@@ -8139,7 +8139,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int));
for(j = 0; j < buf[i].b.len; j++)
((int *)buf[i].b.p)[j] = (int)(i * 10 + j);
- buf[i].c = 1. / (i + 1.);
+ buf[i].c = 1.0F / (i + 1.0F);
} /* end for */
/* Initialize the filenames */
@@ -8278,7 +8278,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int));
for(j = 0; j < buf[i].b.len; j++)
((int *)buf[i].b.p)[j] = (int)(i * 10 + j);
- buf[i].c = 1. / (i + 1.);
+ buf[i].c = 1.0F / (i + 1.0F);
} /* end for */
/* Initialize the filenames */
@@ -8423,7 +8423,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int));
for(j = 0; j < buf[i].b.len; j++)
((int *)buf[i].b.p)[j] = (int)(i * 10 + j);
- buf[i].c = 1. / (i + 1.);
+ buf[i].c = 1.0F / (i + 1.0F);
} /* end for */
/* Initialize the filenames */
diff --git a/test/plugin.c b/test/plugin.c
index 86bc952..3707411 100644
--- a/test/plugin.c
+++ b/test/plugin.c
@@ -456,14 +456,14 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_read_with_filters
+ * Function: test_read_with_filters
*
- * Purpose: Tests reading dataset created with dynamically loaded filters
+ * Purpose: Tests reading dataset created with dynamically loaded filters
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 14 March 2013
*
*-------------------------------------------------------------------------
@@ -471,7 +471,7 @@ error:
static herr_t
test_read_with_filters(hid_t file)
{
- hid_t dset; /* Dataset ID */
+ hid_t dset; /* Dataset ID */
/*----------------------------------------------------------
* STEP 1: Test deflation by itself.
@@ -526,6 +526,76 @@ error:
}
/*-------------------------------------------------------------------------
+ * Function: test_noread_data
+ *
+ * Purpose: Tests not reading data
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_noread_data(hid_t dataset, int *origin_data)
+{
+ int check[DSET_DIM1][DSET_DIM2];
+ const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
+ int *data_p = origin_data;
+ size_t i, j; /* Local index variables */
+
+ /* Read the dataset back */
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) >= 0)
+ TEST_ERROR;
+
+ PASSED();
+ return 0;
+
+error:
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_noread_with_filters
+ *
+ * Purpose: Tests reading dataset created with dynamically loaded filters disabled
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_noread_with_filters(hid_t file)
+{
+ hid_t dset; /* Dataset ID */
+ int plugin_state; /* status of plugins */
+ TESTING("Testing DYNLIB1 filter with plugins disabled");
+
+ /* disable filter plugin */
+ if(H5PLget_loading_state(&plugin_state) < 0) TEST_ERROR
+ plugin_state = plugin_state & ~H5PL_FILTER_PLUGIN;
+ if(H5PLset_loading_state(plugin_state) < 0) TEST_ERROR
+
+ if((dset = H5Dopen2(file,DSET_DYNLIB1_NAME,H5P_DEFAULT)) < 0) TEST_ERROR
+
+ if(test_noread_data(dset, (int *)points_dynlib1) < 0) TEST_ERROR
+
+ if(H5Dclose(dset) < 0) TEST_ERROR
+
+ /* re-enable filter plugin */
+ plugin_state = plugin_state | H5PL_FILTER_PLUGIN;
+ if(H5PLset_loading_state(plugin_state) < 0) TEST_ERROR
+
+ return 0;
+
+error:
+ /* re-enable filter plugin */
+ plugin_state = plugin_state | H5PL_FILTER_PLUGIN;
+ if(H5PLset_loading_state(plugin_state) < 0) TEST_ERROR
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
* Function: test_filters_for_groups
*
* Purpose: Tests creating group with dynamically loaded filters
@@ -713,6 +783,17 @@ main(void)
/* Open the groups with filters */
nerrors += (test_groups_with_filters(file) < 0 ? 1 : 0);
+ /* Close the library so that all loaded plugin libraries are unloaded */
+ h5_reset();
+ fapl = h5_fileaccess();
+
+ /* Reopen the file for testing data reading */
+ if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
+ TEST_ERROR
+
+ /* Read the data with disabled filters */
+ nerrors += (test_noread_with_filters(file) < 0 ? 1 : 0);
+
if(H5Fclose(file) < 0)
TEST_ERROR
diff --git a/test/set_extent.c b/test/set_extent.c
index ded8009..bea69f3 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -153,10 +153,10 @@ int main( void )
if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
/* Set chunk cache so only part of the chunks can be cached on fapl */
- if(H5Pset_cache(fapl, 0, (size_t)8, 256 * sizeof(int), 0.75) < 0) TEST_ERROR
+ if(H5Pset_cache(fapl, 0, (size_t)8, 256 * sizeof(int), 0.75F) < 0) TEST_ERROR
/* Disable chunk caching on fapl2 */
- if(H5Pset_cache(fapl2, 0, (size_t)0, (size_t)0, 0.) < 0) TEST_ERROR
+ if(H5Pset_cache(fapl2, 0, (size_t)0, (size_t)0, 0.0F) < 0) TEST_ERROR
/* Set the "use the latest version of the format" bounds for creating objects in the file */
if(H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) TEST_ERROR
diff --git a/test/tarray.c b/test/tarray.c
index 1a53336..e3d7c37 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -541,7 +541,7 @@ test_array_compound_atomic(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 */
@@ -745,7 +745,7 @@ test_array_compound_array(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.0F + j * 2.5F + k);
} /* end for */
/* Create file */
@@ -1534,8 +1534,8 @@ test_array_bkg(void)
for (j = 0; j < ALEN; j++)
{
cf[i].a[j] = 100*(i+1) + j;
- cf[i].b[j] = (float)(100.*(i+1) + 0.01*j);
- cf[i].c[j] = 100.*(i+1) + 0.02*j;
+ cf[i].b[j] = (float)(100.0F*(i+1) + 0.01F*j);
+ cf[i].c[j] = (double)(100.0F*(i+1) + 0.02F*j);
}
}
@@ -1674,7 +1674,7 @@ test_array_bkg(void)
/* -------------------------------- */
for (i=0; i< LENGTH; i++)
for (j = 0; j < ALEN; j++)
- cf[i].b[j]=fld[i].b[j] = (float)1.313;
+ cf[i].b[j]=fld[i].b[j] = 1.313F;
status = H5Dwrite (dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, fld);
CHECK(status, FAIL, "H5Dwrite");
diff --git a/test/tattr.c b/test/tattr.c
index 2885124..57d19ff 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -97,7 +97,7 @@ int attr_data2[ATTR2_DIM1][ATTR2_DIM2]={{7614,-416},{197814,-3}}; /* Test data f
#define ATTR3_DIM1 2
#define ATTR3_DIM2 2
#define ATTR3_DIM3 2
-double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3]={{{2.3,-26.1},{0.123,-10.0}},{{973.23,-0.91827},{2.0,23.0}}}; /* Test data for 3rd attribute */
+double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3]={{{2.3F,-26.1F}, {0.123F,-10.0F}},{{973.23F,-0.91827F},{2.0F,23.0F}}}; /* Test data for 3rd attribute */
#define ATTR4_NAME "Attr4"
#define ATTR4_RANK 2
@@ -113,12 +113,12 @@ struct attr4_struct {
int i;
double d;
char c;
- } attr_data4[ATTR4_DIM1][ATTR4_DIM2]={{{3,-26.1,'d'},{-100000, 0.123,'3'}},
- {{-23,981724.2,'Q'},{0,2.0,'\n'}}}; /* Test data for 4th attribute */
+ } attr_data4[ATTR4_DIM1][ATTR4_DIM2]={{{3,-26.1F,'d'},{-100000, 0.123F,'3'}},
+ {{-23,981724.2F,'Q'},{0,2.0F,'\n'}}}; /* Test data for 4th attribute */
#define ATTR5_NAME "Attr5"
#define ATTR5_RANK 0
-float attr_data5=(float)-5.123; /* Test data for 5th attribute */
+float attr_data5=-5.123F; /* Test data for 5th attribute */
#define ATTR6_RANK 3
#define ATTR6_DIM1 100
@@ -500,7 +500,7 @@ test_attr_flush(hid_t fapl)
att, /* Attribute ID */
spc, /* Dataspace ID */
set; /* Dataset ID */
- double wdata=3.14159; /* Data to write */
+ double wdata=3.14159F; /* Data to write */
double rdata; /* Data read in */
herr_t ret; /* Generic return value */
@@ -522,8 +522,8 @@ test_attr_flush(hid_t fapl)
ret=H5Aread(att, H5T_NATIVE_DOUBLE, &rdata);
CHECK(ret, FAIL, "H5Awrite");
- if(!DBL_ABS_EQUAL(rdata,0.0))
- TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n",rdata,0.0);
+ if(!DBL_ABS_EQUAL(rdata,0.0F))
+ TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n",rdata,0.0F);
ret=H5Fflush(fil, H5F_SCOPE_GLOBAL);
CHECK(ret, FAIL, "H5Fflush");
@@ -531,8 +531,8 @@ test_attr_flush(hid_t fapl)
ret=H5Aread(att, H5T_NATIVE_DOUBLE, &rdata);
CHECK(ret, FAIL, "H5Awrite");
- if(!DBL_ABS_EQUAL(rdata,0.0))
- TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n",rdata,0.0);
+ if(!DBL_ABS_EQUAL(rdata,0.0F))
+ TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n",rdata,0.0F);
ret=H5Awrite(att, H5T_NATIVE_DOUBLE, &wdata);
CHECK(ret, FAIL, "H5Awrite");
@@ -985,7 +985,7 @@ test_attr_scalar_read(hid_t fapl)
hid_t sid; /* Dataspace ID */
hid_t attr; /* Attribute ID */
H5S_class_t stype; /* Dataspace class */
- float rdata = 0.0; /* Buffer for reading 1st attribute */
+ float rdata = 0.0F; /* Buffer for reading 1st attribute */
H5O_info_t oinfo; /* Object info */
herr_t ret; /* Generic return value */
diff --git a/test/testhdf5.h b/test/testhdf5.h
index 907fce9..62dadde 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -68,6 +68,18 @@
} \
}
+#define CHECK_PTR_NULL(ret,where) { \
+ if (VERBOSE_HI) { \
+ print_func(" Call to routine: %15s at line %4d in %s returned %p\n", \
+ (where), (int)__LINE__, __FILE__, (ret)); \
+ } \
+ if (ret) { \
+ TestErrPrintf ("*** UNEXPECTED RETURN from %s is not NULL line %4d in %s\n", \
+ (where), (int)__LINE__, __FILE__); \
+ H5Eprint2(H5E_DEFAULT, stdout); \
+ } \
+}
+
/* Used to make certain a return value _is_ a value */
#define VERIFY(_x, _val, where) do { \
long __x = (long)_x, __val = (long)_val; \
diff --git a/test/tfile.c b/test/tfile.c
index aba5d6d..4de8935 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -2362,7 +2362,7 @@ test_rw_noupdate(void)
diff = HDdifftime(sb2.st_mtime, sb1.st_mtime);
/* Check That Timestamps Are Equal */
- if(diff > 0.0) {
+ if(diff > 0.0F) {
/* Output message about test being performed */
MESSAGE(1, ("Testing to verify that nothing is written if nothing is changed: This test is skipped on this system because the modification time from stat is the same as the last access time (We know OpenVMS behaves in this way).\n"));
} /* end if */
@@ -2395,7 +2395,7 @@ test_rw_noupdate(void)
/* Ensure That Timestamps Are Equal */
diff = HDdifftime(sb2.st_mtime, sb1.st_mtime);
- ret = (diff > 0.0);
+ ret = (diff > 0.0F);
VERIFY(ret, 0, "Timestamp");
} /* end else */
} /* end test_rw_noupdate() */
diff --git a/test/tgenprop.c b/test/tgenprop.c
index 004e346..d147099 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -47,7 +47,7 @@ int prop1_def=10; /* Property 1 default value */
#define PROP1_DEF_VALUE (&prop1_def)
#define PROP2_NAME "Property 2"
-float prop2_def=(float)3.14; /* Property 2 default value */
+float prop2_def=3.14F; /* Property 2 default value */
#define PROP2_SIZE sizeof(prop2_def)
#define PROP2_DEF_VALUE (&prop2_def)
@@ -57,7 +57,7 @@ char prop3_def[10]="Ten chars"; /* Property 3 default value */
#define PROP3_DEF_VALUE (&prop3_def)
#define PROP4_NAME "Property 4"
-double prop4_def=1.41; /* Property 4 default value */
+double prop4_def=1.41F; /* Property 4 default value */
#define PROP4_SIZE sizeof(prop4_def)
#define PROP4_DEF_VALUE (&prop4_def)
diff --git a/test/th5s.c b/test/th5s.c
index d3a651c..94268a7 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -79,7 +79,7 @@ struct space4_struct {
unsigned u;
float f;
char c2;
- } space4_data={'v',987123,(float)-3.14,'g'}; /* Test data for 4th dataspace */
+ } space4_data={'v',987123,-3.14F,'g'}; /* Test data for 4th dataspace */
/****************************************************************
**
@@ -1647,7 +1647,7 @@ test_h5s_chunk(void)
/* Initialize float array */
for(i = 0; i < 50000; i++)
for(j = 0; j < 3; j++)
- chunk_data_flt[i][j] = (float)((i + 1) * 2.5 - j * 100.3);
+ chunk_data_flt[i][j] = (float)((i + 1) * 2.5F - j * 100.3F);
status = H5Dwrite(dsetID, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_flt);
CHECK(status, FAIL, "H5Dwrite");
@@ -1683,7 +1683,7 @@ test_h5s_chunk(void)
for(i=0; i<50000; i++) {
for(j=0; j<3; j++) {
/* Check if the two values are within 0.001% range. */
- if(!DBL_REL_EQUAL(chunk_data_dbl[i][j], chunk_data_flt[i][j], 0.00001))
+ if(!DBL_REL_EQUAL(chunk_data_dbl[i][j], chunk_data_flt[i][j], 0.00001F))
TestErrPrintf("%u: chunk_data_dbl[%d][%d]=%e, chunk_data_flt[%d][%d]=%e\n", (unsigned)__LINE__, i, j, chunk_data_dbl[i][j], i, j, chunk_data_flt[i][j]);
} /* end for */
} /* end for */
diff --git a/test/tmisc.c b/test/tmisc.c
index cac6b04..68a30eb 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -2427,17 +2427,17 @@ test_misc13(void)
static void
test_misc14(void)
{
- hid_t file_id; /* File ID */
- hid_t fapl; /* File access property list ID */
- hid_t DataSpace; /* Dataspace ID */
- hid_t Dataset1; /* Dataset ID #1 */
- hid_t Dataset2; /* Dataset ID #2 */
- hid_t Dataset3; /* Dataset ID #3 */
- double data1 = 5.0; /* Data to write for dataset #1 */
- double data2 = 10.0; /* Data to write for dataset #2 */
- double data3 = 15.0; /* Data to write for dataset #3 */
- double rdata; /* Data read in */
- herr_t ret; /* Generic return value */
+ hid_t file_id; /* File ID */
+ hid_t fapl; /* File access property list ID */
+ hid_t DataSpace; /* Dataspace ID */
+ hid_t Dataset1; /* Dataset ID #1 */
+ hid_t Dataset2; /* Dataset ID #2 */
+ hid_t Dataset3; /* Dataset ID #3 */
+ double data1 = 5.0F; /* Data to write for dataset #1 */
+ double data2 = 10.0F; /* Data to write for dataset #2 */
+ double data3 = 15.0F; /* Data to write for dataset #3 */
+ double rdata; /* Data read in */
+ herr_t ret; /* Generic return value */
/* Test creating two datasets and deleting the second */
@@ -4949,7 +4949,7 @@ test_misc28(void)
* bytes). */
fapl = H5Pcreate(H5P_FILE_ACCESS);
CHECK(fapl, FAIL, "H5Pcreate");
- ret = H5Pset_cache(fapl, MISC28_NSLOTS, MISC28_NSLOTS, MISC28_SIZE, 0.75);
+ ret = H5Pset_cache(fapl, MISC28_NSLOTS, MISC28_NSLOTS, MISC28_SIZE, 0.75F);
CHECK(ret, FAIL, "H5Pset_cache");
/* Create the dcpl and set the chunk size */
@@ -5304,6 +5304,73 @@ test_misc31(void)
/****************************************************************
+ *
+ * test_misc32(): Simple test of filter memory allocation
+ * functions.
+ *
+ ***************************************************************/
+static void
+test_misc32(void)
+{
+ void *buffer;
+ void *resized;
+ size_t size;
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Edge case test of filter memory allocation functions\n"));
+
+ /* Test that the filter memory allocation functions behave correctly
+ * at edge cases.
+ */
+
+ /* FREE */
+
+ /* Test freeing a NULL pointer.
+ * No real confirmation check here, but Valgrind will confirm no
+ * shenanigans.
+ */
+ buffer = NULL;
+ H5free_memory(buffer);
+
+ /* ALLOCATE */
+
+ /* Size zero returns NULL.
+ * Also checks that a size of zero and setting the buffer clear flag
+ * to TRUE can be used together.
+ *
+ * Note that we have asserts in the code, so only check when NDEBUG
+ * is defined.
+ */
+#ifdef NDEBUG
+ buffer = H5allocate_memory(0, FALSE);
+ CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/
+ buffer = H5allocate_memory(0, TRUE);
+ CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/
+#endif /* NDEBUG */
+
+ /* RESIZE */
+
+ /* Size zero returns NULL. Valgrind will confirm buffer is freed. */
+ size = 1024;
+ buffer = H5allocate_memory(size, TRUE);
+ resized = H5resize_memory(buffer, 0);
+ CHECK_PTR_NULL(resized, "H5resize_memory");
+
+ /* NULL input pointer returns new buffer */
+ resized = H5resize_memory(NULL, 1024);
+ CHECK_PTR(resized, "H5resize_memory");
+ H5free_memory(resized);
+
+ /* NULL input pointer and size zero returns NULL */
+#ifdef NDEBUG
+ resized = H5resize_memory(NULL, 0);
+ CHECK_PTR_NULL(resized, "H5resize_memory"); /*BAD*/
+#endif /* NDEBUG */
+
+} /* end test_misc32() */
+
+
+/****************************************************************
**
** test_misc(): Main misc. test routine.
**
@@ -5349,6 +5416,7 @@ test_misc(void)
test_misc29(); /* Test that speculative metadata reads are handled correctly */
test_misc30(); /* Exercise local heap loading bug where free lists were getting dropped */
test_misc31(); /* Test Reentering library through deprecated routines after H5close() */
+ test_misc32(); /* Test filter memory allocation functions */
} /* test_misc() */
diff --git a/test/trefer.c b/test/trefer.c
index 9cb7f26..6d72aee 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -522,6 +522,12 @@ test_reference_region(void)
H5O_type_t obj_type; /* Type of object */
int i, j; /* counting variables */
herr_t ret; /* Generic return value */
+ haddr_t addr = HADDR_UNDEF; /* test for undefined reference */
+ hid_t dset_NA; /* Dataset id for undefined reference */
+ hid_t space_NA; /* Dataspace id for undefined reference */
+ hsize_t dims_NA[1] = {1}; /* Dims array for undefined reference */
+ hdset_reg_ref_t wdata_NA[1], /* Write buffer */
+ rdata_NA[1]; /* Read buffer */
/* Output message about test being performed */
MESSAGE(5, ("Testing Dataset Region Reference Functions\n"));
@@ -612,6 +618,31 @@ test_reference_region(void)
ret = H5Dwrite(dset1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf);
CHECK(ret, FAIL, "H5Dwrite");
+ /*
+ * Store a dataset region reference which will not get written to disk
+ */
+
+ /* Create reference to an element in dset1 */
+ ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord1);
+ CHECK(ret, FAIL, "H5Sselect_elements");
+ ret = H5Rcreate(&wdata_NA[0], fid1, "/Dataset1", H5R_DATASET_REGION, sid2);
+ CHECK(ret, FAIL, "H5Rcreate");
+
+ /* Create the dataspace of the region references */
+ space_NA = H5Screate_simple(1, dims_NA, NULL);
+ CHECK(space_NA, FAIL, "H5Screate_simple");
+
+ /* Create the dataset and write the region references to it */
+ dset_NA = H5Dcreate2(fid1, "DS_NA", H5T_STD_REF_DSETREG, space_NA, H5P_DEFAULT,
+ H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dset_NA, FAIL, "H5Dcreate");
+
+ /* Close and release resources for undefined region reference tests */
+ ret = H5Dclose(dset_NA);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Sclose(space_NA);
+ CHECK(ret, FAIL, "H5Sclose");
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -632,6 +663,41 @@ test_reference_region(void)
fid1 = H5Fopen(FILE2, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK(fid1, FAIL, "H5Fopen");
+ /*
+ * Start the test of an undefined reference
+ */
+
+ /* Open the dataset of the undefined references */
+ dset_NA = H5Dopen2(fid1, "DS_NA", H5P_DEFAULT);
+ CHECK(dset_NA, FAIL, "H5Dopen2");
+
+ /* Read the data */
+ ret = H5Dread(dset_NA, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata_NA);
+ CHECK(ret, FAIL, "H5Dread");
+
+ /*
+ * Dereference an undefined reference (should fail)
+ */
+ H5E_BEGIN_TRY {
+ dset2 = H5Rdereference2(dset_NA, H5P_DEFAULT, H5R_DATASET_REGION, &rdata_NA[0]);
+ } H5E_END_TRY;
+ VERIFY(dset2, FAIL, "H5Rdereference2");
+
+ /* Close and release resources. */
+ ret = H5Dclose(dset_NA);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* This close should fail since H5Rdereference2 never created
+ * the id of the referenced object. */
+ H5E_BEGIN_TRY {
+ ret = H5Dclose(dset2);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Dclose");
+
+ /*
+ * End the test of an undefined reference
+ */
+
/* Open the dataset */
dset1 = H5Dopen2(fid1, "/Dataset1", H5P_DEFAULT);
CHECK(dset1, FAIL, "H5Dopen2");
@@ -640,6 +706,10 @@ test_reference_region(void)
ret = H5Dread(dset1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
CHECK(ret, FAIL, "H5Dread");
+ /* Try to read an unaddressed dataset */
+ dset2 = H5Rdereference2(dset1, dapl_id, H5R_DATASET_REGION, &addr);
+ VERIFY(dset2, FAIL, "H5Rdereference2 haddr_undef");
+
/* Try to open objects */
dset2 = H5Rdereference2(dset1, dapl_id, H5R_DATASET_REGION, &rbuf[0]);
CHECK(dset2, FAIL, "H5Rdereference2");
@@ -1070,6 +1140,7 @@ test_reference_obj_deleted(void)
hid_t sid1; /* Dataspace ID */
hobj_ref_t oref; /* Object Reference to test */
H5O_type_t obj_type; /* Object type */
+ haddr_t addr = HADDR_UNDEF; /* test for undefined reference */
herr_t ret; /* Generic return value */
/* Create file */
@@ -1127,6 +1198,10 @@ test_reference_obj_deleted(void)
dataset = H5Dopen2(fid1, "/Dataset2", H5P_DEFAULT);
CHECK(ret, FAIL, "H5Dopen2");
+ /* Open undefined reference */
+ dset2 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &addr);
+ VERIFY(dset2, FAIL, "H5Rdereference2");
+
/* Read selection from disk */
HDmemset(&oref, 0, sizeof(hobj_ref_t));
ret = H5Dread(dataset, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, &oref);
diff --git a/test/tsohm.c b/test/tsohm.c
index 8ebfd52..9da655e 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -57,7 +57,7 @@ const unsigned test_minsizes[H5O_SHMESG_MAX_NINDEXES] = {0, 2, 40, 100, 3, 1000}
#define NAME_BUF_SIZE 512
/* How much overhead counts as "not much" when converting B-trees, etc. */
-#define OVERHEAD_ALLOWED 1.15
+#define OVERHEAD_ALLOWED 1.15F
#define NUM_DATASETS 10
#define NUM_ATTRIBUTES 100
@@ -600,7 +600,7 @@ size1_helper(hid_t file, const char* filename, hid_t fapl_id, int test_file_clos
wdata.i6 = 66;
wdata.i7 = 77;
wdata.i8 = 88;
- wdata.f1 = 0.0;
+ wdata.f1 = 0.0F;
/* Intialize rdata */
HDmemset(&rdata, 0, sizeof(rdata));
diff --git a/test/tunicode.c b/test/tunicode.c
index 7dc3391..82dc429 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -39,8 +39,8 @@
#define RANK 1
#define COMP_INT_VAL 7
-#define COMP_FLOAT_VAL -42.0
-#define COMP_DOUBLE_VAL 42.0
+#define COMP_FLOAT_VAL -42.0F
+#define COMP_DOUBLE_VAL 42.0F
/* Test function prototypes */
void test_fl_string(hid_t fid, const char *string);
diff --git a/test/tvltypes.c b/test/tvltypes.c
index 516974e..2928e57 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -731,7 +731,7 @@ test_vltypes_vlen_compound(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 */
@@ -877,7 +877,7 @@ rewrite_vltypes_vlen_compound(void)
wdata[i].len = i + increment;
for(j = 0; j < (i + increment); j++) {
((s1 *)wdata[i].p)[j].i = i * 40 + j;
- ((s1 *)wdata[i].p)[j].f = (float)((i * 60 + j) / 3.0);
+ ((s1 *)wdata[i].p)[j].f = (float)((i * 60 + j) / 3.0F);
} /* end for */
} /* end for */
@@ -1018,7 +1018,7 @@ test_vltypes_compound_vlen_vlen(void)
/* Allocate and initialize VL data to write */
for(i=0; i<SPACE3_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+L1_INCM)*sizeof(hvl_t));
wdata[i].v.len=i+L1_INCM;
for(t1=(wdata[i].v).p,j=0; j<(i+L1_INCM); j++, t1++) {
@@ -1479,7 +1479,7 @@ test_vltypes_compound_vlen_atomic(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++)
@@ -1595,7 +1595,7 @@ test_vltypes_compound_vlen_atomic(void)
/* Check data read in */
for(i = 0; i < SPACE1_DIM1; i++)
- if(rdata[i].i != 0 || !FLT_ABS_EQUAL(rdata[i].f, 0.0) || rdata[i].v.len != 0 || rdata[i].v.p != NULL)
+ if(rdata[i].i != 0 || !FLT_ABS_EQUAL(rdata[i].f, 0.0F) || rdata[i].v.len != 0 || rdata[i].v.p != NULL)
TestErrPrintf("VL doesn't match!, rdata[%d].i=%d, rdata[%d].f=%f, rdata[%d].v.len=%u, rdata[%d].v.p=%p\n",(int)i,rdata[i].i,(int)i,rdata[i].f,(int)i,(unsigned)rdata[i].v.len,(int)i,rdata[i].v.p);
/* Write dataset to disk */
@@ -1697,7 +1697,7 @@ rewrite_vltypes_compound_vlen_atomic(void)
/* Allocate and initialize VL data to write */
for(i = 0; i < SPACE1_DIM1; i++) {
wdata[i].i = i * 40;
- wdata[i].f = (float)((i * 50) / 3.0);
+ wdata[i].f = (float)((i * 50) / 3.0F);
wdata[i].v.p = HDmalloc((i + increment) * sizeof(unsigned int));
wdata[i].v.len = i + increment;
for(j = 0; j < (i + increment); j++)
@@ -2430,8 +2430,8 @@ test_vltypes_fill_value(void)
hsize_t small_dims[] = {SPACE4_DIM_SMALL};
hsize_t large_dims[] = {SPACE4_DIM_LARGE};
size_t dset_elmts; /* Number of elements in a particular dataset */
- const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead", 3, 4.0, 100.0, 1.0, "liquid", "meter"};
- const dtype1_struct wdata = {3, 4, "", NULL, "\0", "foo", "two", 6, 8.0, 200.0, 2.0, "solid", "yard"};
+ const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead", 3, 4.0F, 100.0F, 1.0F, "liquid", "meter"};
+ const dtype1_struct wdata = {3, 4, "", NULL, "\0", "foo", "two", 6, 8.0F, 200.0F, 2.0F, "solid", "yard"};
dtype1_struct *rbuf = NULL; /* Buffer for reading data */
size_t mem_used = 0; /* Memory used during allocation */
H5D_layout_t layout; /* Dataset storage layout */
diff --git a/testpar/Makefile.in b/testpar/Makefile.in
index 23ae44a..44c30fc 100644
--- a/testpar/Makefile.in
+++ b/testpar/Makefile.in
@@ -486,7 +486,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -574,10 +573,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/testpar/t_dset.c b/testpar/t_dset.c
index ee59b27..3aed558 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -2502,7 +2502,6 @@ extend_readAll(void)
* Example of using the parallel HDF5 library to read a compressed
* dataset in an HDF5 file with collective parallel access support.
*/
-
#ifdef H5_HAVE_FILTER_DEFLATE
void
compress_readAll(void)
@@ -3469,7 +3468,6 @@ actual_io_mode_tests(void) {
#define DSET_NOCOLCAUSE "nocolcause"
#define NELM 2
#define FILE_EXTERNAL "nocolcause_extern.data"
-#undef H5_HAVE_FILTER_FLETCHER32
static void
test_no_collective_cause_mode(int selection_mode)
{
@@ -3505,9 +3503,9 @@ test_no_collective_cause_mode(int selection_mode)
hid_t file_space = -1;
hsize_t chunk_dims[RANK];
herr_t ret;
-#ifdef H5_HAVE_FILTER_FLETCHER32
+#ifdef LATER /* fletcher32 */
H5Z_filter_t filter_info;
-#endif
+#endif /* LATER */
/* set to global value as default */
int l_facc_type = facc_type;
char message[256];
@@ -3539,7 +3537,7 @@ test_no_collective_cause_mode(int selection_mode)
is_chunked = 0;
}
-#ifdef H5_HAVE_FILTER_FLETCHER32
+#ifdef LATER /* fletcher32 */
if (selection_mode & TEST_FILTERS) {
ret = H5Zfilter_avail(H5Z_FILTER_FLETCHER32);
VRFY ((ret >=0 ), "Fletcher32 filter is available.\n");
@@ -3550,7 +3548,7 @@ test_no_collective_cause_mode(int selection_mode)
ret = H5Pset_fletcher32(dcpl);
VRFY((ret >= 0),"set filter (flecher32) succeeded");
}
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
+#endif /* LATER */
if (selection_mode & TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES) {
sid = H5Screate(H5S_NULL);
@@ -3631,13 +3629,13 @@ test_no_collective_cause_mode(int selection_mode)
no_collective_cause_global_expected |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET;
}
-#ifdef H5_HAVE_FILTER_FLETCHER32
+#ifdef LATER /* fletcher32 */
if (selection_mode & TEST_FILTERS) {
test_name = "Broken Collective I/O - Filter is required";
no_collective_cause_local_expected |= H5D_MPIO_FILTERS;
no_collective_cause_global_expected |= H5D_MPIO_FILTERS;
}
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
+#endif /* LATER */
if (selection_mode & TEST_COLLECTIVE) {
test_name = "Broken Collective I/O - Not Broken";
@@ -3826,9 +3824,9 @@ test_no_collective_cause_mode_filter(int selection_mode)
hid_t file_space = -1;
hsize_t chunk_dims[RANK];
herr_t ret;
-#ifdef H5_HAVE_FILTER_FLETCHER32
+#ifdef LATER /* fletcher32 */
H5Z_filter_t filter_info;
-#endif
+#endif /* LATER */
char message[256];
/* Set up MPI parameters */
@@ -3847,7 +3845,7 @@ test_no_collective_cause_mode_filter(int selection_mode)
VRFY((dcpl >= 0), "dataset creation plist created successfully");
if (selection_mode == TEST_FILTERS_READ ) {
-#ifdef H5_HAVE_FILTER_FLETCHER32
+#ifdef LATER /* fletcher32 */
ret = H5Zfilter_avail(H5Z_FILTER_FLETCHER32);
VRFY ((ret >=0 ), "Fletcher32 filter is available.\n");
@@ -3856,7 +3854,7 @@ test_no_collective_cause_mode_filter(int selection_mode)
ret = H5Pset_fletcher32(dcpl);
VRFY((ret >= 0),"set filter (flecher32) succeeded");
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
+#endif /* LATER */
}
else {
VRFY(0, "Unexpected mode, only test for TEST_FILTERS_READ.");
@@ -3894,12 +3892,12 @@ test_no_collective_cause_mode_filter(int selection_mode)
dcpl, H5P_DEFAULT);
VRFY((dataset >= 0), "H5Dcreate2() dataset succeeded");
-#ifdef H5_HAVE_FILTER_FLETCHER32
+#ifdef LATER /* fletcher32 */
/* Set expected cause */
test_name = "Broken Collective I/O - Filter is required";
no_collective_cause_local_expected = H5D_MPIO_FILTERS;
no_collective_cause_global_expected = H5D_MPIO_FILTERS;
-#endif
+#endif /* LATER */
/* Get the file dataspace */
file_space = H5Dget_space(dataset);
@@ -4028,13 +4026,13 @@ no_collective_cause_tests(void)
test_no_collective_cause_mode (TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES);
test_no_collective_cause_mode (TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT);
test_no_collective_cause_mode (TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL);
-#ifdef H5_HAVE_FILTER_FLETCHER32
+#ifdef LATER /* fletcher32 */
/* TODO: use this instead of below TEST_FILTERS_READ when H5Dcreate and
* H5Dwrite is ready for mpio + filter feature.
*/
/* test_no_collective_cause_mode (TEST_FILTERS); */
test_no_collective_cause_mode_filter (TEST_FILTERS_READ);
-#endif
+#endif /* LATER */
/*
* Test combined causes
diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c
index 5a711cd..14f37be 100644
--- a/testpar/t_filter_read.c
+++ b/testpar/t_filter_read.c
@@ -217,9 +217,7 @@ test_filter_read(void)
unsigned disable_partial_chunk_filters; /* Whether filters are disabled on partial chunks */
herr_t hrc;
const char *filename;
-#ifdef H5_HAVE_FILTER_FLETCHER32
hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */
-#endif /* H5_HAVE_FILTER_FLETCHER32 */
#ifdef H5_HAVE_FILTER_DEFLATE
hsize_t deflate_size; /* Size of dataset with deflate filter */
@@ -231,13 +229,11 @@ test_filter_read(void)
unsigned szip_pixels_per_block=4;
#endif /* H5_HAVE_FILTER_SZIP */
-#ifdef H5_HAVE_FILTER_SHUFFLE
hsize_t shuffle_size; /* Size of dataset with shuffle filter */
-#endif /* H5_HAVE_FILTER_SHUFFLE */
-#if(defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP) && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
- hsize_t combo_size; /* Size of dataset with shuffle+deflate filter */
-#endif /* H5_HAVE_FILTER_DEFLATE && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */
+#if(defined H5_HAVE_FILTER_DEFLATE || defined H5_HAVE_FILTER_SZIP)
+ hsize_t combo_size; /* Size of dataset with multiple filters */
+#endif /* H5_HAVE_FILTER_DEFLATE || H5_HAVE_FILTER_SZIP */
filename = GetTestParameters();
@@ -359,6 +355,7 @@ test_filter_read(void)
#endif /* H5_HAVE_FILTER_SZIP */
} /* end for */
+
/*----------------------------------------------------------
* STEP 4: Test shuffling by itself.
*----------------------------------------------------------
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 4bd80af..aa0247c 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -457,7 +457,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -545,10 +544,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/h5copy/Makefile.in b/tools/h5copy/Makefile.in
index e9a5e62..3ba120c 100644
--- a/tools/h5copy/Makefile.in
+++ b/tools/h5copy/Makefile.in
@@ -465,7 +465,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -553,10 +552,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/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index 29543a4..50534f4 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -472,7 +472,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -560,10 +559,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/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index f2be3f0..31f8acb 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -329,10 +329,10 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
*/
{
- double data1[3][2] = {{1,1}, {1,1}, {0,0}};
- double data2[3][2] = {{0,1.1},{1.01,1.001},{0,1}};
- double data3[3][2] = {{100,100},{100,100},{100,100}};
- double data4[3][2] = {{105,120},{160,95},{80,40}};
+ double data1[3][2] = {{ 1.0F, 1.0F}, { 1.00F, 1.000F}, { 0.0F, 0.0F}};
+ double data2[3][2] = {{ 0.0F, 1.1F}, { 1.01F, 1.001F}, { 0.0F, 1.0F}};
+ double data3[3][2] = {{100.0F, 100.0F}, {100.00F, 100.000F}, {100.0F, 100.0F}};
+ double data4[3][2] = {{105.0F, 120.0F}, {160.00F, 95.000F}, { 80.0F, 40.0F}};
write_dset(gid1,2,dims2,"dset1",H5T_NATIVE_DOUBLE,data1);
write_dset(gid2,2,dims2,"dset2",H5T_NATIVE_DOUBLE,data2);
@@ -383,8 +383,8 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
*-------------------------------------------------------------------------
*/
{
- double data9[3][2] = {{100,100},{100,0},{0,100}};
- double data10[3][2] ={{120,80}, {0,100},{0,50}};
+ double data9[3][2] = {{100.0F, 100.0F}, {100.0F, 0.0F}, {0.0F, 100.0F}};
+ double data10[3][2] ={{120.0F, 80.0F}, { 0.0F, 100.0F}, {0.0F, 50.0F}};
write_dset(gid1,2,dims2,"dset9",H5T_NATIVE_DOUBLE,data9);
write_dset(gid1,2,dims2,"dset10",H5T_NATIVE_DOUBLE,data10);
@@ -405,8 +405,14 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
/* epsilon = 0.0000000000000001 = 1e-16
* system epsilon for double : DBL_EPSILON = 2.22045E-16
*/
- double data13[3][2] ={{0.0000000000000000, 0.0000000000000001},{0.0000000000000001, 0.0000000000000000},{0.00000000000000033, 0.0000000000000001}};
- double data14[3][2] ={{0.0000000000000000, 0.0000000000000004},{0.0000000000000002, 0.0000000000000001},{0.0000000000000001, 0.00000000000000000}};
+ double data13[3][2] ={
+ {H5_DOUBLE(0.0000000000000000), H5_DOUBLE(0.0000000000000001)},
+ {H5_DOUBLE(0.0000000000000001), H5_DOUBLE(0.0000000000000000)},
+ {H5_DOUBLE(0.00000000000000033), H5_DOUBLE(0.0000000000000001)}};
+ double data14[3][2] ={
+ {H5_DOUBLE(0.0000000000000000), H5_DOUBLE(0.0000000000000004)},
+ {H5_DOUBLE(0.0000000000000002), H5_DOUBLE(0.0000000000000001)},
+ {H5_DOUBLE(0.0000000000000001), H5_DOUBLE(0.00000000000000000)}};
write_dset(gid1,2,dims2,"fp1",H5T_NATIVE_FLOAT,data11);
write_dset(gid1,2,dims2,"fp2",H5T_NATIVE_FLOAT,data12);
@@ -424,7 +430,7 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
*-------------------------------------------------------------------------
*/
- long double data15[3][2] ={{1,1},{1,1},{1,1}};
+ long double data15[3][2] ={{1.0L,1.0L},{1.0L,1.0L},{1.0L,1.0L}};
write_dset(gid1,2,dims2,"ld",H5T_NATIVE_LDOUBLE,data15);
@@ -442,19 +448,19 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
float data15[6];
float data16[6];
- data15[0] = (float) sqrt( (double)-1 );
- data15[1] = 1;
- data15[2] = (float) sqrt( (double)-1 );
- data15[3] = 1;
- data15[4] = 1;
- data15[5] = 1;
+ data15[0] = (float)HDsqrt(-1.0F);
+ data15[1] = 1.0F;
+ data15[2] = (float)HDsqrt(-1.0F);
+ data15[3] = 1.0F;
+ data15[4] = 1.0F;
+ data15[5] = 1.0F;
- data16[0] = (float) sqrt( (double)-1 );
- data16[1] = (float) sqrt( (double)-1 );
- data16[2] = 1;
- data16[3] = 1;
- data16[4] = 1;
- data16[5] = 1;
+ data16[0] = (float)HDsqrt(-1.0F);
+ data16[1] = (float)HDsqrt(-1.0F);
+ data16[2] = 1.0F;
+ data16[3] = 1.0F;
+ data16[4] = 1.0F;
+ data16[5] = 1.0F;
write_dset(gid1,1,dims1,"fp15",H5T_NATIVE_FLOAT,data15);
write_dset(gid1,1,dims1,"fp16",H5T_NATIVE_FLOAT,data16);
@@ -470,19 +476,19 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
double data17[6];
double data18[6];
- data17[0] = sqrt( (double)-1 );
- data17[1] = 1;
- data17[2] = sqrt( (double)-1 );
- data17[3] = 1;
- data17[4] = 1;
- data17[5] = 1;
+ data17[0] = HDsqrt(-1.0F);
+ data17[1] = 1.0F;
+ data17[2] = HDsqrt(-1.0F);
+ data17[3] = 1.0F;
+ data17[4] = 1.0F;
+ data17[5] = 1.0F;
- data18[0] = (float) sqrt( (double)-1 );
- data18[1] = (float) sqrt( (double)-10000 );
- data18[2] = 1;
- data18[3] = 1;
- data18[4] = 1;
- data18[5] = 1;
+ data18[0] = HDsqrt(-1.0F);
+ data18[1] = HDsqrt(-10000.0F);
+ data18[2] = 1.0F;
+ data18[3] = 1.0F;
+ data18[4] = 1.0F;
+ data18[5] = 1.0F;
write_dset(gid1,1,dims1,"fp17",H5T_NATIVE_DOUBLE,data17);
write_dset(gid1,1,dims1,"fp18",H5T_NATIVE_DOUBLE,data18);
@@ -497,11 +503,11 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
float data19[6];
double data20[6];
- data19[0] = data19[1] = data19[2] = log(0);
- data19[3] = data19[4] = data19[5] = -log(0);
+ data19[0] = data19[1] = data19[2] = (float)HDlog(0.0F);
+ data19[3] = data19[4] = data19[5] = (float)-HDlog(0.0F);
- data20[0] = data20[1] = data20[2] = log(0);
- data20[3] = data20[4] = data20[5] = -log(0);
+ data20[0] = data20[1] = data20[2] = HDlog(0.0F);
+ data20[3] = data20[4] = data20[5] = -HDlog(0.0F);
write_dset(gid1,1,dims1,"fp19",H5T_NATIVE_FLOAT,data19);
write_dset(gid1,1,dims1,"fp19_COPY",H5T_NATIVE_FLOAT,data19);
@@ -526,15 +532,15 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
size_t type_size;
hid_t tid;
- buf1[0].d = sqrt( (double)-1 );
- buf1[0].f = (float) sqrt( (double)-1 );
- buf2[0].d = sqrt( (double)-1 );
- buf2[0].f = (float) sqrt( (double)-1 );
+ buf1[0].d = HDsqrt(-1.0F);
+ buf1[0].f = (float)HDsqrt(-1.0F);
+ buf2[0].d = HDsqrt(-1.0F);
+ buf2[0].f = (float)HDsqrt(-1.0F);
- buf1[1].d = sqrt( (double)-1 );
- buf1[1].f = (float) sqrt( (double)-1 );
- buf2[1].d = 0;
- buf2[1].f = 0;
+ buf1[1].d = HDsqrt(-1.0F);
+ buf1[1].f = (float)HDsqrt(-1.0F);
+ buf2[1].d = 0.0F;
+ buf2[1].f = 0.0F;
type_size = sizeof( cmp1_t );
tid = H5Tcreate (H5T_COMPOUND, type_size );
@@ -567,7 +573,7 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
int i;
} cmp3_t;
- double data2[6] = {0,0,0,0,0,0};
+ double data2[6] = {0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F};
int data3[6] = {0,0,0,0,0,0};
int data4[3][2] = {{0,0},{0,0},{0,0}};
int data5[2][2] = {{0,0},{0,0}};
@@ -782,10 +788,10 @@ int test_datatypes(const char *fname)
int buf3b[3][2] = {{1,1},{3,4},{5,6}};
long buf4a[3][2] = {{1,1},{1,1},{1,1}};
long buf4b[3][2] = {{1,1},{3,4},{5,6}};
- float buf5a[3][2] = {{1,1},{1,1},{1,1}};
- float buf5b[3][2] = {{1,1},{3,4},{5,6}};
- double buf6a[3][2] = {{1,1},{1,1},{1,1}};
- double buf6b[3][2] = {{1,1},{3,4},{5,6}};
+ float buf5a[3][2] = {{1.0F, 1.0F}, {1.0F, 1.0F}, {1.0F, 1.0F}};
+ float buf5b[3][2] = {{1.0F, 1.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}};
+ double buf6a[3][2] = {{1.0F, 1.0F}, {1.0F, 1.0F}, {1.0F, 1.0F}};
+ double buf6b[3][2] = {{1.0F, 1.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}};
/*unsigned/signed test
signed char -128 to 127
@@ -1037,10 +1043,10 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
/* file1 attr */
int f1_attr_idata[2]= {1,2}; /* integer */
- float f1_attr_fdata[2]= {1.1,2.2}; /* float */
+ float f1_attr_fdata[2]= {1.1F,2.2F}; /* float */
/* file2 attr */
int f2_attr_idata[2]= {2,3}; /* integer */
- float f2_attr_fdata[2]= {2.1,3.2}; /* float */
+ float f2_attr_fdata[2]= {2.1F,3.2F}; /* float */
/*----------------------------------------------------------------------
@@ -4464,7 +4470,7 @@ static void test_comps_array (const char *fname, const char *dset, const char *a
for(j=0; j < SDIM_CMPD_ARRAY; j++)
{
wdata[i].cmpd2[j].i2 = i*10 + diff;
- wdata[i].cmpd2[j].f2 = (float)(i*10.5) + diff;
+ wdata[i].cmpd2[j].f2 = (float)(i*10.5F) + diff;
} /* end for */
}
@@ -4581,7 +4587,7 @@ static void test_comps_vlen (const char * fname, const char *dset, const char *a
for(j=0; j<(i+1); j++)
{
((cmpd2_t *)wdata[i].vl.p)[j].i2 = i*10 + diff;
- ((cmpd2_t *)wdata[i].vl.p)[j].f2 = (float)(i*10.5) + diff;
+ ((cmpd2_t *)wdata[i].vl.p)[j].f2 = (float)(i*10.5F) + diff;
} /* end for */
} /* end for */
@@ -4707,7 +4713,7 @@ static void test_comps_array_vlen (const char * fname, const char *dset,const ch
{
/* Initialize data of compound3 */
((cmpd3_t *)wdata[i].cmpd2[j].vl.p)[k].i3 = j*10 + diff;
- ((cmpd3_t *)wdata[i].cmpd2[j].vl.p)[k].f3 = (float)(j*10.5) + diff;
+ ((cmpd3_t *)wdata[i].cmpd2[j].vl.p)[k].f3 = (float)(j*10.5F) + diff;
} /* end for */
} /* end for */
}
@@ -4854,8 +4860,8 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch
for (k=0; k < SDIM_CMPD_ARRAY; k++)
{
/* compound 3 data */
- ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].i3 = k*10.5 + diff;
- ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].f3 = (float)(k*10.5) + diff;
+ ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].i3 = k*10.5F + diff;
+ ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].f3 = (float)(k*10.5F) + diff;
}
} /* end for */
} /* end for */
@@ -5347,27 +5353,27 @@ void write_attr_in(hid_t loc_id,
char buf1[2][STR_SIZE]= {"ab","de"}; /* string */
char *buf1a[2]; /* VL string */
char buf2[2]= {1,2}; /* bitfield, opaque */
- s_t buf3[2]= {{1,2},{3,4}}; /* compound */
+ s_t buf3[2]= {{1,2.0F},{3,4.0F}}; /* compound */
hobj_ref_t buf4[2]; /* reference */
e_t buf45[2]= {RED,RED}; /* enum */
hvl_t buf5[2]; /* vlen */
hsize_t dimarray[1]={3}; /* array dimension */
int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */
int buf7[2]= {1,2}; /* integer */
- float buf8[2]= {1,2}; /* float */
+ float buf8[2]= {1.0F, 2.0F}; /* float */
/* create 2D attributes with dimension [3][2], 6 elements */
hsize_t dims2[2]={3,2};
- char buf12[3][2][STR_SIZE]= {{"ab","cd"},{"ef","gh"},{"ij","kl"}}; /* string */
- char *buf12a[3][2]; /* VL string */
- char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
- s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */
- hobj_ref_t buf42[3][2]; /* reference */
- e_t buf452[3][2]; /* enum */
- hvl_t buf52[3][2]; /* vlen */
- int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
- int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
- float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */
+ char buf12[3][2][STR_SIZE]= {{"ab","cd"},{"ef","gh"},{"ij","kl"}}; /* string */
+ char *buf12a[3][2]; /* VL string */
+ char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
+ s_t buf32[6]= {{1,2.0F},{3,4.0F},{5,6.0F},{7,8.0F},{9,10.0F},{11,12.0F}}; /* compound */
+ hobj_ref_t buf42[3][2]; /* reference */
+ e_t buf452[3][2]; /* enum */
+ hvl_t buf52[3][2]; /* vlen */
+ int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
+ int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
+ float buf82[3][2]= {{1.0F,2.0F},{3.0F,4.0F},{5.0F,6.0F}}; /* float */
/* create 3D attributes with dimension [4][3][2], 24 elements */
hsize_t dims3[3]={4,3,2};
@@ -6118,7 +6124,7 @@ void write_attr_in(hid_t loc_id,
for (k = 0; k < 2; k++) {
if (make_diffs) {
buf33[i][j][k].a=0;
- buf33[i][j][k].b=0;
+ buf33[i][j][k].b=0.0F;
}
else {
buf33[i][j][k].a=n++;
@@ -6332,7 +6338,7 @@ void write_attr_in(hid_t loc_id,
for (k = 0; k < 2; k++) {
if (make_diffs) {
buf73[i][j][k]=0;
- buf83[i][j][k]=0;
+ buf83[i][j][k]=0.0F;
}
else {
buf73[i][j][k]=n++;
@@ -6404,26 +6410,26 @@ void write_dset_in(hid_t loc_id,
char buf1[2][STR_SIZE]= {"ab","de"}; /* string */
char *buf1a[2]; /* VL string */
char buf2[2]= {1,2}; /* bitfield, opaque */
- s_t buf3[2]= {{1,2},{3,4}}; /* compound */
+ s_t buf3[2]= {{1,2.0F},{3,4.0F}}; /* compound */
hobj_ref_t buf4[2]; /* reference */
e_t buf45[2]= {RED,GREEN}; /* enum */
hvl_t buf5[2]; /* vlen */
hsize_t dimarray[1]={3}; /* array dimension */
int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */
int buf7[2]= {1,2}; /* integer */
- float buf8[2]= {1,2}; /* float */
+ float buf8[2]= {1.0F,2.0F}; /* float */
/* create 2D attributes with dimension [3][2], 6 elements */
hsize_t dims2[2]={3,2};
char buf12[3][2][STR_SIZE]= {{"ab","cd"},{"ef","gh"},{"ij","kl"}}; /* string */
char *buf12a[3][2]; /* VL string */
char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
- s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */
+ s_t buf32[6]= {{1,2.0F},{3,4.0F},{5,6.0F},{7,8.0F},{9,10.0F},{11,12.0F}}; /* compound */
hobj_ref_t buf42[3][2]; /* reference */
hvl_t buf52[3][2]; /* vlen */
int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
- float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */
+ float buf82[3][2]= {{1.0F,2.0F},{3.0F,4.0F},{5.0F,6.0F}}; /* float */
/* create 3D attributes with dimension [4][3][2], 24 elements */
hsize_t dims3[3]={4,3,2};
@@ -6960,7 +6966,7 @@ void write_dset_in(hid_t loc_id,
if (make_diffs)
{
buf33[i][j][k].a=0;
- buf33[i][j][k].b=0;
+ buf33[i][j][k].b=0.0F;
}
else {
buf33[i][j][k].a=n++;
@@ -7069,7 +7075,7 @@ void write_dset_in(hid_t loc_id,
for (k = 0; k < 2; k++) {
if (make_diffs) {
buf73[i][j][k]=0;
- buf83[i][j][k]=0;
+ buf83[i][j][k]=0.0F;
}
else {
buf73[i][j][k]=n++;
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index fb8cc9b..aee2a6c 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -471,7 +471,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -559,10 +558,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/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/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 0857d80..accf7b6 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -440,7 +440,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);
@@ -535,7 +535,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);
@@ -963,16 +963,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);
}
@@ -1148,16 +1148,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);
@@ -1397,7 +1397,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);
@@ -1408,7 +1408,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);
@@ -1576,7 +1576,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);
@@ -2389,10 +2389,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;
}
/*
@@ -2593,7 +2593,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 */
@@ -2727,7 +2727,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++)
@@ -2799,7 +2799,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 */
@@ -3170,7 +3170,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 */
@@ -3238,7 +3238,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 */
@@ -4944,10 +4944,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';
@@ -5444,7 +5444,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);
@@ -5455,14 +5455,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);
@@ -5473,13 +5472,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);
@@ -5492,13 +5490,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);
@@ -5509,7 +5506,6 @@ static void gent_filters(void)
ret=make_dset(fid,"scaleoffset",sid,H5T_NATIVE_INT,dcpl,buf1);
HDassert(ret >= 0);
-#endif
/*-------------------------------------------------------------------------
* all filters
@@ -5519,11 +5515,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) {
@@ -5540,17 +5534,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);
@@ -6894,7 +6884,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);
@@ -7290,7 +7280,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);
@@ -7480,7 +7470,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);
@@ -7693,7 +7683,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 */
@@ -7968,7 +7958,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 */
@@ -8136,17 +8126,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);
@@ -8434,7 +8424,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);
@@ -8633,7 +8623,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);
@@ -8819,7 +8809,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 */
@@ -9050,8 +9040,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 */
@@ -9388,7 +9378,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 */
@@ -9653,7 +9643,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..36f12a0 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
@@ -1184,7 +1180,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/h5import/Makefile.in b/tools/h5import/Makefile.in
index ed26aab..01ec73b 100644
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -465,7 +465,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -553,10 +552,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/h5import/h5importtest.c b/tools/h5import/h5importtest.c
index 49f977c..ac839fb 100644
--- a/tools/h5import/h5importtest.c
+++ b/tools/h5import/h5importtest.c
@@ -40,13 +40,13 @@ main(void)
FILE *sp;
float row4[3], col4[4], pln4[5];
- float rowo4 = (float)11.0e0, colo4 = (float)21.0e0, plno4 = (float)51.0e0;
- float rowi4 = (float)1.0e0, coli4 = (float)2.0e0, plni4 = (float)5.0e0;
+ float rowo4 = 11.0F, colo4 = 21.0F, plno4 = 51.0F;
+ float rowi4 = 1.0F, coli4 = 2.0F, plni4 = 5.0F;
int b32i3[5][3][4];
int row4i[3], col4i[4], pln4i[5];
- int rowo4i = (int)11 , colo4i = (int)21 , plno4i = (int)51 ;
- int rowi4i = (int)1 , coli4i = (int)2 , plni4i = (int)5 ;
+ int rowo4i = 11 , colo4i = 21 , plno4i = 51 ;
+ int rowi4i = 1 , coli4i = 2 , plni4i = 5 ;
#ifdef H5_SIZEOF_LONG_LONG
long long row4i64[3], col4i64[4], pln4i64[5];
@@ -66,8 +66,8 @@ main(void)
double b64r3[5][3][4];
double row8[3], col8[4], pln8[5];
- double rowo8 = 11.0e0, colo8 = 21.0e0, plno8 = 51.0e0;
- double rowi8 = 1.0e0, coli8 = 2.0e0, plni8 = 5.0e0;
+ double rowo8 = 11.0F, colo8 = 21.0F, plno8 = 51.0F;
+ double rowi8 = 1.0F, coli8 = 2.0F, plni8 = 5.0F;
/*
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index 855b708..acf5a03 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -477,7 +477,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -565,10 +564,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/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c
index 9636597..5a93c13 100644
--- a/tools/h5jam/h5jamgentest.c
+++ b/tools/h5jam/h5jamgentest.c
@@ -254,7 +254,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
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);
@@ -265,7 +265,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
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);
diff --git a/tools/h5jam/testh5jam.sh.in b/tools/h5jam/testh5jam.sh.in
index 36f0657..1664d6b 100644
--- a/tools/h5jam/testh5jam.sh.in
+++ b/tools/h5jam/testh5jam.sh.in
@@ -20,8 +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@"
TESTNAME=h5jam/h5unjam
EXIT_SUCCESS=0
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index 0a33e29..d556d3d 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -457,7 +457,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -545,10 +544,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/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 698b8a3..43fe5c6 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -489,7 +489,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -577,10 +576,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/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index a4d12bd..e3bb939 100644
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -24,10 +24,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=h5repack
EXIT_SUCCESS=0
@@ -742,40 +738,24 @@ fi
# shuffle with individual object
arg="h5repack_layout.h5 -f dset2:SHUF -l dset2:CHUNK=20x10"
-if test $USE_FILTER_SHUFFLE != "yes" ; then
- SKIP $arg
-else
- TOOLTEST shuffle_individual $arg
-fi
+TOOLTEST shuffle_individual $arg
# shuffle for all
arg="h5repack_layout.h5 -f SHUF"
-if test $USE_FILTER_SHUFFLE != "yes" ; then
- SKIP $arg
-else
- TOOLTEST shuffle_all $arg
-fi
+TOOLTEST shuffle_all $arg
# fletcher32 with individual object
arg="h5repack_layout.h5 -f dset2:FLET -l dset2:CHUNK=20x10"
-if test $USE_FILTER_FLETCHER32 != "yes" ; then
- SKIP $arg
-else
- TOOLTEST fletcher_individual $arg
-fi
+TOOLTEST fletcher_individual $arg
# fletcher32 for all
arg="h5repack_layout.h5 -f FLET"
-if test $USE_FILTER_FLETCHER32 != "yes" ; then
- SKIP $arg
-else
- TOOLTEST fletcher_all $arg
-fi
+TOOLTEST fletcher_all $arg
# all filters
arg="h5repack_layout.h5 -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10"
-if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then
+if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
TOOLTEST all_filters $arg
@@ -828,87 +808,47 @@ fi
# shuffle copy
arg="h5repack_shuffle.h5"
-if test $USE_FILTER_SHUFFLE != "yes" ; then
- SKIP $arg
-else
- TOOLTEST shuffle_copy $arg
-fi
+TOOLTEST shuffle_copy $arg
# shuffle remove
arg="h5repack_shuffle.h5 -f dset_shuffle:NONE"
-if test $USE_FILTER_SHUFFLE != "yes" ; then
- SKIP $arg
-else
- TOOLTEST shuffle_remove $arg
-fi
+TOOLTEST shuffle_remove $arg
# fletcher32 copy
arg="h5repack_fletcher.h5"
-if test $USE_FILTER_FLETCHER32 != "yes" ; then
- SKIP $arg
-else
- TOOLTEST fletcher_copy $arg
-fi
+TOOLTEST fletcher_copy $arg
# fletcher32 remove
arg="h5repack_fletcher.h5 -f dset_fletcher32:NONE"
-if test $USE_FILTER_FLETCHER32 != "yes" ; then
- SKIP $arg
-else
- TOOLTEST fletcher_remove $arg
-fi
+TOOLTEST fletcher_remove $arg
# nbit copy
arg="h5repack_nbit.h5"
-if test $USE_FILTER_NBIT != "yes" ; then
- SKIP $arg
-else
- TOOLTEST nbit_copy $arg
-fi
+TOOLTEST nbit_copy $arg
# nbit remove
arg="h5repack_nbit.h5 -f dset_nbit:NONE"
-if test $USE_FILTER_NBIT != "yes" ; then
- SKIP $arg
-else
- TOOLTEST nbit_remove $arg
-fi
+TOOLTEST nbit_remove $arg
# nbit add
arg="h5repack_nbit.h5 -f dset_int31:NBIT"
-if test $USE_FILTER_NBIT != "yes" ; then
- SKIP $arg
-else
- TOOLTEST nbit_add $arg
-fi
+TOOLTEST nbit_add $arg
# scaleoffset copy
arg="h5repack_soffset.h5"
-if test $USE_FILTER_SCALEOFFSET != "yes" ; then
- SKIP $arg
-else
- TOOLTEST scale_copy $arg
-fi
+TOOLTEST scale_copy $arg
# scaleoffset add
arg="h5repack_soffset.h5 -f dset_none:SOFF=31,IN"
-if test $USE_FILTER_SCALEOFFSET != "yes" ; then
- SKIP $arg
-else
- TOOLTEST scale_add $arg
-fi
+TOOLTEST scale_add $arg
# scaleoffset remove
arg="h5repack_soffset.h5 -f dset_scaleoffset:NONE"
-if test $USE_FILTER_SCALEOFFSET != "yes" ; then
- SKIP $arg
-else
- TOOLTEST scale_remove $arg
-fi
+TOOLTEST scale_remove $arg
# remove all filters
arg="h5repack_filters.h5 -f NONE"
-if test $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_NBIT != "yes" -o $USE_FILTER_SCALEOFFSET != "yes" ; then
+if test $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" ; then
SKIP $arg
else
TOOLTEST remove_all $arg
@@ -1061,7 +1001,7 @@ fi
# several global filters
arg="h5repack_layout.h5 --filter GZIP=1 --filter SHUF"
-if test $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SHUFFLE != "yes" ; then
+if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
TOOLTEST global_filters $arg
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index 5d5b0c3..d35b602 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -472,8 +472,6 @@ int main (void)
TESTING(" addding shuffle filter");
-#ifdef H5_HAVE_FILTER_SHUFFLE
-
/*-------------------------------------------------------------------------
* test an individual object option
*-------------------------------------------------------------------------
@@ -495,9 +493,6 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
/*-------------------------------------------------------------------------
* test all objects option
@@ -506,8 +501,6 @@ int main (void)
TESTING(" addding shuffle filter to all");
-#ifdef H5_HAVE_FILTER_SHUFFLE
-
/* fs_type = H5F_FILE_SPACE_ALL_PERSIST; fs_size = 1 */
if (h5repack_init (&pack_options, 0, FALSE, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
@@ -525,13 +518,9 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
- TESTING(" adding checksum filter");
-#ifdef H5_HAVE_FILTER_FLETCHER32
+ TESTING(" adding checksum filter");
/*-------------------------------------------------------------------------
* test an individual object option
@@ -554,9 +543,6 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
/*-------------------------------------------------------------------------
* test all objects option
@@ -566,8 +552,6 @@ int main (void)
TESTING(" adding checksum filter to all");
-#ifdef H5_HAVE_FILTER_FLETCHER32
-
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("FLET",&pack_options) < 0)
@@ -584,9 +568,6 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
TESTING(" filter queue fletcher, shuffle, deflate, szip");
@@ -600,16 +581,10 @@ int main (void)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options) < 0)
GOERROR;
-
-#if defined (H5_HAVE_FILTER_FLETCHER32)
if (h5repack_addfilter("dset1:FLET",&pack_options) < 0)
GOERROR;
-#endif
-
-#ifdef H5_HAVE_FILTER_SHUFFLE
if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0)
GOERROR;
-#endif
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
@@ -1088,7 +1063,6 @@ int main (void)
TESTING(" copy of shuffle filter");
-#ifdef H5_HAVE_FILTER_SHUFFLE
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0)
@@ -1101,13 +1075,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
+
TESTING(" removing shuffle filter");
-#ifdef H5_HAVE_FILTER_SHUFFLE
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_shuffle:NONE",&pack_options) < 0)
@@ -1122,13 +1093,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
+
TESTING(" copy of fletcher filter");
-#ifdef H5_HAVE_FILTER_FLETCHER32
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0)
@@ -1141,13 +1109,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
+
TESTING(" removing fletcher filter");
-#ifdef H5_HAVE_FILTER_FLETCHER32
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options) < 0)
@@ -1162,14 +1127,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
TESTING(" copy of nbit filter");
-#ifdef H5_HAVE_FILTER_NBIT
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
@@ -1182,13 +1143,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
+
TESTING(" removing nbit filter");
-#ifdef H5_HAVE_FILTER_NBIT
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_nbit:NONE",&pack_options) < 0)
@@ -1203,14 +1161,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
TESTING(" adding nbit filter");
-#ifdef H5_HAVE_FILTER_NBIT
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_int31:NBIT",&pack_options) < 0)
@@ -1225,14 +1179,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
TESTING(" copy of scaleoffset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
@@ -1245,13 +1195,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
+
TESTING(" removing scaleoffset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options) < 0)
@@ -1266,14 +1213,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
TESTING(" adding scaleoffset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options) < 0)
@@ -1288,10 +1231,6 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
-
/*-------------------------------------------------------------------------
@@ -1307,9 +1246,7 @@ int main (void)
TESTING(" filter conversion from deflate to szip");
-#if defined (H5_HAVE_FILTER_SZIP) \
- && defined (H5_HAVE_FILTER_DEFLATE) \
- && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE)
if (szip_can_encode) {
/* fs_type = H5F_FILE_SPACE_VFD; fs_size = 4 */
@@ -1336,9 +1273,7 @@ int main (void)
TESTING(" filter conversion from szip to deflate");
-#if defined (H5_HAVE_FILTER_SZIP) \
- && defined (H5_HAVE_FILTER_DEFLATE) \
- && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE)
if (szip_can_encode) {
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
@@ -1370,8 +1305,7 @@ int main (void)
TESTING(" removing all filters");
-#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) \
- && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE)
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
@@ -2396,13 +2330,12 @@ int make_shuffle(hid_t loc_id)
* shuffle
*-------------------------------------------------------------------------
*/
-#if defined (H5_HAVE_FILTER_SHUFFLE)
+
/* set the shuffle filter */
if (H5Pset_shuffle(dcpl) < 0)
goto out;
if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0)
goto out;
-#endif
/*-------------------------------------------------------------------------
@@ -2463,7 +2396,7 @@ int make_fletcher32(hid_t loc_id)
* fletcher32
*-------------------------------------------------------------------------
*/
-#if defined (H5_HAVE_FILTER_FLETCHER32)
+
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
@@ -2472,7 +2405,6 @@ int make_fletcher32(hid_t loc_id)
goto out;
if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0)
goto out;
-#endif
/*-------------------------------------------------------------------------
* close space and dcpl
@@ -2537,7 +2469,6 @@ int make_nbit(hid_t loc_id)
goto out;
}
-#if defined H5_HAVE_FILTER_NBIT
/* remove the filters from the dcpl */
if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0)
{
@@ -2571,7 +2502,6 @@ int make_nbit(hid_t loc_id)
goto out;
}
H5Dclose(dsid);
-#endif
/*-------------------------------------------------------------------------
* close
@@ -2633,7 +2563,6 @@ int make_scaleoffset(hid_t loc_id)
dtid = H5Tcopy(H5T_NATIVE_INT);
-#if defined (H5_HAVE_FILTER_SCALEOFFSET)
/* remove the filters from the dcpl */
if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0) {
H5Tclose(dtid);
@@ -2662,7 +2591,6 @@ int make_scaleoffset(hid_t loc_id)
}
H5Tclose(dtid);
H5Dclose(dsid);
-#endif
/*-------------------------------------------------------------------------
* close space and dcpl
@@ -2696,10 +2624,8 @@ int make_all_filters(hid_t loc_id)
{
hid_t dcpl; /* dataset creation property list */
hid_t sid; /* dataspace ID */
-#if defined (H5_HAVE_FILTER_NBIT)
hid_t dtid;
hid_t dsid;
-#endif /* H5_HAVE_FILTER_NBIT */
#if defined (H5_HAVE_FILTER_SZIP)
unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK;
unsigned szip_pixels_per_block=8;
@@ -2729,17 +2655,13 @@ int make_all_filters(hid_t loc_id)
if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto out;
-#if defined (H5_HAVE_FILTER_SHUFFLE)
/* set the shuffle filter */
if (H5Pset_shuffle(dcpl) < 0)
goto out;
-#endif
-#if defined (H5_HAVE_FILTER_FLETCHER32)
/* set the checksum filter */
if (H5Pset_fletcher32(dcpl) < 0)
goto out;
-#endif
#if defined (H5_HAVE_FILTER_SZIP)
if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1)
@@ -2765,7 +2687,6 @@ int make_all_filters(hid_t loc_id)
if (make_dset(loc_id,"dset_all",sid,dcpl,buf) < 0)
goto out;
-#if defined (H5_HAVE_FILTER_FLETCHER32)
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
@@ -2774,7 +2695,6 @@ int make_all_filters(hid_t loc_id)
goto out;
if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0)
goto out;
-#endif
/* Make sure encoding is enabled */
@@ -2796,7 +2716,6 @@ int make_all_filters(hid_t loc_id)
#endif
-#if defined (H5_HAVE_FILTER_SHUFFLE)
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
@@ -2805,7 +2724,6 @@ int make_all_filters(hid_t loc_id)
goto out;
if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0)
goto out;
-#endif
#if defined (H5_HAVE_FILTER_DEFLATE)
@@ -2821,7 +2739,6 @@ int make_all_filters(hid_t loc_id)
-#if defined (H5_HAVE_FILTER_NBIT)
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0)
goto out;
@@ -2842,8 +2759,6 @@ int make_all_filters(hid_t loc_id)
return -1;
if(H5Dclose(dsid) < 0)
return -1;
-#endif
-
if(H5Sclose(sid) < 0)
goto out;
diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in
index 993a226..bfad3ad 100644
--- a/tools/h5stat/Makefile.in
+++ b/tools/h5stat/Makefile.in
@@ -467,7 +467,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -555,10 +554,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/h5stat/testh5stat.sh.in b/tools/h5stat/testh5stat.sh.in
index 2aea61e..b48f327 100644
--- a/tools/h5stat/testh5stat.sh.in
+++ b/tools/h5stat/testh5stat.sh.in
@@ -25,10 +25,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=h5stat
EXIT_SUCCESS=0
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index 607f1ed..c972bab 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -454,7 +454,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -542,10 +541,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/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c
index 79cf253..ccdba26 100644
--- a/tools/lib/h5tools_filters.c
+++ b/tools/lib/h5tools_filters.c
@@ -107,44 +107,24 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
*-------------------------------------------------------------------------
*/
case H5Z_FILTER_SHUFFLE:
-#ifndef H5_HAVE_FILTER_SHUFFLE
- if (name)
- print_warning(name,"shuffle");
- return 0;
-#endif
break;
/*-------------------------------------------------------------------------
* H5Z_FILTER_FLETCHER32 3 , fletcher32 checksum of EDC
*-------------------------------------------------------------------------
*/
case H5Z_FILTER_FLETCHER32:
-#ifndef H5_HAVE_FILTER_FLETCHER32
- if (name)
- print_warning(name,"fletcher32");
- return 0;
-#endif
break;
/*-------------------------------------------------------------------------
* H5Z_FILTER_NBIT
*-------------------------------------------------------------------------
*/
case H5Z_FILTER_NBIT:
-#ifndef H5_HAVE_FILTER_NBIT
- if (name)
- print_warning(name,"nbit");
- return 0;
-#endif
break;
/*-------------------------------------------------------------------------
* H5Z_FILTER_SCALEOFFSET
*-------------------------------------------------------------------------
*/
case H5Z_FILTER_SCALEOFFSET:
-#ifndef H5_HAVE_FILTER_SCALEOFFSET
- if (name)
- print_warning(name,"scaleoffset");
- return 0;
-#endif
break;
}/*switch*/
}/*for*/
@@ -211,24 +191,12 @@ int h5tools_can_encode(H5Z_filter_t filtn) {
#endif
break;
case H5Z_FILTER_SHUFFLE:
-#ifndef H5_HAVE_FILTER_SHUFFLE
- return 0;
-#endif
break;
case H5Z_FILTER_FLETCHER32:
-#ifndef H5_HAVE_FILTER_FLETCHER32
- return 0;
-#endif
break;
case H5Z_FILTER_NBIT:
-#ifndef H5_HAVE_FILTER_NBIT
- return 0;
-#endif
break;
case H5Z_FILTER_SCALEOFFSET:
-#ifndef H5_HAVE_FILTER_SCALEOFFSET
- return 0;
-#endif
break;
}/*switch*/
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index d0a4a76..90e6d3d 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -50,6 +50,10 @@ typedef struct {
hid_t fid; /* File ID being traversed */
} trav_print_udata_t;
+typedef struct trav_path_op_data_t {
+ const char *path;
+} trav_path_op_data_t;
+
/* format for hsize_t */
#ifdef H5TRAV_PRINT_SPACE
#define HSIZE_T_FORMAT "%" H5_PRINTF_LL_WIDTH "u"
@@ -899,11 +903,11 @@ trav_attr(hid_t
#ifndef H5TRAV_PRINT_SPACE
UNUSED
#endif /* H5TRAV_PRINT_SPACE */
-obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, void *op_data)
+obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, void *_op_data)
{
- char *buf;
+ trav_path_op_data_t *op_data = (trav_path_op_data_t *)_op_data;
+ const char *buf = op_data->path;
- buf = (char*)op_data;
if((strlen(buf)==1) && (*buf=='/'))
printf(" %-10s %s%s", "attribute", buf, attr_name);
else
@@ -1009,10 +1013,14 @@ trav_print_visit_obj(const char *path, const H5O_info_t *oinfo,
/* Check if we've already seen this object */
if(NULL == already_visited) {
+ trav_path_op_data_t op_data;
+
+ op_data.path = path;
/* Finish printing line about object */
printf("\n");
if(trav_verbosity > 0)
- H5Aiterate_by_name(print_udata->fid, path, trav_index_by, trav_index_order, NULL, trav_attr, (void *)path, H5P_DEFAULT);
+ H5Aiterate_by_name(print_udata->fid, path, trav_index_by, trav_index_order,
+ NULL, trav_attr, &op_data, H5P_DEFAULT);
}
else
/* Print the link's original name */
diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c
index 78e7fe9..b8d44de 100644
--- a/tools/lib/io_timer.c
+++ b/tools/lib/io_timer.c
@@ -40,7 +40,7 @@
* The number to divide the tv_usec field with to get a nice decimal to add to
* the number of seconds.
*/
-#define MICROSECOND 1000000.0
+#define MICROSECOND 1000000.0F
/* global variables */
io_time_t *timer_g; /* timer: global for stub functions */
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index e11838f..623bc8d 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -492,7 +492,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -580,10 +579,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/perform/Makefile.in b/tools/perform/Makefile.in
index 1f903c5..d28f307 100644
--- a/tools/perform/Makefile.in
+++ b/tools/perform/Makefile.in
@@ -496,7 +496,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -584,10 +583,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/perform/chunk.c b/tools/perform/chunk.c
index a3c11c1..6825a4c 100644
--- a/tools/perform/chunk.c
+++ b/tools/perform/chunk.c
@@ -57,20 +57,20 @@
#define RM_CACHE_STRT 25
#define RM_CACHE_END 25
#define RM_CACHE_DELT 5
-#define RM_START 0.50
-#define RM_END 5.00
-#define RM_DELTA 0.50
-#define RM_W0 0.0
+#define RM_START 0.50F
+#define RM_END 5.00F
+#define RM_DELTA 0.50F
+#define RM_W0 0.0F
#define RM_NRDCC 521
/* Diagonal test */
#define DIAG_CACHE_STRT 25
#define DIAG_CACHE_END 25
#define DIAG_CACHE_DELT 5
-#define DIAG_START 0.50
-#define DIAG_END 5.00
-#define DIAG_DELTA 0.50
-/* #define DIAG_W0 0.65 */
+#define DIAG_START 0.50F
+#define DIAG_END 5.00F
+#define DIAG_DELTA 0.50F
+/* #define DIAG_W0 0.65F */
/* #define DIAG_NRDCC 521 */
static size_t nio_g;
diff --git a/tools/perform/iopipe.c b/tools/perform/iopipe.c
index 85063fa..a04ef82 100644
--- a/tools/perform/iopipe.c
+++ b/tools/perform/iopipe.c
@@ -81,25 +81,25 @@ print_stats (const char *prefix,
double u_time, s_time;
u_time = ((double)(r_stop->ru_utime.tv_sec)+
- (double)(r_stop->ru_utime.tv_usec)/1000000.0) -
+ (double)(r_stop->ru_utime.tv_usec)/1000000.0F) -
((double)(r_start->ru_utime.tv_sec)+
- (double)(r_start->ru_utime.tv_usec)/1000000.0);
+ (double)(r_start->ru_utime.tv_usec)/1000000.0F);
s_time = ((double)(r_stop->ru_stime.tv_sec)+
- (double)(r_stop->ru_stime.tv_usec)/1000000.0) -
+ (double)(r_stop->ru_stime.tv_usec)/1000000.0F) -
((double)(r_start->ru_stime.tv_sec)+
- (double)(r_start->ru_stime.tv_usec)/1000000.0);
+ (double)(r_start->ru_stime.tv_usec)/1000000.0F);
#endif
#ifndef H5_HAVE_SYS_TIMEB
e_time = ((double)(t_stop->tv_sec)+
- (double)(t_stop->tv_usec)/1000000.0) -
+ (double)(t_stop->tv_usec)/1000000.0F) -
((double)(t_start->tv_sec)+
- (double)(t_start->tv_usec)/1000000.0);
+ (double)(t_start->tv_usec)/1000000.0F);
#else
e_time = ((double)(t_stop->tv_sec)+
- (double)(t_stop->tv_usec)/1000.0) -
+ (double)(t_stop->tv_usec)/1000.0F) -
((double)(t_start->tv_sec)+
- (double)(t_start->tv_usec)/1000.0);
+ (double)(t_start->tv_usec)/1000.0F);
#endif
bw = (double)nbytes / e_time;
@@ -191,7 +191,7 @@ main (void)
* 1998-11-06 ptl
*/
printf ("I/O request size is %1.1fMB\n",
- (double)(hssize_t)(size[0]*size[1])/1024.0*1024);
+ (double)(hssize_t)(size[0]*size[1])/1024.0F*1024);
/* Open the files */
file = H5Fcreate (HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/tools/perform/overhead.c b/tools/perform/overhead.c
index 9341e64..046668f 100644
--- a/tools/perform/overhead.c
+++ b/tools/perform/overhead.c
@@ -209,7 +209,7 @@ test(fill_t fill_style, const double splits[],
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) goto error;
if(!use_rdcc) {
if(H5Pget_cache(fapl, &mdc_nelmts, NULL, NULL, NULL) < 0) goto error;
- if(H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0) < 0) goto error;
+ if(H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0F) < 0) goto error;
}
if((file = H5Fcreate(FILE_NAME_1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) goto error;
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
diff --git a/tools/perform/sio_perf.c b/tools/perform/sio_perf.c
index 1828d6f..7d75a2d 100644
--- a/tools/perform/sio_perf.c
+++ b/tools/perform/sio_perf.c
@@ -68,7 +68,7 @@
#define SIO_HDF5 0x4
/* report 0.0 in case t is zero too */
-#define MB_PER_SEC(bytes,t) (((t)==0.0) ? 0.0 : ((((double)bytes) / ONE_MB) / (t)))
+#define MB_PER_SEC(bytes,t) (((t)==0.0F) ? 0.0F : ((((double)bytes) / ONE_MB) / (t)))
#ifndef TRUE
#define TRUE 1
@@ -451,14 +451,14 @@ run_test(iotype iot, parameters parms, struct options *opts)
minmax *read_mm_table=NULL;
minmax *read_gross_mm_table=NULL;
minmax *read_raw_mm_table=NULL;
- minmax write_sys_mm = {0.0, 0.0, 0.0, 0};
- minmax write_mm = {0.0, 0.0, 0.0, 0};
- minmax write_gross_mm = {0.0, 0.0, 0.0, 0};
- minmax write_raw_mm = {0.0, 0.0, 0.0, 0};
- minmax read_sys_mm = {0.0, 0.0, 0.0, 0};
- minmax read_mm = {0.0, 0.0, 0.0, 0};
- minmax read_gross_mm = {0.0, 0.0, 0.0, 0};
- minmax read_raw_mm = {0.0, 0.0, 0.0, 0};
+ minmax write_sys_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax write_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax write_gross_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax write_raw_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax read_sys_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax read_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax read_gross_mm = {0.0F, 0.0F, 0.0F, 0};
+ minmax read_raw_mm = {0.0F, 0.0F, 0.0F, 0};
raw_size = (off_t)parms.num_bytes;
parms.io_type = iot;
@@ -717,7 +717,7 @@ accumulate_minmax_stuff(minmax *mm, int count)
int i;
minmax total_mm;
- total_mm.sum = 0.0;
+ total_mm.sum = 0.0F;
total_mm.max = -DBL_MAX;
total_mm.min = DBL_MAX;
total_mm.num = count;
diff --git a/tools/perform/zip_perf.c b/tools/perform/zip_perf.c
index edd5b0f..f73ba40 100644
--- a/tools/perform/zip_perf.c
+++ b/tools/perform/zip_perf.c
@@ -43,10 +43,10 @@
#define ONE_MB (ONE_KB * ONE_KB)
#define ONE_GB (ONE_MB * ONE_KB)
-#define MICROSECOND 1000000.0
+#define MICROSECOND 1000000.0F
/* report 0.0 in case t is zero too */
-#define MB_PER_SEC(bytes,t) ((fabs(t)<0.0000000001) ? 0.0 : ((((double)bytes) / ONE_MB) / (t)))
+#define MB_PER_SEC(bytes,t) ((fabs(t)<0.0000000001F) ? 0.0F : ((((double)bytes) / ONE_MB) / (t)))
#ifndef TRUE
#define TRUE 1
@@ -182,7 +182,7 @@ write_file(Bytef *source, uLongf sourceLen)
/* destination buffer needs to be at least 0.1% larger than sourceLen
* plus 12 bytes */
- destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1)) + 12;
+ destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1F)) + 12;
dest = (Bytef *)HDmalloc(destLen);
if (!dest)
@@ -464,7 +464,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size,
error("out of memory");
}
- compression_time = 0.0;
+ compression_time = 0.0F;
if (random_test)
fill_with_random_data(src, src_len);