From 50c38a5733bf39c2ba2cdb0de4d03e4aa78b1814 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Thu, 5 Mar 2015 15:31:34 -0500 Subject: [svn-r26372] Bring revisions #26195:#26219 from trunk to revise_chunks. h5committested. --- CMakeLists.txt | 2 +- bin/cmakehdf5 | 2 +- c++/CMakeLists.txt | 2 +- c++/examples/CMakeLists.txt | 2 +- c++/src/CMakeLists.txt | 2 +- c++/test/CMakeLists.txt | 2 +- config/cmake/HDF518_Examples.cmake.in | 2 +- configure | 5 ++ configure.ac | 5 ++ examples/CMakeLists.txt | 2 +- fortran/CMakeLists.txt | 2 +- fortran/examples/CMakeLists.txt | 2 +- fortran/src/CMakeLists.txt | 2 +- fortran/src/H5Tf.c | 43 +++++++++++ fortran/src/H5Tff.f90 | 51 ------------ fortran/src/H5Tff_F03.f90 | 107 ++++++++++++++++++++++++++ fortran/src/H5Tff_F90.f90 | 56 ++++++++++++++ fortran/src/H5f90proto.h | 1 + fortran/src/hdf5_fortrandll.def.in | 4 +- fortran/test/CMakeLists.txt | 2 +- fortran/test/tH5T_F03.f90 | 2 +- fortran/testpar/CMakeLists.txt | 2 +- hl/CMakeLists.txt | 2 +- hl/c++/CMakeLists.txt | 2 +- hl/c++/examples/CMakeLists.txt | 2 +- hl/c++/src/CMakeLists.txt | 2 +- hl/c++/test/CMakeLists.txt | 2 +- hl/examples/CMakeLists.txt | 2 +- hl/fortran/CMakeLists.txt | 2 +- hl/fortran/examples/CMakeLists.txt | 2 +- hl/fortran/src/CMakeLists.txt | 2 +- hl/fortran/test/CMakeLists.txt | 2 +- hl/src/CMakeLists.txt | 2 +- hl/test/CMakeLists.txt | 2 +- hl/tools/CMakeLists.txt | 2 +- release_docs/INSTALL_CMake.txt | 2 +- release_docs/USING_HDF5_CMake.txt | 4 +- src/CMakeLists.txt | 2 +- src/H5Dchunk.c | 45 +++++------ src/H5Dint.c | 10 ++- src/H5Dio.c | 2 + src/H5PL.c | 141 ++++++++++++++++++---------------- src/H5private.h | 2 +- test/CMakeLists.txt | 2 +- testpar/CMakeLists.txt | 2 +- tools/CMakeLists.txt | 2 +- tools/h5copy/CMakeLists.txt | 2 +- tools/h5diff/CMakeLists.txt | 2 +- tools/h5dump/CMakeLists.txt | 2 +- tools/h5import/CMakeLists.txt | 2 +- tools/h5jam/CMakeLists.txt | 2 +- tools/h5ls/CMakeLists.txt | 2 +- tools/h5repack/CMakeLists.txt | 2 +- tools/h5stat/CMakeLists.txt | 2 +- tools/lib/CMakeLists.txt | 2 +- tools/misc/CMakeLists.txt | 2 +- tools/perform/CMakeLists.txt | 2 +- 57 files changed, 372 insertions(+), 190 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c16d56..a09ab1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5 C CXX) #----------------------------------------------------------------------------- diff --git a/bin/cmakehdf5 b/bin/cmakehdf5 index ec6357f..c092545 100755 --- a/bin/cmakehdf5 +++ b/bin/cmakehdf5 @@ -279,7 +279,7 @@ EOF #========== #========== cat > $cfgfile <<'EOF' -cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) ######################################################## # This dashboard is maintained by The HDF Group # For any comments please contact cdashhelp@hdfgroup.org diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index 63fc083..39280e8 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_CPP) #----------------------------------------------------------------------------- diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index e3e1077..5ea51a4 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) # -------------------------------------------------------------------- # 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 c0e2f11..513bbb6 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_CPP_SRC) #----------------------------------------------------------------------------- diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index acb2b7f..fe463fa 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_CPP_TEST) # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 1575393..7b7cf0a 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a compressed file # Execute from a command line: diff --git a/configure b/configure index 2d603e6..65f8407 100755 --- a/configure +++ b/configure @@ -7729,6 +7729,11 @@ fi ## Check that time can be used with srcdir. This is okay on most systems, ## but seems to cause problems on Cygwin. ## The solution on Cygwin is not to record execution time for tests. +## +## Note: This is still true as of Cygwin 1.7.32 (Aug 2014) on both 32- +## and 64-bit platforms. Given how long this has been true, it seems +## unlikely to change, but we should probably re-test this periodically. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if srcdir= and time commands work together" >&5 $as_echo_n "checking if srcdir= and time commands work together... " >&6; } diff --git a/configure.ac b/configure.ac index 39a9313..fe07e1e 100644 --- a/configure.ac +++ b/configure.ac @@ -594,6 +594,11 @@ AC_PATH_PROG([TR], [tr]) ## Check that time can be used with srcdir. This is okay on most systems, ## but seems to cause problems on Cygwin. ## The solution on Cygwin is not to record execution time for tests. +## +## Note: This is still true as of Cygwin 1.7.32 (Aug 2014) on both 32- +## and 64-bit platforms. Given how long this has been true, it seems +## unlikely to change, but we should probably re-test this periodically. + AC_MSG_CHECKING([if srcdir= and time commands work together]) AC_SUBST([TIME]) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 4cd72a0..da8174b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_EXAMPLES) #----------------------------------------------------------------------------- diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index 3fe9e7d..c725047 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_F90 C CXX Fortran) if (H5_HAVE_PARALLEL) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 322ae35..1f59f32 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) 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 06b9bed..8c1b45a 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index ca9c30f..b6bcf5f 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -2421,3 +2421,46 @@ h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void return ret_value; } +/****if* H5Tf/h5tenum_insert_ptr_c + * NAME + * /h5tenum_insert_ptr_c + * PURPOSE + * Calls H5Tenum_insert + * INPUTS + * type_id - Datatype identifier for the enumeration datatype. + * name - Datatype identifier. + * value - Pointer to the value of the new member. + * + * OUTPUTS + * + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld + * 2/6/2015 + * + * SOURCE +*/ +int_f +h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value) +/******/ +{ + int ret_value = -1; + hid_t status; + char *c_name; + size_t c_namelen; + + /* + * Convert FORTRAN name to C name + */ + c_namelen = *namelen; + c_name = (char *)HD5f2cstring(name, c_namelen); + if (c_name == NULL) return ret_value; + + status = H5Tenum_insert( (hid_t)*type_id, c_name, value); + if ( status < 0 ) return ret_value; + ret_value = 0; + return ret_value; +} + + diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90 index 0e1dbb0..4b4c0b6 100644 --- a/fortran/src/H5Tff.f90 +++ b/fortran/src/H5Tff.f90 @@ -2335,57 +2335,6 @@ CONTAINS hdferr = h5tenum_create_c(parent_id, new_type_id) END SUBROUTINE h5tenum_create_f - -! -!****s* H5T/h5tenaum_insert_f -! -! NAME -! h5tenaum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_insert_f(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member - INTEGER, INTENT(IN) :: value !value of the new member - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER :: namelen - END FUNCTION h5tenum_insert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f - ! !****s* H5T/h5tenum_nameof_f ! diff --git a/fortran/src/H5Tff_F03.f90 b/fortran/src/H5Tff_F03.f90 index 2405837..beff717 100644 --- a/fortran/src/H5Tff_F03.f90 +++ b/fortran/src/H5Tff_F03.f90 @@ -47,6 +47,11 @@ MODULE H5T_PROVISIONAL !***** + INTERFACE h5tenum_insert_f + MODULE PROCEDURE h5tenum_insert_f03 + MODULE PROCEDURE h5tenum_insert_f90 + END INTERFACE + CONTAINS !****s* H5T (F03)/H5Tconvert_f_F03 @@ -93,6 +98,7 @@ CONTAINS BIND(C, NAME='h5tconvert_c') USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr USE H5GLOBAL + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: src_id INTEGER(HID_T) , INTENT(IN) :: dst_id INTEGER(SIZE_T), INTENT(IN) :: nelmts @@ -111,6 +117,107 @@ CONTAINS hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) END SUBROUTINE h5tconvert_f +! +!****s* (F03) H5T/h5tenaum_insert_f03 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member + INTEGER, INTENT(IN) :: value !value of the new member + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + INTERFACE + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER :: namelen + END FUNCTION h5tenum_insert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f90 + +! +!****s* (F03) H5T/h5tenaum_insert_f03 +! +! NAME +! h5tenum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Pointer to the value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! M. Scot Breitenfeld +! February 6, 2015 +! +! HISTORY +! F2003 implementation of function +! SOURCE + SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR) , INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & + BIND(C, NAME='h5tenum_insert_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + TYPE(C_PTR), VALUE :: value + END FUNCTION h5tenum_insert_ptr_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f03 END MODULE H5T_PROVISIONAL diff --git a/fortran/src/H5Tff_F90.f90 b/fortran/src/H5Tff_F90.f90 index a95b31f..8540d2b 100644 --- a/fortran/src/H5Tff_F90.f90 +++ b/fortran/src/H5Tff_F90.f90 @@ -36,4 +36,60 @@ MODULE H5T_PROVISIONAL + USE H5GLOBAL + +CONTAINS + +! +!****s* H5T/h5tenum_insert_f +! +! NAME +! h5tenaum_insert_f +! +! PURPOSE +! Inserts a new enumeration datatype member. +! +! INPUTS +! type_id - Datatype identifier for the enumeration datatype. +! name - Datatype identifier. +! value - Value of the new member. +! OUTPUTS +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! August 12, 1999 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). March 7, 2001 +! SOURCE + SUBROUTINE h5tenum_insert_f(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER :: namelen + END FUNCTION h5tenum_insert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f + END MODULE H5T_PROVISIONAL diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 284ffbd..b5e40a8 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -772,6 +772,7 @@ H5_FCDLL int_f nh5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen H5_FCDLL int_f nh5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id); H5_FCDLL int_f nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id); H5_FCDLL int_f nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); +H5_FCDLL int_f h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value); H5_FCDLL int_f nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen); H5_FCDLL int_f nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value); H5_FCDLL int_f nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value); diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index c9c5e76..9a6fac5 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -543,7 +543,7 @@ H5T_mp_H5TINSERT_F H5T_mp_H5TPACK_F H5T_mp_H5TARRAY_CREATE_F H5T_mp_H5TENUM_CREATE_F -H5T_mp_H5TENUM_INSERT_F +H5T_PROVISIONAL_mp_H5TENUM_INSERT_F H5T_mp_H5TENUM_NAMEOF_F H5T_mp_H5TENUM_VALUEOF_F H5T_mp_H5TGET_MEMBER_VALUE_F @@ -560,6 +560,8 @@ H5T_mp_H5TGET_CREATE_PLIST_F H5T_mp_H5TCOMPILER_CONV_F H5T_mp_H5TGET_NATIVE_TYPE_F @H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TCONVERT_F +@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F90 +@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TENUM_INSERT_F03 ; H5Z H5Z_mp_H5ZUNREGISTER_F H5Z_mp_H5ZFILTER_AVAIL_F diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index d10f2ef..3b235d4 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90 index f15424d..d9a671c 100644 --- a/fortran/test/tH5T_F03.f90 +++ b/fortran/test/tH5T_F03.f90 @@ -1419,7 +1419,7 @@ SUBROUTINE t_enum(total_error) ! Insert enumerated value for memtype. ! val(1) = i - CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), val(1), error) + CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), C_LOC(val(1)), error) CALL check("H5Tenum_insert_f", error, total_error) ! ! Insert enumerated value for filetype. We must first convert diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 3361220..dfe9ce7 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index e693dd7..031b7d6 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL C CXX) #----------------------------------------------------------------------------- diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt index 9f0aa7e..36f4c30 100644 --- a/hl/c++/CMakeLists.txt +++ b/hl/c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_CPP) #----------------------------------------------------------------------------- diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index 8f9b43f..12c1d50 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_CPP_EXAMPLES) #----------------------------------------------------------------------------- diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 03ef26d..0dee06f 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_CPP_SRC) #----------------------------------------------------------------------------- diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt index 4a7523c..d4e1157 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_CPP_TEST) #----------------------------------------------------------------------------- diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt index 7847dbe..edcb920 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_EXAMPLES ) #----------------------------------------------------------------------------- diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt index c26d94c..d32f85f 100644 --- a/hl/fortran/CMakeLists.txt +++ b/hl/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_F90 C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index 12467b8..bf6a0ca 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index ee8604e..c3a6562 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT(HDF5_HL_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index 120d6a5..fcb0b8c 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 9c9e3a9..f4d5a96 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_SRC) #----------------------------------------------------------------------------- diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 545210b..28c716c 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_TEST) # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index a41aecc..567b3da 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_TOOLS) #----------------------------------------------------------------------------- diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index bc11e20..248f03f 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -632,7 +632,7 @@ platform configuration script. # CTestScript.cmake file. Usage: # "ctest -S HDF518LinuxCmake.cmake -C Release -O hdf518shared.log" ############################################################################ -cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) # this is the location of the source hardcoded to hdf5-1.8.13 set(CTEST_SOURCE_NAME hdf5-1.8.13) diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index 6195dc3..ae62ac9 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -179,7 +179,7 @@ Create a CMakeLists.txt file at the source root. Include the following text in the file: ########################################################## -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5MyApp C CXX) FIND_PACKAGE (HDF5 NAMES hdf5) @@ -232,7 +232,7 @@ ctest # where hdf518Examples is the source folder relative to the location of these scripts ############################################################################ -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1.0 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 019a7f9..0e760a5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_SRC C CXX) #----------------------------------------------------------------------------- diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 1311ba9..66cb87c 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -334,11 +334,10 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsiz FUNC_ENTER_STATIC_TAG(dxpl_id, dset->oloc.addr, FAIL) /* Allocate data space and initialize it if it hasn't been. */ - if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) { + if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) /* Allocate storage */ if(H5D__alloc_storage(dset, dxpl_id, H5D_ALLOC_WRITE, FALSE, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage") - } /* end if */ /* Calculate the index of this chunk */ H5VM_chunk_scaled(dset->shared->ndims, offset, layout->u.chunk.dim, scaled); @@ -381,11 +380,9 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsiz /* Evict the entry from the cache if present, but do not flush * it to disk */ - if(UINT_MAX != udata.idx_hint) { - if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, - rdcc->slot[udata.idx_hint], FALSE) < 0) + if(UINT_MAX != udata.idx_hint) + if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], FALSE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") - } /* end if */ /* Write the data to the file */ if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, data_size, dxpl_id, buf) < 0) @@ -3001,7 +2998,6 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, size_t chunk_size; /*size of a chunk */ hbool_t disable_filters = FALSE; /* Whether to disable filters (when adding to cache) */ void *chunk = NULL; /*the file chunk */ - unsigned u; /*counters */ void *ret_value; /*return value */ FUNC_ENTER_PACKAGE @@ -3029,9 +3025,13 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, ent = rdcc->slot[udata->idx_hint]; #ifndef NDEBUG +{ + unsigned u; /*counters */ + /* Make sure this is the right chunk */ for(u = 0; u < layout->u.chunk.ndims; u++) HDassert(io_info->store->chunk.offset[u] == ent->offset[u]); +} #endif /* NDEBUG */ /* @@ -3286,7 +3286,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to preempt chunk(s) from cache") /* Create a new entry */ - if(NULL == (ent = H5FL_MALLOC(H5D_rdcc_ent_t))) + if(NULL == (ent = H5FL_CALLOC(H5D_rdcc_ent_t))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate raw data chunk entry") ent->locked = 0; @@ -3295,6 +3295,8 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, ent->edge_chunk_state |= H5D_RDCC_NEWLY_DISABLED_FILTERS; ent->dirty = FALSE; ent->deleted = FALSE; + + /* Initialize the new entry */ ent->chunk_addr = chunk_addr; ent->chunk_idx = udata->chunk_idx; HDmemcpy(ent->offset, io_info->store->chunk.offset, sizeof(hsize_t) * layout->u.chunk.ndims); @@ -3312,16 +3314,13 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, rdcc->nused++; /* Add it to the linked list */ - ent->next = NULL; if(rdcc->tail) { rdcc->tail->next = ent; ent->prev = rdcc->tail; rdcc->tail = ent; } /* end if */ - else { + else rdcc->head = rdcc->tail = ent; - ent->prev = NULL; - } /* end else */ ent->tmp_next = NULL; ent->tmp_prev = NULL; @@ -3842,6 +3841,7 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite, /* Make sure the chunk is really in the dataset and outside the * original dimensions */ { + unsigned u; /* Local index variable */ hbool_t outside_orig = FALSE; for(u = 0; u < space_ndims; u++) { HDassert(chunk_offset[u] < space_dim[u]); @@ -4772,8 +4772,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim) / chunk_dim[op_dim]); /* Determine if we need to fill chunks in this dimension */ - if((hssize_t)min_mod_chunk_off[op_dim] - == max_fill_chunk_off[op_dim]) { + if((hssize_t)min_mod_chunk_off[op_dim] == max_fill_chunk_off[op_dim]) { fill_dim[op_dim] = TRUE; has_fill = TRUE; @@ -4822,8 +4821,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim) if(!shrunk_dim[op_dim]) continue; else { - HDassert((hsize_t) max_mod_chunk_off[op_dim] - >= min_mod_chunk_off[op_dim]); + HDassert((hsize_t) max_mod_chunk_off[op_dim] >= min_mod_chunk_off[op_dim]); /* Reset the chunk offset indices */ HDmemset(chunk_offset, 0, (space_ndims * sizeof(chunk_offset[0]))); @@ -4902,11 +4900,9 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim) /* Evict the entry from the cache if present, but do not flush * it to disk */ - if(UINT_MAX != chk_udata.idx_hint) { - if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, - rdcc->slot[chk_udata.idx_hint], FALSE) < 0) + if(UINT_MAX != chk_udata.idx_hint) + if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, rdcc->slot[chk_udata.idx_hint], FALSE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") - } /* end if */ /* Remove the chunk from disk, if present */ if(H5F_addr_defined(chk_udata.addr)) { @@ -4944,8 +4940,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim) } /* end if */ else { /* Check if we just went outside the fill dimension */ - if(!dims_outside_fill[i] && (hssize_t)chunk_offset[i] - > max_fill_chunk_off[i]) { + if(!dims_outside_fill[i] && (hssize_t)chunk_offset[i] > max_fill_chunk_off[i]) { dims_outside_fill[i] = TRUE; ndims_outside_fill++; } /* end if */ @@ -4963,8 +4958,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim) if(min_mod_chunk_off[op_dim] == 0) break; else - max_mod_chunk_off[op_dim] = min_mod_chunk_off[op_dim] - - chunk_dim[op_dim]; + max_mod_chunk_off[op_dim] = min_mod_chunk_off[op_dim] - chunk_dim[op_dim]; } /* end for(op_dim=0...) */ /* Reset any cached chunk info for this dataset */ @@ -4974,10 +4968,9 @@ done: /* Release resources */ if(chunk_space && H5S_close(chunk_space) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace") - if(udata_init) { + if(udata_init) if(udata.fb_info_init && H5D__fill_term(&udata.fb_info) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info") - } /* end if */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__chunk_prune_by_extent() */ diff --git a/src/H5Dint.c b/src/H5Dint.c index c7a4704..c397da5 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1341,6 +1341,7 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id, hid_t dxpl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment object count") } /* end else */ + /* Set the dataset to return */ ret_value = dataset; done: @@ -1382,6 +1383,7 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id) H5O_fill_t *fill_prop; /* Pointer to dataset's fill value info */ unsigned alloc_time_state; /* Allocation time state */ htri_t msg_exists; /* Whether a particular type of message exists */ + hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC_TAG(dxpl_id, dataset->oloc.addr, FAIL) @@ -1423,6 +1425,9 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id) if(H5D__layout_oh_read(dataset, dxpl_id, dapl_id, plist) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout/pline/efl info") + /* Indicate that the layout information was initialized */ + layout_init = TRUE; + /* Point at dataset's copy, to cache it for later */ fill_prop = &dataset->shared->dcpl_cache.fill; @@ -1502,6 +1507,9 @@ done: if(H5F_addr_defined(dataset->oloc.addr) && H5O_close(&(dataset->oloc)) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release object header") if(dataset->shared) { + if(dataset->shared->layout.type == H5D_CHUNKED && layout_init) + if(H5D__chunk_dest(dataset->oloc.file, dxpl_id, dataset) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy chunk cache") if(dataset->shared->space && H5S_close(dataset->shared->space) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace") if(dataset->shared->type) { @@ -2425,7 +2433,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id) && (dset->shared->dcpl_cache.pline.nused > 0)) if(H5D__chunk_update_old_edge_chunks(dset, dxpl_id, curr_dims) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to do update old edge chunks") - } /* end if */ + } /* Mark the dataspace as dirty, for later writing to the file */ if(H5D__mark(dset, dxpl_id, H5D_MARK_SPACE) < 0) diff --git a/src/H5Dio.c b/src/H5Dio.c index e9f6f10..17351ed 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -320,6 +320,8 @@ H5D__pre_write(H5D_t *dset, hbool_t direct_write, hid_t mem_type_id, if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME, &direct_datasize) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data size for direct chunk write") + /* The library's chunking code requires the offset terminates with a zero. So transfer the + * offset array to an internal offset array */ for(u = 0; u < dset->shared->ndims; u++) { /* Make sure the offset doesn't exceed the dataset's dimensions */ if(direct_offset[u] > dset->shared->curr_dims[u]) diff --git a/src/H5PL.c b/src/H5PL.c index 738db90..1806ea6 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -23,11 +23,11 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5PLprivate.h" /* Plugin */ -#include "H5Zprivate.h" /* Filter pipeline */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5PLprivate.h" /* Plugin */ +#include "H5Zprivate.h" /* Filter pipeline */ /****************/ @@ -40,7 +40,19 @@ /* Macros for supporting * both Windows and Unix */ /****************************/ -/* Windows support */ +/* Windows support + * + * SPECIAL WINDOWS NOTE + * + * Some of the Win32 API functions expand to fooA or fooW depending on + * whether UNICODE or _UNICODE are defined. You MUST explicitly use + * the A version of the functions to force char * behavior until we + * work out a scheme for proper Windows Unicode support. + * + * If you do not do this, people will be unable to incorporate our + * source code into their own CMake builds if they define UNICODE. + */ + #ifdef H5_HAVE_WIN32_API #define H5PL_PATH_SEPARATOR ";" @@ -49,7 +61,7 @@ #define H5PL_HANDLE HINSTANCE /* Get a handle to a plugin library. Windows: TEXT macro handles Unicode strings */ -#define H5PL_OPEN_DLIB(S) LoadLibraryEx(TEXT(S), NULL, LOAD_WITH_ALTERED_SEARCH_PATH) +#define H5PL_OPEN_DLIB(S) LoadLibraryExA(S, NULL, LOAD_WITH_ALTERED_SEARCH_PATH) /* Get the address of a symbol in dynamic library */ #define H5PL_GET_LIB_FUNC(H,N) GetProcAddress(H,N) @@ -96,9 +108,9 @@ typedef const void *(*H5PL_get_plugin_info_t)(void); /* Type for the list of info for opened plugin libraries */ typedef struct H5PL_table_t { - H5PL_type_t pl_type; /* plugin type */ - int pl_id; /* ID for the plugin */ - H5PL_HANDLE handle; /* plugin handle */ + H5PL_type_t pl_type; /* plugin type */ + int pl_id; /* ID for the plugin */ + H5PL_HANDLE handle; /* plugin handle */ } H5PL_table_t; @@ -128,8 +140,8 @@ static herr_t H5PL__close(H5PL_HANDLE handle); /*******************/ /* Table for opened plugin libraries */ -static size_t H5PL_table_alloc_g = 0; -static size_t H5PL_table_used_g = 0; +static size_t H5PL_table_alloc_g = 0; +static size_t H5PL_table_used_g = 0; static H5PL_table_t *H5PL_table_g = NULL; /* Table of location paths for plugin libraries */ @@ -173,15 +185,15 @@ H5PL__init_interface(void) /*------------------------------------------------------------------------- - * Function: H5PL_no_plugin + * Function: H5PL_no_plugin * - * Purpose: Quick way for filter module to query whether to load plugin + * Purpose: Quick way for filter module to query whether to load plugin * - * Return: TRUE: No plugin loading during data reading + * Return: TRUE: No plugin loading during data reading * - * FALSE: Load plugin during data reading + * FALSE: Load plugin during data reading * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 20 February 2013 * *------------------------------------------------------------------------- @@ -201,18 +213,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5PL_term_interface + * Function: H5PL_term_interface * - * Purpose: Terminate the H5PL interface: release all memory, reset all - * global variables to initial values. This only happens if all - * types have been destroyed from other interfaces. + * Purpose: Terminate the H5PL interface: release all memory, reset all + * global variables to initial values. This only happens if all + * types have been destroyed from other interfaces. * - * Return: Success: Positive if any action was taken that might - * affect some other interface; zero otherwise. + * Return: Success: Positive if any action was taken that might + * affect some other interface; zero otherwise. * - * Failure: Negative. + * Failure: Negative. * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 20 February 2013 * *------------------------------------------------------------------------- @@ -227,13 +239,13 @@ H5PL_term_interface(void) if(H5_interface_initialize_g) { size_t u; /* Local index variable */ - /* Close opened dynamic libraries */ + /* Close opened dynamic libraries */ for(u = 0; u < H5PL_table_used_g; u++) H5PL__close((H5PL_table_g[u]).handle); - /* Free the table of dynamic libraries */ - H5PL_table_g = (H5PL_table_t *)H5MM_xfree(H5PL_table_g); - H5PL_table_used_g = H5PL_table_alloc_g = 0; + /* Free the table of dynamic libraries */ + H5PL_table_g = (H5PL_table_t *)H5MM_xfree(H5PL_table_g); + H5PL_table_used_g = H5PL_table_alloc_g = 0; /* Free the table of search paths */ for(u = 0; u < H5PL_num_paths_g; u++) @@ -242,7 +254,7 @@ H5PL_term_interface(void) H5PL_num_paths_g = 0; H5PL_path_found_g = FALSE; - H5_interface_initialize_g = 0; + H5_interface_initialize_g = 0; i = 1; } /* end if */ @@ -251,15 +263,15 @@ H5PL_term_interface(void) /*------------------------------------------------------------------------- - * Function: H5PL_load + * Function: H5PL_load * - * Purpose: Given the plugin type and identifier, this function searches + * Purpose: Given the plugin type and identifier, this function searches * and/or loads a dynamic plugin library first among the already * opened libraries then in the designated location paths. * - * Return: Non-NULL on success/NULL on failure + * Return: Non-NULL on success/NULL on failure * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 13 February 2013 * *------------------------------------------------------------------------- @@ -314,13 +326,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5PL__init_path_table + * Function: H5PL__init_path_table * - * Purpose: Initialize the path table. + * Purpose: Initialize the path table. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * 18 March 2013 * *------------------------------------------------------------------------- @@ -369,18 +381,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5PL__find + * Function: H5PL__find * * Purpose: Given a path, this function opens the directory and envokes * another function to go through all files to find the right * plugin library. Two function definitions are for Unix and * Windows. * - * Return: TRUE on success, + * Return: TRUE on success, * FALSE on not found, * negative on failure * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 13 February 2013 * *------------------------------------------------------------------------- @@ -457,17 +469,17 @@ done: static htri_t H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info) { - WIN32_FIND_DATA fdFile; - HANDLE hFind; - char *pathname = NULL; - char service[2048]; - htri_t ret_value = FALSE; + WIN32_FIND_DATAA fdFile; + HANDLE hFind; + char *pathname = NULL; + char service[2048]; + htri_t ret_value = FALSE; FUNC_ENTER_STATIC /* Specify a file mask. *.* = We want everything! */ sprintf(service, "%s\\*.dll", dir); - if((hFind = FindFirstFile(service, &fdFile)) == INVALID_HANDLE_VALUE) + if((hFind = FindFirstFileA(service, &fdFile)) == INVALID_HANDLE_VALUE) HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory") do { @@ -480,7 +492,7 @@ H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info) /* Allocate & initialize the path name */ pathname_len = HDstrlen(dir) + HDstrlen(fdFile.cFileName) + 2; - if(NULL == (pathname = (char *)H5MM_malloc(pathname_len))) + if(NULL == (pathname = (char *)H5MM_malloc(pathname_len))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") HDsnprintf(pathname, pathname_len, "%s\\%s", dir, fdFile.cFileName); @@ -495,10 +507,10 @@ H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info) HGOTO_DONE(TRUE) } /* end if */ else - HDassert(pathname); + HDassert(pathname); pathname = (char *)H5MM_xfree(pathname); } /* end if */ - } while(FindNextFile(hFind, &fdFile)); /* Find the next file. */ + } while(FindNextFileA(hFind, &fdFile)); /* Find the next file. */ done: if(hFind) @@ -512,17 +524,17 @@ done: /*------------------------------------------------------------------------- - * Function: H5PL__open + * Function: H5PL__open * * Purpose: Iterates through all files to find the right plugin library. * It loads the dynamic plugin library and keeps it on the list - * of loaded libraries. + * of loaded libraries. * - * Return: TRUE on success, + * Return: TRUE on success, * FALSE on not found, * negative on failure * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 13 February 2013 * *------------------------------------------------------------------------- @@ -600,16 +612,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5PL__search_table + * Function: H5PL__search_table * * Purpose: Search in the list of already opened dynamic libraries * to see if the one we are looking for is already opened. * - * Return: TRUE on success, + * Return: TRUE on success, * FALSE on not found, * Negative on failure * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 13 February 2013 * *------------------------------------------------------------------------- @@ -631,12 +643,12 @@ H5PL__search_table(H5PL_type_t plugin_type, int type_id, const void **info) const H5Z_class2_t *plugin_info; if(NULL == (get_plugin_info = (H5PL_get_plugin_info_t)H5PL_GET_LIB_FUNC((H5PL_table_g[i]).handle, "H5PLget_plugin_info"))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get function for H5PLget_plugin_info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get function for H5PLget_plugin_info") - if(NULL == (plugin_info = (const H5Z_class2_t *)(*get_plugin_info)())) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get plugin info") + if(NULL == (plugin_info = (const H5Z_class2_t *)(*get_plugin_info)())) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get plugin info") - *info = plugin_info; + *info = plugin_info; HGOTO_DONE(TRUE) } /* end if */ } /* end for */ @@ -648,13 +660,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5PL__close + * Function: H5PL__close * * Purpose: Closes the handle for dynamic library * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 13 February 2013 * *------------------------------------------------------------------------- @@ -668,4 +680,3 @@ H5PL__close(H5PL_HANDLE handle) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5PL__close() */ - diff --git a/src/H5private.h b/src/H5private.h index 1e348cc..9c66296 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -213,7 +213,7 @@ #define MPE_LOG_VARS \ static int eventa(FUNC) = -1; \ static int eventb(FUNC) = -1; \ - char p_event_start[100]; + char p_event_start[128]; /* Hardwire the color to "red", since that's what all the routines are using * now. In the future, if we want to change that color for a given routine, diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b99447a..83f82bd 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TEST) #----------------------------------------------------------------------------- diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index 8c631a3..11437c0 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TEST_PAR) #----------------------------------------------------------------------------- diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 2365326..fd47379 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TOOLS) #----------------------------------------------------------------------------- diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index 267d92b..8c27536 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TOOLS_H5COPY) #----------------------------------------------------------------------------- diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index 35c55a4..f539d20 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TOOLS_H5DIFF) #----------------------------------------------------------------------------- diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 584222e..4559ae3 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TOOLS_H5DUMP) #----------------------------------------------------------------------------- diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index a18133f..2ba2b78 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TOOLS_H5IMPORT) #----------------------------------------------------------------------------- diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index a8e3a7c..412a2f0 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TOOLS_H5JAM) #----------------------------------------------------------------------------- diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index f3749e3..0d163ce 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TOOLS_H5LS) #----------------------------------------------------------------------------- diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index cb8720e..f6c3050 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TOOLS_H5REPACK) #----------------------------------------------------------------------------- diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 0658216..2969405 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TOOLS_H5STAT) #----------------------------------------------------------------------------- diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index ce29208..35ad46e 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TOOLS_LIB) #----------------------------------------------------------------------------- diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 8af05b4..932948d 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_TOOLS_MISC) #----------------------------------------------------------------------------- diff --git a/tools/perform/CMakeLists.txt b/tools/perform/CMakeLists.txt index 0713661..e6abf7f 100644 --- a/tools/perform/CMakeLists.txt +++ b/tools/perform/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.11) +cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_PERFORM ) #----------------------------------------------------------------------------- -- cgit v0.12