From 99ceb100fe1d24ccd7a01b8b3139aa5efadab4b1 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Tue, 17 Jun 2014 17:26:28 -0500 Subject: [svn-r25309] Bring revisions #24783 - #24851 from trunk to revise_chunks. Tested on jam, koala, ostrich, platypus. --- CMakeLists.txt | 64 +++++++------- MANIFEST | 1 + c++/CMakeLists.txt | 8 +- c++/examples/CMakeLists.txt | 2 +- c++/src/CMakeLists.txt | 2 +- c++/src/H5Exception.cpp | 22 ++--- c++/src/H5Exception.h | 22 ++--- c++/test/CMakeLists.txt | 2 +- c++/test/h5cpputil.cpp | 4 +- c++/test/h5cpputil.h | 4 +- config/cmake/CheckTypeSize.cmake | 4 +- config/cmake/ConfigureChecks.cmake | 22 ++--- config/cmake/FindMPI.cmake | 21 ++++- config/cmake/HDF5UseFortran.cmake | 10 +-- config/cmake/grepTest.cmake | 2 +- config/cmake/prunTest.cmake | 38 ++++---- config/cmake/runTest.cmake | 42 ++++----- config/cmake/userblockTest.cmake | 12 +-- config/cmake/vfdTest.cmake | 4 +- examples/CMakeLists.txt | 2 +- examples/CMakeTests.cmake | 7 +- fortran/CMakeLists.txt | 10 +-- fortran/examples/CMakeLists.txt | 2 +- fortran/src/CMakeLists.txt | 2 +- fortran/src/H5_f.c | 33 ++++--- fortran/src/H5_ff.f90 | 3 + fortran/src/H5f90global.f90 | 59 +++++++------ fortran/src/H5f90proto.h | 6 +- fortran/test/CMakeLists.txt | 2 +- fortran/testpar/CMakeLists.txt | 2 +- hl/CMakeLists.txt | 12 +-- hl/c++/CMakeLists.txt | 8 +- hl/c++/examples/CMakeLists.txt | 2 +- hl/c++/src/CMakeLists.txt | 2 +- hl/c++/src/Makefile.am | 2 +- hl/c++/src/Makefile.in | 8 +- hl/c++/test/CMakeLists.txt | 2 +- hl/examples/CMakeLists.txt | 2 +- hl/fortran/CMakeLists.txt | 8 +- hl/fortran/examples/CMakeLists.txt | 2 +- hl/fortran/src/CMakeLists.txt | 9 +- hl/fortran/test/CMakeLists.txt | 2 +- hl/src/CMakeLists.txt | 7 +- hl/test/CMakeLists.txt | 2 +- hl/test/test_image.c | 24 ++--- hl/tools/CMakeLists.txt | 2 +- hl/tools/CMakeTests.cmake | 2 +- hl/tools/gif2h5/decompress.c | 6 -- hl/tools/gif2h5/gif2mem.c | 2 - hl/tools/gif2h5/hdfgifwr.c | 65 -------------- perform/CMakeLists.txt | 2 +- perform/sio_engine.c | 12 --- perform/zip_perf.c | 6 -- release_docs/INSTALL_CMake.txt | 32 ++++--- release_docs/RELEASE.txt | 26 +++--- release_docs/USING_HDF5_CMake.txt | 6 +- src/CMakeLists.txt | 2 +- src/H5Tconv.c | 108 +++++++++++------------ src/H5private.h | 19 ---- src/H5public.h | 21 +++++ test/CMakeLists.txt | 8 +- test/H5srcdir.h | 8 +- test/cross_read.c | 2 + test/dt_arith.c | 174 +++++++++++++++++++------------------ test/gen_cross.c | 2 + test/gen_new_group.c | 7 -- test/h5test.c | 152 +++++++++++++++----------------- test/testmeta.c | 2 - test/titerate.c | 1 - test/ttime.c | 2 + test/ttsafe_dcreate.c | 1 - test/tunicode.c | 3 - test/tvltypes.c | 5 -- testpar/CMakeLists.txt | 2 +- tools/CMakeLists.txt | 22 ++--- tools/h5copy/CMakeLists.txt | 2 +- tools/h5copy/CMakeTests.cmake | 2 +- tools/h5diff/CMakeLists.txt | 2 +- tools/h5diff/CMakeTests.cmake | 2 +- tools/h5dump/CMakeLists.txt | 2 +- tools/h5dump/CMakeTests.cmake | 10 +-- tools/h5import/CMakeLists.txt | 2 +- tools/h5import/CMakeTests.cmake | 2 +- tools/h5import/h5import.c | 17 ++-- tools/h5jam/CMakeLists.txt | 2 +- tools/h5jam/CMakeTests.cmake | 2 +- tools/h5jam/getub.c | 23 +++-- tools/h5jam/h5jamgentest.c | 31 +------ tools/h5jam/tellub.c | 23 +++-- tools/h5ls/CMakeLists.txt | 2 +- tools/h5ls/CMakeTests.cmake | 2 +- tools/h5repack/CMakeLists.txt | 6 +- tools/h5repack/dynlib_rpk.c | 97 +++++++++++++++++++++ tools/h5stat/CMakeLists.txt | 2 +- tools/lib/CMakeLists.txt | 2 +- tools/lib/h5diff.c | 2 - tools/lib/h5trav.c | 102 +++++++++------------- tools/lib/h5trav.h | 12 +-- tools/misc/CMakeLists.txt | 2 +- tools/misc/CMakeTests.cmake | 2 +- tools/misc/h5repart_gentest.c | 1 - 101 files changed, 769 insertions(+), 793 deletions(-) create mode 100644 tools/h5repack/dynlib_rpk.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 1701667..8d7cec2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5 C CXX) #----------------------------------------------------------------------------- @@ -52,22 +52,22 @@ PROJECT (HDF5 C CXX) # # # Setup all necessary overrides for zlib so that HDF5 uses our # # internally compiled zlib rather than any other version -# IF(HDF5_ENABLE_Z_LIB_SUPPORT) +# if (HDF5_ENABLE_Z_LIB_SUPPORT) # # We must tell the main HDF5 library that it depends on our zlib # set (HDF5_LIB_DEPENDENCIES vtkzlib) # # Override the zlib header file -# IF(VTK_USE_SYSTEM_ZLIB) +# if (VTK_USE_SYSTEM_ZLIB) # set (H5_ZLIB_HEADER "zlib.h") -# ELSE(VTK_USE_SYSTEM_ZLIB) +# else (VTK_USE_SYSTEM_ZLIB) # set (H5_ZLIB_HEADER "vtk_zlib.h") # # Set vars that FindZlib would have set if used in sub project # set (ZLIB_INCLUDE_DIRS "${VTK_ZLIB_INCLUDE_DIRS}") # set (ZLIB_LIBRARIES vtkzlib) -# ENDIF(VTK_USE_SYSTEM_ZLIB) -# ENDIF(HDF5_ENABLE_Z_LIB_SUPPORT) +# endif (VTK_USE_SYSTEM_ZLIB) +# endif (HDF5_ENABLE_Z_LIB_SUPPORT) # # # Add the sub project -# ADD_SUBDIRECTORY(Utilities/hdf5-1.8) +# add_subdirectory (Utilities/hdf5-1.8) #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- @@ -78,12 +78,12 @@ PROJECT (HDF5 C CXX) # explicitly turn off this option to build HDF5 in the Express IDE... # option (HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON) -MARK_AS_ADVANCED (HDF5_USE_FOLDERS) +mark_as_advanced (HDF5_USE_FOLDERS) if (HDF5_USE_FOLDERS) set_property (GLOBAL PROPERTY USE_FOLDERS ON) endif (HDF5_USE_FOLDERS) option (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF) -MARK_AS_ADVANCED (HDF5_NO_PACKAGES) +mark_as_advanced (HDF5_NO_PACKAGES) #----------------------------------------------------------------------------- # Set the core names of all the libraries @@ -169,7 +169,7 @@ endif (NOT HDF5_INSTALL_DATA_DIR) #----------------------------------------------------------------------------- # parse the full version number from H5public.h and include in H5_VERS_INFO #----------------------------------------------------------------------------- -FILE (READ ${HDF5_SRC_DIR}/H5public.h _h5public_h_contents) +file (READ ${HDF5_SRC_DIR}/H5public.h _h5public_h_contents) string (REGEX REPLACE ".*#define[ \t]+H5_VERS_MAJOR[ \t]+([0-9]*).*$" "\\1" H5_VERS_MAJOR ${_h5public_h_contents}) string (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$" @@ -183,14 +183,14 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._]*) #----------------------------------------------------------------------------- # parse the full soversion number from config/lt_vers.am and include in H5_SOVERS_INFO #----------------------------------------------------------------------------- -FILE (READ ${HDF5_SOURCE_DIR}/config/lt_vers.am _lt_vers_am_contents) +file (READ ${HDF5_SOURCE_DIR}/config/lt_vers.am _lt_vers_am_contents) string (REGEX REPLACE ".*LT_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_SOVERS_INTERFACE ${_lt_vers_am_contents}) string (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_SOVERS_MINOR ${_lt_vers_am_contents}) string (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_SOVERS_RELEASE ${_lt_vers_am_contents}) -MATH(EXPR H5_SOVERS_MAJOR ${H5_SOVERS_INTERFACE}-${H5_SOVERS_RELEASE}) +MATH (EXPR H5_SOVERS_MAJOR ${H5_SOVERS_INTERFACE}-${H5_SOVERS_RELEASE}) message (STATUS "SOVERSION: ${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") #----------------------------------------------------------------------------- @@ -216,16 +216,16 @@ set (HDF5_PACKAGE_BUGREPORT "help@hdfgroup.org") # Set Install folder value #----------------------------------------------------------------------------- if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - IF(CMAKE_HOST_UNIX) + if (CMAKE_HOST_UNIX) set (CMAKE_INSTALL_PREFIX "/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}" CACHE PATH "Install path prefix, prepended onto install directories." FORCE) - ELSE(CMAKE_HOST_UNIX) + else (CMAKE_HOST_UNIX) GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES) set (CMAKE_INSTALL_PREFIX "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}" CACHE PATH "Install path prefix, prepended onto install directories." FORCE) set (CMAKE_GENERIC_PROGRAM_FILES) - ENDIF(CMAKE_HOST_UNIX) + endif (CMAKE_HOST_UNIX) endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) #----------------------------------------------------------------------------- @@ -327,7 +327,7 @@ endif (HDF5_ENABLE_COVERAGE) #----------------------------------------------------------------------------- # option (HDF5_ENABLE_USING_DMALLOC "Indicate that dmalloc is used" OFF) # if (HDF5_ENABLE_USING_DMALLOC) -# FIND_PACKAGE (DMALLOC) +# find_package (DMALLOC) # set (H5_HAVE_DMALLOC DMALLOC_FOUND) # endif (HDF5_ENABLE_USING_DMALLOC) @@ -396,7 +396,7 @@ if (CMAKE_BUILD_TYPE MATCHES Debug) if (HDF5_ENABLE_INSTRUMENT) set (H5_HAVE_INSTRUMENTED_LIBRARY 1) endif (HDF5_ENABLE_INSTRUMENT) - MARK_AS_ADVANCED (HDF5_Enable_Instrument) + mark_as_advanced (HDF5_Enable_Instrument) #-- NMake Makefiles will overwhelm the console with warnings if -Wall is used. if (NOT WIN32) add_definitions (-Wall) @@ -754,7 +754,7 @@ endif (WIN32 AND NOT CYGWIN) #----------------------------------------------------------------------------- # Add the HDF5 Library Target to the build #----------------------------------------------------------------------------- -ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src) +add_subdirectory (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) @@ -774,28 +774,28 @@ if (BUILD_TESTING) CACHE INTEGER "Timeout in seconds for each test (default 1200=20minutes)" ) - ENABLE_TESTING () + enable_testing () include (CTest) if (NOT HDF5_EXTERNALLY_CONFIGURED) if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test") - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib) - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/test ${PROJECT_BINARY_DIR}/test) + add_subdirectory (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib) + add_subdirectory (${HDF5_SOURCE_DIR}/test ${PROJECT_BINARY_DIR}/test) endif (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test") if (EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform") - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/perform ${PROJECT_BINARY_DIR}/perform) - ENDIF(EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform") + add_subdirectory (${HDF5_SOURCE_DIR}/perform ${PROJECT_BINARY_DIR}/perform) + endif (EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform") if (H5_HAVE_PARALLEL) if (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar") - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/testpar ${PROJECT_BINARY_DIR}/testpar) + add_subdirectory (${HDF5_SOURCE_DIR}/testpar ${PROJECT_BINARY_DIR}/testpar) endif (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar") endif (H5_HAVE_PARALLEL) endif (NOT HDF5_EXTERNALLY_CONFIGURED) option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF) - MARK_AS_ADVANCED (HDF5_TEST_VFD) + mark_as_advanced (HDF5_TEST_VFD) if (HDF5_TEST_VFD) option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON) - MARK_AS_ADVANCED (HDF5_TEST_FHEAP_VFD) + mark_as_advanced (HDF5_TEST_FHEAP_VFD) endif (HDF5_TEST_VFD) include (${HDF5_SOURCE_DIR}/CTestConfig.cmake) @@ -829,11 +829,11 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for # # set (FCFLAGS "${Fortran_DEFINES}") - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran) + add_subdirectory (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran) if (HDF5_BUILD_HL_LIB) if (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran") #-- Build the High Level Fortran source codes - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/hl/fortran ${PROJECT_BINARY_DIR}/hl/fortran) + add_subdirectory (${HDF5_SOURCE_DIR}/hl/fortran ${PROJECT_BINARY_DIR}/hl/fortran) endif (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran") endif (HDF5_BUILD_HL_LIB) endif (HDF5_BUILD_FORTRAN) @@ -845,7 +845,7 @@ endif (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/ if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples") option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF) if (HDF5_BUILD_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/examples ${PROJECT_BINARY_DIR}/examples) + add_subdirectory (${HDF5_SOURCE_DIR}/examples ${PROJECT_BINARY_DIR}/examples) endif (HDF5_BUILD_EXAMPLES) endif (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples") @@ -862,7 +862,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") if (CMAKE_NO_STD_NAMESPACE) set (H5_NO_STD 1) endif (CMAKE_NO_STD_NAMESPACE) - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/c++ ${PROJECT_BINARY_DIR}/c++) + add_subdirectory (${HDF5_SOURCE_DIR}/c++ ${PROJECT_BINARY_DIR}/c++) endif (HDF5_BUILD_CPP_LIB) endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") @@ -872,7 +872,7 @@ endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++" if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") option (HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF) if (HDF5_BUILD_TOOLS) - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools) + add_subdirectory (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools) endif (HDF5_BUILD_TOOLS) endif (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") @@ -883,7 +883,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl") option (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF) if (HDF5_BUILD_HL_LIB) set (H5_INCLUDE_HL 1) - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl) + add_subdirectory (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl) endif (HDF5_BUILD_HL_LIB) endif (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl") diff --git a/MANIFEST b/MANIFEST index 8aeb2bb..773787b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1302,6 +1302,7 @@ # h5repack sources ./tools/h5repack/Makefile.am ./tools/h5repack/Makefile.in +./tools/h5repack/dynlib_rpk.c ./tools/h5repack/h5repack.sh.in ./tools/h5repack/h5repack_plugin.sh.in ./tools/h5repack/h5repack.c diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index 06d4609..89426c5 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_CPP) #----------------------------------------------------------------------------- @@ -36,18 +36,18 @@ if (H5_HAVE_PARALLEL) add_definitions ("-DMPICH_IGNORE_CXX_SEEK") endif (H5_HAVE_PARALLEL) -ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src) +add_subdirectory (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src) #----------------------------------------------------------------------------- # Build the CPP Examples #----------------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples) + add_subdirectory (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples) endif (HDF5_BUILD_EXAMPLES) #----------------------------------------------------------------------------- # Build the CPP unit tests #----------------------------------------------------------------------------- if (BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test) + add_subdirectory (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test) endif (BUILD_TESTING) diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index b6b1afa..e3e1077 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) # -------------------------------------------------------------------- # Notes: When creating examples they should be prefixed # with "cpp_ex_". This allows for easier filtering of the examples. diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 502a192..7054b04 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_CPP_SRC) #----------------------------------------------------------------------------- diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp index 8513372..ddc1d00 100644 --- a/c++/src/H5Exception.cpp +++ b/c++/src/H5Exception.cpp @@ -312,7 +312,7 @@ void Exception::printError( FILE* stream ) const ///\brief Noop destructor // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -Exception::~Exception() {} +Exception::~Exception() throw() {} //-------------------------------------------------------------------------- // Subclass: FileIException @@ -335,7 +335,7 @@ FileIException::FileIException(const H5std_string& func_name, const H5std_string // Function: FileIException destructor ///\brief Noop destructor. //-------------------------------------------------------------------------- -FileIException::~FileIException() {} +FileIException::~FileIException() throw() {} //-------------------------------------------------------------------------- // Subclass: GroupIException @@ -358,7 +358,7 @@ GroupIException::GroupIException(const H5std_string& func_name, const H5std_stri // Function: GroupIException destructor ///\brief Noop destructor. //-------------------------------------------------------------------------- -GroupIException::~GroupIException() {} +GroupIException::~GroupIException() throw() {} //-------------------------------------------------------------------------- // Subclass: DataSpaceIException @@ -381,7 +381,7 @@ DataSpaceIException::DataSpaceIException(const H5std_string& func_name, const H5 // Function: DataSpaceIException destructor ///\brief Noop destructor. //-------------------------------------------------------------------------- -DataSpaceIException::~DataSpaceIException() {} +DataSpaceIException::~DataSpaceIException() throw() {} //-------------------------------------------------------------------------- // Subclass: DataTypeIException @@ -404,7 +404,7 @@ DataTypeIException::DataTypeIException(const H5std_string& func_name, const H5st // Function: DataTypeIException destructor ///\brief Noop destructor. //-------------------------------------------------------------------------- -DataTypeIException::~DataTypeIException() {} +DataTypeIException::~DataTypeIException() throw() {} //-------------------------------------------------------------------------- // Subclass: PropListIException @@ -427,7 +427,7 @@ PropListIException::PropListIException(const H5std_string& func_name, const H5st // Function: PropListIException destructor ///\brief Noop destructor. //-------------------------------------------------------------------------- -PropListIException::~PropListIException() {} +PropListIException::~PropListIException() throw() {} //-------------------------------------------------------------------------- // Subclass: DataSetIException @@ -450,7 +450,7 @@ DataSetIException::DataSetIException(const H5std_string& func_name, const H5std_ // Function: DataSetIException destructor ///\brief Noop destructor. //-------------------------------------------------------------------------- -DataSetIException::~DataSetIException() {} +DataSetIException::~DataSetIException() throw() {} //-------------------------------------------------------------------------- // Subclass: AttributeIException @@ -473,7 +473,7 @@ AttributeIException::AttributeIException(const H5std_string& func_name, const H5 // Function: AttributeIException destructor ///\brief Noop destructor. //-------------------------------------------------------------------------- -AttributeIException::~AttributeIException() {} +AttributeIException::~AttributeIException() throw() {} //-------------------------------------------------------------------------- // Subclass: ReferenceException @@ -496,7 +496,7 @@ ReferenceException::ReferenceException(const H5std_string& func_name, const H5st // Function: ReferenceException destructor ///\brief Noop destructor. //-------------------------------------------------------------------------- -ReferenceException::~ReferenceException() {} +ReferenceException::~ReferenceException() throw() {} //-------------------------------------------------------------------------- // Subclass: LibraryIException @@ -519,7 +519,7 @@ LibraryIException::LibraryIException(const H5std_string& func_name, const H5std_ // Function: LibraryIException destructor ///\brief Noop destructor. //-------------------------------------------------------------------------- -LibraryIException::~LibraryIException() {} +LibraryIException::~LibraryIException() throw() {} //-------------------------------------------------------------------------- // Subclass: IdComponentException @@ -542,7 +542,7 @@ IdComponentException::IdComponentException(const H5std_string& func_name, const // Function: IdComponentException destructor ///\brief Noop destructor. //-------------------------------------------------------------------------- -IdComponentException::~IdComponentException() {} +IdComponentException::~IdComponentException() throw() {} #ifndef H5_NO_NAMESPACE } // end namespace #endif diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h index 30fe537..d747af3 100644 --- a/c++/src/H5Exception.h +++ b/c++/src/H5Exception.h @@ -81,7 +81,7 @@ class H5_DLLCPP Exception { Exception( const Exception& orig); // virtual Destructor - virtual ~Exception(); + virtual ~Exception() throw(); protected: // Default value for detail_message @@ -96,70 +96,70 @@ class H5_DLLCPP FileIException : public Exception { public: FileIException( const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); FileIException(); - virtual ~FileIException(); + virtual ~FileIException() throw(); }; class H5_DLLCPP GroupIException : public Exception { public: GroupIException( const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); GroupIException(); - virtual ~GroupIException(); + virtual ~GroupIException() throw(); }; class H5_DLLCPP DataSpaceIException : public Exception { public: DataSpaceIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); DataSpaceIException(); - virtual ~DataSpaceIException(); + virtual ~DataSpaceIException() throw(); }; class H5_DLLCPP DataTypeIException : public Exception { public: DataTypeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); DataTypeIException(); - virtual ~DataTypeIException(); + virtual ~DataTypeIException() throw(); }; class H5_DLLCPP PropListIException : public Exception { public: PropListIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); PropListIException(); - virtual ~PropListIException(); + virtual ~PropListIException() throw(); }; class H5_DLLCPP DataSetIException : public Exception { public: DataSetIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); DataSetIException(); - virtual ~DataSetIException(); + virtual ~DataSetIException() throw(); }; class H5_DLLCPP AttributeIException : public Exception { public: AttributeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); AttributeIException(); - virtual ~AttributeIException(); + virtual ~AttributeIException() throw(); }; class H5_DLLCPP ReferenceException : public Exception { public: ReferenceException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); ReferenceException(); - virtual ~ReferenceException(); + virtual ~ReferenceException() throw(); }; class H5_DLLCPP LibraryIException : public Exception { public: LibraryIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); LibraryIException(); - virtual ~LibraryIException(); + virtual ~LibraryIException() throw(); }; class H5_DLLCPP IdComponentException : public Exception { public: IdComponentException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); IdComponentException(); - virtual ~IdComponentException(); + virtual ~IdComponentException() throw(); }; #ifndef H5_NO_NAMESPACE diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index ec2a32f..9966163 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_CPP_TEST) # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp index cd85b6e..40e81cc 100644 --- a/c++/test/h5cpputil.cpp +++ b/c++/test/h5cpputil.cpp @@ -220,7 +220,7 @@ InvalidActionException::InvalidActionException(const H5std_string func_name, con //-------------------------------------------------------------------------- // Function: InvalidActionException destructor //-------------------------------------------------------------------------- -InvalidActionException::~InvalidActionException() {} +InvalidActionException::~InvalidActionException() throw() {} //-------------------------------------------------------------------------- // Function: TestFailedException default constructor @@ -242,5 +242,5 @@ TestFailedException::TestFailedException(const H5std_string func_name, const H5s //-------------------------------------------------------------------------- // Function: TestFailedException destructor //-------------------------------------------------------------------------- -TestFailedException::~TestFailedException() {} +TestFailedException::~TestFailedException() throw() {} diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h index e6aba79..b107045 100644 --- a/c++/test/h5cpputil.h +++ b/c++/test/h5cpputil.h @@ -49,14 +49,14 @@ class InvalidActionException : public Exception { public: InvalidActionException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG); InvalidActionException(); - virtual ~InvalidActionException(); + virtual ~InvalidActionException() throw(); }; class TestFailedException : public Exception { public: TestFailedException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG); TestFailedException(); - virtual ~TestFailedException(); + virtual ~TestFailedException() throw(); }; // Overloaded/Template functions to verify values and display proper info diff --git a/config/cmake/CheckTypeSize.cmake b/config/cmake/CheckTypeSize.cmake index 0fe2cbc..4af5741 100644 --- a/config/cmake/CheckTypeSize.cmake +++ b/config/cmake/CheckTypeSize.cmake @@ -34,12 +34,12 @@ MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE) ) if (HAVE_${VARIABLE}) message (STATUS "Check size of ${TYPE} - done") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n" ) else (HAVE_${VARIABLE}) message (STATUS "Check size of ${TYPE} - failed") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n\n" ) endif (HAVE_${VARIABLE}) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 93c6138..03a7975 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -289,7 +289,7 @@ MACRO (HDF5_FUNCTION_TEST OTHER_TEST) else (${OTHER_TEST}) message (STATUS "Performing Other Test ${OTHER_TEST} - Failed") set (H5_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Performing Other Test ${OTHER_TEST} failed with the following output:\n" "${OUTPUT}\n" ) @@ -467,14 +467,14 @@ if (NOT WINDOWS) else (TEST_LFS_WORKS_RUN MATCHES 0) set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_LFS_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n" ) endif (TEST_LFS_WORKS_RUN MATCHES 0) else (TEST_LFS_WORKS_COMPILE ) set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_LFS_WORKS Compile failed with the following output:\n ${OUTPUT}\n" ) endif (TEST_LFS_WORKS_COMPILE) @@ -757,7 +757,7 @@ MACRO (HDF5_CXX_FUNCTION_TEST OTHER_TEST) else ("${OTHER_TEST}" EQUAL 0) message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed") set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Performing CXX Test ${OTHER_TEST} failed with the following output:\n" "${OUTPUT}\n" ) @@ -802,14 +802,14 @@ if (NOT WINDOWS) else (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0) set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_DIRECT_VFD_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n" ) endif (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0) else (TEST_DIRECT_VFD_WORKS_COMPILE ) set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_DIRECT_VFD_WORKS Compile failed with the following output:\n ${OUTPUT}\n" ) endif (TEST_DIRECT_VFD_WORKS_COMPILE) @@ -870,7 +870,7 @@ if (WINDOWS) if ("${HAVE_IOEO_EXITCODE}" EQUAL 0) set (H5_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce") message (STATUS "Performing Test InitOnceExecuteOnce - Success") - FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n" "${OUTPUT}\n" "Return value: ${HAVE_IOEO}\n") @@ -882,7 +882,7 @@ if (WINDOWS) endif (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN") message (STATUS "Performing Test InitOnceExecuteOnce - Failed") - FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing InitOnceExecuteOnce Test failed with the following output:\n" "${OUTPUT}\n" "Return value: ${HAVE_IOEO_EXITCODE}\n") @@ -950,7 +950,7 @@ if (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown") message ("Width with ${HDF5_PRINTF_LL} failed with result: ${HDF5_PRINTF_LL_TEST_RUN}") endif (HDF5_PRINTF_LL_TEST_RUN MATCHES 0) else (HDF5_PRINTF_LL_TEST_COMPILE) - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test H5_PRINTF_LL_WIDTH for ${HDF5_PRINTF_LL} failed with the following output:\n ${OUTPUT}\n" ) endif (HDF5_PRINTF_LL_TEST_COMPILE) @@ -1000,14 +1000,14 @@ MACRO (H5ConversionTests TEST msg) else (${TEST}_RUN MATCHES 0) set (${TEST} "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n" ) endif (${TEST}_RUN MATCHES 0) else (${TEST}_COMPILE ) set (${TEST} "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n" ) endif (${TEST}_COMPILE) diff --git a/config/cmake/FindMPI.cmake b/config/cmake/FindMPI.cmake index b16c9c3..6d12276 100644 --- a/config/cmake/FindMPI.cmake +++ b/config/cmake/FindMPI.cmake @@ -86,7 +86,7 @@ include(GetPrerequisites) # # The compilers are detected in this order: # -# 1. Try to find the most generic availble MPI compiler, as this is usually set up by +# 1. Try to find the most generic available MPI compiler, as this is usually set up by # cluster admins. e.g., if plain old mpicc is available, we'll use it and assume it's # the right compiler. # @@ -354,6 +354,20 @@ function (interrogate_mpi_compiler lang try_libs) # Extract the set of libraries to link against from the link command # line string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}") + # add the compiler implicit directories because some compilers + # such as the intel compiler have libraries that show up + # in the showme list that can only be found in the implicit + # link directories of the compiler. Do this for C++ and C + # compilers if the implicit link directories are defined. + if (DEFINED CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES) + set(MPI_LINK_PATH + "${MPI_LINK_PATH};${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}") + endif () + + if (DEFINED CMAKE_C_IMPLICIT_LINK_DIRECTORIES) + set(MPI_LINK_PATH + "${MPI_LINK_PATH};${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") + endif () # Determine full path names for all of the libraries that one needs # to link against in an MPI program @@ -573,6 +587,11 @@ foreach (lang C CXX Fortran) try_regular_compiler(${lang} regular_compiler_worked) endif() + set(MPI_${lang}_FIND_QUIETLY ${MPI_FIND_QUIETLY}) + set(MPI_${lang}_FIND_REQUIRED ${MPI_FIND_REQUIRED}) + set(MPI_${lang}_FIND_VERSION ${MPI_FIND_VERSION}) + set(MPI_${lang}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT}) + if (regular_compiler_worked) find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_COMPILER) else() diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 69ff5b3..e65ea21 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -15,11 +15,11 @@ FortranCInterface_HEADER ( SYMBOLS mysub mymod:my_sub ) -FILE (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL\\(.*,.*\\) +(.*)") +file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL\\(.*,.*\\) +(.*)") string (REGEX MATCH "H5_FC_GLOBAL\\(.*,.*\\) +(.*)" RESULT ${CONTENTS}) set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) ${CMAKE_MATCH_1}") -FILE (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)") +file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)") string (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS}) set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}") @@ -36,7 +36,7 @@ MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) else (CMAKE_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) endif (CMAKE_REQUIRED_LIBRARIES) - FILE (WRITE + file (WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f "${CODE}" ) @@ -54,14 +54,14 @@ MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) if (${VARIABLE}) set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") message (STATUS "Testing Fortran ${FUNCTION} - OK") - FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" "${OUTPUT}\n\n" ) else (${VARIABLE}) message (STATUS "Testing Fortran ${FUNCTION} - Fail") set (${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}") - FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" "${OUTPUT}\n\n") endif (${VARIABLE}) diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake index 7670ad5..579d855 100644 --- a/config/cmake/grepTest.cmake +++ b/config/cmake/grepTest.cmake @@ -41,7 +41,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}") message (STATUS "COMMAND Error: ${TEST_ERROR}") # now grep the output with the reference -FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) +file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) # TEST_REFERENCE should always be matched STRING(REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) diff --git a/config/cmake/prunTest.cmake b/config/cmake/prunTest.cmake index 9cf0c55..3d5ec31 100644 --- a/config/cmake/prunTest.cmake +++ b/config/cmake/prunTest.cmake @@ -46,34 +46,34 @@ EXECUTE_PROCESS ( message (STATUS "COMMAND Result: ${TEST_RESULT}") -FILE (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) -FILE (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") +file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) +file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") if (ERROR_APPEND) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (ERROR_APPEND) if (TEST_APPEND) - FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n") endif (TEST_APPEND) message (STATUS "COMMAND Error: ${TEST_ERROR}") if (TEST_MASK) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage:
\n" TEST_STREAM "${TEST_STREAM}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK) if (TEST_MASK_MOD) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_MOD) if (TEST_MASK_ERROR) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") @@ -81,26 +81,26 @@ if (TEST_MASK_ERROR) STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_ERROR) if (TEST_FILTER) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_FILTER) #if (TEST_REF_FILTER) # message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}") -# FILE (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM) +# file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM) # STRING(REGEX REPLACE "${TEST_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") -# FILE (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") +# file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") #endif (TEST_REF_FILTER) if (NOT TEST_SKIP_COMPARE) if (WIN32 AND NOT MINGW) - FILE (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM) - FILE (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") + file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM) + file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") endif (WIN32 AND NOT MINGW) # now compare the output with the reference @@ -110,9 +110,9 @@ if (NOT TEST_SKIP_COMPARE) ) if (NOT ${TEST_RESULT} STREQUAL 0) set (TEST_RESULT 0) - FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) LIST (LENGTH test_act len_act) - FILE (STRINGS ${TEST_FOLDER}/P_${TEST_REFERENCE} test_ref) + file (STRINGS ${TEST_FOLDER}/P_${TEST_REFERENCE} test_ref) LIST (LENGTH test_ref len_ref) if (NOT ${len_act} STREQUAL "0") MATH (EXPR _FP_LEN "${len_ref} - 1") diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake index 9a891e6..879426c 100644 --- a/config/cmake/runTest.cmake +++ b/config/cmake/runTest.cmake @@ -49,12 +49,12 @@ EXECUTE_PROCESS ( message (STATUS "COMMAND Result: ${TEST_RESULT}") if (ERROR_APPEND) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (ERROR_APPEND) if (TEST_APPEND) - FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") endif (TEST_APPEND) # if the return value is !=${TEST_EXPECT} bail out @@ -65,22 +65,22 @@ endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) message (STATUS "COMMAND Error: ${TEST_ERROR}") if (TEST_MASK) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage:
\n" TEST_STREAM "${TEST_STREAM}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK) if (TEST_MASK_MOD) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_MOD) if (TEST_MASK_ERROR) if (NOT TEST_ERRREF) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) else (NOT TEST_ERRREF) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) endif (NOT TEST_ERRREF) STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") @@ -90,22 +90,22 @@ if (TEST_MASK_ERROR) STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") if (NOT TEST_ERRREF) - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") else (NOT TEST_ERRREF) - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") endif (NOT TEST_ERRREF) endif (TEST_MASK_ERROR) if (TEST_FILTER) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_FILTER) if (NOT TEST_SKIP_COMPARE) if (WIN32 AND NOT MINGW) - FILE (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) - FILE (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") + file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) + file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") endif (WIN32 AND NOT MINGW) # now compare the output with the reference @@ -115,9 +115,9 @@ if (NOT TEST_SKIP_COMPARE) ) if (NOT ${TEST_RESULT} STREQUAL 0) set (TEST_RESULT 0) - FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) LIST (LENGTH test_act len_act) - FILE (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref) + file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref) LIST (LENGTH test_ref len_ref) if (NOT ${len_act} STREQUAL "0") MATH (EXPR _FP_LEN "${len_ref} - 1") @@ -146,8 +146,8 @@ if (NOT TEST_SKIP_COMPARE) if (TEST_ERRREF) if (WIN32 AND NOT MINGW) - FILE (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) - FILE (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}") + file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) + file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}") endif (WIN32 AND NOT MINGW) # now compare the error output with the error reference @@ -157,9 +157,9 @@ if (NOT TEST_SKIP_COMPARE) ) if (NOT ${TEST_RESULT} STREQUAL 0) set (TEST_RESULT 0) - FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act) + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act) LIST (LENGTH test_act len_act) - FILE (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref) + file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref) LIST (LENGTH test_ref len_ref) MATH (EXPR _FP_LEN "${len_ref} - 1") if (NOT ${len_act} STREQUAL "0") diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake index 2b6b934..2e0740b 100644 --- a/config/cmake/userblockTest.cmake +++ b/config/cmake/userblockTest.cmake @@ -35,7 +35,7 @@ set (TEST_STRING_SIZE 0) if (TEST_CHECKUB STREQUAL "YES") # find the length of the user block to check #s1=`cat $ufile | wc -c | sed -e 's/ //g'` - FILE (STRINGS ${TEST_FOLDER}/${TEST_UFILE} TEST_U_STRING) + file (STRINGS ${TEST_FOLDER}/${TEST_UFILE} TEST_U_STRING) string (LENGTH ${TEST_U_STRING} TEST_U_STRING_LEN) # Get the size of the original user block, if any. @@ -54,7 +54,7 @@ if (TEST_CHECKUB STREQUAL "YES") if (NOT ${TEST_RESULT} STREQUAL "0") message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} ${TEST_OFILE} is: ${TEST_ERROR}") endif (NOT ${TEST_RESULT} STREQUAL "0") - FILE (READ ${TEST_HFILE}.len.txt TEST_O_STRING_LEN) + file (READ ${TEST_HFILE}.len.txt TEST_O_STRING_LEN) endif (TEST_OFILE) MATH( EXPR TEST_STRING_SIZE "${TEST_U_STRING_LEN} + ${TEST_O_STRING_LEN}" ) @@ -71,11 +71,11 @@ if (TEST_CHECKUB STREQUAL "YES") OUTPUT_STRIP_TRAILING_WHITESPACE ) #cat $ufile >> $cmpfile - FILE (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME) - FILE (APPEND ${TEST_HFILE}-ub.cmp "${TEST_STREAM}") + file (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME) + file (APPEND ${TEST_HFILE}-ub.cmp "${TEST_STREAM}") else (NOT TEST_O_STRING_LEN STREQUAL "0") - FILE (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME) - FILE (WRITE ${TEST_HFILE}-ub.cmp ${TEST_STREAM}) + file (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME) + file (WRITE ${TEST_HFILE}-ub.cmp ${TEST_STREAM}) endif (NOT TEST_O_STRING_LEN STREQUAL "0") #$JAM_BIN/getub -c $size $hfile > $tfile diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake index f12dee7..d3cb87e 100644 --- a/config/cmake/vfdTest.cmake +++ b/config/cmake/vfdTest.cmake @@ -36,8 +36,8 @@ EXECUTE_PROCESS ( message (STATUS "COMMAND Result: ${TEST_RESULT}") if (ERROR_APPEND) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM) - FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}") + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM) + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}") endif (ERROR_APPEND) # if the return value is !=${TEST_EXPECT} bail out diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 088a238..fe8216d 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_EXAMPLES) #----------------------------------------------------------------------------- diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake index 9f51d74..5a756c8 100644 --- a/examples/CMakeTests.cmake +++ b/examples/CMakeTests.cmake @@ -4,7 +4,7 @@ ### T E S T I N G ### ############################################################################## ############################################################################## - FILE (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w) + file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w) # Remove any output file left over from previous test run add_test ( @@ -56,10 +56,11 @@ set (last_test "EXAMPLES-${example}") endforeach (example ${examples}) - if (H5_HAVE_PARALLEL) +### Windows pops up a modal permission dialog on this test + if (H5_HAVE_PARALLEL AND NOT WIN32) add_test (NAME EXAMPLES-ph5example COMMAND $) if (NOT "${last_test}" STREQUAL "") set_tests_properties (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") set (last_test "EXAMPLES-ph5example") - endif (H5_HAVE_PARALLEL) + endif (H5_HAVE_PARALLEL AND NOT WIN32) diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index c13f3c6..4d8c9dd 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_F90 C CXX Fortran) if (H5_HAVE_PARALLEL) @@ -8,21 +8,21 @@ endif (H5_HAVE_PARALLEL) #----------------------------------------------------------------------------- # Traverse source subdirectory #----------------------------------------------------------------------------- -ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src) +add_subdirectory (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src) #----------------------------------------------------------------------------- # Build the Fortran Examples #----------------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/examples ${HDF5_F90_BINARY_DIR}/examples) + add_subdirectory (${HDF5_F90_SOURCE_DIR}/examples ${HDF5_F90_BINARY_DIR}/examples) endif (HDF5_BUILD_EXAMPLES) #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- if (BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/test ${HDF5_F90_BINARY_DIR}/test) + add_subdirectory (${HDF5_F90_SOURCE_DIR}/test ${HDF5_F90_BINARY_DIR}/test) if (MPI_Fortran_FOUND) - ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/testpar ${HDF5_F90_BINARY_DIR}/testpar) + add_subdirectory (${HDF5_F90_SOURCE_DIR}/testpar ${HDF5_F90_BINARY_DIR}/testpar) endif (MPI_Fortran_FOUND) endif (BUILD_TESTING) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 80318a4..6f11895 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_F90_EXAMPLES C CXX Fortran) # -------------------------------------------------------------------- # Notes: When creating examples they should be prefixed diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 90f5aae..60057a3 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 4c85df2..dcfcfc4 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -330,9 +330,10 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes, * PURPOSE * Initialize Fortran flags * INPUTS - * h5d_flags - H5D inteface flags - * h5e_flags - H5E inteface flags - * h5e_hid_flags - H5E inteface flags of type hid_t + * h5d_flags - H5D interface flags + * h5d_size_flags - H5D interface flags of type size_t + * h5e_flags - H5E interface flags + * h5e_hid_flags - H5E interface flags of type hid_t * h5f_flags - H5F interface flags * h5fd_flags - H5FD interface flags * h5fd_hid_flags - H5FD interface flags of type hid_t @@ -360,12 +361,15 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes, * Added Generic flags introduced in version 1.8 * MSB, January, 2008 * Added types in lines h5*_flags = ( )variable to match input - * Added E flags. + * Added E flags * MSB, July 9, 2009 + * Added type h5d_flags of type size_t + * MSB, Feb. 28, 2014 * SOURCE */ int_f -nh5init_flags_c( int_f *h5d_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, +nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, + int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags, @@ -376,6 +380,9 @@ nh5init_flags_c( int_f *h5d_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int /* * H5D flags */ + h5d_size_flags[0] = (size_t_f)H5D_CHUNK_CACHE_NSLOTS_DEFAULT; + h5d_size_flags[1] = (size_t_f)H5D_CHUNK_CACHE_NBYTES_DEFAULT; + h5d_flags[0] = (int_f)H5D_COMPACT; h5d_flags[1] = (int_f)H5D_CONTIGUOUS; h5d_flags[2] = (int_f)H5D_CHUNKED; @@ -395,18 +402,18 @@ nh5init_flags_c( int_f *h5d_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int h5d_flags[16] = (int_f)H5D_FILL_VALUE_UNDEFINED; h5d_flags[17] = (int_f)H5D_FILL_VALUE_DEFAULT; h5d_flags[18] = (int_f)H5D_FILL_VALUE_USER_DEFINED; - h5d_flags[19] = (int_f)H5D_CHUNK_CACHE_NSLOTS_DEFAULT; - h5d_flags[20] = (int_f)H5D_CHUNK_CACHE_NBYTES_DEFAULT; - h5d_flags[21] = (int_f)H5D_CHUNK_CACHE_W0_DEFAULT; - h5d_flags[22] = (int_f)H5D_MPIO_NO_COLLECTIVE; - h5d_flags[23] = (int_f)H5D_MPIO_CHUNK_INDEPENDENT; - h5d_flags[24] = (int_f)H5D_MPIO_CHUNK_COLLECTIVE; - h5d_flags[25] = (int_f)H5D_MPIO_CHUNK_MIXED; - h5d_flags[26] = (int_f)H5D_MPIO_CONTIGUOUS_COLLECTIVE; + h5d_flags[19] = (int_f)H5D_CHUNK_CACHE_W0_DEFAULT; + h5d_flags[20] = (int_f)H5D_MPIO_NO_COLLECTIVE; + h5d_flags[21] = (int_f)H5D_MPIO_CHUNK_INDEPENDENT; + h5d_flags[22] = (int_f)H5D_MPIO_CHUNK_COLLECTIVE; + h5d_flags[23] = (int_f)H5D_MPIO_CHUNK_MIXED; + h5d_flags[24] = (int_f)H5D_MPIO_CONTIGUOUS_COLLECTIVE; + /* * H5E flags */ h5e_hid_flags[0] = (hid_t_f)H5E_DEFAULT; + h5e_flags[0] = (int_f)H5E_MAJOR; h5e_flags[1] = (int_f)H5E_MINOR; h5e_flags[2] = (int_f)H5E_WALK_UPWARD; diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90 index f9c20ac..49e64a3 100644 --- a/fortran/src/H5_ff.f90 +++ b/fortran/src/H5_ff.f90 @@ -87,6 +87,7 @@ CONTAINS END INTERFACE INTERFACE INTEGER FUNCTION h5init_flags_c(i_H5D_flags, & + i_H5D_size_flags,& i_H5E_flags, & i_H5E_hid_flags, & i_H5F_flags, & @@ -106,6 +107,7 @@ CONTAINS i_H5generic_flags) USE H5GLOBAL INTEGER i_H5D_flags(H5D_FLAGS_LEN) + INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN) INTEGER i_H5E_flags(H5E_FLAGS_LEN) INTEGER(HID_T) i_H5E_hid_flags(H5E_HID_FLAGS_LEN) INTEGER i_H5F_flags(H5F_FLAGS_LEN) @@ -139,6 +141,7 @@ CONTAINS END INTERFACE error_1 = h5init_types_c(predef_types, floating_types, integer_types) error_2 = h5init_flags_c(H5D_flags, & + H5D_size_flags, & H5E_flags, & H5E_hid_flags, & H5F_flags, & diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 index a6168d52..f2bb3de 100644 --- a/fortran/src/H5f90global.f90 +++ b/fortran/src/H5f90global.f90 @@ -76,7 +76,7 @@ MODULE H5GLOBAL ! integer data types are added INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 27 - INTEGER(HID_T) H5T_NATIVE_INTEGER_1, & + INTEGER(HID_T) :: H5T_NATIVE_INTEGER_1, & H5T_NATIVE_INTEGER_2, & H5T_NATIVE_INTEGER_4, & H5T_NATIVE_INTEGER_8, & @@ -111,7 +111,7 @@ MODULE H5GLOBAL ! continuation lines to 39; the F03/F08 standard limits the number ! to 255 lines. - INTEGER(HID_T) H5T_STD_U32LE, & + INTEGER(HID_T) :: H5T_STD_U32LE, & H5T_STD_U64BE, & H5T_STD_U64LE, & H5T_STRING, & @@ -235,7 +235,7 @@ MODULE H5GLOBAL ! H5F flags declaration ! INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 - INTEGER H5F_flags(H5F_FLAGS_LEN) + INTEGER :: H5F_flags(H5F_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5F_FLAGS/ !DEC$endif @@ -284,7 +284,7 @@ MODULE H5GLOBAL ! H5generic flags declaration ! INTEGER, PARAMETER :: H5generic_FLAGS_LEN = 9 - INTEGER H5generic_flags(H5generic_FLAGS_LEN) + INTEGER :: H5generic_flags(H5generic_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5generic_FLAGS/ !DEC$endif @@ -315,7 +315,7 @@ MODULE H5GLOBAL ! H5G flags declaration ! INTEGER, PARAMETER :: H5G_FLAGS_LEN = 12 - INTEGER H5G_flags(H5G_FLAGS_LEN) + INTEGER :: H5G_flags(H5G_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5G_FLAGS/ !DEC$endif @@ -354,8 +354,10 @@ MODULE H5GLOBAL ! H5D flags declaration ! - INTEGER, PARAMETER :: H5D_FLAGS_LEN = 27 - INTEGER H5D_flags(H5D_FLAGS_LEN) + INTEGER, PARAMETER :: H5D_FLAGS_LEN = 25 + INTEGER :: H5D_flags(H5D_FLAGS_LEN) + INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2 + INTEGER(SIZE_T) :: H5D_size_flags(H5D_SIZE_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5D_FLAGS/ !DEC$endif @@ -390,8 +392,8 @@ MODULE H5GLOBAL ! shortened "_CONTIGUOUS" to "_CONTIG" to satisfy the limit of 31 ! characters for variable names in Fortran. - INTEGER :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F - INTEGER :: H5D_CHUNK_CACHE_NBYTES_DFLT_F + INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F + INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NBYTES_DFLT_F INTEGER :: H5D_CHUNK_CACHE_W0_DFLT_F INTEGER :: H5D_MPIO_NO_COLLECTIVE_F INTEGER :: H5D_MPIO_CHUNK_INDEPENDENT_F @@ -423,22 +425,23 @@ MODULE H5GLOBAL EQUIVALENCE(H5D_flags(18), H5D_FILL_VALUE_DEFAULT_F) EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F) - EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_NSLOTS_DFLT_F) - EQUIVALENCE(H5D_flags(21), H5D_CHUNK_CACHE_NBYTES_DFLT_F) - EQUIVALENCE(H5D_flags(22), H5D_CHUNK_CACHE_W0_DFLT_F) - EQUIVALENCE(H5D_flags(23), H5D_MPIO_NO_COLLECTIVE_F) - EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_INDEPENDENT_F) - EQUIVALENCE(H5D_flags(25), H5D_MPIO_CHUNK_COLLECTIVE_F) - EQUIVALENCE(H5D_flags(26), H5D_MPIO_CHUNK_MIXED_F) - EQUIVALENCE(H5D_flags(27), H5D_MPIO_CONTIG_COLLECTIVE_F) + EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_W0_DFLT_F) + EQUIVALENCE(H5D_flags(21), H5D_MPIO_NO_COLLECTIVE_F) + EQUIVALENCE(H5D_flags(22), H5D_MPIO_CHUNK_INDEPENDENT_F) + EQUIVALENCE(H5D_flags(23), H5D_MPIO_CHUNK_COLLECTIVE_F) + EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_MIXED_F) + EQUIVALENCE(H5D_flags(25), H5D_MPIO_CONTIG_COLLECTIVE_F) + + EQUIVALENCE(H5D_size_flags(1), H5D_CHUNK_CACHE_NSLOTS_DFLT_F) + EQUIVALENCE(H5D_size_flags(2), H5D_CHUNK_CACHE_NBYTES_DFLT_F) ! ! H5E flags declaration ! INTEGER, PARAMETER :: H5E_FLAGS_LEN = 4 - INTEGER H5E_flags(H5E_FLAGS_LEN) + INTEGER :: H5E_flags(H5E_FLAGS_LEN) INTEGER, PARAMETER :: H5E_HID_FLAGS_LEN = 1 - INTEGER(HID_T) H5E_hid_flags(H5E_HID_FLAGS_LEN) + INTEGER(HID_T) :: H5E_hid_flags(H5E_HID_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5E_FLAGS/ !DEC$ATTRIBUTES DLLEXPORT :: /H5E_HID_FLAGS/ @@ -462,7 +465,7 @@ MODULE H5GLOBAL ! H5FD flags declaration ! INTEGER, PARAMETER :: H5FD_FLAGS_LEN = 11 - INTEGER H5FD_flags(H5FD_FLAGS_LEN) + INTEGER :: H5FD_flags(H5FD_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_FLAGS/ !DEC$endif @@ -495,7 +498,7 @@ MODULE H5GLOBAL ! H5FD file drivers flags declaration ! INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7 - INTEGER(HID_T) H5FD_hid_flags(H5FD_HID_FLAGS_LEN) + INTEGER(HID_T) :: H5FD_hid_flags(H5FD_HID_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/ !DEC$endif @@ -521,7 +524,7 @@ MODULE H5GLOBAL ! H5I flags declaration ! INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7 - INTEGER H5I_flags(H5I_FLAGS_LEN) + INTEGER :: H5I_flags(H5I_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5I_FLAGS/ !DEC$endif @@ -671,10 +674,10 @@ MODULE H5GLOBAL EQUIVALENCE(H5P_flags(18), H5P_LINK_ACCESS_F) ! - ! H5P intgere flags declaration + ! H5P integers flags declaration ! INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2 - INTEGER H5P_flags_int(H5P_FLAGS_INT_LEN) + INTEGER :: H5P_flags_int(H5P_FLAGS_INT_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS_INT/ !DEC$endif @@ -687,7 +690,7 @@ MODULE H5GLOBAL ! H5R flags declaration ! INTEGER, PARAMETER :: H5R_FLAGS_LEN = 2 - INTEGER H5R_flags(H5R_FLAGS_LEN) + INTEGER :: H5R_flags(H5R_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5R_FLAGS/ !DEC$endif @@ -703,7 +706,7 @@ MODULE H5GLOBAL ! H5S flags declaration ! INTEGER, PARAMETER :: H5S_FLAGS_LEN = 19 - INTEGER H5S_flags(H5S_FLAGS_LEN) + INTEGER :: H5S_flags(H5S_FLAGS_LEN) INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1 INTEGER(HSIZE_T) H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) @@ -766,7 +769,7 @@ MODULE H5GLOBAL ! H5T flags declaration ! INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35 - INTEGER H5T_flags(H5T_FLAGS_LEN) + INTEGER :: H5T_flags(H5T_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5T_FLAGS/ !DEC$endif @@ -847,7 +850,7 @@ MODULE H5GLOBAL ! H5Z flags declaration ! INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 20 - INTEGER H5Z_flags(H5Z_FLAGS_LEN) + INTEGER :: H5Z_flags(H5Z_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5Z_FLAGS/ !DEC$endif diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 4b02b6c..2c5e9a1 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -1260,9 +1260,9 @@ H5_FCDLL int_f nprocess_buffer(hid_t_f *estack_id,void **buffer); H5_FCDLL int_f nh5open_c(void); H5_FCDLL int_f nh5close_c(void); -H5_FCDLL int_f nh5init_types_c(hid_t_f *types, hid_t_f * floatingtypes, hid_t_f * integertypes); -H5_FCDLL int_f nh5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f * floatingtypes, int_f * floatinglen, hid_t_f * integertypes, int_f * integerlen); -H5_FCDLL int_f nh5init_flags_c(int_f *h5d_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, +H5_FCDLL int_f nh5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes); +H5_FCDLL int_f nh5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen); +H5_FCDLL int_f nh5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags, diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 4b8a8e9..ff88919 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 54da542..3361220 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index c6c0f82..22c0770 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL C CXX) #----------------------------------------------------------------------------- @@ -20,25 +20,25 @@ endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES (${HDF5_HL_SOURCE_DIR}/src ) -ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/src ${HDF5_HL_BINARY_DIR}/src) +add_subdirectory (${HDF5_HL_SOURCE_DIR}/src ${HDF5_HL_BINARY_DIR}/src) #-- Build the High level Tools if (HDF5_BUILD_TOOLS) - ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/tools ${HDF5_HL_BINARY_DIR}/tools) + add_subdirectory (${HDF5_HL_SOURCE_DIR}/tools ${HDF5_HL_BINARY_DIR}/tools) endif (HDF5_BUILD_TOOLS) #-- Add High Level Examples if (HDF5_BUILD_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/examples ${HDF5_HL_BINARY_DIR}/examples) + add_subdirectory (${HDF5_HL_SOURCE_DIR}/examples ${HDF5_HL_BINARY_DIR}/examples) endif (HDF5_BUILD_EXAMPLES) #-- Build the Unit testing if requested if (NOT HDF5_EXTERNALLY_CONFIGURED) if (BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/test ${HDF5_HL_BINARY_DIR}/test) + add_subdirectory (${HDF5_HL_SOURCE_DIR}/test ${HDF5_HL_BINARY_DIR}/test) endif (BUILD_TESTING) endif (NOT HDF5_EXTERNALLY_CONFIGURED) if (HDF5_BUILD_CPP_LIB) - ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/c++ ${HDF5_HL_BINARY_DIR}/c++) + add_subdirectory (${HDF5_HL_SOURCE_DIR}/c++ ${HDF5_HL_BINARY_DIR}/c++) endif (HDF5_BUILD_CPP_LIB) diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt index d641eae..9f0aa7e 100644 --- a/hl/c++/CMakeLists.txt +++ b/hl/c++/CMakeLists.txt @@ -1,16 +1,16 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL_CPP) #----------------------------------------------------------------------------- # Main HL lib is in /src #----------------------------------------------------------------------------- -ADD_SUBDIRECTORY (${HDF5_HL_CPP_SOURCE_DIR}/src ${HDF5_HL_CPP_BINARY_DIR}/src) +add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/src ${HDF5_HL_CPP_BINARY_DIR}/src) # -------------------------------------------------------------------- # Add in the examples for the Packet Table codes # -------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_HL_CPP_SOURCE_DIR}/examples ${HDF5_HL_CPP_BINARY_DIR}/examples) + add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/examples ${HDF5_HL_CPP_BINARY_DIR}/examples) endif (HDF5_BUILD_EXAMPLES) # -------------------------------------------------------------------- @@ -18,5 +18,5 @@ endif (HDF5_BUILD_EXAMPLES) # -------------------------------------------------------------------- if (BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_HL_CPP_SOURCE_DIR}/test ${HDF5_HL_CPP_BINARY_DIR}/test) + add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/test ${HDF5_HL_CPP_BINARY_DIR}/test) endif (BUILD_TESTING) diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index ca086db..8f9b43f 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL_CPP_EXAMPLES) #----------------------------------------------------------------------------- diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 9f8d3f8..39c6737 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL_CPP_SRC) #----------------------------------------------------------------------------- diff --git a/hl/c++/src/Makefile.am b/hl/c++/src/Makefile.am index 7961747..03289c0 100644 --- a/hl/c++/src/Makefile.am +++ b/hl/c++/src/Makefile.am @@ -22,7 +22,7 @@ include $(top_srcdir)/config/commence.am include $(top_srcdir)/config/lt_vers.am # Include src directory -INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src +AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src # This is our main target lib_LTLIBRARIES=libhdf5_hl_cpp.la diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 235cb81..c13f26a 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -187,7 +187,10 @@ AMTAR = @AMTAR@ # instead of CFLAGS, as CFLAGS is reserved solely for the user to define. # This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ -AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ + +# Include src directory +AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \ + -I$(top_srcdir)/hl/src AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ @@ -463,9 +466,6 @@ LT_VERS_INTERFACE = 6 LT_VERS_REVISION = 165 LT_VERS_AGE = 0 -# Include src directory -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src - # This is our main target lib_LTLIBRARIES = libhdf5_hl_cpp.la diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt index 82a4df0..4a7523c 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL_CPP_TEST) #----------------------------------------------------------------------------- diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt index 2d621ca..7847dbe 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL_EXAMPLES ) #----------------------------------------------------------------------------- diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt index f0ff22d..c26d94c 100644 --- a/hl/fortran/CMakeLists.txt +++ b/hl/fortran/CMakeLists.txt @@ -1,21 +1,21 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL_F90 C CXX Fortran) #----------------------------------------------------------------------------- # List Source files #----------------------------------------------------------------------------- -ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/src ${HDF5_HL_F90_BINARY_DIR}/src) +add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/src ${HDF5_HL_F90_BINARY_DIR}/src) #----------------------------------------------------------------------------- # Build the HL Fortran Examples #----------------------------------------------------------------------------- if (HDF5_BUILD_FORTRAN_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/examples ${HDF5_HL_F90_BINARY_DIR}/examples) + add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/examples ${HDF5_HL_F90_BINARY_DIR}/examples) endif (HDF5_BUILD_FORTRAN_EXAMPLES) #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- if (BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/test ${HDF5_HL_F90_BINARY_DIR}/test) + add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/test ${HDF5_HL_F90_BINARY_DIR}/test) endif (BUILD_TESTING) diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index 189c9cc..12467b8 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 9efcbc8..f0b5d3d 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT(HDF5_HL_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- @@ -96,9 +96,10 @@ endif (WIN32 AND NOT CYGWIN) # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - - INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries) - #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries) + if (BUILD_SHARED_LIBS) + INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries) + #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries) + endif (BUILD_SHARED_LIBS) install ( TARGETS diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index 23c199c..120d6a5 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 7a4e411..e3a72e4 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL_SRC) #----------------------------------------------------------------------------- @@ -59,8 +59,9 @@ install ( # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - - INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hllibraries) + if (BUILD_SHARED_LIBS) + INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hllibraries) + endif (BUILD_SHARED_LIBS) install ( TARGETS diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 32b049a..545210b 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL_TEST) # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed diff --git a/hl/test/test_image.c b/hl/test/test_image.c index 38f1830..36dc734 100644 --- a/hl/test/test_image.c +++ b/hl/test/test_image.c @@ -13,8 +13,10 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#include #include #include + #include "h5hltest.h" #include "H5srcdir.h" #include "H5LTpublic.h" @@ -622,10 +624,12 @@ static int test_generate(void) if(n_elements > INT_MAX / (int)sizeof(float)) goto out; - data = (float *)HDmalloc((size_t)n_elements * sizeof( float )); - HDassert(data); - image_data = (unsigned char *)HDmalloc((size_t)n_elements * sizeof( unsigned char )); - HDassert(image_data); + data = (float *)HDmalloc((size_t)n_elements * sizeof(float)); + if(NULL == data) + goto out; + image_data = (unsigned char *)HDmalloc((size_t)n_elements * sizeof(unsigned char)); + if(NULL == image_data) + goto out; for ( i = 0; i < n_elements; i++ ) { @@ -794,9 +798,6 @@ static int read_data( const char* fname, /*IN*/ fscanf(f, "%s", str); fscanf(f, "%d", &w); - *width = (hsize_t)w; - *height = (hsize_t)h; - /* Check product for overflow */ if(w < 1 || h < 1 || color_planes < 1) goto out; @@ -813,13 +814,16 @@ static int read_data( const char* fname, /*IN*/ goto out; /* Release the buffer, if it was previously allocated */ - if(image_data) { + if(image_data) HDfree(image_data); - image_data = NULL; - } /* end if */ /* Allocate the image data buffer */ image_data = (unsigned char *)HDmalloc((size_t)n_elements * sizeof(unsigned char)); + if(NULL == image_data) + goto out; + + *width = (hsize_t)w; + *height = (hsize_t)h; /* Read data elements */ for(i = 0; i < n_elements; i++) { diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index a3db367..a41aecc 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_HL_TOOLS) #----------------------------------------------------------------------------- diff --git a/hl/tools/CMakeTests.cmake b/hl/tools/CMakeTests.cmake index 7c5bd77..a340c2d 100644 --- a/hl/tools/CMakeTests.cmake +++ b/hl/tools/CMakeTests.cmake @@ -6,7 +6,7 @@ ############################################################################## # Make testfiles dir under build dir -FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") +file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") # # copy test files from source to build dir diff --git a/hl/tools/gif2h5/decompress.c b/hl/tools/gif2h5/decompress.c index 2e44f1c..d4e4cdc 100644 --- a/hl/tools/gif2h5/decompress.c +++ b/hl/tools/gif2h5/decompress.c @@ -17,12 +17,6 @@ #include "gif.h" -#define NEXTBYTE (*ptr++) - -#define IMAGESEP 0x2c -#define INTERLACEMASK 0x40 -#define COLORMAPMASK 0x80 - WORD iWIDE, iHIGH, eWIDE, eHIGH, expand, numcols, strip, nostrip; unsigned long cols[256]; char *cmd; diff --git a/hl/tools/gif2h5/gif2mem.c b/hl/tools/gif2h5/gif2mem.c index 7995bb4..ac4b0ec 100644 --- a/hl/tools/gif2h5/gif2mem.c +++ b/hl/tools/gif2h5/gif2mem.c @@ -37,8 +37,6 @@ #include "gif.h" -#define GIF2VERSION "1.00" - GIFTOMEM Gif2Mem(BYTE *MemGif) { diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c index 1771d06..d828226 100644 --- a/hl/tools/gif2h5/hdfgifwr.c +++ b/hl/tools/gif2h5/hdfgifwr.c @@ -56,31 +56,6 @@ typedef BYTE byte; typedef long int count_int; -/* indicies into conv24MB */ -#define CONV24_8BIT 0 -#define CONV24_24BIT 1 -#define CONV24_SEP1 2 -#define CONV24_LOCK 3 -#define CONV24_SEP2 4 -#define CONV24_FAST 5 -#define CONV24_SLOW 6 -#define CONV24_BEST 7 -#define CONV24_MAX 8 - -/* values 'picType' can take */ -#define PIC8 CONV24_8BIT -#define PIC24 CONV24_24BIT - -/* MONO returns total intensity of r,g,b components */ -#define MONO(rd,gn,bl) (((rd)*11 + (gn)*16 + (bl)*5) >> 5) /*.33R+ .5G+ .17B*/ - -#ifdef UNUSED -static int Width, Height; -static int curx, cury; -static long CountDown; -static int Interlace; -#endif /* UNUSED */ - #ifdef __STDC__ static void compress(int, FILE *, byte *, int); static void output(int); @@ -95,20 +70,12 @@ static void char_init(), char_out(), flush_char(); #endif /* __STDC__ */ static byte pc2nc[256]; -#ifdef UNUSED -static byte r1[256],g1[256],b1[256]; -#endif /* UNUSED */ /*************************************************************/ int hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap, byte *gmap, byte *bmap, byte *pc2ncmap, int numcols, int colorstyle, int BitsPerPixel) { -#ifdef UNUSED - int RWidth, RHeight; - int LeftOfs, TopOfs; - int ColorMapSize, Background; -#endif /* UNUSED */ int InitCodeSize; int i; byte *pic8 = pic; @@ -121,39 +88,15 @@ int hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap, numcols=numcols; colorstyle=colorstyle; -#ifdef UNUSED - Interlace = 0; - Background = 0; -#endif /* UNUSED */ - for (i = 0; i < 256; i++) { pc2nc[i] = pc2ncmap[i]; -#ifdef UNUSED - r1[i] = rmap[i]; - g1[i] = gmap[i]; - b1[i] = bmap[i]; -#endif /* UNUSED */ } -#ifdef UNUSED - ColorMapSize = 1 << BitsPerPixel; - - RWidth = Width = w; - RHeight = Height = h; - LeftOfs = TopOfs = 0; - - CountDown = w * h; /* # of pixels we'll be doing */ -#endif /* UNUSED */ - if (BitsPerPixel <= 1) InitCodeSize = 2; else InitCodeSize = BitsPerPixel; -#ifdef UNUSED - curx = cury = 0; -#endif /* UNUSED */ - if (!fp) { fprintf(stderr, "WriteGIF: file not open for writing\n" ); return (1); @@ -172,11 +115,7 @@ static unsigned long cur_accum = 0; static int cur_bits = 0; #define MAXCODE(n_bits) ( (1 << (n_bits)) - 1) -#ifndef min -#define min(a,b) ((a>b) ? b : a) -#endif /* min */ #define XV_BITS 12 /* BITS was already defined on some systems */ -#define MSDOS 1 #define HSIZE 5003 /* 80% occupancy */ typedef unsigned char char_type; @@ -203,10 +142,6 @@ static int hsize = HSIZE; /* for dynamic table sizing */ * used to be 8000 characters). */ -#define tab_prefixof(i) CodeTabOf(i) -#define tab_suffixof(i) ((char_type *)(htab))[i] -#define de_stack ((char_type *)&tab_suffixof(1<__file #endif /* RISCOS */ -#ifndef GZ_SUFFIX -# define GZ_SUFFIX ".gz" -#endif /* GZ_SUFFIX */ - #define ONE_KB 1024 #define ONE_MB (ONE_KB * ONE_KB) #define ONE_GB (ONE_MB * ONE_KB) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index dc359f6..ce2d98e 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -89,8 +89,9 @@ Notes: This short set of instructions is written for users who want to c:\MyHDFstuff\hdf5\build 4. Configure the C library, tools and tests with this command: - cmake -G "Visual Studio 10" -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON .. - The two dots on the end of the command is the location of the source. + cmake -G "Visual Studio 10" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON .. + The two dots on the end of the command is the location of the source. + The CMAKE_BUILD_TYPE must match the configuration type. 5. Build the C library, tools and tests with this command: cmake --build . --config Release @@ -118,8 +119,9 @@ Notes: This short set of instructions is written for users who want to ~/MyHDFstuff/hdf5/build 4. Configure the C library, tools and tests with this command: - cmake -G "Unix Makefiles" -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON .. + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON .. The two dots on the end of the command is the location of the source. + The CMAKE_BUILD_TYPE must match the configuration type. 5. Build the C library, tools and tests with this command: cmake --build . --config Release @@ -141,7 +143,7 @@ III. Preconditions ======================================================================== 1. We suggest you obtain the latest CMake for windows from the Kitware - web site. The HDF5 1.8.x product requires a minimum CMake version 2.8.10. + web site. The HDF5 1.8.x product requires a minimum CMake version 2.8.12. 2. If you plan to use Zlib or Szip: A. Download the binary packages and install them in a central location. @@ -152,7 +154,8 @@ III. Preconditions HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="SVN" ZLIB_SVN_URL:STRING="http://some_location/zlib/trunk" SZIP_SVN_URL:STRING="http://some_location/szip/trunk" - where "some_location" is the URL to the SVN repository. + where "some_location" is the URL to the SVN repository. Also set + CMAKE_BUILD_TYPE to the configuration type. C. Use source packages from a compressed file by adding the following CMake options: HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ" @@ -160,7 +163,8 @@ III. Preconditions SZIP_TGZ_NAME:STRING="szip_src.ext" TGZPATH:STRING="some_location" where "some_location" is the URL or full path to the compressed - file and ext is the type of compression file. + file and ext is the type of compression file. Also set CMAKE_BUILD_TYPE + to the configuration type during configuration 3. If you are building on Apple Darwin platforms, you should add the following options: @@ -181,7 +185,8 @@ III. Preconditions on the command line are those options that are different. Example using HDF default cache file: cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 10" \ - -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF .. + -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \ + -DCMAKE_BUILD_TYPE:STRING=Release .. Notes: CMake and HDF5 @@ -346,7 +351,8 @@ These five steps are described in detail below. 2.2 Preferred command line example on Windows in c:\MyHDFstuff\hdf5\build directory: cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 10" \ - -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF .. + -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \ + -DCMAKE_BUILD_TYPE:STRING=Release .. 2.3 On Windows, if you are using a Visual Studio Express version you must be sure that the following two options are correctly set/unset: @@ -381,7 +387,8 @@ These five steps are described in detail below. The options to control the SVN URL (config/cmake/cacheinit.cmake file) are: ZLIB_SVN_URL:STRING="http://svn.hdfgroup.uiuc.edu/zlib/trunk" SZIP_SVN_URL:STRING="http://svn.hdfgroup.uiuc.edu/szip/trunk" - These should be changed to your location. + These should be changed to your location. Also define CMAKE_BUILD_TYPE + to be the configuration type. 3.2.2 Or the external libraries (zlib and szip) can be configured to allow building the libraries by using a compressed file. @@ -396,7 +403,8 @@ These five steps are described in detail below. TGZPATH:STRING="some_location" where "some_location/xxxx_src.ext" is the URL or full path to the compressed file and where ext is the type of the compression - file such as .bz2, .tar, .tar.gz, .tgz, or .zip. + file such as .bz2, .tar, .tar.gz, .tgz, or .zip. Also define + CMAKE_BUILD_TYPE to be the configuration type. 4. Test HDF5 @@ -563,7 +571,7 @@ is used to build, test, and package HDF5 Library files. -cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) ######################################################## # This dashboard is maintained by The HDF Group # For any comments please contact cdashhelp@hdfgroup.org @@ -859,7 +867,7 @@ and the build folder is created as a sub-folder. # "ctest -S HDF518Static.cmake,hdf518 -C Release -O hdf518static.log" # where hdf518 is the source folder relative to the location of these scripts ############################################################################ -cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) set(CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}") diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 0e0ac93..1ff3b14 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -677,6 +677,11 @@ Bug Fixes since HDF5-1.8.0 release Configuration ------------- + - When CMake commands are executed individually on the command line and the + external filters are being built, the CMAKE_BUILD_TYPE define must be set + to the same value as the configuration + (-DCMAKE_BUILD_TYPE:STRING=Release if using -C Release). This is needed + by the the szip and zlib filter build commands. (ADB - HDFFV-8695) - Modified H5detect.c to scan floating point types for padding bits before analyzing the type further. This should fix problems with gcc 4.8 (NAF - 2013/09/19 - HDFFV-8523/HDFFV-8500) @@ -1171,20 +1176,19 @@ Supported Platforms (emu) Sun Fortran 95 8.6 SunOS_sparc Sun C++ 5.12 SunOS_sparc - Windows 7 Visual Studio 2008 w/ Intel Fortran 11 (cmake) - Visual Studio 2010 w/ Intel Fortran 12 (cmake) - Visual Studio 2012 w/ Intel Fortran 13 (cmake) - Cygwin(CYGWIN_NT-6.1 1.7.25(0.270/5/3) gcc(4.7.3) compiler and gfortran) + Windows 7 Visual Studio 2008 w/ Intel Fortran 14 (cmake) + Visual Studio 2010 w/ Intel Fortran 14 (cmake) + Visual Studio 2012 w/ Intel Fortran 14 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.28(0.271/5/3) gcc(4.8.2) compiler and gfortran) (cmake and autotools) - Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11 (cmake) - Visual Studio 2010 w/ Intel Fortran 12 (cmake) - Visual Studio 2012 w/ Intel Fortran 13 (cmake) - Cygwin(CYGWIN_NT-6.1 1.7.25(0.270/5/3) gcc(4.8.1) compiler and gfortran) - (cmake and autotools) - Windows 8.1 Visual Studio 2012 w/ Intel Fortran 13 (cmake) + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 14 (cmake) + Visual Studio 2010 w/ Intel Fortran 14 (cmake) + Visual Studio 2012 w/ Intel Fortran 14 (cmake) + + Windows 8.1 Visual Studio 2012 w/ Intel Fortran 14 (cmake) - Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 13 (cmake) + Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 14 (cmake) Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6 Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6 diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index 9a50525..a0aca41 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -37,7 +37,7 @@ I. Preconditions 1. We suggest you obtain the latest CMake for windows from the Kitware web site. The HDF5 1.8.x product requires a minimum CMake version - of 2.8.10. + of 2.8.12. 2. You have installed the HDF5 library built with CMake, by executing the HDF Install Utility (the *.exe file in the binary package for @@ -186,7 +186,7 @@ III. Minimum C Project Files for CMake following text in the file: ########################################################## -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.12) PROJECT (HDF5MyApp C CXX) FIND_PACKAGE (HDF5 NAMES hdf5) @@ -239,7 +239,7 @@ ctest # where hdf518Examples is the source folder relative to the location of these scripts ############################################################################ -cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5f332a1..8d361f8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_SRC C CXX) #----------------------------------------------------------------------------- diff --git a/src/H5Tconv.c b/src/H5Tconv.c index bf686b8..58b0b46 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -8039,9 +8039,9 @@ H5T__conv_float_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(FLOAT, SCHAR, float, signed char, SCHAR_MIN, SCHAR_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8066,9 +8066,9 @@ H5T__conv_float_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(FLOAT, UCHAR, float, unsigned char, 0, UCHAR_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8093,9 +8093,9 @@ H5T__conv_double_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(DOUBLE, SCHAR, double, signed char, SCHAR_MIN, SCHAR_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8120,9 +8120,9 @@ H5T__conv_double_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(DOUBLE, UCHAR, double, unsigned char, 0, UCHAR_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8148,9 +8148,9 @@ H5T__conv_ldouble_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, SCHAR, long double, signed char, SCHAR_MIN, SCHAR_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } #endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */ @@ -8177,9 +8177,9 @@ H5T__conv_ldouble_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, UCHAR, long double, unsigned char, 0, UCHAR_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } #endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */ @@ -8205,9 +8205,9 @@ H5T__conv_float_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(FLOAT, SHORT, float, short, SHRT_MIN, SHRT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8232,9 +8232,9 @@ H5T__conv_float_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(FLOAT, USHORT, float, unsigned short, 0, USHRT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8259,9 +8259,9 @@ H5T__conv_double_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(DOUBLE, SHORT, double, short, SHRT_MIN, SHRT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8286,9 +8286,9 @@ H5T__conv_double_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(DOUBLE, USHORT, double, unsigned short, 0, USHRT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8314,9 +8314,9 @@ H5T__conv_ldouble_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, SHORT, long double, short, SHRT_MIN, SHRT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } #endif /*H5T_CONV_INTERNAL_LDOUBLE_INTEGER*/ @@ -8343,9 +8343,9 @@ H5T__conv_ldouble_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, USHORT, long double, unsigned short, 0, USHRT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } #endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */ @@ -8371,9 +8371,9 @@ H5T__conv_float_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8398,9 +8398,9 @@ H5T__conv_float_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8425,9 +8425,9 @@ H5T__conv_double_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8452,9 +8452,9 @@ H5T__conv_double_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(DOUBLE, UINT, double, unsigned int, 0, UINT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8480,9 +8480,9 @@ H5T__conv_ldouble_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, INT, long double, int, INT_MIN, INT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } #endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */ @@ -8509,9 +8509,9 @@ H5T__conv_ldouble_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, UINT, long double, unsigned int, 0, UINT_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } #endif /* H5T_CONV_INTERNAL_LDOUBLE_UINT */ @@ -8537,9 +8537,9 @@ H5T__conv_float_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8564,9 +8564,9 @@ H5T__conv_float_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(FLOAT, ULONG, float, unsigned long, 0, ULONG_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8591,9 +8591,9 @@ H5T__conv_double_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(DOUBLE, LONG, double, long, LONG_MIN, LONG_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8618,9 +8618,9 @@ H5T__conv_double_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(DOUBLE, ULONG, double, unsigned long, 0, ULONG_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } @@ -8646,9 +8646,9 @@ H5T__conv_ldouble_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, LONG, long double, long, LONG_MIN, LONG_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } #endif /*H5T_CONV_INTERNAL_LDOUBLE_INTEGER*/ @@ -8675,9 +8675,9 @@ H5T__conv_ldouble_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, ULONG, long double, unsigned long, 0, ULONG_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } #endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */ @@ -8704,9 +8704,9 @@ H5T__conv_float_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(FLOAT, LLONG, float, long long, LLONG_MIN, LLONG_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } #endif /* H5T_CONV_INTERNAL_FP_LLONG */ @@ -8760,9 +8760,9 @@ H5T__conv_double_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(DOUBLE, LLONG, double, long long, LLONG_MIN, LLONG_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } #endif /*H5T_CONV_INTERNAL_FP_LLONG*/ @@ -8816,9 +8816,9 @@ H5T__conv_ldouble_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { -GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX); -GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON(float-equal) } #endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/ diff --git a/src/H5private.h b/src/H5private.h index a95cb0d..fc80bb7 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -2381,25 +2381,6 @@ func_init_failed: \ #define HDcompile_assert(e) do { typedef struct { unsigned int b: (e); } x; } while(0) */ -/* Macros for enabling/disabling particular GCC warnings */ -/* (see the following web-sites for more info: - * http://www.dbp-consulting.com/tutorials/SuppressingGCCWarnings.html - * http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas - */ -/* These pragmas are only implemented usefully in gcc 4.6+ */ -#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 - #define GCC_DIAG_STR(s) #s - #define GCC_DIAG_JOINSTR(x,y) GCC_DIAG_STR(x ## y) - #define GCC_DIAG_DO_PRAGMA(x) _Pragma (#x) - #define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x) - - #define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(push) GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,x)) - #define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(pop) -#else - #define GCC_DIAG_OFF(x) - #define GCC_DIAG_ON(x) -#endif - /* Private functions, not part of the publicly documented API */ H5_DLL herr_t H5_init_library(void); H5_DLL void H5_term_library(void); diff --git a/src/H5public.h b/src/H5public.h index 92dcd91..39c8979 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -72,6 +72,25 @@ extern "C" { #endif +/* Macros for enabling/disabling particular GCC warnings */ +/* (see the following web-sites for more info: + * http://www.dbp-consulting.com/tutorials/SuppressingGCCWarnings.html + * http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas + */ +/* These pragmas are only implemented usefully in gcc 4.6+ */ +#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 + #define H5_GCC_DIAG_STR(s) #s + #define H5_GCC_DIAG_JOINSTR(x,y) H5_GCC_DIAG_STR(x ## y) + #define H5_GCC_DIAG_DO_PRAGMA(x) _Pragma (#x) + #define H5_GCC_DIAG_PRAGMA(x) H5_GCC_DIAG_DO_PRAGMA(GCC diagnostic x) + + #define H5_GCC_DIAG_OFF(x) H5_GCC_DIAG_PRAGMA(push) H5_GCC_DIAG_PRAGMA(ignored H5_GCC_DIAG_JOINSTR(-W,x)) + #define H5_GCC_DIAG_ON(x) H5_GCC_DIAG_PRAGMA(pop) +#else + #define H5_GCC_DIAG_OFF(x) + #define H5_GCC_DIAG_ON(x) +#endif + /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ @@ -148,8 +167,10 @@ typedef long long ssize_t; * type. */ #if H5_SIZEOF_LONG_LONG >= 8 +H5_GCC_DIAG_OFF(long-long) typedef unsigned long long hsize_t; typedef signed long long hssize_t; +H5_GCC_DIAG_ON(long-long) # define H5_SIZEOF_HSIZE_T H5_SIZEOF_LONG_LONG # define H5_SIZEOF_HSSIZE_T H5_SIZEOF_LONG_LONG #else diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7bc9d3b..dcbe9d4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TEST) #----------------------------------------------------------------------------- @@ -46,8 +46,8 @@ set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES #----------------------------------------------------------------------------- if (BUILD_SHARED_LIBS) # make plugins dir - FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1") - FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2") + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1") + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2") #----------------------------------------------------------------------------- # Define Test Library Sources @@ -294,7 +294,7 @@ set_target_properties (links_env PROPERTIES FOLDER test) #-- Adding test for libinfo set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) file (WRITE ${GREP_RUNNER} - "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") + "file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") if (\${TEST_RESULT} STREQUAL \"0\") message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\") else (\${TEST_RESULT} STREQUAL \"0\") diff --git a/test/H5srcdir.h b/test/H5srcdir.h index 202d050..4f0f439 100644 --- a/test/H5srcdir.h +++ b/test/H5srcdir.h @@ -46,8 +46,8 @@ static const char *H5_get_srcdir_filename(const char *filename) /* Build path to test file */ if((HDstrlen(srcdir) + HDstrlen(filename) + 2) < sizeof(srcdir_testpath)) { - HDstrcpy(srcdir_testpath, srcdir); #ifdef H5_VMS + HDstrcpy(srcdir_testpath, srcdir); if(filename[0] == '[') { char *tmp = filename; @@ -57,8 +57,7 @@ static const char *H5_get_srcdir_filename(const char *filename) else HDstrcat(srcdir_testpath, filename); #else - HDstrcat(srcdir_testpath, "/"); - HDstrcat(srcdir_testpath, filename); + HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s/%s", srcdir, filename); #endif return(srcdir_testpath); } /* end if */ @@ -77,8 +76,7 @@ static const char *H5_get_srcdir(void) /* Build path to all test files */ if((HDstrlen(srcdir) + 2) < sizeof(srcdir_path)) { - HDstrcpy(srcdir_path, srcdir); - HDstrcat(srcdir_path, "/"); + HDsnprintf(srcdir_path, sizeof(srcdir_path), "%s/", srcdir); return(srcdir_path); } /* end if */ else diff --git a/test/cross_read.c b/test/cross_read.c index 308a0c1..ba99c9e 100644 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -50,8 +50,10 @@ const char *FILENAME[] = { #define DATASETNAME15 "Fletcher_float_data_be" #define DATASETNAME16 "Deflate_float_data_le" #define DATASETNAME17 "Deflate_float_data_be" +#ifdef H5_HAVE_FILTER_SZIP #define DATASETNAME18 "Szip_float_data_le" #define DATASETNAME19 "Szip_float_data_be" +#endif /* H5_HAVE_FILTER_SZIP */ #define DATASETNAME20 "Shuffle_float_data_le" #define DATASETNAME21 "Shuffle_float_data_be" #define DATASETNAME22 "Nbit_float_data_le" diff --git a/test/dt_arith.c b/test/dt_arith.c index c3692d0..1922f72 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -531,15 +531,14 @@ except_func(H5T_conv_except_t except_type, hid_t UNUSED src_id, hid_t UNUSED dst * Programmer: Robb Matzke * Tuesday, July 21, 1998 * - * Modifications: - * *------------------------------------------------------------------------- */ void some_dummy_func(float x) { char s[128]; - sprintf(s, "%g", x); + + HDsnprintf(s, sizeof(s), "%g", x); } @@ -576,7 +575,8 @@ generates_sigfpe(void) HDexit(1); } else if (0==pid) { for (i=0; i<2000; i++) { - for (j=0; j derived floating-point conversions"); + HDsnprintf(str, sizeof(str), "\nTesting random sw derived floating-point -> derived floating-point conversions"); printf("%-70s", str); HDfflush(stdout); H5_FAILED(); @@ -1204,13 +1204,13 @@ test_derived_flt(void) src_size = H5Tget_size(tid2); dst_size = H5Tget_size(tid1); endian = H5Tget_order(tid2); - buf = (unsigned char*)HDmalloc(nelmts*(MAX(src_size, dst_size))); - saved_buf = (unsigned char*)HDmalloc(nelmts*src_size); - HDmemset(buf, 0, nelmts*MAX(src_size, dst_size)); + buf = (unsigned char *)HDmalloc(nelmts*(MAX(src_size, dst_size))); + saved_buf = (unsigned char *)HDmalloc(nelmts*src_size); + HDmemset(buf, 0, nelmts * MAX(src_size, dst_size)); HDmemset(saved_buf, 0, nelmts*src_size); for(i=0; i derived floating-point conversions"); + HDsnprintf(str, sizeof(str), "\nTesting random sw derived floating-point -> derived floating-point conversions"); printf("%-70s", str); HDfflush(stdout); H5_FAILED(); @@ -1514,13 +1514,13 @@ test_derived_integer(void) src_size = H5Tget_size(tid1); dst_size = H5Tget_size(tid2); endian = H5Tget_order(tid1); - buf = (unsigned char*)HDmalloc(nelmts*(MAX(src_size, dst_size))); - saved_buf = (unsigned char*)HDmalloc(nelmts*src_size); - HDmemset(buf, 0, nelmts*MAX(src_size, dst_size)); + buf = (unsigned char *)HDmalloc(nelmts*(MAX(src_size, dst_size))); + saved_buf = (unsigned char *)HDmalloc(nelmts*src_size); + HDmemset(buf, 0, nelmts * MAX(src_size, dst_size)); HDmemset(saved_buf, 0, nelmts*src_size); - for(i=0; i derived integer conversions"); + HDsnprintf(str, sizeof(str), "\nTesting random sw derived integer -> derived integer conversions"); printf("%-70s", str); HDfflush(stdout); H5_FAILED(); @@ -1748,14 +1748,14 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) /* Sanity checks */ if (OTHER==src_type || OTHER==dst_type) { - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); H5_FAILED(); HDputs(" Unknown data type."); goto error; } else { - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); HDfflush(stdout); @@ -2718,17 +2718,20 @@ my_isnan(dtype_t type, void *val) if (!retval) { if (FLT_FLOAT==type) { float x; + HDmemcpy(&x, val, sizeof(float)); - sprintf(s, "%g", x); + HDsnprintf(s, sizeof(s), "%g", x); } else if (FLT_DOUBLE==type) { double x; + HDmemcpy(&x, val, sizeof(double)); - sprintf(s, "%g", x); + HDsnprintf(s, sizeof(s), "%g", x); #if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0 } else if (FLT_LDOUBLE==type) { long double x; + HDmemcpy(&x, val, sizeof(long double)); - sprintf(s, "%Lg", x); + HDsnprintf(s, sizeof(s), "%Lg", x); #endif } else { return 0; @@ -2896,7 +2899,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) } else if (WIFEXITED(status)) { return WEXITSTATUS(status); } else if (WIFSIGNALED(status)) { - sprintf(str, " Child caught signal %d.", WTERMSIG(status)); + HDsnprintf(str, sizeof(str), " Child caught signal %d.", WTERMSIG(status)); HDputs(str); return 1; /*child exit after catching non-SIGFPE signal */ } else { @@ -2952,16 +2955,16 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) HDputs("Sizeof(float)==sizeof(double) - some tests may not be sensible."); if (OTHER==src_type || OTHER==dst_type) { if(!strcmp(name, "noop")) - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); else if(run_test==TEST_SPECIAL) - sprintf(str, "Testing %s special %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name, dst_type_name); else if(run_test==TEST_NORMAL) - sprintf(str, "Testing %s normalized %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name, dst_type_name); else if(run_test==TEST_DENORM) - sprintf(str, "Testing %s denormalized %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); @@ -2970,16 +2973,16 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) goto error; } else { if(!strcmp(name, "noop")) - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); else if(run_test==TEST_SPECIAL) - sprintf(str, "Testing %s special %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name, dst_type_name); else if(run_test==TEST_NORMAL) - sprintf(str, "Testing %s normalized %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name, dst_type_name); else if(run_test==TEST_DENORM) - sprintf(str, "Testing %s denormalized %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); @@ -3097,10 +3100,10 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) /* Check the software results against the hardware */ for (j=0; j %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); H5_FAILED(); @@ -3661,15 +3665,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) } if ((INT_SCHAR==src_type || INT_UCHAR==src_type || INT_SHORT==src_type || - INT_USHORT==src_type || INT_INT==src_type || INT_UINT==src_type || - INT_LONG==src_type || INT_ULONG==src_type || INT_LLONG==src_type || - INT_ULLONG==src_type) && - (FLT_FLOAT!=dst_type && FLT_DOUBLE!=dst_type + INT_USHORT==src_type || INT_INT==src_type || INT_UINT==src_type || + INT_LONG==src_type || INT_ULONG==src_type || INT_LLONG==src_type || + INT_ULLONG==src_type) && + (FLT_FLOAT!=dst_type && FLT_DOUBLE!=dst_type #if H5_SIZEOF_LONG_DOUBLE !=0 - && FLT_LDOUBLE!=dst_type + && FLT_LDOUBLE!=dst_type #endif - )) { - sprintf(str, "Testing %s %s -> %s conversions", + )) { + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); H5_FAILED(); @@ -3679,14 +3683,14 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) if ((FLT_FLOAT==src_type || FLT_DOUBLE==src_type #if H5_SIZEOF_LONG_DOUBLE !=0 - || FLT_LDOUBLE==src_type + || FLT_LDOUBLE==src_type #endif - ) - && (INT_SCHAR!=dst_type && INT_UCHAR!=dst_type && INT_SHORT!=dst_type - && INT_USHORT!=dst_type && INT_INT!=dst_type && INT_UINT!=dst_type - && INT_LONG!=dst_type && INT_ULONG!=dst_type && INT_LLONG!=dst_type - && INT_ULLONG!=dst_type)) { - sprintf(str, "Testing %s %s -> %s conversions", + ) + && (INT_SCHAR!=dst_type && INT_UCHAR!=dst_type && INT_SHORT!=dst_type + && INT_USHORT!=dst_type && INT_INT!=dst_type && INT_UINT!=dst_type + && INT_LONG!=dst_type && INT_ULONG!=dst_type && INT_LLONG!=dst_type + && INT_ULLONG!=dst_type)) { + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); H5_FAILED(); @@ -3695,23 +3699,23 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) } if (INT_SCHAR==src_type || INT_UCHAR==src_type || INT_SHORT==src_type || - INT_USHORT==src_type || INT_INT==src_type || INT_UINT==src_type || - INT_LONG==src_type || INT_ULONG==src_type || INT_LLONG==src_type || - INT_ULLONG==src_type) { - sprintf(str, "Testing %s %s -> %s conversions", + INT_USHORT==src_type || INT_INT==src_type || INT_UINT==src_type || + INT_LONG==src_type || INT_ULONG==src_type || INT_LLONG==src_type || + INT_ULLONG==src_type) { + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); HDfflush(stdout); fails_this_test=0; } else { if(run_test==TEST_NORMAL) - sprintf(str, "Testing %s normalized %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name, dst_type_name); else if(run_test==TEST_DENORM) - sprintf(str, "Testing %s denormalized %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name, dst_type_name); else - sprintf(str, "Testing %s special %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name, dst_type_name); printf("%-70s", str); HDfflush(stdout); @@ -5125,13 +5129,13 @@ run_int_fp_conv(const char *name) { char str[256]; /*hello string */ - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "unsigned long long", "float"); printf("%-70s", str); SKIPPED(); HDputs(" Test skipped due to compiler not handling conversion."); - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "unsigned long long", "double"); printf("%-70s", str); SKIPPED(); @@ -5153,19 +5157,19 @@ run_int_fp_conv(const char *name) nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LONG, H5T_NATIVE_LDOUBLE); nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULONG, H5T_NATIVE_LDOUBLE); #else - { - char str[256]; /*string */ + { + char str[256]; /*string */ - sprintf(str, "Testing %s %s -> %s conversions", - name, "(unsigned) long", "long double"); - printf("%-70s", str); - SKIPPED(); + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "(unsigned) long", "long double"); + printf("%-70s", str); + SKIPPED(); #if H5_SIZEOF_LONG_DOUBLE!=0 - HDputs(" Test skipped due to the special algorithm of hardware conversion."); + HDputs(" Test skipped due to the special algorithm of hardware conversion."); #else - HDputs(" Test skipped due to disabled long double."); + HDputs(" Test skipped due to disabled long double."); #endif - } + } #endif #endif /* H5_SIZEOF_LONG!=H5_SIZEOF_INT */ #if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG @@ -5175,7 +5179,7 @@ run_int_fp_conv(const char *name) { char str[256]; /*hello string */ - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long long", "long double"); printf("%-70s", str); SKIPPED(); @@ -5188,7 +5192,7 @@ run_int_fp_conv(const char *name) { char str[256]; /*hello string */ - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "unsigned long long", "long double"); printf("%-70s", str); SKIPPED(); @@ -5201,7 +5205,7 @@ run_int_fp_conv(const char *name) { char str[256]; /*string */ - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "all integers", "long double"); printf("%-70s", str); SKIPPED(); @@ -5290,13 +5294,13 @@ run_fp_int_conv(const char *name) { char str[256]; /*hello string */ - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "float", "unsigned long long"); printf("%-70s", str); SKIPPED(); HDputs(" Test skipped due to hardware conversion error."); - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "double", "unsigned long long"); printf("%-70s", str); SKIPPED(); @@ -5318,7 +5322,7 @@ run_fp_int_conv(const char *name) { char str[256]; /*string */ - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "unsigned int"); printf("%-70s", str); SKIPPED(); @@ -5337,7 +5341,7 @@ run_fp_int_conv(const char *name) { char str[256]; /*string */ - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "(unsigned) long"); printf("%-70s", str); SKIPPED(); @@ -5357,7 +5361,7 @@ run_fp_int_conv(const char *name) { char str[256]; /*string */ - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "long long"); printf("%-70s", str); SKIPPED(); @@ -5374,7 +5378,7 @@ run_fp_int_conv(const char *name) { char str[256]; /*string */ - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "unsigned long long"); printf("%-70s", str); SKIPPED(); @@ -5391,7 +5395,7 @@ run_fp_int_conv(const char *name) { char str[256]; /*hello string */ - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "all integers"); printf("%-70s", str); SKIPPED(); @@ -5412,7 +5416,7 @@ run_fp_int_conv(const char *name) */ char str[256]; /*string */ - sprintf(str, "Testing %s %s -> %s conversions", + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "all floating-point numbers", "all integers"); printf("%-70s", str); SKIPPED(); diff --git a/test/gen_cross.c b/test/gen_cross.c index 8cbb2f5..bdc2835 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -46,8 +46,10 @@ #define DATASETNAME15 "Fletcher_float_data_be" #define DATASETNAME16 "Deflate_float_data_le" #define DATASETNAME17 "Deflate_float_data_be" +#ifdef H5_HAVE_FILTER_SZIP #define DATASETNAME18 "Szip_float_data_le" #define DATASETNAME19 "Szip_float_data_be" +#endif /* H5_HAVE_FILTER_SZIP */ #define DATASETNAME20 "Shuffle_float_data_le" #define DATASETNAME21 "Shuffle_float_data_be" #define DATASETNAME22 "Nbit_float_data_le" diff --git a/test/gen_new_group.c b/test/gen_new_group.c index 6d16031..b998913 100644 --- a/test/gen_new_group.c +++ b/test/gen_new_group.c @@ -31,13 +31,6 @@ #define FILENAME "group_new.h5" -#ifndef TRUE -#define TRUE 1 -#endif /* TRUE */ -#ifndef FALSE -#define FALSE 0 -#endif /* FALSE */ - int main(void) { hid_t fid = -1; /* File ID */ diff --git a/test/h5test.c b/test/h5test.c index f361c49..3b7bfbe 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -75,7 +75,6 @@ char *paraprefix = NULL; /* for command line option para-prefix */ MPI_Info h5_io_info_g=MPI_INFO_NULL;/* MPI INFO object for IO */ #endif -#define FILENAME_BUF_SIZE 1024 #define READ_BUF_SIZE 4096 /* @@ -132,63 +131,61 @@ h5_errors(hid_t estack, void UNUSED *client_data) * Programmer: Albert Cheng * May 28, 1998 * - * Modifications: - * Albert Cheng, 2000-09-09 - * Added the explicite base_name argument to replace the - * global variable FILENAME. - * *------------------------------------------------------------------------- */ int h5_cleanup(const char *base_name[], hid_t fapl) { - char filename[1024]; - char temp[2048]; - int i, j; - int retval=0; - hid_t driver; + int retval = 0; + + if(GetTestCleanup()) { + int i; - if (GetTestCleanup()){ - for (i = 0; base_name[i]; i++) { - if (h5_fixname(base_name[i], fapl, filename, sizeof(filename)) == NULL) - continue; + for(i = 0; base_name[i]; i++) { + char filename[1024]; + char temp[2048]; + hid_t driver; + + if(NULL == h5_fixname(base_name[i], fapl, filename, sizeof(filename))) + continue; driver = H5Pget_driver(fapl); - if (driver == H5FD_FAMILY) { - for (j = 0; /*void*/; j++) { - HDsnprintf(temp, sizeof temp, filename, j); + if(driver == H5FD_FAMILY) { + int j; + + for(j = 0; /*void*/; j++) { + HDsnprintf(temp, sizeof temp, filename, j); - if (HDaccess(temp, F_OK) < 0) + if(HDaccess(temp, F_OK) < 0) break; - HDremove(temp); - } - } else if (driver == H5FD_CORE) { + HDremove(temp); + } /* end for */ + } else if(driver == H5FD_CORE) { hbool_t backing; /* Whether the core file has backing store */ - H5Pget_fapl_core(fapl,NULL,&backing); + H5Pget_fapl_core(fapl, NULL, &backing); /* If the file was stored to disk with bacing store, remove it */ if(backing) HDremove(filename); + } else if (driver == H5FD_MULTI) { + H5FD_mem_t mt; - } else if (driver == H5FD_MULTI) { - H5FD_mem_t mt; - assert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES); + HDassert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES); - for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) { - HDsnprintf(temp, sizeof temp, "%s-%c.h5", - filename, multi_letters[mt]); - HDremove(temp); /*don't care if it fails*/ - } - } else { - HDremove(filename); - } - } + for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) { + HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]); + HDremove(temp); /*don't care if it fails*/ + } /* end for */ + } else { + HDremove(filename); + } + } /* end for */ - retval = 1; - } + retval = 1; + } /* end if */ H5Pclose(fapl); return retval; @@ -205,8 +202,6 @@ h5_cleanup(const char *base_name[], hid_t fapl) * Programmer: Robb Matzke * Friday, November 20, 1998 * - * Modifications: - * *------------------------------------------------------------------------- */ void @@ -268,16 +263,6 @@ h5_reset(void) * Programmer: Robb Matzke * Thursday, November 19, 1998 * - * Modifications: - * Robb Matzke, 1999-08-03 - * Modified to use the virtual file layer. - * - * Albert Cheng, 2000-01-25 - * Added prefix for parallel test files. - * - * Albert Cheng, 2003-05-08 - * Changed the default parallel prefix back to NULL but added - * an explanation remark of $HDF5_PARAPREFIX. *------------------------------------------------------------------------- */ char * @@ -293,37 +278,36 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) if (!base_name || !fullname || size < 1) return NULL; - memset(fullname, 0, size); + HDmemset(fullname, 0, size); /* figure out the suffix */ - if (H5P_DEFAULT != fapl) { - if ((driver = H5Pget_driver(fapl)) < 0) + if(H5P_DEFAULT != fapl) { + if((driver = H5Pget_driver(fapl)) < 0) return NULL; - if (H5FD_FAMILY == driver) - suffix = "%05d.h5"; - else if (H5FD_MULTI == driver) - suffix = NULL; + if(H5FD_FAMILY == driver) + suffix = "%05d.h5"; + else if (H5FD_MULTI == driver) + suffix = NULL; } /* Must first check fapl is not H5P_DEFAULT (-1) because H5FD_XXX * could be of value -1 if it is not defined. */ - isppdriver = H5P_DEFAULT != fapl && - (H5FD_MPIO==driver || H5FD_MPIPOSIX==driver); + isppdriver = H5P_DEFAULT != fapl && (H5FD_MPIO==driver || H5FD_MPIPOSIX==driver); /* Check HDF5_NOCLEANUP environment setting. * (The #ifdef is needed to prevent compile failure in case MPI is not * configured.) */ - if (isppdriver){ + if(isppdriver) { #ifdef H5_HAVE_PARALLEL - if (getenv_all(MPI_COMM_WORLD, 0, "HDF5_NOCLEANUP")) - SetTestNoCleanup(); + if(getenv_all(MPI_COMM_WORLD, 0, "HDF5_NOCLEANUP")) + SetTestNoCleanup(); #endif /* H5_HAVE_PARALLEL */ - }else{ - if (HDgetenv("HDF5_NOCLEANUP")) - SetTestNoCleanup(); + } else { + if(HDgetenv("HDF5_NOCLEANUP")) + SetTestNoCleanup(); } /* Check what prefix to use for test files. Process HDF5_PARAPREFIX and @@ -332,7 +316,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) * (The #ifdef is needed to prevent compile failure in case MPI is not * configured.) */ - if (isppdriver){ + if(isppdriver) { #ifdef H5_HAVE_PARALLEL /* * For parallel: @@ -341,38 +325,38 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) */ static int explained = 0; - prefix = (paraprefix ? paraprefix : getenv_all(MPI_COMM_WORLD, 0, "HDF5_PARAPREFIX")); + prefix = (paraprefix ? paraprefix : getenv_all(MPI_COMM_WORLD, 0, "HDF5_PARAPREFIX")); - if (!prefix && !explained) { - /* print hint by process 0 once. */ - int mpi_rank; + if (!prefix && !explained) { + /* print hint by process 0 once. */ + int mpi_rank; - MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); + MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); - if (mpi_rank == 0) - printf("*** Hint ***\n" - "You can use environment variable HDF5_PARAPREFIX to " - "run parallel test files in a\n" - "different directory or to add file type prefix. E.g.,\n" - " HDF5_PARAPREFIX=pfs:/PFS/user/me\n" - " export HDF5_PARAPREFIX\n" - "*** End of Hint ***\n"); + if (mpi_rank == 0) + printf("*** Hint ***\n" + "You can use environment variable HDF5_PARAPREFIX to " + "run parallel test files in a\n" + "different directory or to add file type prefix. E.g.,\n" + " HDF5_PARAPREFIX=pfs:/PFS/user/me\n" + " export HDF5_PARAPREFIX\n" + "*** End of Hint ***\n"); - explained = TRUE; + explained = TRUE; #ifdef HDF5_PARAPREFIX prefix = HDF5_PARAPREFIX; #endif /* HDF5_PARAPREFIX */ - } + } #endif /* H5_HAVE_PARALLEL */ } else { - /* + /* * For serial: * First use the environment variable, then try the constant - */ - prefix = HDgetenv("HDF5_PREFIX"); + */ + prefix = HDgetenv("HDF5_PREFIX"); #ifdef HDF5_PREFIX - if (!prefix) + if (!prefix) prefix = HDF5_PREFIX; #endif /* HDF5_PREFIX */ } diff --git a/test/testmeta.c b/test/testmeta.c index 9aa4972..a008cc7 100644 --- a/test/testmeta.c +++ b/test/testmeta.c @@ -29,14 +29,12 @@ #define FILEN "testmeta.h5" -#define MEMB_SIZE 100000000 #define CHUNK_SIZE 512 #define NDATAARRAYS 3 /*#define NPOINTS 2048*/ #define NPOINTS 20 #define NEXTARRAYS 10 -#define NWATTRS 2 #define NDATAOBJECTS 100000 int main(void) diff --git a/test/titerate.c b/test/titerate.c index d41df84..049e258 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -40,7 +40,6 @@ #define NAMELEN 80 /* 1-D dataset with fixed dimensions */ -#define SPACE1_NAME "Space1" #define SPACE1_RANK 1 #define SPACE1_DIM1 4 diff --git a/test/ttime.c b/test/ttime.c index 4762656..16acd3e 100644 --- a/test/ttime.c +++ b/test/ttime.c @@ -26,7 +26,9 @@ #include "hdf5.h" #define DATAFILE "ttime.h5" +#ifdef NOT_YET #define DATASETNAME "Dataset" +#endif /* NOT_YET */ /**************************************************************** ** diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c index f83332d..df51f72 100644 --- a/test/ttsafe_dcreate.c +++ b/test/ttsafe_dcreate.c @@ -45,7 +45,6 @@ #ifdef H5_HAVE_THREADSAFE #define FILENAME "ttsafe_dcreate.h5" -#define DATASETNAME_LENGTH 10 #define NUM_THREAD 16 void *tts_dcreate_creator(void *); diff --git a/test/tunicode.c b/test/tunicode.c index 7dfda16..7793ea3 100644 --- a/test/tunicode.c +++ b/test/tunicode.c @@ -29,16 +29,13 @@ #define LONG_BUF_SIZE (2 * MAX_STRING_LENGTH + 4) #define DSET1_NAME "fl_string_dataset" -#define DSET2_NAME "dataset2" #define DSET3_NAME "dataset3" #define DSET4_NAME "dataset4" #define VL_DSET1_NAME "vl_dset_1" -#define VL_DSET2_NAME "vl_dset_2" #define GROUP1_NAME "group1" #define GROUP2_NAME "group2" #define GROUP3_NAME "group3" #define GROUP4_NAME "group4" -#define SLINK_NAME "soft_link" #define RANK 1 #define COMP_INT_VAL 7 diff --git a/test/tvltypes.c b/test/tvltypes.c index ab4d880..516974e 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -32,11 +32,6 @@ #define SPACE1_RANK 1 #define SPACE1_DIM1 4 -/* 2-D dataset with fixed dimensions */ -#define SPACE2_RANK 2 -#define SPACE2_DIM1 10 -#define SPACE2_DIM2 10 - /* 1-D dataset with fixed dimensions */ #define SPACE3_RANK 1 #define SPACE3_DIM1 128 diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index 8eaa13a..6d4f4d4 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TEST_PAR) #----------------------------------------------------------------------------- diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 0dfe7c9..27820ae 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS) #----------------------------------------------------------------------------- @@ -15,32 +15,32 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib) # If testing was NOT enabled, then we need to build the tools library # -------------------------------------------------------------------- if (NOT BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/lib) + add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/lib) endif (NOT BUILD_TESTING) #-- Add the h5diff and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5diff) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5diff) #-- Add the h5ls executable -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5ls) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5ls) #-- Misc Executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/misc) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/misc) #-- Add the h5import and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5import) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5import) #-- h5Repack executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5repack) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5repack) #-- Add the h5dump and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5jam) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5jam) #-- Add the h5copy and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5copy) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5copy) #-- Add the h5stat and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5stat) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5stat) #-- Add the h5dump and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5dump) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5dump) diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index 66cbae6..e5a1a9f 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_H5COPY) #----------------------------------------------------------------------------- diff --git a/tools/h5copy/CMakeTests.cmake b/tools/h5copy/CMakeTests.cmake index 34976fe..77399a8 100644 --- a/tools/h5copy/CMakeTests.cmake +++ b/tools/h5copy/CMakeTests.cmake @@ -19,7 +19,7 @@ ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out ) - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) GET_FILENAME_COMPONENT(fname "${listfiles}" NAME) diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index f660c12..5620968 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_H5DIFF) #----------------------------------------------------------------------------- diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake index 8bae2ca..19a5fe4 100644 --- a/tools/h5diff/CMakeTests.cmake +++ b/tools/h5diff/CMakeTests.cmake @@ -234,7 +234,7 @@ ) # Make testfiles dir under build dir - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") # # copy test files from source to build dir diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 387c4bf..1a46586 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_H5DUMP) #----------------------------------------------------------------------------- diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake index 433faa3..bb2a37e 100644 --- a/tools/h5dump/CMakeTests.cmake +++ b/tools/h5dump/CMakeTests.cmake @@ -307,7 +307,7 @@ ) # make test dir - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") # # copy test files from source dir to test dir @@ -326,8 +326,8 @@ foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) if (WIN32 AND NOT CYGWIN) - FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM) - FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}") + file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM) + file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}") else (WIN32 AND NOT CYGWIN) add_custom_command ( TARGET h5dump @@ -373,8 +373,8 @@ ) if (WIN32 AND NOT CYGWIN) - FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM) - FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}") + file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM) + file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}") else (WIN32 AND NOT CYGWIN) add_custom_command ( TARGET h5dump diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index 32dff55..36a3a9e 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_H5IMPORT) #----------------------------------------------------------------------------- diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake index 2adbdde..5c5b4de 100644 --- a/tools/h5import/CMakeTests.cmake +++ b/tools/h5import/CMakeTests.cmake @@ -61,7 +61,7 @@ textpfe.h5 ) - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") foreach (conf_file ${HDF5_REFERENCE_CONF_FILES}) set (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}") #message (STATUS " Copying ${conf_file}") diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index a10ef24..74c67b9 100644 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -863,11 +863,11 @@ static int processStrData(FILE *strm, struct Input *in, hid_t file_id) hid_t handle; hsize_t dims[1]; char str[1024]; - char c; + int c; int i = 0; int j; - int nlines = 0; - int line; + hsize_t nlines = 0; + hsize_t line; /*------------------------------------------------------------------------- * get number of lines in the input file @@ -877,9 +877,8 @@ static int processStrData(FILE *strm, struct Input *in, hid_t file_id) while (!HDfeof(strm)) { c = HDfgetc(strm); - if (c == 10) { /* eol */ + if (c == 10) /* eol */ nlines++; - } } if (!nlines) @@ -944,7 +943,7 @@ static int processStrData(FILE *strm, struct Input *in, hid_t file_id) while (!HDfeof(strm)) { c = HDfgetc(strm); - str[i] = c; + str[i] = (char)c; i++; @@ -1012,7 +1011,7 @@ static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) char *str3 = NULL; char str[1024] = ""; int j; - int line; + hsize_t line; /*------------------------------------------------------------------------- * read file and generate an HDF5 dataset @@ -1079,7 +1078,7 @@ static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) str2 = NULL; str3 = NULL; #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING[%d]={%s}\n", line, str1); + printf("processStrHDFData DATATYPE STRING[%llu]={%s}\n", (unsigned long long)line, str1); #endif /* process string to remove the first and last quote char */ str2 = strchr(str1, '"'); @@ -1108,7 +1107,7 @@ static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) hsize_t count[1] = { 1 }; #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING[%d] store %s\n", line, str2); + printf("processStrHDFData DATATYPE STRING[%llu] store %s\n", (unsigned long long)line, str2); #endif if ((fspace_id = H5Dget_space(dset_id)) < 0) goto out; diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index b12544f..b0d5ac8 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_H5JAM) #----------------------------------------------------------------------------- diff --git a/tools/h5jam/CMakeTests.cmake b/tools/h5jam/CMakeTests.cmake index 4b71d7f..fb64313 100644 --- a/tools/h5jam/CMakeTests.cmake +++ b/tools/h5jam/CMakeTests.cmake @@ -20,7 +20,7 @@ twithub513.h5 ) - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}") #message (STATUS " Copying ${h5_file}") diff --git a/tools/h5jam/getub.c b/tools/h5jam/getub.c index 3aff2b4..776eaeb 100644 --- a/tools/h5jam/getub.c +++ b/tools/h5jam/getub.c @@ -26,9 +26,6 @@ void parse_command_line (int argc, const char *argv[]); -#define TRUE 1 -#define FALSE 0 - /* Name of tool */ #define PROGRAMNAME "getub" char *nbytes = NULL; @@ -79,21 +76,21 @@ usage (const char *prog) void parse_command_line (int argc, const char *argv[]) { - int opt = FALSE; + int opt; /* parse command line options */ while ((opt = get_option (argc, argv, s_opts, l_opts)) != EOF) { switch ((char) opt) - { - case 'c': - nbytes = HDstrdup (opt_arg); - break; - case '?': - default: - usage (h5tools_getprogname()); - exit (EXIT_FAILURE); - } + { + case 'c': + nbytes = HDstrdup (opt_arg); + break; + case '?': + default: + usage (h5tools_getprogname()); + exit (EXIT_FAILURE); + } } if (argc <= opt_ind) diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c index ca3d86c..9636597 100644 --- a/tools/h5jam/h5jamgentest.c +++ b/tools/h5jam/h5jamgentest.c @@ -28,7 +28,9 @@ #include "hdf5.h" #include "H5private.h" +/* not used yet #define UBTXT1 "u0.txt" +*/ #define UBTXT2 "u10.txt" #define UBTXT3 "u511.txt" #define UBTXT4 "u512.txt" @@ -69,24 +71,7 @@ char pattern[11] = "abcdefghij"; #define BUF_SIZE 1024 -#define LENSTR 50 -#define LENSTR2 11 - -#define SPACE2_RANK 2 -#define SPACE2_DIM1 10 -#define SPACE2_DIM2 10 - -#define SPACE1_RANK 1 -#define SPACE1_DIM1 4 - -#define DIM1 20 -#define DIM2 10 -#define CDIM1 DIM1/2 -#define CDIM2 DIM2/2 -#define RANK 2 - /* Element selection information */ -#define POINT1_NPOINTS 10 typedef enum{ RED, @@ -106,22 +91,10 @@ typedef struct s1_t { /* 1-D array datatype */ #define ARRAY1_RANK 1 -#define ARRAY1_DIM1 4 - -/* 3-D array datatype */ -#define ARRAY2_RANK 3 -#define ARRAY2_DIM1 3 -#define ARRAY2_DIM2 4 -#define ARRAY2_DIM3 5 /* 2-D array datatype */ -#define ARRAY3_RANK 2 -#define ARRAY3_DIM1 6 #define ARRAY3_DIM2 3 -/* VL string datatype name */ -#define VLSTR_TYPE "vl_string_type" - /* A UD link traversal function. Shouldn't actually be called. */ static hid_t UD_traverse(const char UNUSED * link_name, hid_t UNUSED cur_group, const void UNUSED * udata, size_t UNUSED udata_size, hid_t UNUSED lapl_id) diff --git a/tools/h5jam/tellub.c b/tools/h5jam/tellub.c index 0169d71..b4f87af 100644 --- a/tools/h5jam/tellub.c +++ b/tools/h5jam/tellub.c @@ -24,9 +24,6 @@ #include "h5tools.h" #include "h5tools_utils.h" -#define TRUE 1 -#define FALSE 0 - /* Name of tool */ #define PROGRAMNAME "tellub" @@ -85,21 +82,21 @@ usage (const char *prog) static void parse_command_line (int argc, const char *argv[]) { - int opt = FALSE; + int opt; /* parse command line options */ while ((opt = get_option (argc, argv, s_opts, l_opts)) != EOF) { switch ((char) opt) - { - case 'h': - usage (h5tools_getprogname()); - exit (EXIT_SUCCESS); - case '?': - default: - usage (h5tools_getprogname()); - exit (EXIT_FAILURE); - } + { + case 'h': + usage (h5tools_getprogname()); + exit (EXIT_SUCCESS); + case '?': + default: + usage (h5tools_getprogname()); + exit (EXIT_FAILURE); + } } /* check for file name to be processed */ diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index b351268..5220087 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_H5LS) #----------------------------------------------------------------------------- diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake index eb68d79..b739130 100644 --- a/tools/h5ls/CMakeTests.cmake +++ b/tools/h5ls/CMakeTests.cmake @@ -92,7 +92,7 @@ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2be.ls ) - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") # copy the list of test files foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index 4625607..4d26c0c 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_H5REPACK) #----------------------------------------------------------------------------- @@ -54,7 +54,7 @@ if (BUILD_TESTING) add_definitions (${HDF5_EXTRA_C_FLAGS}) INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) - add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SRC_DIR}/dynlib1.c) + add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} dynlib_rpk.c) TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} " " " ") target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS ( @@ -65,7 +65,7 @@ if (BUILD_TESTING) ) # make plugins dir - FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") #----------------------------------------------------------------------------- # Copy plugin library to a plugins folder #----------------------------------------------------------------------------- diff --git a/tools/h5repack/dynlib_rpk.c b/tools/h5repack/dynlib_rpk.c new file mode 100644 index 0000000..1ccc33a --- /dev/null +++ b/tools/h5repack/dynlib_rpk.c @@ -0,0 +1,97 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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 + * 13 February 2013 + * + * Purpose: Tests the plugin module (H5PL) + */ + +#include +#include +#include "H5PLextern.h" + +#define H5Z_FILTER_DYNLIB1 257 + +static size_t H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts, + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); + +/* This message derives from H5Z */ +const H5Z_class2_t H5Z_DYNLIB1[1] = {{ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_DYNLIB1, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "dynlib1", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + (H5Z_func_t)H5Z_filter_dynlib1, /* The actual filter function */ +}}; + +H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;} +const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB1;} + +/*------------------------------------------------------------------------- + * Function: H5Z_filter_dynlib1 + * + * Purpose: A dynlib1 filter method that adds on and subtract from + * the original value with another value. It will be built + * as a shared library. plugin.c test will load and use + * this filter library. + * + * Return: Success: Data chunk size + * + * Failure: 0 + * + * Programmer: Raymond Lu + * 29 March 2013 + * + *------------------------------------------------------------------------- + */ +static size_t +H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts, + const unsigned int *cd_values, size_t nbytes, + size_t *buf_size, void **buf) +{ + int *int_ptr = (int *)*buf; /* Pointer to the data values */ + size_t buf_left = *buf_size; /* Amount of data buffer left to process */ + int add_on = 0; + + /* Check for the correct number of parameters */ + if(cd_nelmts == 0) + return(0); + + /* Check that permanent parameters are set correctly */ + if(cd_values[0] > 9) + return(0); + + add_on = (int)cd_values[0]; + + if(flags & H5Z_FLAG_REVERSE) { /*read*/ + /* Substract the "add on" value to all the data values */ + while(buf_left > 0) { + *int_ptr++ -= add_on; + buf_left -= sizeof(int); + } /* end while */ + } /* end if */ + else { /*write*/ + /* Add the "add on" value to all the data values */ + while(buf_left > 0) { + *int_ptr++ += add_on; + buf_left -= sizeof(int); + } /* end while */ + } /* end else */ + + return nbytes; +} /* end H5Z_filter_dynlib1() */ + diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index d182a45..82f0ffb 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_H5STAT) #----------------------------------------------------------------------------- diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 5569b6f..83df182 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_LIB) #----------------------------------------------------------------------------- diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index ab21bfd..884a85d 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -1096,7 +1096,6 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, char * grp2_path = ""; char * obj1_fullpath = NULL; char * obj2_fullpath = NULL; - h5trav_type_t objtype; diff_args_t argdata; size_t idx1 = 0; size_t idx2 = 0; @@ -1163,7 +1162,6 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, { if( table->objs[i].flags[0] && table->objs[i].flags[1]) { - objtype = table->objs[i].type; /* make full path for obj1 */ obj1_fullpath = (char*)HDcalloc (HDstrlen(grp1_path) + strlen (table->objs[i].name) + 1, sizeof (char)); HDstrcpy(obj1_fullpath, grp1_path); diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index fca3096..d0a4a76 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -21,13 +21,15 @@ * local typedefs *------------------------------------------------------------------------- */ +typedef struct trav_addr_path_t { + haddr_t addr; + char *path; +} trav_addr_path_t; + typedef struct trav_addr_t { size_t nalloc; size_t nused; - struct { - haddr_t addr; - char *path; - } *objs; + trav_addr_path_t *objs; } trav_addr_t; typedef struct { @@ -132,7 +134,7 @@ trav_addr_add(trav_addr_t *visited, haddr_t addr, const char *path) /* Allocate space if necessary */ if(visited->nused == visited->nalloc) { visited->nalloc = MAX(1, visited->nalloc * 2);; - visited->objs = HDrealloc(visited->objs, visited->nalloc * sizeof(visited->objs[0])); + visited->objs = (trav_addr_path_t *)HDrealloc(visited->objs, visited->nalloc * sizeof(trav_addr_path_t)); } /* end if */ /* Append it */ @@ -194,14 +196,15 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo, /* Create the full path name for the link */ if(udata->is_absolute) { size_t base_len = HDstrlen(udata->base_grp_name); - size_t add_slash = base_len ? ((udata->base_grp_name)[base_len-1] != '/') : 1; + size_t add_slash = base_len ? ((udata->base_grp_name)[base_len - 1] != '/') : 1; + size_t new_name_len = base_len + add_slash + HDstrlen(path) + 1; - if(NULL == (new_name = (char*)HDmalloc(base_len + add_slash + HDstrlen(path) + 1))) + if(NULL == (new_name = (char*)HDmalloc(new_name_len))) return(H5_ITER_ERROR); - HDstrcpy(new_name, udata->base_grp_name); - if (add_slash) - new_name[base_len] = '/'; - HDstrcpy(new_name + base_len + add_slash, path); + if(add_slash) + HDsnprintf(new_name, new_name_len, "%s/%s", udata->base_grp_name, path); + else + HDsnprintf(new_name, new_name_len, "%s%s", udata->base_grp_name, path); full_name = new_name; } /* end if */ else @@ -216,7 +219,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo, if(new_name) HDfree(new_name); return(H5_ITER_ERROR); - } + } /* end if */ /* If the object has multiple links, add it to the list of addresses * already visited, if it isn't there already @@ -231,7 +234,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo, if(new_name) HDfree(new_name); return(H5_ITER_ERROR); - } + } /* end if */ } /* end if */ else { /* Make 'visit link' callback */ @@ -240,7 +243,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo, if(new_name) HDfree(new_name); return(H5_ITER_ERROR); - } + } /* end if */ } /* end else */ if(new_name) @@ -730,7 +733,7 @@ trav_table_add(trav_table_t *table, if(table->nobjs == table->size) { table->size = MAX(1, table->size * 2); - table->objs = (trav_obj_t*)HDrealloc(table->objs, table->size * sizeof(trav_obj_t)); + table->objs = (trav_obj_t *)HDrealloc(table->objs, table->size * sizeof(trav_obj_t)); } /* end if */ new_obj = table->nobjs++; @@ -774,7 +777,7 @@ trav_table_addlink(trav_table_t *table, haddr_t objno, const char *path) /* allocate space if necessary */ if(table->objs[i].nlinks == (unsigned)table->objs[i].sizelinks) { table->objs[i].sizelinks = MAX(1, table->objs[i].sizelinks * 2); - table->objs[i].links = (trav_link_t*)HDrealloc(table->objs[i].links, table->objs[i].sizelinks * sizeof(trav_link_t)); + table->objs[i].links = (trav_link_t *)HDrealloc(table->objs[i].links, table->objs[i].sizelinks * sizeof(trav_link_t)); } /* end if */ /* insert it */ @@ -1168,31 +1171,21 @@ h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start, * * Date: September 5, 2008 * - * Modified: - * Jonathan Kim - * - Moved from h5ls.c to share among tools. (Sep 16, 2010) - * - Renamed from elink_trav_add to symlink_visit_add for both soft and - * external links. (May 25, 2010) - * - Add type parameter to distingush between soft and external link for - * sure, which prevent from mixing up visited link when the target names - * are same between the soft and external link, as code marks with the - * target name. (May 25,2010) - * *------------------------------------------------------------------------- */ herr_t symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, const char *path) { size_t idx; /* Index of address to use */ - void *tmp_ptr; /* Allocate space if necessary */ - if(visited->nused == visited->nalloc) - { + if(visited->nused == visited->nalloc) { + void *tmp_ptr; + visited->nalloc = MAX(1, visited->nalloc * 2); - if(NULL == (tmp_ptr = HDrealloc(visited->objs, visited->nalloc * sizeof(visited->objs[0])))) + if(NULL == (tmp_ptr = HDrealloc(visited->objs, visited->nalloc * sizeof(symlink_trav_path_t)))) return -1; - visited->objs = tmp_ptr; + visited->objs = (symlink_trav_path_t *)tmp_ptr; } /* end if */ /* Append it */ @@ -1202,22 +1195,19 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co visited->objs[idx].file = NULL; visited->objs[idx].path = NULL; - if (type == H5L_TYPE_EXTERNAL) - { - if(NULL == (visited->objs[idx].file = HDstrdup(file))) - { + if(type == H5L_TYPE_EXTERNAL) { + if(NULL == (visited->objs[idx].file = HDstrdup(file))) { visited->nused--; return -1; - } - } + } /* end if */ + } /* end if */ - if(NULL == (visited->objs[idx].path = HDstrdup(path))) - { + if(NULL == (visited->objs[idx].path = HDstrdup(path))) { visited->nused--; - if (visited->objs[idx].file) + if(visited->objs[idx].file) HDfree (visited->objs[idx].file); return -1; - } + } /* end if */ return 0; } /* end symlink_visit_add() */ @@ -1235,16 +1225,6 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co * * Date: September 5, 2008 * - * Modified: - * Jonathan Kim - * - Moved from h5ls.c to share among tools. (Sep 16, 2010) - * - Renamed from elink_trav_visited to symlink_is_visited for both soft and - * external links. (May 25, 2010) - * - Add type parameter to distingush between soft and external link for - * sure, which prevent from mixing up visited link when the target names - * are same between the soft and external link, as code marks with the - * target name. (May 25,2010) - * *------------------------------------------------------------------------- */ hbool_t @@ -1253,21 +1233,19 @@ symlink_is_visited(symlink_trav_t *visited, H5L_type_t type, const char *file, c size_t u; /* Local index variable */ /* Look for symlink */ - for(u = 0; u < visited->nused; u++) - { + for(u = 0; u < visited->nused; u++) { /* Check for symlink values already in array */ /* check type and path pair to distingush between symbolic links */ - if ((visited->objs[u].type == type) && !HDstrcmp(visited->objs[u].path, path)) - { + if((visited->objs[u].type == type) && !HDstrcmp(visited->objs[u].path, path)) { /* if external link, file need to be matched as well */ - if (visited->objs[u].type == H5L_TYPE_EXTERNAL) - { - if (!HDstrcmp(visited->objs[u].file, file)) - return (TRUE); - } + if(visited->objs[u].type == H5L_TYPE_EXTERNAL) + if(!HDstrcmp(visited->objs[u].file, file)) + return(TRUE); + return (TRUE); - } - } + } /* end if */ + } /* end for */ + /* Didn't find symlink */ return(FALSE); } /* end symlink_is_visited() */ diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index 3548c6b..352a9e5 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -51,14 +51,16 @@ typedef enum { /* Struct to keep track of symbolic link targets visited. * Functions: symlink_visit_add() and symlink_is_visited() */ +typedef struct symlink_trav_path_t { + H5L_type_t type; + char *file; + char *path; +} symlink_trav_path_t; + typedef struct symlink_trav_t { size_t nalloc; size_t nused; - struct { - H5L_type_t type; - char *file; - char *path; - } *objs; + symlink_trav_path_t *objs; hbool_t dangle_link; } symlink_trav_t; diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 833e7e5..ed8c315 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_MISC) #----------------------------------------------------------------------------- diff --git a/tools/misc/CMakeTests.cmake b/tools/misc/CMakeTests.cmake index a935c2b..468ff3a 100644 --- a/tools/misc/CMakeTests.cmake +++ b/tools/misc/CMakeTests.cmake @@ -58,7 +58,7 @@ ) # make test dir - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") foreach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES}) set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}") diff --git a/tools/misc/h5repart_gentest.c b/tools/misc/h5repart_gentest.c index 8420da5..f7d9a73 100644 --- a/tools/misc/h5repart_gentest.c +++ b/tools/misc/h5repart_gentest.c @@ -23,7 +23,6 @@ #include "hdf5.h" #include "H5private.h" -#define KB 1024 #define FAMILY_NUMBER 4 #define FAMILY_SIZE 1024 #define FILENAME "family_file%05d.h5" -- cgit v0.12