From 41010b8d1e12f01a944afc127bb53234497724a8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 23 Jan 2019 17:25:41 -0600 Subject: Update CMake --- config/cmake/HDF5_Examples.cmake.in | 8 ++++++-- config/cmake/patch.xml | 4 ++-- config/cmake_ext_mod/HDFMacros.cmake | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index d30f2ab..bac174a 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -48,7 +48,11 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${ ################################################################## if(NOT DEFINED INSTALLDIR) - set(INSTALLDIR "C:/Program Files/HDF_Group/@HDF5_PACKAGE_NAME@/@HDF5_PACKAGE_VERSION@") + if(WIN32) + set(INSTALLDIR "C:/Program Files/HDF_Group/@HDF5_PACKAGE_NAME@/@HDF5_PACKAGE_VERSION@") + else() + set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") + endif() endif() if(NOT DEFINED CTEST_SOURCE_NAME) @@ -70,7 +74,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) -# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.10-Source") +# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.12.4-Source") #endif() ############################################################################################################### diff --git a/config/cmake/patch.xml b/config/cmake/patch.xml index 70571c5..1bdff3e 100644 --- a/config/cmake/patch.xml +++ b/config/cmake/patch.xml @@ -1,5 +1,5 @@ - + - + diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 147ae2f..ede1e67 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -273,7 +273,7 @@ macro (HDF_README_PROPERTIES target_fortran) set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015") else () set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017") - endif () + endif () else () set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}") endif () -- cgit v0.12 From 62277207a4608284a30a4495eab2da8119fcdbd1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 24 Jan 2019 15:56:42 -0600 Subject: Java html fix and cmake update --- config/cmake_ext_mod/HDFMacros.cmake | 4 ++-- java/src/hdf/hdf5lib/H5.java | 12 +++++------- java/src/hdf/overview.html | 3 +-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index ede1e67..77980c0 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -170,7 +170,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) if (${importtype} MATCHES "IMPORT") set (importprefix "${CMAKE_STATIC_LIBRARY_PREFIX}") endif () - if (${CMAKE_BUILD_TYPE} MATCHES "Debug") + if (${HDF_CFG_NAME} MATCHES "Debug") set (IMPORT_LIB_NAME ${LIB_DEBUG_NAME}) else () set (IMPORT_LIB_NAME ${LIB_RELEASE_NAME}) @@ -397,7 +397,7 @@ macro (HDF_DIR_PATHS package_prefix) ) get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_BUILD_TYPE}) set (CMAKE_PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." ) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 807c613..19ca83b 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -70,8 +70,7 @@ import hdf.hdf5lib.structs.H5O_info_t; * In general, arguments to the HDF Java API are straightforward translations from the 'C' API described in the HDF * Reference Manual. * - *
- * + *
* * * @@ -107,8 +106,7 @@ import hdf.hdf5lib.structs.H5O_info_t; * * *
HDF-5 C types to Java types
HDF-5Special -- see HDFArray
- *
- *
General Rules for Passing Arguments and Results
+ * General Rules for Passing Arguments and Results *

* In general, arguments passed IN to Java are the analogous basic types, as above. The exception is for arrays, * which are discussed below. @@ -143,7 +141,7 @@ import hdf.hdf5lib.structs.H5O_info_t; *

* All the routines where this convention is used will have specific documentation of the details, given below. *

- * Arrays + * Arrays *

* HDF5 needs to read and write multi-dimensional arrays of any number type (and records). The HDF5 API describes the * layout of the source and destination, and the data for the array passed as a block of bytes, for instance, @@ -176,7 +174,7 @@ import hdf.hdf5lib.structs.H5O_info_t; * and the parameter data can be any multi-dimensional array of numbers, such as float[][], or int[][][], or * Double[][]. *

- * HDF-5 Constants + * HDF-5 Constants *

* The HDF-5 API defines a set of constants and enumerated values. Most of these values are available to Java programs * via the class HDF5Constants. For example, the parameters for @@ -196,7 +194,7 @@ import hdf.hdf5lib.structs.H5O_info_t; * The Java application uses both types of constants the same way, the only difference is that the * HDF5CDataTypes may have different values on different platforms. *

- * Error handling and Exceptions + * Error handling and Exceptions *

* The HDF5 error API (H5E) manages the behavior of the error stack in the HDF-5 library. This API is omitted from the * JHI5. Errors are converted into Java exceptions. This is totally different from the C interface, but is very natural diff --git a/java/src/hdf/overview.html b/java/src/hdf/overview.html index edb1b76..e3a032b 100644 --- a/java/src/hdf/overview.html +++ b/java/src/hdf/overview.html @@ -90,8 +90,7 @@ like this: The H5 class automatically loads the native method implementations and the HDF5 library. -

-To Obtain

+

To Obtain

The JHI5 is included with the HDF5 library. -- cgit v0.12 From 37f5c682b66d503d556c1e5fe99c5c0c98f5e7b3 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 24 Jan 2019 16:36:47 -0600 Subject: CMake fix --- config/cmake_ext_mod/HDFMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 77980c0..27d730b 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -397,7 +397,7 @@ macro (HDF_DIR_PATHS package_prefix) ) get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_BUILD_TYPE}) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) set (CMAKE_PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." ) -- cgit v0.12 From 822caec9071019d02da869fe0c9b06f24d88c2d5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 25 Jan 2019 11:36:36 -0600 Subject: Fix CMake on Windows --- config/cmake_ext_mod/HDFMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 27d730b..b3d97ce 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -14,7 +14,7 @@ macro (SET_HDF_BUILD_TYPE) get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(_isMultiConfig) - set(HDF_CFG_NAME ${CTEST_CONFIGURATION_TYPE}) + set(HDF_CFG_NAME \${CTEST_CONFIGURATION_TYPE}) set(HDF_BUILD_TYPE ${CMAKE_CFG_INTDIR}) set(HDF_CFG_BUILD_TYPE \${CMAKE_INSTALL_CONFIG_NAME}) else() -- cgit v0.12 From 3fac85c00d6253f7b2c96ca46c7b9718d0203029 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 25 Jan 2019 09:58:50 -0800 Subject: Fixed a bug identified by valgrind in the cork test. --- test/cork.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/cork.c b/test/cork.c index dceaf5a..240be77 100644 --- a/test/cork.c +++ b/test/cork.c @@ -286,19 +286,19 @@ static unsigned verify_obj_dset_cork(hbool_t swmr) { /* Variable Declarations */ - hid_t fid = -1; /* File ID */ + hid_t fid = -1; /* File ID */ hid_t fapl = -1; /* File access property list */ hid_t aid = -1; /* Attribute ID */ hid_t sid = -1, sid2 = -1; /* Dataspace IDs */ hid_t did = -1, did2 = -1; /* Dataset IDs */ hid_t oid = -1; /* Object ID */ - hid_t dcpl2; /* Dataset creation property list */ + hid_t dcpl2; /* Dataset creation property list */ int i = 0; /* Local index variable */ - hsize_t dim[1] = {100}; /* Dataset dimension size */ + hsize_t dim[1] = {100}; /* Dataset dimension size */ hsize_t chunk_dim[1] = {7}; /* Dataset chunk dimension size */ H5O_info_t oinfo, oinfo2; /* Object metadata information */ char attrname[500]; /* Name of attribute */ - unsigned flags; /* File access flags */ + unsigned flags; /* File access flags */ if(swmr) { TESTING("cork status for dataset objects with attributes (SWMR)"); @@ -341,7 +341,7 @@ verify_obj_dset_cork(hbool_t swmr) TEST_ERROR /* Attach and write to an attribute to the dataset: DSET */ - if((aid = H5Acreate2(did, ATTR, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if((aid = H5Acreate2(did, ATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Verify cork status of the dataset: DSET */ @@ -380,11 +380,11 @@ verify_obj_dset_cork(hbool_t swmr) TEST_ERROR /* Attach 8 attributes to the dataset */ - for(i = 0;i < 8; i++) { - sprintf(attrname, "attr %d", i); - if((aid = H5Acreate2(did2, attrname, H5T_NATIVE_UINT, sid2, H5P_DEFAULT, H5P_DEFAULT)) < 0) + for(i = 0; i < 8; i++) { + HDsprintf(attrname, "attr %d", i); + if((aid = H5Acreate2(did2, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0) + if(H5Awrite(aid, H5T_NATIVE_INT, &i) < 0) TEST_ERROR if(H5Aclose(aid) < 0) TEST_ERROR -- cgit v0.12 From ad906dc708fc803e8c5f17963fafa63591d3cc8d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 25 Jan 2019 15:21:11 -0600 Subject: Invalid position of declaration fixed. --- tools/src/h5repack/h5repack_filters.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index 123263c..3d9472a 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -338,9 +338,10 @@ int apply_filters(const char* name, /* object name from traverse list */ sm_nbytes = msize; for (i = rank; i > 0; --i) { + hsize_t size = 0; if(sm_nbytes == 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "number of bytes per stripmine must be > 0"); - hsize_t size = H5TOOLS_BUFSIZE / sm_nbytes; + size = H5TOOLS_BUFSIZE / sm_nbytes; if (size == 0) /* datum size > H5TOOLS_BUFSIZE */ size = 1; sm_size[i - 1] = MIN(dims[i - 1], size); -- cgit v0.12