From 4cebd8aa6c965fe2e5dde6dbff36b2be3ca58bf1 Mon Sep 17 00:00:00 2001 From: David Young Date: Tue, 26 May 2020 10:43:20 -0500 Subject: Make examples installation respect DESTDIR. Fixes HDFFV-11060. --- c++/examples/Makefile.am | 4 ++-- examples/Makefile.am | 4 ++-- fortran/examples/Makefile.am | 4 ++-- hl/c++/examples/Makefile.am | 4 ++-- hl/examples/Makefile.am | 4 ++-- hl/fortran/examples/Makefile.am | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/c++/examples/Makefile.am b/c++/examples/Makefile.am index 0648504..cbec8f8 100644 --- a/c++/examples/Makefile.am +++ b/c++/examples/Makefile.am @@ -49,8 +49,8 @@ CXX_API=yes # Where to install examples # Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=$(examplesdir)/c++ -EXAMPLETOPDIR=$(examplesdir) +EXAMPLEDIR=${DESTDIR}$(examplesdir)/c++ +EXAMPLETOPDIR=${DESTDIR}$(examplesdir) # How to build programs using h5c++ $(EXTRA_PROG): $(H5CPP) diff --git a/examples/Makefile.am b/examples/Makefile.am index b7850a7..c00f0b9 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -86,8 +86,8 @@ CHECK_CLEANFILES+=$(EXTLINK_DIRS) # Example directory # Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=$(examplesdir)/c -EXAMPLETOPDIR=$(examplesdir) +EXAMPLEDIR=${DESTDIR}$(examplesdir)/c +EXAMPLETOPDIR=${DESTDIR}$(examplesdir) # List dependencies for each program. Normally, automake would take # care of this for us, but if we tell automake about the programs it diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am index fb510bc..474126d 100644 --- a/fortran/examples/Makefile.am +++ b/fortran/examples/Makefile.am @@ -74,8 +74,8 @@ endif # Tell automake how to install examples # Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=$(examplesdir)/fortran -EXAMPLETOPDIR=$(examplesdir) +EXAMPLEDIR=${DESTDIR}$(examplesdir)/fortran +EXAMPLETOPDIR=${DESTDIR}$(examplesdir) # List dependencies for each example. Normally, automake would take # care of this for us, but if we tell automake about the programs it diff --git a/hl/c++/examples/Makefile.am b/hl/c++/examples/Makefile.am index 592e8da..7234bfc 100644 --- a/hl/c++/examples/Makefile.am +++ b/hl/c++/examples/Makefile.am @@ -33,8 +33,8 @@ CXX_API=yes # Where to install examples # Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=$(examplesdir)/hl/c++ -EXAMPLETOPDIR=$(examplesdir)/hl +EXAMPLEDIR=${DESTDIR}$(examplesdir)/hl/c++ +EXAMPLETOPDIR=${DESTDIR}$(examplesdir)/hl # How to build programs using h5c++ $(EXTRA_PROG): $(H5CPP) diff --git a/hl/examples/Makefile.am b/hl/examples/Makefile.am index cc2d671..c9d90dd 100644 --- a/hl/examples/Makefile.am +++ b/hl/examples/Makefile.am @@ -25,8 +25,8 @@ endif # Example directory # Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=$(examplesdir)/hl/c -EXAMPLETOPDIR=$(examplesdir)/hl +EXAMPLEDIR=${DESTDIR}$(examplesdir)/hl/c +EXAMPLETOPDIR=${DESTDIR}$(examplesdir)/hl INSTALL_SCRIPT_FILES = run-hlc-ex.sh INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh diff --git a/hl/fortran/examples/Makefile.am b/hl/fortran/examples/Makefile.am index b81cc6f..32f279c 100644 --- a/hl/fortran/examples/Makefile.am +++ b/hl/fortran/examples/Makefile.am @@ -51,8 +51,8 @@ endif # Tell automake how to install examples # Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR=$(examplesdir)/hl/fortran -EXAMPLETOPDIR=$(examplesdir)/hl +EXAMPLEDIR=${DESTDIR}$(examplesdir)/hl/fortran +EXAMPLETOPDIR=${DESTDIR}$(examplesdir)/hl # List dependencies for each example. Normally, automake would take # care of this for us, but if we tell automake about the programs it -- cgit v0.12 From 03ab219996e562502e90c508e669141b0e601e54 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 26 May 2020 14:01:09 -0700 Subject: Removed trailing space from Fortran files. --- config/cmake/HDFCXXCompilerFlags.cmake | 2 +- fortran/src/H5Aff.F90 | 10 +- fortran/src/H5Dff.F90 | 50 +- fortran/src/H5Eff.F90 | 2 +- fortran/src/H5Fff.F90 | 8 +- fortran/src/H5Gff.F90 | 22 +- fortran/src/H5Iff.F90 | 20 +- fortran/src/H5Lff.F90 | 34 +- fortran/src/H5Off.F90 | 154 +- fortran/src/H5Pff.F90 | 2582 ++++++++++++++++---------------- fortran/src/H5Rff.F90 | 2 +- fortran/src/H5Sff.F90 | 94 +- fortran/src/H5Tff.F90 | 182 +-- fortran/src/H5VLff.F90 | 14 +- fortran/src/H5Zff.F90 | 4 +- fortran/src/H5_buildiface.F90 | 42 +- fortran/src/H5_ff.F90 | 76 +- fortran/src/H5f90global.F90 | 32 +- fortran/src/H5fortkit.F90 | 4 +- fortran/test/H5_test_buildiface.F90 | 16 +- fortran/test/fflush1.F90 | 2 +- fortran/test/fortranlib_test.F90 | 20 +- fortran/test/fortranlib_test_F03.F90 | 16 +- fortran/test/tH5A.F90 | 2 +- fortran/test/tH5A_1_8.F90 | 636 ++++---- fortran/test/tH5D.F90 | 114 +- fortran/test/tH5E_F03.F90 | 6 +- fortran/test/tH5F.F90 | 12 +- fortran/test/tH5F_F03.F90 | 28 +- fortran/test/tH5G_1_8.F90 | 582 +++---- fortran/test/tH5I.F90 | 20 +- fortran/test/tH5L_F03.F90 | 76 +- fortran/test/tH5MISC_1_8.F90 | 76 +- fortran/test/tH5O.F90 | 138 +- fortran/test/tH5O_F03.F90 | 30 +- fortran/test/tH5P.F90 | 138 +- fortran/test/tH5P_F03.F90 | 220 +-- fortran/test/tH5R.F90 | 14 +- fortran/test/tH5S.F90 | 4 +- fortran/test/tH5Sselect.F90 | 438 +++--- fortran/test/tH5T.F90 | 34 +- fortran/test/tH5T_F03.F90 | 608 ++++---- fortran/test/tH5VL.F90 | 4 +- fortran/test/tHDF5_F03.F90 | 2 +- fortran/test/tf.F90 | 30 +- fortran/test/vol_connector.F90 | 8 +- hl/fortran/src/H5DSff.F90 | 68 +- hl/fortran/src/H5HL_buildiface.F90 | 50 +- hl/fortran/src/H5IMff.F90 | 102 +- hl/fortran/src/H5LTff.F90 | 90 +- hl/fortran/src/H5TBff.F90 | 128 +- hl/fortran/test/tstds.F90 | 36 +- hl/fortran/test/tstlite.F90 | 16 +- hl/fortran/test/tsttable.F90 | 14 +- 54 files changed, 3556 insertions(+), 3556 deletions(-) diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 02bf5cd..8527327 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -85,7 +85,7 @@ if (NOT MSVC) list (APPEND H5_CXXFLAGS0 "-Wsign-compare -Wtrigraphs -Wwrite-strings") endif() elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED + if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) # add the general CXX flags for g++ compiler versions 4.8 and above. ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general") diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index abfaae9..f514c37 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -344,7 +344,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN), VALUE :: attr_id END FUNCTION H5Aget_space END INTERFACE - + space_id = H5Aget_space(attr_id) hdferr = 0 @@ -389,7 +389,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN), VALUE :: attr_id END FUNCTION H5Aget_type END INTERFACE - + type_id = H5Aget_type(attr_id) hdferr = 0 @@ -508,7 +508,7 @@ CONTAINS ! Returns attribute name size, ! -1 if fail INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, ! of the attribute !***** INTEGER(HID_T) :: lapl_id_default @@ -1766,7 +1766,7 @@ CONTAINS ! up to 7 dimensions. ! ! Fortran2003 Interface: -!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, hdferr) +!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, hdferr) !! INTEGER(HID_T) , INTENT(IN) :: attr_id !! INTEGER(HID_T) , INTENT(IN) :: memtype_id !! TYPE(C_PTR) , INTENT(IN) :: buf @@ -1851,7 +1851,7 @@ CONTAINS ! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers ! up to 7 dimensions. ! Fortran2003 Interface: -!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, hdferr) +!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, hdferr) !! INTEGER(HID_T) , INTENT(IN) :: attr_id !! INTEGER(HID_T) , INTENT(IN) :: memtype_id !! TYPE(C_PTR) , INTENT(INOUT) :: buf diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index ec73f60..7128698 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -86,7 +86,7 @@ #include MODULE H5D - + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR USE H5GLOBAL @@ -1088,7 +1088,7 @@ CONTAINS SUBROUTINE h5dget_offset_f(dset_id, offset, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HADDR_T), INTENT(OUT) :: offset + INTEGER(HADDR_T), INTENT(OUT) :: offset INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE @@ -1100,7 +1100,7 @@ CONTAINS END INTERFACE offset = h5dget_offset(dset_id) - + hdferr = 0 ! never returns a function error because C API never returns a function error. END SUBROUTINE h5dget_offset_f @@ -1164,7 +1164,7 @@ CONTAINS ! plist_id - Dataset access property list identifier ! hdferr - Returns 0 if successful and -1 if fails ! -! AUTHOR +! AUTHOR ! M. Scot Breitenfeld ! April 13, 2009 ! @@ -1172,8 +1172,8 @@ CONTAINS SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T), INTENT(OUT) :: plist_id + INTEGER , INTENT(OUT) :: hdferr !***** INTERFACE INTEGER FUNCTION h5dget_access_plist_c(dset_id, plist_id) BIND(C,NAME='h5dget_access_plist_c') @@ -1183,9 +1183,9 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: plist_id END FUNCTION h5dget_access_plist_c END INTERFACE - + hdferr = h5dget_access_plist_c(dset_id, plist_id) - + END SUBROUTINE h5dget_access_plist_f @@ -1295,7 +1295,7 @@ CONTAINS INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - + CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & mem_space_id, file_space_id, xfer_prp) @@ -1483,17 +1483,17 @@ CONTAINS !****s* H5D (F03)/h5dwrite_f_F03 ! -! NAME +! NAME ! h5dwrite_f_F03 ! ! PURPOSE -! Writes raw data from a dataset into a buffer. +! Writes raw data from a dataset into a buffer. ! ! Inputs: ! dset_id - Identifier of the dataset to write to. ! mem_type_id - Identifier of the memory datatype. ! buf - Buffer with data to be written to the file. -! +! ! Outputs: ! hdferr - Returns 0 if successful and -1 if fails ! @@ -1548,16 +1548,16 @@ CONTAINS !****s* H5D (F03)/h5dread_f_F03 ! -! NAME +! NAME ! h5dread_f_F03 ! ! PURPOSE -! Reads raw data from a dataset into a buffer. +! Reads raw data from a dataset into a buffer. ! ! Inputs: ! dset_id - Identifier of the dataset read from. ! mem_type_id - Identifier of the memory datatype. -! +! ! Outputs: ! buf - Buffer to receive data read from file. ! hdferr - Returns 0 if successful and -1 if fails @@ -1612,10 +1612,10 @@ CONTAINS END SUBROUTINE h5dread_ptr ! -! NAME +! NAME ! h5dfill_integer ! -! PURPOSE +! PURPOSE ! Fills dataspace elements with a fill value in a memory buffer. ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes ! of the fillvalues and buffers are supported. Buffer and fillvalue @@ -1786,10 +1786,10 @@ CONTAINS END SUBROUTINE h5dfill_c_long_double #endif ! -! NAME +! NAME ! h5dfill_char ! -! PURPOSE +! PURPOSE ! Fills dataspace elements with a fill value in a memory buffer. ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes ! of the fillvalues and buffers are supported. Buffer and fillvalue @@ -1835,15 +1835,15 @@ CONTAINS ! NAME ! h5dvlen_reclaim_f ! -! PURPOSE -! Reclaims VL datatype memory buffers. +! PURPOSE +! Reclaims VL datatype memory buffers. ! ! Inputs: ! -! type_id - Identifier of the datatype. -! space_id - Identifier of the dataspace. -! plist_id - Identifier of the property list used to create the buffer. -! buf - Pointer to the buffer to be reclaimed. +! type_id - Identifier of the datatype. +! space_id - Identifier of the dataspace. +! plist_id - Identifier of the property list used to create the buffer. +! buf - Pointer to the buffer to be reclaimed. ! ! Outputs: ! hdferr - Returns 0 if successful and -1 if fails diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90 index 435d967..1e94c7a 100644 --- a/fortran/src/H5Eff.F90 +++ b/fortran/src/H5Eff.F90 @@ -254,7 +254,7 @@ CONTAINS ! estack_id - Error stack identifier. ! func - Function to be called upon an error condition. ! client_data - Data passed to the error function -! +! ! Outputs: ! hdferr - Returns 0 if successful and -1 if fails ! diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 index 62e8de8..d74400c 100644 --- a/fortran/src/H5Fff.F90 +++ b/fortran/src/H5Fff.F90 @@ -690,7 +690,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(OUT) :: obj_count END FUNCTION h5fget_obj_count_c END INTERFACE - + hdferr = h5fget_obj_count_c(file_id, obj_type, obj_count) ! Don't include objects created by H5open in the H5F_OBJ_ALL_F count @@ -929,7 +929,7 @@ CONTAINS ! h5fget_file_image_f ! ! PURPOSE -! Retrieves a copy of the image of an existing, open file. +! Retrieves a copy of the image of an existing, open file. ! ! INPUTS ! file_id - Target file identifier. @@ -939,7 +939,7 @@ CONTAINS ! OUTPUTS ! hdferr - error code: ! 0 on success and -1 on failure -! OPTIONAL PARAMETERS +! OPTIONAL PARAMETERS ! buf_size - Returns the size in bytes of the buffer required to store the file image, ! no data will be copied. ! @@ -1024,7 +1024,7 @@ CONTAINS hdferr = INT(h5fget_dset_no_attrs_hint_c(file_id, c_minimize)) - ! Transfer value of C C_BOOL type to Fortran LOGICAL + ! Transfer value of C C_BOOL type to Fortran LOGICAL minimize = c_minimize END SUBROUTINE h5fget_dset_no_attrs_hint_f diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90 index 0684508..942cc51 100644 --- a/fortran/src/H5Gff.F90 +++ b/fortran/src/H5Gff.F90 @@ -64,11 +64,11 @@ CONTAINS ! gcpl_id - Property list for group creation ! gapl_id - Property list for group access ! -! AUTHOR +! AUTHOR ! Elena Pourmal ! August 12, 1999 ! -! HISTORY +! HISTORY ! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows ! port). March 5, 2001 @@ -668,7 +668,7 @@ CONTAINS !***** INTEGER :: namelen ! Lenghth of the current_name string INTEGER :: new_namelen ! Lenghth of the new_name string - + INTERFACE INTEGER FUNCTION h5gmove_c(loc_id, name, namelen, new_name, new_namelen) BIND(C,NAME='h5gmove_c') IMPORT :: C_CHAR @@ -680,7 +680,7 @@ CONTAINS INTEGER :: new_namelen END FUNCTION h5gmove_c END INTERFACE - + namelen = LEN(name) new_namelen = LEN(new_name) hdferr = h5gmove_c(loc_id, name, namelen, new_name, new_namelen) @@ -716,7 +716,7 @@ CONTAINS !***** INTEGER :: src_namelen ! Length of the current_name string INTEGER :: dst_namelen ! Lenghth of the new_name string - + INTERFACE INTEGER FUNCTION h5gmove2_c(src_loc_id, src_name, src_namelen, & dst_loc_id, dst_name, dst_namelen) BIND(C,NAME='h5gmove2_c') @@ -730,7 +730,7 @@ CONTAINS INTEGER :: dst_namelen END FUNCTION h5gmove2_c END INTERFACE - + src_namelen = LEN(src_name) dst_namelen = LEN(dst_name) hdferr = h5gmove2_c(src_loc_id, src_name, src_namelen, dst_loc_id, dst_name, dst_namelen) @@ -777,7 +777,7 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTEGER :: namelen ! Lenghth of the current_name string - + INTERFACE INTEGER FUNCTION h5gget_linkval_c(loc_id, name, namelen, size, buffer) BIND(C,NAME='h5gget_linkval_c') IMPORT :: C_CHAR, SIZE_T @@ -789,7 +789,7 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buffer END FUNCTION h5gget_linkval_c END INTERFACE - + namelen = LEN(name) hdferr = h5gget_linkval_c(loc_id, name, namelen, size, buffer) END SUBROUTINE h5gget_linkval_f @@ -829,7 +829,7 @@ CONTAINS !***** INTEGER :: namelen ! Lenghth of the current_name string INTEGER :: commentlen ! Lenghth of the comment string - + INTERFACE INTEGER FUNCTION h5gset_comment_c(loc_id, name, namelen, & comment, commentlen) BIND(C,NAME='h5gset_comment_c') @@ -842,7 +842,7 @@ CONTAINS INTEGER :: commentlen END FUNCTION h5gset_comment_c END INTERFACE - + namelen = LEN(name) commentlen = LEN(comment) hdferr = h5gset_comment_c(loc_id, name, namelen, comment, commentlen) @@ -1004,7 +1004,7 @@ CONTAINS ! INPUTS ! group_id - Group identifier ! -! OUTPUTS +! OUTPUTS ! storage_type - Type of storage for links in group ! H5G_STORAGE_TYPE_COMPACT: Compact storage ! H5G_STORAGE_TYPE_DENSE: Indexed storage diff --git a/fortran/src/H5Iff.F90 b/fortran/src/H5Iff.F90 index 351dd4b..d9c3d49 100644 --- a/fortran/src/H5Iff.F90 +++ b/fortran/src/H5Iff.F90 @@ -38,7 +38,7 @@ !***** MODULE H5I - + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR USE H5GLOBAL @@ -305,10 +305,10 @@ CONTAINS ! Check if an ID is valid without producing an error message ! ! INPUTS -! id - identifier -! OUTPUTS +! id - identifier +! OUTPUTS ! valid - status of id as a valid identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! @@ -318,26 +318,26 @@ CONTAINS ! SOURCE SUBROUTINE h5iis_valid_f(id, valid, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: id ! Identifier + INTEGER(HID_T), INTENT(IN) :: id ! Identifier LOGICAL, INTENT(OUT) :: valid ! Status of id as a valid identifier INTEGER, INTENT(OUT) :: hdferr ! Error code !***** INTEGER :: c_valid ! 0 = .false, 1 = .true. - + INTERFACE INTEGER FUNCTION h5iis_valid_c(id, c_valid) BIND(C, NAME='h5iis_valid_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: id ! Identifier + INTEGER(HID_T), INTENT(IN) :: id ! Identifier INTEGER :: c_valid END FUNCTION h5iis_valid_c END INTERFACE - + hdferr = h5iis_valid_c(id, c_valid) - + valid = .FALSE. ! Default IF(c_valid.EQ.1) valid = .TRUE. - + END SUBROUTINE h5iis_valid_f END MODULE H5I diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90 index 66f5b5c..2901a16 100644 --- a/fortran/src/H5Lff.F90 +++ b/fortran/src/H5Lff.F90 @@ -64,10 +64,10 @@ MODULE H5L ! H5L_TYPE_HARD Hard link ! H5L_TYPE_SOFT Soft link ! H5L_TYPE_EXTERNAL External link -! H5L_TYPE_ERROR Error +! H5L_TYPE_ERROR Error !cset specifies the character set in which the link name is encoded. Valid values include the following: ! H5T_CSET_ASCII US ASCII -! H5T_CSET_UTF8 UTF-8 Unicode encoding +! H5T_CSET_UTF8 UTF-8 Unicode encoding CONTAINS @@ -593,7 +593,7 @@ CONTAINS ! link_loc_id - File or group identifier. ! link_name - Name of the link for which information is being sought ! -! OUTPUTS +! OUTPUTS ! NOTE: In C these are contained in the structure H5L_info_t ! ! cset - indicates the character set used for link’s name. @@ -605,8 +605,8 @@ CONTAINS ! H5L_TYPE_EXTERNAL_F - External link ! H5L_TYPE_ERROR_ F - Error ! token - If the link is a hard link, token specifies the object token that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., -! the length of the name of the pointed-to object with a null terminator. +! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., +! the length of the name of the pointed-to object with a null terminator. ! hdferr - Returns 0 if successful and -1 if fails ! ! OPTIONAL PARAMETERS @@ -642,8 +642,8 @@ CONTAINS ! H5L_TYPE_EXTERNAL_F - External link ! H5L_TYPE_ERROR _F - Error TYPE(H5O_TOKEN_T_F), INTENT(OUT), TARGET :: token ! If the link is a hard link, token specifies the object token that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. + INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., + ! the length of the name of the pointed-to object with a null terminator. INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list @@ -701,13 +701,13 @@ CONTAINS ! order - Order within field or index ! n - Link for which to retrieve information ! -! OUTPUTS +! OUTPUTS ! NOTE: In C these are defined as a structure: H5L_info_t ! corder_valid - Indicates whether the creation order data is valid for this attribute ! corder - Is a positive integer containing the creation order of the attribute -! cset - Indicates the character set used for the attribute’s name +! cset - Indicates the character set used for the attribute’s name ! token - If the link is a hard link, token specifies the object token that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., +! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., ! the length of the name of the pointed-to object with a null terminator. ! hdferr - Returns 0 if successful and -1 if fails ! @@ -723,13 +723,13 @@ CONTAINS ! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F ! to ! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F -! MSB January 8, 2010. +! MSB January 8, 2010. ! ! SOURCE SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & link_type, f_corder_valid, corder, cset, token, val_size, hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order ! H5_INDEX_UNKNOWN_F - Unknown index type @@ -747,12 +747,12 @@ CONTAINS ! H5L_TYPE_SOFT_F - Soft link ! H5L_TYPE_EXTERNAL_F - External link ! H5L_TYPE_ERROR _F - Error - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute + LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name TYPE(H5O_TOKEN_T_F), INTENT(OUT), TARGET :: token ! If the link is a hard link, token specifies the object token that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. + INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., + ! the length of the name of the pointed-to object with a null terminator. INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list @@ -1426,11 +1426,11 @@ CONTAINS USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name + CHARACTER(LEN=*), INTENT(IN) :: group_name INTEGER , INTENT(IN) :: index_type INTEGER , INTENT(IN) :: order INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR) , INTENT(IN) :: op + TYPE(C_FUNPTR) , INTENT(IN) :: op TYPE(C_PTR) , INTENT(IN) :: op_data INTEGER , INTENT(OUT) :: return_value INTEGER , INTENT(OUT) :: hdferr diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 index fb17942..d3b02e5 100644 --- a/fortran/src/H5Off.F90 +++ b/fortran/src/H5Off.F90 @@ -92,7 +92,7 @@ MODULE H5O END TYPE space_t TYPE, BIND(C) :: mesg_t - INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header + INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header INTEGER(c_int64_t) :: shared ! Flags to indicate message type is shared in header END TYPE mesg_t @@ -341,13 +341,13 @@ CONTAINS END SUBROUTINE h5oopen_by_token_f ! !****s* H5O/h5ocopy_f -! NAME -! h5ocopy_f +! NAME +! h5ocopy_f ! ! PURPOSE ! Copies an object in an HDF5 file. ! -! Inputs: +! Inputs: ! src_loc_id - Object identifier indicating the location of the source object to be copied. ! src_name - Name of the source object to be copied. ! dst_loc_id - Location identifier specifying the destination. @@ -357,13 +357,13 @@ CONTAINS ! ocpypl_id - Object copy property list. ! lcpl_id - Link creation property list for the new hard link. ! -! Outputs: +! Outputs: ! hdferr - Returns 0 if successful and -1 if fails. ! -! AUTHOR +! AUTHOR ! M. Scot Breitenfeld ! March 14, 2012 -! +! ! Fortran90 Interface: SUBROUTINE h5ocopy_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr, ocpypl_id, lcpl_id) IMPLICIT NONE @@ -411,22 +411,22 @@ CONTAINS END SUBROUTINE h5ocopy_f !****s* H5O/h5odecr_refcount_f -! NAME +! NAME ! h5odecr_refcount_f ! ! PURPOSE -! Decrements an object reference count. +! Decrements an object reference count. ! -! Inputs: +! Inputs: ! object_id - Object identifier. ! -! Outputs: +! Outputs: ! hdferr - Returns 0 if successful and -1 if fails. ! -! AUTHOR +! AUTHOR ! M. Scot Breitenfeld ! May 11, 2012 -! +! ! Fortran90 Interface: SUBROUTINE h5odecr_refcount_f(object_id, hdferr) IMPLICIT NONE @@ -442,33 +442,33 @@ CONTAINS END FUNCTION h5odecr_refcount_c END INTERFACE - hdferr = h5odecr_refcount_c(object_id) + hdferr = h5odecr_refcount_c(object_id) END SUBROUTINE h5odecr_refcount_f !****s* H5O/h5oexists_by_name_f -! NAME +! NAME ! h5oexists_by_name_f ! ! PURPOSE ! Determines whether a link resolves to an actual object. ! ! Inputs: -! loc_id - Identifier of the file or group to query. -! name - The name of the link to check. -! +! loc_id - Identifier of the file or group to query. +! name - The name of the link to check. +! ! ! Optional parameters: ! lapl_id - Link access property list identifier. ! -! Outputs: +! Outputs: ! link_exists - Existing link resolves to an object. ! hdferr - Returns 0 if successful and -1 if fails. ! -! AUTHOR +! AUTHOR ! M. Scot Breitenfeld ! May 11, 2012 -! +! ! Fortran90 Interface: SUBROUTINE h5oexists_by_name_f(loc_id, name, link_exists, hdferr, lapl_id) IMPLICIT NONE @@ -498,7 +498,7 @@ CONTAINS END INTERFACE namelen = LEN(name) - + lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default = lapl_id @@ -517,11 +517,11 @@ CONTAINS END SUBROUTINE h5oexists_by_name_f !****s* H5O/h5oget_comment_f -! NAME +! NAME ! h5oget_comment_f ! ! PURPOSE -! Retrieves comment for specified object. +! Retrieves comment for specified object. ! ! Inputs: ! obj_id - Identifier for the target object. @@ -529,21 +529,21 @@ CONTAINS ! Optional parameters: ! bufsize - Size of the comment buffer. ! -! Outputs: +! Outputs: ! comment - The comment. ! hdferr - Returns 0 if successful and -1 if fails. ! -! AUTHOR +! AUTHOR ! M. Scot Breitenfeld ! May 11, 2012 -! +! ! Fortran90 Interface: SUBROUTINE h5oget_comment_f(obj_id, comment, hdferr, bufsize) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: obj_id CHARACTER(LEN=*) , INTENT(OUT) :: comment INTEGER , INTENT(OUT) :: hdferr - INTEGER(HSSIZE_T), INTENT(OUT), OPTIONAL :: bufsize + INTEGER(HSSIZE_T), INTENT(OUT), OPTIONAL :: bufsize !***** INTEGER(SIZE_T) :: commentsize_default @@ -565,13 +565,13 @@ CONTAINS commentsize_default = LEN(comment) hdferr = h5oget_comment_c(obj_id, comment, commentsize_default, bufsize_default) - + IF(PRESENT(bufsize)) bufsize = bufsize_default END SUBROUTINE h5oget_comment_f !****s* H5O/h5oget_comment_by_name_f -! NAME +! NAME ! h5oget_comment_by_name_f ! ! PURPOSE @@ -579,20 +579,20 @@ CONTAINS ! ! Inputs: ! loc_id - Identifier of a file, group, dataset, or named datatype. -! name - Name of the object whose comment is to be retrieved, -! specified as a path relative to loc_id. +! name - Name of the object whose comment is to be retrieved, +! specified as a path relative to loc_id. ! ! Optional parameters: ! bufsize - Size of the comment buffer. ! -! Outputs: +! Outputs: ! comment - The comment. ! hdferr - Returns 0 if successful and -1 if fails. ! -! AUTHOR +! AUTHOR ! M. Scot Breitenfeld ! July 6, 2012 -! +! ! Fortran90 Interface: SUBROUTINE h5oget_comment_by_name_f(loc_id, name, comment, hdferr, bufsize, lapl_id) IMPLICIT NONE @@ -600,8 +600,8 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: name CHARACTER(LEN=*), INTENT(OUT) :: comment INTEGER , INTENT(OUT) :: hdferr - INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: bufsize - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id + INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: bufsize + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id !***** INTEGER(SIZE_T) :: commentsize_default @@ -632,28 +632,28 @@ CONTAINS hdferr = h5oget_comment_by_name_c(loc_id, name, name_size, & comment, commentsize_default, bufsize_default, lapl_id_default) - + IF(PRESENT(bufsize)) bufsize = bufsize_default END SUBROUTINE h5oget_comment_by_name_f !****s* H5O/h5oincr_refcount_f -! NAME +! NAME ! h5oincr_refcount_f ! ! PURPOSE ! Increments an object reference count. ! -! Inputs: +! Inputs: ! obj_id - Object identifier. ! -! Outputs: +! Outputs: ! hdferr - Returns 0 if successful and -1 if fails. ! -! AUTHOR +! AUTHOR ! M. Scot Breitenfeld ! May 15, 2012 -! +! ! Fortran90 Interface: SUBROUTINE h5oincr_refcount_f(obj_id, hdferr) IMPLICIT NONE @@ -669,7 +669,7 @@ CONTAINS END FUNCTION h5oincr_refcount_c END INTERFACE - hdferr = h5oincr_refcount_c(obj_id) + hdferr = h5oincr_refcount_c(obj_id) END SUBROUTINE h5oincr_refcount_f @@ -679,7 +679,7 @@ CONTAINS ! h5oopen_by_idx_f ! ! PURPOSE -! Open the nth object in a group. +! Open the nth object in a group. ! ! Inputs: ! loc_id - A file or group identifier. @@ -714,7 +714,7 @@ CONTAINS !***** INTEGER(SIZE_T) :: group_namelen INTEGER(HID_T) :: lapl_id_default - + INTERFACE INTEGER FUNCTION h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) & BIND(C,NAME='h5oopen_by_idx_c') @@ -743,23 +743,23 @@ CONTAINS END SUBROUTINE H5Oopen_by_idx_f !****s* H5O/h5oset_comment_f -! NAME +! NAME ! h5oset_comment_f ! ! PURPOSE ! Sets comment for specified object. ! -! Inputs: +! Inputs: ! obj_id - Identifier of the target object. ! comment - The new comment. ! -! Outputs: +! Outputs: ! hdferr - Returns 0 if successful and -1 if fails. ! -! AUTHOR +! AUTHOR ! M. Scot Breitenfeld ! May 15, 2012 -! +! ! Fortran90 Interface: SUBROUTINE h5oset_comment_f(obj_id, comment, hdferr) IMPLICIT NONE @@ -782,34 +782,34 @@ CONTAINS END INTERFACE commentlen = LEN(comment) - + hdferr = h5oset_comment_c(obj_id, comment, commentlen) END SUBROUTINE h5oset_comment_f !****s* H5O/h5oset_comment_by_name_f -! NAME +! NAME ! h5oset_comment_by_name_f ! ! PURPOSE -! Sets comment for specified object. +! Sets comment for specified object. ! -! Inputs: +! Inputs: ! loc_id - Identifier of a file, group, dataset, or named datatype. -! name - Name of the object whose comment is to be set or reset, -! specified as a path relative to loc_id. +! name - Name of the object whose comment is to be set or reset, +! specified as a path relative to loc_id. ! comment - The new comment. ! -! Outputs: +! Outputs: ! hdferr - Returns 0 if successful and -1 if fails. ! ! Optional parameters: ! lapl_id - Link access property list identifier. ! -! AUTHOR +! AUTHOR ! M. Scot Breitenfeld ! May 15, 2012 -! +! ! Fortran90 Interface: SUBROUTINE h5oset_comment_by_name_f(loc_id, name, comment, hdferr, lapl_id) IMPLICIT NONE @@ -843,7 +843,7 @@ CONTAINS lapl_id_default = H5P_DEFAULT_F IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - + hdferr = h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id_default) END SUBROUTINE h5oset_comment_by_name_f @@ -869,7 +869,7 @@ CONTAINS ! op_data - User-defined pointer to data required by the application for its processing of the group ! ! Outputs: -! return_value - returns the return value of the first operator that returns a positive value, or +! return_value - returns the return value of the first operator that returns a positive value, or ! zero if all members were processed with no operator returning non-zero. ! hdferr - Returns 0 if successful and -1 if fails ! @@ -884,14 +884,14 @@ CONTAINS SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr, fields) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: index_type INTEGER, INTENT(IN) :: order TYPE(C_FUNPTR):: op TYPE(C_PTR) :: op_data INTEGER, INTENT(OUT) :: return_value INTEGER, INTENT(OUT) :: hdferr - INTEGER, INTENT(IN), OPTIONAL :: fields + INTEGER, INTENT(IN), OPTIONAL :: fields !***** INTEGER :: fields_c @@ -932,11 +932,11 @@ CONTAINS ! Retrieves the metadata for an object, identifying the object by location and relative name. ! ! Inputs: -! loc_id - File or group identifier specifying location of group +! loc_id - File or group identifier specifying location of group ! in which object is located. ! name - Name of group, relative to loc_id. ! -! Outputs: +! Outputs: ! object_info - Buffer in which to return object information. ! hdferr - Returns 0 if successful and -1 if fails. ! @@ -956,13 +956,13 @@ CONTAINS TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id - INTEGER , INTENT(IN) , OPTIONAL :: fields + INTEGER , INTENT(IN) , OPTIONAL :: fields !***** INTEGER(SIZE_T) :: namelen INTEGER(HID_T) :: lapl_id_default TYPE(C_PTR) :: ptr INTEGER :: fields_c - + INTERFACE INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info, fields) & BIND(C, NAME='h5oget_info_by_name_c') @@ -1022,7 +1022,7 @@ CONTAINS INTEGER(HID_T) , INTENT(IN) :: object_id TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info INTEGER , INTENT(OUT) :: hdferr - INTEGER , INTENT(IN), OPTIONAL :: fields + INTEGER , INTENT(IN), OPTIONAL :: fields !***** TYPE(C_PTR) :: ptr INTEGER :: fields_c @@ -1056,14 +1056,14 @@ CONTAINS ! Retrieves the metadata for an object, identifying the object by an index position. ! ! Inputs: -! loc_id - File or group identifier specifying location of group +! loc_id - File or group identifier specifying location of group ! in which object is located. ! group_name - Name of group in which object is located. ! index_field - Index or field that determines the order. ! order - Order within field or index. ! n - Object for which information is to be returned ! -! Outputs: +! Outputs: ! object_info - Buffer in which to return object information. ! hdferr - Returns 0 if successful and -1 if fails. ! @@ -1089,13 +1089,13 @@ CONTAINS TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id - INTEGER , INTENT(IN) , OPTIONAL :: fields + INTEGER , INTENT(IN) , OPTIONAL :: fields !***** INTEGER(SIZE_T) :: namelen INTEGER(HID_T) :: lapl_id_default TYPE(C_PTR) :: ptr INTEGER :: fields_c - + INTERFACE INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & index_field, order, n, lapl_id_default, object_info, fields) BIND(C, NAME='h5oget_info_by_idx_c') @@ -1137,7 +1137,7 @@ CONTAINS ! ! Inputs: ! loc_id - Identifier of a file or group. -! object_name - Name of the object, generally relative to loc_id, that will serve as root of the iteration +! object_name - Name of the object, generally relative to loc_id, that will serve as root of the iteration ! index_type - Type of index; valid values include: ! H5_INDEX_NAME_F ! H5_INDEX_CRT_ORDER_F @@ -1149,7 +1149,7 @@ CONTAINS ! op_data - User-defined pointer to data required by the application for its processing of the group ! ! Outputs: -! return_value - Returns the return value of the first operator that returns a positive value, or +! return_value - Returns the return value of the first operator that returns a positive value, or ! zero if all members were processed with no operator returning non-zero. ! hdferr - Returns 0 if successful and -1 if fails ! @@ -1167,7 +1167,7 @@ CONTAINS IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: object_name - INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: index_type INTEGER , INTENT(IN) :: order TYPE(C_FUNPTR) :: op @@ -1175,7 +1175,7 @@ CONTAINS INTEGER , INTENT(OUT) :: return_value INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id - INTEGER , INTENT(IN) , OPTIONAL :: fields + INTEGER , INTENT(IN) , OPTIONAL :: fields !***** INTEGER(SIZE_T) :: namelen diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 883e49a..7e06cf3 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -141,7 +141,7 @@ MODULE H5P BIND(C, NAME='h5pget_c') IMPORT :: c_char, c_ptr IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER :: name_len TYPE(C_PTR), VALUE :: value @@ -178,12 +178,12 @@ MODULE H5P CONTAINS -!****s* H5P/h5pcreate_f +!****s* H5P/h5pcreate_f ! NAME -! h5pcreate_f +! h5pcreate_f ! ! PURPOSE -! Creates a new property as an instance of a property +! Creates a new property as an instance of a property ! list class. ! ! INPUTS @@ -208,18 +208,18 @@ CONTAINS ! ! OUTPUTS ! prp_id - property list identifier -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! ! Fortran90 Interface: SUBROUTINE h5pcreate_f(class, prp_id, hdferr) @@ -238,15 +238,15 @@ CONTAINS END FUNCTION h5pcreate_c END INTERFACE - hdferr = h5pcreate_c(class, prp_id) + hdferr = h5pcreate_c(class, prp_id) END SUBROUTINE h5pcreate_f -!****s* H5P/h5pset_preserve_f +!****s* H5P/h5pset_preserve_f ! NAME -! h5pset_preserve_f +! h5pset_preserve_f ! ! PURPOSE -! Sets the dataset transfer property list status to +! Sets the dataset transfer property list status to ! TRUE or FALSE for initializing compound datatype ! members during write/read operations. ! @@ -262,20 +262,20 @@ CONTAINS ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Datatype of the flag parameter is changed from +! port). March 14, 2001 +! +! Datatype of the flag parameter is changed from ! INTEGER to LOGICAL June 4, 2003 ! ! Fortran90 Interface: SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier LOGICAL, INTENT(IN) :: flag ! TRUE/FALSE flag to set the dataset ! transfer property for partila writing/reading ! compound datatype @@ -295,12 +295,12 @@ CONTAINS END INTERFACE flag_c = 0 IF(flag) flag_c = 1 - hdferr = h5pset_preserve_c(prp_id, flag_c) + hdferr = h5pset_preserve_c(prp_id, flag_c) END SUBROUTINE h5pset_preserve_f -!****s* H5P/h5pget_preserve_f +!****s* H5P/h5pget_preserve_f ! NAME -! h5pget_preserve_f +! h5pget_preserve_f ! ! PURPOSE ! Checks status of the dataset transfer property list. @@ -310,26 +310,26 @@ CONTAINS ! ! OUTPUTS ! flag - status flag -! hdferr - error code +! hdferr - error code ! Success: 0 ! Failure: -1 ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows ! port). March 14, 2001 -! -! Datatype of the flag parameter is changed from -! INTEGER to LOGICAL -! June 4, 2003 -! +! +! Datatype of the flag parameter is changed from +! INTEGER to LOGICAL +! June 4, 2003 +! ! Fortran90 Interface: SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag. Shows status of the dataset's ! transfer property for partial writing/reading ! compound datatype @@ -347,15 +347,15 @@ CONTAINS INTEGER :: flag_c END FUNCTION h5pget_preserve_c END INTERFACE - - hdferr = h5pget_preserve_c(prp_id, flag_c) + + hdferr = h5pget_preserve_c(prp_id, flag_c) flag = .FALSE. IF(flag_c .EQ. 1) flag = .TRUE. END SUBROUTINE h5pget_preserve_f -!****s* H5P/h5pget_class_f +!****s* H5P/h5pget_class_f ! NAME -! h5pget_class_f +! h5pget_class_f ! ! PURPOSE ! Returns the property list class for a property list. @@ -365,24 +365,24 @@ CONTAINS ! ! OUTPUTS ! classtype - property list class -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! ! Fortran90 Interface: SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: classtype ! The type of the property list + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: classtype ! The type of the property list ! to be created. INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -394,42 +394,42 @@ CONTAINS IMPORT :: HID_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: classtype + INTEGER(HID_T), INTENT(OUT) :: classtype END FUNCTION h5pget_class_c END INTERFACE - hdferr = h5pget_class_c(prp_id, classtype) + hdferr = h5pget_class_c(prp_id, classtype) END SUBROUTINE h5pget_class_f -!****s* H5P/h5pcopy_f +!****s* H5P/h5pcopy_f ! NAME -! h5pcopy_f +! h5pcopy_f ! ! PURPOSE -! Copies an existing property list to create a new +! Copies an existing property list to create a new ! property list ! ! INPUTS ! prp_id - property list identifier ! OUTPUTS ! new_prp_id - new property list identifier -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows ! port). March 14, 2001 ! ! Fortran90 Interface: SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -444,38 +444,38 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: new_prp_id END FUNCTION h5pcopy_c END INTERFACE - + hdferr = h5pcopy_c(prp_id, new_prp_id) END SUBROUTINE h5pcopy_f -!****s* H5P/h5pclose_f +!****s* H5P/h5pclose_f ! NAME -! h5pclose_f +! h5pclose_f ! ! PURPOSE -! Terminates access to a property list. +! Terminates access to a property list. ! ! INPUTS -! prp_id - identifier of the property list to -! terminate access to. +! prp_id - identifier of the property list to +! terminate access to. ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pclose_f(prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -484,45 +484,45 @@ CONTAINS BIND(C,NAME='h5pclose_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id END FUNCTION h5pclose_c END INTERFACE - + hdferr = h5pclose_c(prp_id) END SUBROUTINE h5pclose_f -!****s* H5P/h5pset_chunk_f +!****s* H5P/h5pset_chunk_f ! NAME -! h5pset_chunk_f +! h5pset_chunk_f ! ! PURPOSE -! Sets the size of the chunks used to store -! a chunked layout dataset. +! Sets the size of the chunks used to store +! a chunked layout dataset. ! ! INPUTS ! prp_id - datatset creation property list identifier ! ndims - number of dimensions for each chunk ! dims - array with dimension sizes for each chunk ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims ! Array containing sizes of ! chunk dimensions INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -538,16 +538,16 @@ CONTAINS INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims END FUNCTION h5pset_chunk_c END INTERFACE - + hdferr = h5pset_chunk_c(prp_id, ndims, dims) END SUBROUTINE h5pset_chunk_f -!****s* H5P/h5pget_chunk_f +!****s* H5P/h5pget_chunk_f ! NAME -! h5pget_chunk_f +! h5pget_chunk_f ! ! PURPOSE -! Retrieves the size of chunks for the raw data of a +! Retrieves the size of chunks for the raw data of a ! chunked layout dataset ! ! INPUTS @@ -555,26 +555,26 @@ CONTAINS ! ndims - size of dims array ! OUTPUTS ! dims - array with dimension sizes for each chunk -! hdferr - error code +! hdferr - error code ! Success: number of chunk dimensions ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions to ! to return - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims ! Array containing sizes of ! chunk dimensions INTEGER, INTENT(OUT) :: hdferr ! Error code: @@ -596,19 +596,19 @@ CONTAINS hdferr = h5pget_chunk_c(prp_id, ndims, dims) END SUBROUTINE h5pget_chunk_f -!****s* H5P/h5pset_deflate_f +!****s* H5P/h5pset_deflate_f ! NAME -! h5pset_deflate_f +! h5pset_deflate_f ! ! PURPOSE -! Sets compression method and compression level. +! Sets compression method and compression level. ! ! INPUTS ! prp_id - property list identifier ! level - compression level ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 ! Failure: -1 ! @@ -617,15 +617,15 @@ CONTAINS ! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows ! port). March 14, 2001 -! +! ! Fortran90 Interface: SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: level ! Compression level + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: level ! Compression level INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -643,15 +643,15 @@ CONTAINS END FUNCTION h5pset_deflate_c END INTERFACE hdferr = h5pset_deflate_c(prp_id, level) - + END SUBROUTINE h5pset_deflate_f -!****s* H5P/h5pget_version_f +!****s* H5P/h5pget_version_f ! NAME -! h5pget_version_f +! h5pget_version_f ! ! PURPOSE -! Retrieves the version information of various objects +! Retrieves the version information of various objects ! for a file creation property list ! ! INPUTS @@ -661,24 +661,24 @@ CONTAINS ! freelist - global freelist version number ! stab - symbol table version number ! shhdr - shared object header version number -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +! port). March 14, 2001 +! +! Fortran90 Interface: SUBROUTINE h5pget_version_f(prp_id, boot, freelist, & stab, shhdr, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, DIMENSION(:), INTENT(OUT) :: boot ! Array to put boot ! block version number INTEGER, DIMENSION(:), INTENT(OUT) :: freelist ! Array to put global @@ -698,19 +698,19 @@ CONTAINS IMPORT :: HID_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, DIMENSION(*), INTENT(OUT) :: boot - INTEGER, DIMENSION(*), INTENT(OUT) :: freelist + INTEGER, DIMENSION(*), INTENT(OUT) :: boot + INTEGER, DIMENSION(*), INTENT(OUT) :: freelist INTEGER, DIMENSION(*), INTENT(OUT) :: stab INTEGER, DIMENSION(*), INTENT(OUT) :: shhdr END FUNCTION h5pget_version_c END INTERFACE - + hdferr = h5pget_version_c(prp_id, boot, freelist, stab, shhdr) END SUBROUTINE h5pget_version_f -!****s* H5P/h5pset_userblock_f +!****s* H5P/h5pset_userblock_f ! NAME -! h5pset_userblock_f +! h5pset_userblock_f ! ! PURPOSE ! Sets user block size @@ -720,24 +720,24 @@ CONTAINS ! size - size of the user-block in bytes ! ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! ! Fortran90 Interface: SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -754,38 +754,38 @@ CONTAINS hdferr = h5pset_userblock_c(prp_id, size) END SUBROUTINE h5pset_userblock_f -!****s* H5P/h5pget_userblock_f +!****s* H5P/h5pget_userblock_f ! NAME -! h5pget_userblock_f +! h5pget_userblock_f ! ! PURPOSE ! Gets user block size. ! ! INPUTS -! +! ! prp_id - file creation property list identifier ! OUTPUTS -! +! ! block_size - size of the user block in bytes -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: block_size ! Size of the - ! user-block in bytes + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: block_size ! Size of the + ! user-block in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -801,41 +801,41 @@ CONTAINS hdferr = h5pget_userblock_c(prp_id, block_size) END SUBROUTINE h5pget_userblock_f -!****s* H5P/h5pset_sizes_f +!****s* H5P/h5pset_sizes_f ! NAME -! h5pset_sizes_f +! h5pset_sizes_f ! ! PURPOSE -! Sets the byte size of the offsets and lengths used +! Sets the byte size of the offsets and lengths used ! to address objects in an HDF5 file. ! ! INPUTS ! prp_id - file creation property list identifier -! sizeof_addr - size of an object offset in bytes +! sizeof_addr - size of an object offset in bytes ! sizeof_size - size of an object length in bytes ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object - ! offset in bytes - INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object - ! length in bytes + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object + ! offset in bytes + INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object + ! length in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -844,50 +844,50 @@ CONTAINS BIND(C,NAME='h5pset_sizes_c') IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr INTEGER(SIZE_T), INTENT(IN) :: sizeof_size END FUNCTION h5pset_sizes_c END INTERFACE - + hdferr = h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) END SUBROUTINE h5pset_sizes_f -!****s* H5P/h5pget_sizes_f +!****s* H5P/h5pget_sizes_f ! NAME -! h5pget_sizes_f +! h5pget_sizes_f ! ! PURPOSE -! Retrieves the size of the offsets and lengths used +! Retrieves the size of the offsets and lengths used ! in an HDF5 file ! ! INPUTS ! prp_id - file creation property list identifier ! OUTPUTS -! -! sizeof_addr - size of an object offset in bytes +! +! sizeof_addr - size of an object offset in bytes ! sizeof_size - size of an object length in bytes -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr ! Size of an object - ! offset in bytes + ! offset in bytes INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size ! Size of an object - ! length in bytes + ! length in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -896,49 +896,49 @@ CONTAINS BIND(C,NAME='h5pget_sizes_c') IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size END FUNCTION h5pget_sizes_c END INTERFACE - + hdferr = h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) END SUBROUTINE h5pget_sizes_f -!****s* H5P/h5pset_sym_k_f +!****s* H5P/h5pset_sym_k_f ! NAME -! h5pset_sym_k_f +! h5pset_sym_k_f ! ! PURPOSE -! Sets the size of parameters used to control the +! Sets the size of parameters used to control the !symbol table nodes ! ! INPUTS -! +! ! prp_id - file creation property list identifier ! ik - symbol table tree rank ! lk - symbol table node size ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ik ! Symbol table tree rank - INTEGER, INTENT(IN) :: lk ! Symbol table node size + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(IN) :: ik ! Symbol table tree rank + INTEGER, INTENT(IN) :: lk ! Symbol table node size INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -947,46 +947,46 @@ CONTAINS BIND(C,NAME='h5pset_sym_k_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: ik INTEGER, INTENT(IN) :: lk END FUNCTION h5pset_sym_k_c END INTERFACE - + hdferr = h5pset_sym_k_c(prp_id, ik, lk) END SUBROUTINE h5pset_sym_k_f -!****s* H5P/h5pget_sym_k_f +!****s* H5P/h5pget_sym_k_f ! NAME -! h5pget_sym_k_f +! h5pget_sym_k_f ! ! PURPOSE ! Retrieves the size of the symbol table B-tree 1/2 rank -! and the symbol table leaf node 1/2 size. +! and the symbol table leaf node 1/2 size. ! ! INPUTS -! +! ! prp_id - file creation property list identifier ! OUTPUTS -! +! ! ik - symbol table tree 1/2 rank ! lk - symbol table node 1/2 size -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: ik ! Symbol table tree rank INTEGER, INTENT(OUT) :: lk ! Symbol table node size INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -997,45 +997,45 @@ CONTAINS BIND(C,NAME='h5pget_sym_k_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: ik INTEGER, INTENT(OUT) :: lk END FUNCTION h5pget_sym_k_c END INTERFACE - + hdferr = h5pget_sym_k_c(prp_id, ik, lk) END SUBROUTINE h5pget_sym_k_f -!****s* H5P/h5pset_istore_k_f +!****s* H5P/h5pset_istore_k_f ! NAME -! h5pset_istore_k_f +! h5pset_istore_k_f ! ! PURPOSE -! Sets the size of the parameter used to control the +! Sets the size of the parameter used to control the ! B-trees for indexing chunked datasets ! ! INPUTS -! +! ! prp_id - file creation property list identifier ! ik - 1/2 rank of chunked storage B-tree ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: ik ! 1/2 rank of chunked storage B-tree INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -1049,40 +1049,40 @@ CONTAINS INTEGER, INTENT(IN) :: ik END FUNCTION h5pset_istore_k_c END INTERFACE - + hdferr = h5pset_istore_k_c(prp_id, ik) END SUBROUTINE h5pset_istore_k_f -!****s* H5P/h5pget_istore_k_f +!****s* H5P/h5pget_istore_k_f ! NAME -! h5pget_istore_k_f +! h5pget_istore_k_f ! ! PURPOSE -! Queries the 1/2 rank of an indexed storage B-tree. +! Queries the 1/2 rank of an indexed storage B-tree. ! ! INPUTS -! +! ! prp_id - file creation property list identifier ! OUTPUTS -! +! ! ik - 1/2 rank of chunked storage B-tree -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: ik ! 1/2 rank of chunked storage B-tree INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -1096,41 +1096,41 @@ CONTAINS INTEGER, INTENT(OUT) :: ik END FUNCTION h5pget_istore_k_c END INTERFACE - + hdferr = h5pget_istore_k_c(prp_id, ik) END SUBROUTINE h5pget_istore_k_f -!****s* H5P/h5pget_driver_f +!****s* H5P/h5pget_driver_f ! NAME -! h5pget_driver_f +! h5pget_driver_f ! ! PURPOSE -! Returns low-lever driver identifier. +! Returns low-lever driver identifier. ! ! INPUTS -! -! prp_id - file access or data transfer property -! list identifier. +! +! prp_id - file access or data transfer property +! list identifier. ! OUTPUTS -! +! ! driver - low-level driver identifier -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HID_T), INTENT(OUT) :: driver ! Low-level file driver identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -1144,39 +1144,39 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: driver END FUNCTION h5pget_driver_c END INTERFACE - + hdferr = h5pget_driver_c(prp_id, driver) END SUBROUTINE h5pget_driver_f -!****s* H5P/h5pset_fapl_stdio_f +!****s* H5P/h5pset_fapl_stdio_f ! NAME -! h5pset_fapl_stdio_f +! h5pset_fapl_stdio_f ! ! PURPOSE -! Sets the standard I/O driver. +! Sets the standard I/O driver. ! ! INPUTS -! +! ! prp_id - file access property list identifier ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -1188,34 +1188,34 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: prp_id END FUNCTION h5pset_fapl_stdio_c END INTERFACE - + hdferr = h5pset_fapl_stdio_c(prp_id) END SUBROUTINE h5pset_fapl_stdio_f -!****s* H5P/h5pget_stdio_f +!****s* H5P/h5pget_stdio_f ! NAME -! h5pget_stdio_f +! h5pget_stdio_f ! ! PURPOSE ! NOT AVAILABLE ! ! INPUTS -! +! ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! SOURCE ! SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr) ! @@ -1231,35 +1231,35 @@ CONTAINS ! hdferr = h5pget_stdio_c(prp_id, io) ! END SUBROUTINE h5pget_stdio_f -!****s* H5P/h5pset_fapl_sec2_f +!****s* H5P/h5pset_fapl_sec2_f ! NAME -! h5pset_fapl_sec2_f +! h5pset_fapl_sec2_f ! ! PURPOSE -! Sets the sec2 driver. +! Sets the sec2 driver. ! ! INPUTS -! +! ! prp_id - file access property list identifier ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -1268,38 +1268,38 @@ CONTAINS BIND(C,NAME='h5pset_fapl_sec2_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier END FUNCTION h5pset_fapl_sec2_c END INTERFACE - + hdferr = h5pset_fapl_sec2_c(prp_id) END SUBROUTINE h5pset_fapl_sec2_f -!****s* H5P/h5pget_sec2_f +!****s* H5P/h5pget_sec2_f ! NAME -! h5pget_sec2_f +! h5pget_sec2_f ! ! PURPOSE ! NOT AVAILABLE ! ! INPUTS -! +! ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE! SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) +! port). March 14, 2001 +! +! SOURCE! SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) ! IMPLICIT NONE ! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier ! INTEGER, INTENT(OUT) :: sec2 ! value indicates whether the file @@ -1312,37 +1312,37 @@ CONTAINS ! hdferr = h5pget_sec2_c(prp_id, sec2) ! END SUBROUTINE h5pget_sec2_f -!****s* H5P/h5pset_alignment_f +!****s* H5P/h5pset_alignment_f ! NAME -! h5pset_alignment_f +! h5pset_alignment_f ! ! PURPOSE -! Sets alignment properties of a file access property list. +! Sets alignment properties of a file access property list. ! ! INPUTS -! +! ! prp_id - file access property list identifier -! threshold - threshold value +! threshold - threshold value ! alignment - alignment value ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_alignment_f(prp_id, threshold, alignment, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1358,41 +1358,41 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN) :: alignment END FUNCTION h5pset_alignment_c END INTERFACE - + hdferr = h5pset_alignment_c(prp_id, threshold, alignment) END SUBROUTINE h5pset_alignment_f -!****s* H5P/h5pget_alignment_f +!****s* H5P/h5pget_alignment_f ! NAME -! h5pget_alignment_f +! h5pget_alignment_f ! ! PURPOSE -! Retrieves the current settings for alignment -! properties from a file access property list. +! Retrieves the current settings for alignment +! properties from a file access property list. ! ! INPUTS ! prp_id - file access property list identifier ! ! OUTPUTS -! threshold - threshold value +! threshold - threshold value ! alignment - alignment value -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_alignment_f(prp_id, threshold, alignment, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1408,44 +1408,44 @@ CONTAINS INTEGER(HSIZE_T), INTENT(OUT) :: alignment END FUNCTION h5pget_alignment_c END INTERFACE - + hdferr = h5pget_alignment_c(prp_id, threshold, alignment) END SUBROUTINE h5pget_alignment_f -!****s* H5P/h5pset_fapl_core_f +!****s* H5P/h5pset_fapl_core_f ! NAME -! h5pset_fapl_core_f +! h5pset_fapl_core_f ! ! PURPOSE -! Modifies the file access property list to use the -! H5FD_CORE driver. +! Modifies the file access property list to use the +! H5FD_CORE driver. ! ! INPUTS ! prp_id - file access property list identifier -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. +! increment - size, in bytes, of memory increments +! backing_store - boolean flag indicating whether to write +! the file contents to disk when the file is closed. ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes. LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that - ! entire file contents are flushed to a file + ! entire file contents are flushed to a file ! with the same name as this core file. INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -1456,9 +1456,9 @@ CONTAINS BIND(C,NAME='h5pset_fapl_core_c') IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(IN) :: increment - INTEGER :: backing_store_flag + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: increment + INTEGER :: backing_store_flag END FUNCTION h5pset_fapl_core_c END INTERFACE backing_store_flag = 0 @@ -1466,96 +1466,96 @@ CONTAINS hdferr = h5pset_fapl_core_c(prp_id, increment, backing_store_flag) END SUBROUTINE h5pset_fapl_core_f -!****s* H5P/h5pget_fapl_core_f +!****s* H5P/h5pget_fapl_core_f ! NAME -! h5pget_fapl_core_f +! h5pget_fapl_core_f ! ! PURPOSE -! Queries core file driver properties. +! Queries core file driver properties. ! ! INPUTS ! prp_id - file access property list identifier ! OUTPUTS -! -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. -! hdferr - error code +! +! increment - size, in bytes, of memory increments +! backing_store - boolean flag indicating whether to write +! the file contents to disk when the file is closed. +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes. LOGICAL, INTENT(OUT) :: backing_store ! Flag to indicate that - ! entire file contents are flushed to a file + ! entire file contents are flushed to a file ! with the same name as this core file. INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTEGER :: backing_store_flag + INTEGER :: backing_store_flag INTERFACE INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) & BIND(C,NAME='h5pget_fapl_core_c') IMPORT :: HID_T,SIZE_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: increment - INTEGER :: backing_store_flag + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: increment + INTEGER :: backing_store_flag END FUNCTION h5pget_fapl_core_c END INTERFACE - + hdferr = h5pget_fapl_core_c(prp_id, increment, backing_store_flag) backing_store =.FALSE. IF (backing_store_flag .EQ. 1) backing_store =.TRUE. END SUBROUTINE h5pget_fapl_core_f -!****s* H5P/ h5pset_fapl_family_f +!****s* H5P/ h5pset_fapl_family_f ! NAME -! h5pset_fapl_family_f +! h5pset_fapl_family_f ! ! PURPOSE -! Sets the file access property list to use the family driver. +! Sets the file access property list to use the family driver. ! ! INPUTS ! prp_id - file access property list identifier -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property +! memb_size - size in bytes of each file member +! memb_plist - identifier of the file access property ! list to be used for each family member ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes, ! of each family member - INTEGER(HID_T), INTENT(IN) :: memb_plist ! Identifier of the file - ! access property list for + INTEGER(HID_T), INTENT(IN) :: memb_plist ! Identifier of the file + ! access property list for ! each member of the family INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -1574,39 +1574,39 @@ CONTAINS hdferr = h5pset_fapl_family_c(prp_id, memb_size, memb_plist) END SUBROUTINE h5pset_fapl_family_f -!****s* H5P/h5pget_fapl_family_f +!****s* H5P/h5pget_fapl_family_f ! NAME -! h5pget_fapl_family_f +! h5pget_fapl_family_f ! ! PURPOSE -! Returns file access property list information. +! Returns file access property list information. ! ! INPUTS ! prp_id - file access property list identifier ! OUTPUTS -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property +! memb_size - size in bytes of each file member +! memb_plist - identifier of the file access property ! list to be used for each family member -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes, ! of each family member - INTEGER(HID_T), INTENT(OUT) :: memb_plist ! Identifier of the file - ! access property list for + INTEGER(HID_T), INTENT(OUT) :: memb_plist ! Identifier of the file + ! access property list for ! each member of the family INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -1621,52 +1621,52 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: memb_plist END FUNCTION h5pget_fapl_family_c END INTERFACE - + hdferr = h5pget_fapl_family_c(prp_id, memb_size, memb_plist) END SUBROUTINE h5pget_fapl_family_f -!****s* H5P/h5pset_cache_f +!****s* H5P/h5pset_cache_f ! NAME -! h5pset_cache_f +! h5pset_cache_f ! ! PURPOSE -! Sets the meta data cache and raw data chunk +! Sets the meta data cache and raw data chunk ! cache parameters ! ! INPUTS -! +! ! prp_id - file access property list identifier -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes +! mdc_nelmts - number of elements (objects) in the meta +! data cache +! rdcc_nelmts - number of elements (objects) in the raw +! data chunk cache +! rdcc_nbytes - total size of the raw data chunk cache, in bytes ! rdcc_w0 - preemption policy (0 or 1) ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: mdc_nelmts ! Number of elements (objects) ! in the meta data cache INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts ! Number of elements (objects) ! in the meta data cache - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data - ! chunk cache, in bytes + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data + ! chunk cache, in bytes REAL, INTENT(IN) :: rdcc_w0 ! Preemption policy INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -1677,8 +1677,8 @@ CONTAINS IMPORT :: HID_T, SIZE_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: mdc_nelmts - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts + INTEGER, INTENT(IN) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes REAL, INTENT(IN) :: rdcc_w0 END FUNCTION h5pset_cache_c @@ -1687,50 +1687,50 @@ CONTAINS hdferr = h5pset_cache_c(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) END SUBROUTINE h5pset_cache_f -!****s* H5P/h5pget_cache_f +!****s* H5P/h5pget_cache_f ! NAME -! h5pget_cache_f +! h5pget_cache_f ! ! PURPOSE -! Queries the meta data cache and raw data chunk cache -! parameters. +! Queries the meta data cache and raw data chunk cache +! parameters. ! ! INPUTS ! prp_id - file access property list identifier ! ! OUTPUTS -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes +! mdc_nelmts - number of elements (objects) in the meta +! data cache +! rdcc_nelmts - number of elements (objects) in the raw +! data chunk cache +! rdcc_nbytes - total size of the raw data chunk cache, in bytes ! rdcc_w0 - preemption policy (0 or 1) -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 +! port). March 14, 2001 ! ! Bug fix: type of the rdcc_nelmts parameter should be INTEGER -! instead of INTEGER(SIZE_T) October 10, 2003 -! +! instead of INTEGER(SIZE_T) October 10, 2003 +! ! Fortran90 Interface: SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: mdc_nelmts ! Number of elements (objects) ! in the meta data cache INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts ! Number of elements (objects) ! in the meta data cache - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data - ! chunk cache, in bytes + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data + ! chunk cache, in bytes REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -1741,58 +1741,58 @@ CONTAINS IMPORT :: HID_T, SIZE_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: mdc_nelmts - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts + INTEGER, INTENT(OUT) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes REAL, INTENT(OUT) :: rdcc_w0 END FUNCTION h5pget_cache_c END INTERFACE - + hdferr = h5pget_cache_c(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) END SUBROUTINE h5pget_cache_f -!****s* H5P/h5pset_fapl_split_f +!****s* H5P/h5pset_fapl_split_f ! NAME -! h5pset_fapl_split_f +! h5pset_fapl_split_f ! ! PURPOSE -! Emulates the old split file driver. +! Emulates the old split file driver. ! ! INPUTS -! +! ! prp_id - file access property list identifier -! meta_ext - name of the extension for the metafile +! meta_ext - name of the extension for the metafile ! filename -! meta_plist - identifier of the meta file access property +! meta_plist - identifier of the meta file access property ! list ! raw_ext - name extension for the raw file filename ! raw_plist - identifier of the raw file access property list ! ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: meta_ext ! Name of the extension for ! the metafile filename INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file ! access property list CHARACTER(LEN=*), INTENT(IN) :: raw_ext ! Name extension for the raw file filename - INTEGER(HID_T), INTENT(IN) :: raw_plist ! Identifier of the raw file + INTEGER(HID_T), INTENT(IN) :: raw_plist ! Identifier of the raw file ! access property list INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -1805,10 +1805,10 @@ CONTAINS IMPORT :: HID_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: meta_ext + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: meta_ext INTEGER(HID_T), INTENT(IN) :: meta_plist CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: raw_ext - INTEGER(HID_T), INTENT(IN) :: raw_plist + INTEGER(HID_T), INTENT(IN) :: raw_plist INTEGER :: meta_len, raw_len END FUNCTION h5pset_fapl_split_c END INTERFACE @@ -1818,30 +1818,30 @@ CONTAINS hdferr = h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) END SUBROUTINE h5pset_fapl_split_f -!****s* H5P/h5pget_split_f +!****s* H5P/h5pget_split_f ! NAME -! h5pget_split_f +! h5pget_split_f ! ! PURPOSE ! NOT AVAILABLE ! ! INPUTS -! +! ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! SOURCE ! SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,& ! raw_ext, raw_plist, hdferr) @@ -1870,37 +1870,37 @@ CONTAINS ! raw_ext_size, raw_ext, raw_plist ) ! END SUBROUTINE h5pget_split_f -!****s* H5P/h5pset_gc_references_f +!****s* H5P/h5pset_gc_references_f ! NAME -! h5pset_gc_references_f +! h5pset_gc_references_f ! ! PURPOSE -! Sets garbage collecting references flag. +! Sets garbage collecting references flag. ! ! INPUTS -! +! ! prp_id - file access property list identifier -! gc_reference - flag for stting garbage collection on +! gc_reference - flag for stting garbage collection on ! and off (1 or 0) ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +! port). March 14, 2001 +! +! Fortran90 Interface: SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: gc_reference ! The flag for garbage collecting ! references for the file INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1919,37 +1919,37 @@ CONTAINS hdferr = h5pset_gc_references_c(prp_id, gc_reference) END SUBROUTINE h5pset_gc_references_f -!****s* H5P/h5pget_gc_references_f +!****s* H5P/h5pget_gc_references_f ! NAME -! h5pget_gc_references_f +! h5pget_gc_references_f ! ! PURPOSE -! Returns garbage collecting references setting. +! Returns garbage collecting references setting. ! ! INPUTS -! +! ! prp_id - file access property list identifier ! OUTPUTS -! -! gc_reference - flag for stting garbage collection on +! +! gc_reference - flag for stting garbage collection on ! and off (1 or 0) -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_gc_references_f(prp_id, gc_reference, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: gc_reference ! The flag for garbage collecting ! references for the file INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -1964,20 +1964,20 @@ CONTAINS INTEGER, INTENT(OUT) :: gc_reference END FUNCTION h5pget_gc_references_c END INTERFACE - + hdferr = h5pget_gc_references_c(prp_id, gc_reference) END SUBROUTINE h5pget_gc_references_f -!****s* H5P/h5pset_layout_f +!****s* H5P/h5pset_layout_f ! NAME -! h5pset_layout_f +! h5pset_layout_f ! ! PURPOSE -! Sets the type of storage used store the raw data -! for a dataset. +! Sets the type of storage used store the raw data +! for a dataset. ! ! INPUTS -! +! ! prp_id - data creation property list identifier ! layout - type of storage layout for raw data ! possible values are: @@ -1985,24 +1985,24 @@ CONTAINS ! H5D_CONTIGUOUS_F ! H5D_CHUNKED_F ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: layout ! Type of storage layout for raw data ! possible values are: ! H5D_COMPACT_F @@ -2020,44 +2020,44 @@ CONTAINS INTEGER, INTENT(IN) :: layout END FUNCTION h5pset_layout_c END INTERFACE - + hdferr = h5pset_layout_c(prp_id, layout) END SUBROUTINE h5pset_layout_f -!****s* H5P/h5pget_layout_f +!****s* H5P/h5pget_layout_f ! NAME -! h5pget_layout_f +! h5pget_layout_f ! ! PURPOSE -! Returns the layout of the raw data for a dataset. +! Returns the layout of the raw data for a dataset. ! ! INPUTS -! +! ! prp_id - data creation property list identifier ! OUTPUTS -! +! ! layout - type of storage layout for raw data ! possible values are: ! H5D_COMPACT_F ! H5D_CONTIGUOUS_F ! H5D_CHUNKED_F -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: layout ! Type of storage layout for raw data ! possible values are: ! H5D_COMPACT_F(0) @@ -2075,31 +2075,31 @@ CONTAINS INTEGER, INTENT(OUT) :: layout END FUNCTION h5pget_layout_c END INTERFACE - + hdferr = h5pget_layout_c(prp_id, layout) END SUBROUTINE h5pget_layout_f -!****s* H5P/h5pset_filter_f +!****s* H5P/h5pset_filter_f ! NAME -! h5pset_filter_f +! h5pset_filter_f ! ! PURPOSE -! Adds a filter to the filter pipeline. +! Adds a filter to the filter pipeline. ! ! INPUTS -! -! prp_id - data creation or transfer property list +! +! prp_id - data creation or transfer property list ! identifier -! filter - filter to be added to the pipeline +! filter - filter to be added to the pipeline ! flags - bit vector specifying certain general ! properties of the filter ! cd_nelmts - number of elements in cd_values ! cd_values - auxiliary data for the filter ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal @@ -2108,7 +2108,7 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: filter ! Filter to be added to the pipeline. INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general ! properties of the filter. @@ -2122,48 +2122,48 @@ CONTAINS BIND(C,NAME='h5pset_filter_c') IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(IN) :: flags - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values END FUNCTION h5pset_filter_c END INTERFACE - + hdferr = h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) END SUBROUTINE h5pset_filter_f -!****s* H5P/h5pget_nfilters_f +!****s* H5P/h5pget_nfilters_f ! NAME -! h5pget_nfilters_f +! h5pget_nfilters_f ! ! PURPOSE -! Returns the number of filters in the pipeline. +! Returns the number of filters in the pipeline. ! ! INPUTS -! -! prp_id - data creation or transfer property list +! +! prp_id - data creation or transfer property list ! identifier ! OUTPUTS -! +! ! nfilters - number of filters in the pipeline -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: nfilters ! The number of filters in the pipeline INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -2177,26 +2177,26 @@ CONTAINS INTEGER, INTENT(OUT) :: nfilters END FUNCTION h5pget_nfilters_c END INTERFACE - + hdferr = h5pget_nfilters_c(prp_id, nfilters) END SUBROUTINE h5pget_nfilters_f -!****s* H5P/h5pget_filter_f +!****s* H5P/h5pget_filter_f ! NAME -! h5pget_filter_f +! h5pget_filter_f ! ! PURPOSE ! Returns information about a filter in a pipeline ! ! INPUTS -! -! prp_id - data creation or transfer property list +! +! prp_id - data creation or transfer property list ! identifier ! filter_number - sequence number within the filter -! pipeline of the filter for which +! pipeline of the filter for which ! information is sought ! OUTPUTS -! +! ! filter_id - filter identification number ! flags - bit vector specifying certain general ! properties of the filter @@ -2204,25 +2204,25 @@ CONTAINS ! cd_values - auxiliary data for the filter ! namelen - number of characters in the name buffer ! name - buffer to retrieve filter name -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: filter_number ! Sequence number within the filter - ! pipeline of the filter for which + ! pipeline of the filter for which ! information is sought INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general @@ -2230,7 +2230,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter - INTEGER, INTENT(OUT) :: filter_id ! Filter identification number + INTEGER, INTENT(OUT) :: filter_id ! Filter identification number INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -2247,60 +2247,60 @@ CONTAINS IMPORT :: HID_T, SIZE_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter_number + INTEGER, INTENT(IN) :: filter_number INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values - INTEGER, INTENT(OUT) :: flags + INTEGER, INTENT(OUT) :: flags INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts INTEGER(SIZE_T), INTENT(IN) :: namelen CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name INTEGER, INTENT(OUT) :: filter_id END FUNCTION h5pget_filter_c END INTERFACE - - hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & + + hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & cd_values, namelen, name, filter_id ) END SUBROUTINE h5pget_filter_f -!****s* H5P/h5pset_external_f +!****s* H5P/h5pset_external_f ! NAME -! h5pset_external_f +! h5pset_external_f ! ! PURPOSE -! Adds an external file to the list of external files. +! Adds an external file to the list of external files. ! ! INPUTS -! +! ! prp_id - dataset creation property list identifier ! name - name of external file -! offset - offset in bytes from the beginning of the +! offset - offset in bytes from the beginning of the ! file to the location in the file ! where the data starts -! bytes - size of the external file data. +! bytes - size of the external file data. ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows ! port). March 14, 2001 ! ! Changed type of 'offset' from integer to off_t -- MSB January 9, 2012 -! +! ! Fortran90 Interface: SUBROUTINE h5pset_external_f(prp_id, name, offset, bytes, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an external file - INTEGER(OFF_T), INTENT(IN) :: offset ! Offset, in bytes, from the beginning - ! of the file to the location in the file + INTEGER(OFF_T), INTENT(IN) :: offset ! Offset, in bytes, from the beginning + ! of the file to the location in the file ! where the data starts. - INTEGER(HSIZE_T), INTENT(IN) :: bytes ! Number of bytes reserved in the + INTEGER(HSIZE_T), INTENT(IN) :: bytes ! Number of bytes reserved in the ! file for the data INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -2320,43 +2320,43 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN) :: bytes END FUNCTION h5pset_external_c END INTERFACE - + namelen = LEN(name) hdferr = h5pset_external_c(prp_id, name, namelen, offset, bytes) END SUBROUTINE h5pset_external_f -!****s* H5P/h5pget_external_count_f +!****s* H5P/h5pget_external_count_f ! NAME -! h5pget_external_count_f +! h5pget_external_count_f ! ! PURPOSE -! Returns the number of external files for a dataset. +! Returns the number of external files for a dataset. ! ! INPUTS -! +! ! prp_id - dataset creation property list identifier ! OUTPUTS -! -! count - number of external files for the +! +! count - number of external files for the ! specified dataset -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: count ! Number of external files for the + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER, INTENT(OUT) :: count ! Number of external files for the ! Specified dataset INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -2366,60 +2366,60 @@ CONTAINS BIND(C,NAME='h5pget_external_count_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(OUT) :: count END FUNCTION h5pget_external_count_c END INTERFACE - + hdferr = h5pget_external_count_c(prp_id, count) END SUBROUTINE h5pget_external_count_f -!****s* H5P/h5pget_external_f +!****s* H5P/h5pget_external_f ! NAME -! h5pget_external_f +! h5pget_external_f ! ! PURPOSE -! Returns information about an external file. +! Returns information about an external file. ! ! INPUTS -! +! ! prp_id - dataset creation property list identifier ! OUTPUTS -! -! idx - external file index +! +! idx - external file index ! name_size - maximum size of name array -! name - name of the external file +! name - name of the external file ! name - name of external file -! offset - offset in bytes from the beginning of the +! offset - offset in bytes from the beginning of the ! file to the location in the file ! where the data starts ! bytes - size of the external file data -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows ! port). March 14, 2001 ! ! Changed type of 'offset' from integer to off_t -- MSB January 9, 2012 -! +! ! Fortran90 Interface: SUBROUTINE h5pget_external_f(prp_id, idx, name_size, name, offset,bytes, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: idx ! External file index. - INTEGER(SIZE_T), INTENT(IN) :: name_size ! Maximum length of name array + INTEGER(SIZE_T), INTENT(IN) :: name_size ! Maximum length of name array CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of an external file - INTEGER(OFF_T), INTENT(OUT) :: offset ! Offset, in bytes, from the beginning - ! of the file to the location in the file + INTEGER(OFF_T), INTENT(OUT) :: offset ! Offset, in bytes, from the beginning + ! of the file to the location in the file ! where the data starts. - INTEGER(HSIZE_T), INTENT(OUT) :: bytes ! Number of bytes reserved in the + INTEGER(HSIZE_T), INTENT(OUT) :: bytes ! Number of bytes reserved in the ! file for the data INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -2431,54 +2431,54 @@ CONTAINS IMPORT :: HID_T, SIZE_T, HSIZE_T, OFF_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: idx + INTEGER, INTENT(IN) :: idx INTEGER(SIZE_T), INTENT(IN) :: name_size CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name INTEGER(OFF_T), INTENT(OUT) :: offset INTEGER(HSIZE_T), INTENT(OUT) :: bytes END FUNCTION h5pget_external_c END INTERFACE - + hdferr = h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) END SUBROUTINE h5pget_external_f -!****s* H5P/h5pset_btree_ratios_f +!****s* H5P/h5pset_btree_ratios_f ! NAME -! h5pset_btree_ratios_f +! h5pset_btree_ratios_f ! ! PURPOSE -! Sets B-tree split ratios for a dataset transfer -! property list. +! Sets B-tree split ratios for a dataset transfer +! property list. ! ! INPUTS -! -! prp_id - the dataset transfer property list -! identifier -! left - the B-tree split ratio for left-most nodes +! +! prp_id - the dataset transfer property list +! identifier +! left - the B-tree split ratio for left-most nodes ! middle - the B-tree split ratio for all other nodes ! right - the B-tree split ratio for right-most nodes ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier REAL, INTENT(IN) :: left ! The B-tree split ratio for left-most nodes. - REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes - REAL, INTENT(IN) :: right ! The B-tree split ratio for right-most - ! nodes and lone nodes. + REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes + REAL, INTENT(IN) :: right ! The B-tree split ratio for right-most + ! nodes and lone nodes. INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -2493,7 +2493,7 @@ CONTAINS REAL, INTENT(IN) :: right END FUNCTION h5pset_btree_ratios_c END INTERFACE - + hdferr = h5pset_btree_ratios_c(prp_id, left, middle, right) END SUBROUTINE h5pset_btree_ratios_f @@ -2505,34 +2505,34 @@ CONTAINS ! Gets B-tree split ratios for a dataset transfer property list ! ! INPUTS -! -! prp_id - the dataset transfer property list -! identifier +! +! prp_id - the dataset transfer property list +! identifier ! OUTPUTS -! -! left - the B-tree split ratio for left-most nodes +! +! left - the B-tree split ratio for left-most nodes ! middle - the B-tree split ratio for all other nodes ! right - the B-tree split ratio for right-most nodes -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! August 12, 1999 +! August 12, 1999 ! ! HISTORY -! Explicit Fortran interfaces were added for +! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows -! port). March 14, 2001 -! +! port). March 14, 2001 +! ! Fortran90 Interface: SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier REAL, INTENT(OUT) :: left ! The B-tree split ratio for left-most nodes. - REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes - REAL, INTENT(OUT) :: right ! The B-tree split ratio for right-most + REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes + REAL, INTENT(OUT) :: right ! The B-tree split ratio for right-most ! nodes and lone nodes. INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -2548,43 +2548,43 @@ CONTAINS REAL, INTENT(OUT) :: right END FUNCTION h5pget_btree_ratios_c END INTERFACE - + hdferr = h5pget_btree_ratios_c(prp_id, left, middle, right) END SUBROUTINE h5pget_btree_ratios_f -!****s* H5P/h5pget_fclose_degree_f +!****s* H5P/h5pget_fclose_degree_f ! NAME -! h5pget_fclose_degree_f +! h5pget_fclose_degree_f ! ! PURPOSE ! Returns the degree for the file close behavior. ! ! INPUTS -! +! ! fapl_id - File access property list identifier ! OUTPUTS -! +! ! degree - Possible values are: ! H5F_CLOSE_DEFAULT_F ! H5F_CLOSE_WEAK_F ! H5F_CLOSE_SEMI_F ! H5F_CLOSE_STRONG_F -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! September 26, 2002 +! September 26, 2002 ! ! HISTORY -! -! +! +! ! Fortran90 Interface: SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier - INTEGER, INTENT(OUT) :: degree ! Possible values are: + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier + INTEGER, INTENT(OUT) :: degree ! Possible values are: ! H5F_CLOSE_DEFAULT_F ! H5F_CLOSE_WEAK_F ! H5F_CLOSE_SEMI_F @@ -2601,19 +2601,19 @@ CONTAINS INTEGER, INTENT(OUT) :: degree END FUNCTION h5pget_fclose_degree_c END INTERFACE - - hdferr = h5pget_fclose_degree_c(fapl_id, degree) + + hdferr = h5pget_fclose_degree_c(fapl_id, degree) END SUBROUTINE h5pget_fclose_degree_f -!****s* H5P/h5pset_fclose_degree_f +!****s* H5P/h5pset_fclose_degree_f ! NAME -! h5pset_fclose_degree_f +! h5pset_fclose_degree_f ! ! PURPOSE ! Sets the degree for the file close behavior. ! ! INPUTS -! +! ! fapl_id - file access property list identifier ! degree - Possible values are: ! H5F_CLOSE_DEFAULT_F @@ -2621,19 +2621,19 @@ CONTAINS ! H5F_CLOSE_SEMI_F ! H5F_CLOSE_STRONG_F ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! September 26, 2002 +! September 26, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier - INTEGER, INTENT(IN) :: degree ! Possible values are: + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier + INTEGER, INTENT(IN) :: degree ! Possible values are: ! H5F_CLOSE_DEFAULT_F ! H5F_CLOSE_WEAK_F ! H5F_CLOSE_SEMI_F @@ -2651,43 +2651,43 @@ CONTAINS END FUNCTION h5pset_fclose_degree_c END INTERFACE - hdferr = h5pset_fclose_degree_c(fapl_id, degree) + hdferr = h5pset_fclose_degree_c(fapl_id, degree) END SUBROUTINE h5pset_fclose_degree_f -!****s* H5P/h5pequal_f +!****s* H5P/h5pequal_f ! NAME -! h5pequal_f +! h5pequal_f ! ! PURPOSE ! Checks if two property lists are eqaul ! ! INPUTS -! +! ! plist1_id - property list identifier ! plist2_id - property list identifier ! OUTPUTS -! +! ! flag - flag, possible values ! .TRUE. or .FALSE. -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1, flag is set to .FALSE. +! Failure: -1, flag is set to .FALSE. ! ! AUTHOR ! Elena Pourmal -! September 30, 2002 +! September 30, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier LOGICAL, INTENT(OUT) :: flag ! Flag INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** INTEGER :: c_flag - + INTERFACE INTEGER FUNCTION h5pequal_c(plist1_id, plist2_id, c_flag) & BIND(C,NAME='h5pequal_c') @@ -2700,36 +2700,36 @@ CONTAINS END INTERFACE flag = .FALSE. - hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) + hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) IF (c_flag .GT. 0) flag = .TRUE. END SUBROUTINE h5pequal_f !****s* H5P/h5pset_buffer_f ! NAME -! h5pset_buffer_f +! h5pset_buffer_f ! ! PURPOSE ! Sets sixe for conversion buffer ! ! INPUTS ! plist_id - data transfer property list identifier -! size - buffer size +! size - buffer size ! OUTPUTS -! -! hdferr: - error code +! +! hdferr: - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 2, 2002 +! October 2, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by ! the library. INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -2745,36 +2745,36 @@ CONTAINS END FUNCTION h5pset_buffer_c END INTERFACE - hdferr = h5pset_buffer_c(plist_id, size) + hdferr = h5pset_buffer_c(plist_id, size) END SUBROUTINE h5pset_buffer_f !****s* H5P/h5pget_buffer_f ! NAME -! h5pget_buffer_f +! h5pget_buffer_f ! ! PURPOSE ! Gets size for conversion buffer ! ! INPUTS -! +! ! plist_id - data transfer property list identifier ! OUTPUTS -! -! size - buffer size -! hdferr - error code +! +! size - buffer size +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 2, 2002 +! October 2, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by + INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; + ! buffer is allocated and freed by ! the library. INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -2790,7 +2790,7 @@ CONTAINS END FUNCTION h5pget_buffer_c END INTERFACE - hdferr = h5pget_buffer_c(plist_id, size) + hdferr = h5pget_buffer_c(plist_id, size) END SUBROUTINE h5pget_buffer_f !****s* H5P/h5pfill_value_defined_f @@ -2801,17 +2801,17 @@ CONTAINS ! Check if fill value is defined. ! ! INPUTS -! +! ! plist_id - dataset creation property list identifier ! OUTPUTS -! +! ! flag - fill value status flag ! Possible values are: ! H5D_FILL_VALUE_ERROR_F ! H5D_FILL_VALUE_UNDEFINED_F ! H5D_FILL_VALUE_DEFAULT_F ! H5D_FILL_VALUE_USER_DEFINED_F -! hdferr - error code +! hdferr - error code ! Success: 0 ! Failure: -1 ! @@ -2841,7 +2841,7 @@ CONTAINS END FUNCTION h5pfill_value_defined_c END INTERFACE - hdferr = h5pfill_value_defined_c(plist_id, flag) + hdferr = h5pfill_value_defined_c(plist_id, flag) END SUBROUTINE h5pfill_value_defined_f !****s* H5P/h5pset_alloc_time_f @@ -2852,7 +2852,7 @@ CONTAINS ! Set space allocation time for dataset during creation. ! ! INPUTS -! +! ! plist_id - dataset creation property list identifier ! flag - allocation time flag: ! H5D_ALLOC_TIME_ERROR_F @@ -2861,14 +2861,14 @@ CONTAINS ! H5D_ALLOC_TIME_LATE_F ! H5D_ALLOC_TIME_INCR_F ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 4, 2002 +! October 4, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr) @@ -2882,8 +2882,8 @@ CONTAINS ! H5D_ALLOC_TIME_INCR_F INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - +!***** + INTERFACE INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) & BIND(C,NAME='h5pset_alloc_time_c') @@ -2893,8 +2893,8 @@ CONTAINS INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_alloc_time_c END INTERFACE - - hdferr = h5pset_alloc_time_c(plist_id, flag) + + hdferr = h5pset_alloc_time_c(plist_id, flag) END SUBROUTINE h5pset_alloc_time_f !****s* H5P/h5pget_alloc_time_f @@ -2905,23 +2905,23 @@ CONTAINS ! Get space allocation time for dataset during creation. ! ! INPUTS -! +! ! plist_id - dataset creation property list identifier ! OUTPUTS -! +! ! flag - allocation time flag: ! H5D_ALLOC_TIME_ERROR_F ! H5D_ALLOC_TIME_DEFAULT_F ! H5D_ALLOC_TIME_EARLY_F ! H5D_ALLOC_TIME_LATE_F ! H5D_ALLOC_TIME_INCR_F -! hdferr: - error code +! hdferr: - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 4, 2002 +! October 4, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr) @@ -2946,8 +2946,8 @@ CONTAINS INTEGER, INTENT(OUT) :: flag END FUNCTION h5pget_alloc_time_c END INTERFACE - - hdferr = h5pget_alloc_time_c(plist_id, flag) + + hdferr = h5pget_alloc_time_c(plist_id, flag) END SUBROUTINE h5pget_alloc_time_f !****s* H5P/h5pset_fill_time_f @@ -2958,21 +2958,21 @@ CONTAINS ! Set fill value writing time for dataset ! ! INPUTS -! +! ! plist_id - dataset creation property list identifier ! flag - fill time flag: ! H5D_FILL_TIME_ERROR_F ! H5D_FILL_TIME_ALLOC_F ! H5D_FILL_TIME_NEVER_F ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 4, 2002 +! October 4, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr) @@ -2984,7 +2984,7 @@ CONTAINS ! H5D_FILL_TIME_NEVER_F INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTERFACE INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) & @@ -2995,8 +2995,8 @@ CONTAINS INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_fill_time_c END INTERFACE - - hdferr = h5pset_fill_time_c(plist_id, flag) + + hdferr = h5pset_fill_time_c(plist_id, flag) END SUBROUTINE h5pset_fill_time_f !****s* H5P/h5pget_fill_time_f @@ -3007,11 +3007,11 @@ CONTAINS ! Get fill value writing time for dataset ! ! INPUTS -! +! ! plist_id - dataset creation property list identifier ! OUTPUTS -! -! hdferr: - error code +! +! hdferr: - error code ! Success: 0 ! Failure: -1 ! OPTIONAL PARAMETERS @@ -3022,7 +3022,7 @@ CONTAINS ! H5D_FILL_TIME_NEVER_F ! AUTHOR ! Elena Pourmal -! October 4, 2002 +! October 4, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr) @@ -3034,8 +3034,8 @@ CONTAINS ! H5D_FILL_TIME_NEVER_F INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** - +!***** + INTERFACE INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) & BIND(C,NAME='h5pget_fill_time_c') @@ -3045,36 +3045,36 @@ CONTAINS INTEGER, INTENT(OUT) :: flag END FUNCTION h5pget_fill_time_c END INTERFACE - - hdferr = h5pget_fill_time_c(plist_id, flag) + + hdferr = h5pget_fill_time_c(plist_id, flag) END SUBROUTINE h5pget_fill_time_f -!****s* H5P/ h5pset_meta_block_size_f +!****s* H5P/ h5pset_meta_block_size_f ! NAME -! h5pset_meta_block_size_f +! h5pset_meta_block_size_f ! ! PURPOSE -! Sets the minimum size of metadata block allocations +! Sets the minimum size of metadata block allocations ! ! INPUTS -! +! ! plist_id - file access property list identifier ! size - metatdata block size ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Block size in bytes; + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(IN) :: size ! Block size in bytes; INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -3087,78 +3087,78 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN) :: size END FUNCTION h5pset_meta_block_size_c END INTERFACE - - hdferr = h5pset_meta_block_size_c(plist_id, size) + + hdferr = h5pset_meta_block_size_c(plist_id, size) END SUBROUTINE h5pset_meta_block_size_f -!****s* H5P/h5pget_meta_block_size_f +!****s* H5P/h5pget_meta_block_size_f ! NAME -! h5pget_meta_block_size_f +! h5pget_meta_block_size_f ! ! PURPOSE -! Gets the minimum size of metadata block allocations +! Gets the minimum size of metadata block allocations ! ! INPUTS -! +! ! plist_id - file access property list identifier ! OUTPUTS -! +! ! size - metatdata block size -! hdferr - error code +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Block size in bytes; + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HSIZE_T), INTENT(OUT) :: size ! Block size in bytes; INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** INTERFACE INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) & BIND(C,NAME='h5pget_meta_block_size_c') - IMPORT :: HID_T, HSIZE_T + IMPORT :: HID_T, HSIZE_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER(HSIZE_T), INTENT(OUT) :: size END FUNCTION h5pget_meta_block_size_c END INTERFACE - - hdferr = h5pget_meta_block_size_c(plist_id, size) + + hdferr = h5pget_meta_block_size_c(plist_id, size) END SUBROUTINE h5pget_meta_block_size_f -!****s* H5P/h5pset_sieve_buf_size_f +!****s* H5P/h5pset_sieve_buf_size_f ! NAME -! h5pset_sieve_buf_size_f +! h5pset_sieve_buf_size_f ! ! PURPOSE ! Sets the maximum size of the data sieve buffer ! ! INPUTS -! +! ! plist_id - file access property list identifier ! size - sieve buffer size ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size in bytes; + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size in bytes; INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -3171,36 +3171,36 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: size END FUNCTION h5pset_sieve_buf_size_c END INTERFACE - - hdferr = h5pset_sieve_buf_size_c(plist_id, size) + + hdferr = h5pset_sieve_buf_size_c(plist_id, size) END SUBROUTINE h5pset_sieve_buf_size_f !****s* H5P/h5pget_sieve_buf_size_f ! NAME -! h5pget_sieve_buf_size_f +! h5pget_sieve_buf_size_f ! ! PURPOSE ! Gets the maximum size of the data sieve buffer ! ! INPUTS -! +! ! plist_id - file access property list identifier ! OUTPUTS -! +! ! size - sieve buffer size -! hdferr - error code +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Buffer size in bytes + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(SIZE_T), INTENT(OUT) :: size ! Buffer size in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -3213,35 +3213,35 @@ CONTAINS INTEGER(SIZE_T), INTENT(OUT) :: size END FUNCTION h5pget_sieve_buf_size_c END INTERFACE - - hdferr = h5pget_sieve_buf_size_c(plist_id, size) + + hdferr = h5pget_sieve_buf_size_c(plist_id, size) END SUBROUTINE h5pget_sieve_buf_size_f -!****s* H5P/h5pset_small_data_block_size_f +!****s* H5P/h5pset_small_data_block_size_f ! NAME -! h5pset_small_data_block_size_f +! h5pset_small_data_block_size_f ! ! PURPOSE ! Sets the minimum size of "small" raw data block ! ! INPUTS -! +! ! plist_id - file access property list identifier ! size - small raw data block size ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier INTEGER(HSIZE_T), INTENT(IN) :: size ! Small raw data block size INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -3256,34 +3256,34 @@ CONTAINS END FUNCTION h5pset_small_data_block_size_c END INTERFACE - hdferr = h5pset_small_data_block_size_c(plist_id, size) + hdferr = h5pset_small_data_block_size_c(plist_id, size) END SUBROUTINE h5pset_small_data_block_size_f -!****s* H5P/h5pget_small_data_block_size_f +!****s* H5P/h5pget_small_data_block_size_f ! NAME -! h5pget_small_data_block_size_f +! h5pget_small_data_block_size_f ! ! PURPOSE ! Gets the minimum size of "small" raw data block ! ! INPUTS -! +! ! plist_id - file access property list identifier ! OUTPUTS -! +! ! size - small raw data block size -! hdferr - error code +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier INTEGER(HSIZE_T), INTENT(OUT) :: size ! Small raw data block size INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -3297,35 +3297,35 @@ CONTAINS INTEGER(HSIZE_T), INTENT(OUT) :: size END FUNCTION h5pget_small_data_block_size_c END INTERFACE - - hdferr = h5pget_small_data_block_size_c(plist_id, size) + + hdferr = h5pget_small_data_block_size_c(plist_id, size) END SUBROUTINE h5pget_small_data_block_size_f -!****s* H5P/h5pset_hyper_vector_size_f +!****s* H5P/h5pset_hyper_vector_size_f ! NAME -! h5pset_hyper_vector_size_f +! h5pset_hyper_vector_size_f ! ! PURPOSE ! Set the number of "I/O" vectors (vector size) ! ! INPUTS -! +! ! plist_id - dataset transfer property list identifier ! size - vector size ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier INTEGER(SIZE_T), INTENT(IN) :: size ! Vector size INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -3339,35 +3339,35 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: size END FUNCTION h5pset_hyper_vector_size_c END INTERFACE - - hdferr = h5pset_hyper_vector_size_c(plist_id, size) + + hdferr = h5pset_hyper_vector_size_c(plist_id, size) END SUBROUTINE h5pset_hyper_vector_size_f -!****s* H5P/ h5pget_hyper_vector_size_f +!****s* H5P/ h5pget_hyper_vector_size_f ! NAME -! h5pget_hyper_vector_size_f +! h5pget_hyper_vector_size_f ! ! PURPOSE ! Get the number of "I/O" vectors (vector size) ! ! INPUTS -! +! ! plist_id - dataset transfer property list identifier ! OUTPUTS -! +! ! size - vector size -! hdferr - error code +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 7, 2002 +! October 7, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier INTEGER(SIZE_T), INTENT(OUT) :: size ! Vector size INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -3382,42 +3382,42 @@ CONTAINS END FUNCTION h5pget_hyper_vector_size_c END INTERFACE - hdferr = h5pget_hyper_vector_size_c(plist_id, size) + hdferr = h5pget_hyper_vector_size_c(plist_id, size) END SUBROUTINE h5pget_hyper_vector_size_f -!****s* H5P/h5pexist_f +!****s* H5P/h5pexist_f ! NAME -! h5pexist_f +! h5pexist_f ! ! PURPOSE -! Queries whether a property name exists in a property list or class. +! Queries whether a property name exists in a property list or class. ! ! INPUTS -! +! ! prp_id - property list identifier to query ! name - name of property to check for ! OUTPUTS -! +! ! flag - logical flag -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify LOGICAL, INTENT(OUT) :: flag ! .TRUE. if exists, .FALSE. otherwise INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** INTEGER :: name_len - + INTERFACE INTEGER FUNCTION h5pexist_c(prp_id, name, name_len) & BIND(C,NAME='h5pexist_c') @@ -3438,43 +3438,43 @@ CONTAINS ENDIF END SUBROUTINE h5pexist_f -!****s* H5P/h5pget_size_f +!****s* H5P/h5pget_size_f ! ! NAME -! h5pget_size_f +! h5pget_size_f ! ! PURPOSE ! Queries the size of a property value in bytes. ! ! INPUTS -! +! ! prp_id - property list identifier to query ! name - name of property to query ! OUTPUTS -! +! ! size - size of property in bytes -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! ! HISTORY -! -! +! +! ! Fortran90 Interface: SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to query INTEGER(SIZE_T), INTENT(OUT) :: size ! Size in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** INTEGER :: name_len - + INTERFACE INTEGER FUNCTION h5pget_size_c(prp_id, name, name_len, size) & BIND(C,NAME='h5pget_size_c') @@ -3491,31 +3491,31 @@ CONTAINS hdferr = h5pget_size_c(prp_id, name , name_len, size) END SUBROUTINE h5pget_size_f -!****s* H5P/h5pget_npros_f +!****s* H5P/h5pget_npros_f ! NAME -! h5pget_npros_f +! h5pget_npros_f ! ! PURPOSE ! Queries number of properties in property list or class ! ! INPUTS -! +! ! prp_id - iproperty list identifier to query ! OUTPUTS -! +! ! nprops - number of properties in property object -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(SIZE_T), INTENT(OUT) :: nprops ! Number of properties INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -3532,18 +3532,18 @@ CONTAINS hdferr = h5pget_nprops_c(prp_id, nprops) END SUBROUTINE h5pget_nprops_f -!****s* H5P/h5pget_class_name_f +!****s* H5P/h5pget_class_name_f ! NAME -! h5pget_class_name_f +! h5pget_class_name_f ! ! PURPOSE ! Queries the name of a class. ! ! INPUTS -! +! ! prp_id - property list identifier to query ! OUTPUTS -! +! ! name - name of a class ! size - Actual length of the class name ! NOTE: If provided buffer "name" is smaller, @@ -3551,26 +3551,26 @@ CONTAINS ! provided user buffer. ! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! ! HISTORY -! Returned the size of name as an argument -! +! Returned the size of name as an argument +! ! Fortran90 Interface: SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retireve class name INTEGER, INTENT(OUT) :: size ! Actual length of the class name INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** INTEGER :: name_len - + INTERFACE INTEGER FUNCTION h5pget_class_name_c(prp_id, name, name_len) & BIND(C,NAME='h5pget_class_name_c') @@ -3582,42 +3582,42 @@ CONTAINS INTEGER, INTENT(IN) :: name_len END FUNCTION h5pget_class_name_c END INTERFACE - + name_len = LEN(name) size = h5pget_class_name_c(prp_id, name, name_len) - + hdferr = 0 IF(size.LT.0) hdferr = -1 - + END SUBROUTINE h5pget_class_name_f -!****s* H5P/h5pget_class_parent_f +!****s* H5P/h5pget_class_parent_f ! NAME -! h5pget_class_parent_f +! h5pget_class_parent_f ! ! PURPOSE -! Retrieves the parent class of a genric property class. +! Retrieves the parent class of a genric property class. ! ! INPUTS -! +! ! prp_id - property list identifier to query ! OUTPUTS -! +! ! parent_id - identifier of the parent class -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list - ! identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list + ! identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -3633,32 +3633,32 @@ CONTAINS hdferr = h5pget_class_parent_c(prp_id, parent_id) END SUBROUTINE h5pget_class_parent_f -!****s* H5P/h5pisa_class_f +!****s* H5P/h5pisa_class_f ! NAME -! h5pisa_class_f +! h5pisa_class_f ! ! PURPOSE -! Determines whether a property list is a member of a class. +! Determines whether a property list is a member of a class. ! ! INPUTS -! -! plist - property list identifier +! +! plist - property list identifier ! pclass - identifier of the property class ! OUTPUTS -! +! ! flag - .TRUE. if a member, .FALSE. otherwise -! hdferr: - error code +! hdferr: - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier INTEGER(HID_T), INTENT(IN) :: pclass ! Class identifier LOGICAL, INTENT(OUT) :: flag ! logical flag INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -3681,40 +3681,40 @@ CONTAINS ENDIF END SUBROUTINE h5pisa_class_f -!****s* H5P/h5pcopy_prop_f +!****s* H5P/h5pcopy_prop_f ! NAME -! h5pcopy_prop_f +! h5pcopy_prop_f ! ! PURPOSE ! Copies a property from one list or class to another. ! ! INPUTS -! +! ! dst_id - Identifier of the destination property list -! src_id - Identifier of the source property list +! src_id - Identifier of the source property list ! name - name of the property to copy ! OUTPUTS -! +! ! hdferr: - error code -! Success: 0 -! Failure: -1 +! Success: 0 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dst_id ! Destination property list - ! identifier - INTEGER(HID_T), INTENT(IN) :: src_id ! Source property list identifier + INTEGER(HID_T), INTENT(IN) :: dst_id ! Destination property list + ! identifier + INTEGER(HID_T), INTENT(IN) :: src_id ! Source property list identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Property name INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** INTEGER :: name_len - + INTERFACE INTEGER FUNCTION h5pcopy_prop_c(dst_id, src_id, name, name_len) & BIND(C,NAME='h5pcopy_prop_c') @@ -3731,27 +3731,27 @@ CONTAINS hdferr = h5pcopy_prop_c(dst_id, src_id, name , name_len) END SUBROUTINE h5pcopy_prop_f -!****s* H5P/h5premove_f +!****s* H5P/h5premove_f ! NAME -! h5premove_f +! h5premove_f ! ! PURPOSE -! Removes a property from a property list. +! Removes a property from a property list. ! ! INPUTS -! +! ! plid - Property list identofoer ! name - name of the property to remove ! OUTPUTS -! +! ! hdferr: - error code -! Success: 0 -! Failure: -1 +! Success: 0 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! ! Fortran90 Interface: SUBROUTINE h5premove_f(plid, name, hdferr) @@ -3762,14 +3762,14 @@ CONTAINS ! 0 on success and -1 on failure !***** INTEGER :: name_len - + INTERFACE INTEGER FUNCTION h5premove_c(plid, name, name_len) & BIND(C,NAME='h5premove_c') IMPORT :: C_CHAR IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plid + INTEGER(HID_T), INTENT(IN) :: plid CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name INTEGER, INTENT(IN) :: name_len END FUNCTION h5premove_c @@ -3778,26 +3778,26 @@ CONTAINS hdferr = h5premove_c(plid, name , name_len) END SUBROUTINE h5premove_f -!****s* H5P/h5punregister_f +!****s* H5P/h5punregister_f ! NAME -! h5punregister_f +! h5punregister_f ! ! PURPOSE -! Removes a property from a property list class. +! Removes a property from a property list class. ! ! INPUTS -! +! ! class - Property list class identifier ! name - name of the property to remove ! OUTPUTS -! +! ! hdferr: - error code -! Success: 0 -! Failure: -1 +! Success: 0 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! ! Fortran90 Interface: SUBROUTINE h5punregister_f(class, name, hdferr) @@ -3824,25 +3824,25 @@ CONTAINS hdferr = h5punregister_c(class, name , name_len) END SUBROUTINE h5punregister_f -!****s* H5P/h5pclose_class_f +!****s* H5P/h5pclose_class_f ! NAME -! h5pclose_class_f +! h5pclose_class_f ! ! PURPOSE ! Closes an existing property list class. ! ! INPUTS -! +! ! class - Property list class identifier ! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 +! +! hdferr - error code +! Success: 0 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal -! October 9, 2002 +! October 9, 2002 ! ! Fortran90 Interface: SUBROUTINE h5pclose_class_f(class, hdferr) @@ -3862,9 +3862,9 @@ CONTAINS hdferr = h5pclose_class_c(class) END SUBROUTINE h5pclose_class_f -!****s* H5P/h5pset_shuffle_f +!****s* H5P/h5pset_shuffle_f ! NAME -! h5pset_shuffle_f +! h5pset_shuffle_f ! ! PURPOSE ! Sets shuffling filter @@ -3872,9 +3872,9 @@ CONTAINS ! INPUTS ! prp_id - dataset creation property list identifier ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal @@ -3883,7 +3883,7 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pset_shuffle_f(prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -3896,26 +3896,26 @@ CONTAINS END FUNCTION h5pset_shuffle_c END INTERFACE hdferr = h5pset_shuffle_c(prp_id) - + END SUBROUTINE h5pset_shuffle_f -!****s* H5P/h5pset_edc_check_f +!****s* H5P/h5pset_edc_check_f ! NAME -! h5pset_edc_check_f +! h5pset_edc_check_f ! ! PURPOSE -! Enables/disables error detecting +! Enables/disables error detecting ! ! INPUTS -! +! ! prp_id - dataset creation property list identifier ! flag - EDC flag; possible values: ! H5Z_DISABLE_EDC_F ! H5Z_ENABLE_EDC_F ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal @@ -3924,7 +3924,7 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: flag ! Checksum filter flag INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -3935,27 +3935,27 @@ CONTAINS IMPORT :: HID_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: flag + INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_edc_check_c END INTERFACE hdferr = h5pset_edc_check_c(prp_id, flag) - + END SUBROUTINE h5pset_edc_check_f !****s* H5P/h5pget_edc_check_f ! NAME -! h5pget_edc_check_f +! h5pget_edc_check_f ! ! PURPOSE -! Queries error detecting +! Queries error detecting ! ! INPUTS -! +! ! prp_id - dataset creation property list identifier ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal @@ -3964,7 +3964,7 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier INTEGER, INTENT(OUT) :: flag ! Checksum filter flag ! May have one of the following values: ! H5Z_ERROR_EDC_F @@ -3984,24 +3984,24 @@ CONTAINS END FUNCTION h5pget_edc_check_c END INTERFACE hdferr = h5pget_edc_check_c(prp_id, flag) - + END SUBROUTINE h5pget_edc_check_f !****s* H5P/h5pset_fletcher32_f ! NAME -! h5pset_fletcher32_f +! h5pset_fletcher32_f ! ! PURPOSE -! Sets Fletcher32 checksum of EDC for a dataset creation +! Sets Fletcher32 checksum of EDC for a dataset creation ! property list. ! ! INPUTS -! +! ! prp_id - dataset creation property list identifier ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal @@ -4010,7 +4010,7 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** @@ -4028,19 +4028,19 @@ CONTAINS !****s* H5P/ h5pset_family_offset_f ! NAME -! h5pset_family_offset_f +! h5pset_family_offset_f ! ! PURPOSE ! Sets offset for family file driver. ! ! INPUTS -! +! ! prp_id - file creation property list identifier ! offset - file offset ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal @@ -4049,42 +4049,42 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTERFACE INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) & BIND(C,NAME='h5pset_family_offset_c') IMPORT :: HID_T, HSIZE_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: offset + INTEGER(HSIZE_T), INTENT(IN) :: offset END FUNCTION h5pset_family_offset_c END INTERFACE hdferr = h5pset_family_offset_c(prp_id, offset) - + END SUBROUTINE h5pset_family_offset_f !****s* H5P/h5pset_fapl_multi_l ! NAME -! h5pset_fapl_multi_l +! h5pset_fapl_multi_l ! ! PURPOSE -! Sets up use of the multi-file driver. +! Sets up use of the multi-file driver. ! ! INPUTS -! +! ! prp_id - file creation property list identifier ! mem_map - mapping array ! memb_fapl - property list for each memory usage type ! memb_name - names of member file -! relax - flag +! relax - flag ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal @@ -4097,10 +4097,10 @@ CONTAINS INTEGER, DIMENSION(*), INTENT(IN) :: memb_map INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name - REAL, DIMENSION(*), INTENT(IN) :: memb_addr + REAL, DIMENSION(*), INTENT(IN) :: memb_addr LOGICAL, INTENT(IN) :: relax INTEGER, INTENT(OUT) :: hdferr -!***** +!***** INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm INTEGER :: maxlen INTEGER :: flag = 0 @@ -4113,7 +4113,7 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, DIMENSION(*), INTENT(IN) :: memb_map INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: memb_name @@ -4132,21 +4132,21 @@ CONTAINS hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) END SUBROUTINE h5pset_fapl_multi_l -!****s* H5P/h5pset_fapl_multi_s +!****s* H5P/h5pset_fapl_multi_s ! NAME -! h5pset_fapl_multi_s +! h5pset_fapl_multi_s ! ! PURPOSE -! Sets up use of the multi-file driver. +! Sets up use of the multi-file driver. ! ! INPUTS -! +! ! prp_id - file creation property list identifier -! relax - flag +! relax - flag ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal @@ -4155,11 +4155,11 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier LOGICAL, INTENT(IN) :: relax INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTEGER :: flag INTERFACE @@ -4167,37 +4167,37 @@ CONTAINS BIND(C,NAME='h5pset_fapl_multi_sc') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_fapl_multi_sc END INTERFACE flag = 0 IF (relax) flag = 1 - hdferr = h5pset_fapl_multi_sc(prp_id, flag) - + hdferr = h5pset_fapl_multi_sc(prp_id, flag) + END SUBROUTINE h5pset_fapl_multi_s -!****s* H5P/h5pget_fapl_multi_f +!****s* H5P/h5pget_fapl_multi_f ! NAME -! h5pget_fapl_multi_f +! h5pget_fapl_multi_f ! ! PURPOSE -! Sets up use of the multi-file driver. +! Sets up use of the multi-file driver. ! ! INPUTS -! +! ! prp_id - file creation property list identifier ! OUTPUTS -! +! ! mem_map - mapping array ! memb_fapl - property list for each memory usage type ! memb_name - names of member file -! relax - flag -! hdferr - error code +! relax - flag +! hdferr - error code ! Success: 0 ! Failure: -1 ! ! OPTIONAL PARAMETERS -! maxlen_out - maximum length for memb_name array element +! maxlen_out - maximum length for memb_name array element ! ! AUTHOR ! Elena Pourmal @@ -4206,19 +4206,19 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name REAL, DIMENSION(*), INTENT(OUT) :: memb_addr - INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out + INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out LOGICAL, INTENT(OUT) :: relax INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm INTEGER :: maxlen - INTEGER :: c_maxlen_out + INTEGER :: c_maxlen_out INTEGER :: flag INTEGER :: i ! @@ -4229,14 +4229,14 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: memb_name REAL, DIMENSION(*), INTENT(OUT) :: memb_addr INTEGER, DIMENSION(*) :: lenm INTEGER :: maxlen - INTEGER :: c_maxlen_out + INTEGER :: c_maxlen_out INTEGER, INTENT(OUT) :: flag END FUNCTION h5pget_fapl_multi_c END INTERFACE @@ -4246,20 +4246,20 @@ CONTAINS lenm(i) = LEN_TRIM(memb_name(i)) ENDDO hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) - + relax = .TRUE. IF(flag .EQ. 0) relax = .FALSE. IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out END SUBROUTINE h5pget_fapl_multi_f -!****s* H5P/h5pset_szip_f +!****s* H5P/h5pset_szip_f ! NAME -! h5pset_szip_f +! h5pset_szip_f ! ! PURPOSE ! Sets up use of szip compression ! ! INPUTS -! +! ! prp_id - dataset creation property list identifier ! options_mask - A bit-mask conveying the desired SZIP options. ! Current valid values in Fortran are: @@ -4267,25 +4267,25 @@ CONTAINS ! H5_SZIP_NN_OM_F ! pixels_per_block - szip parameters ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal ! April 10 2003 ! ! Fortran90 Interface: - SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) + SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property + ! list identifier INTEGER, INTENT(IN) :: options_mask ! A bit-mask conveying the desired ! SZIP options ! Current valid values in Fortran are: ! H5_SZIP_EC_OM_F ! H5_SZIP_NN_OM_F - INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements + INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements ! in each data block INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure @@ -4295,33 +4295,33 @@ CONTAINS BIND(C,NAME='h5pset_szip_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier INTEGER, INTENT(IN) :: options_mask INTEGER, INTENT(IN) :: pixels_per_block END FUNCTION h5pset_szip_c END INTERFACE - hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) - + hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) + END SUBROUTINE h5pset_szip_f -!****s* H5P/h5pall_filters_avail_f +!****s* H5P/h5pall_filters_avail_f ! NAME -! h5pall_filters_avail_f +! h5pall_filters_avail_f ! ! PURPOSE ! Checks if all filters set in the dataset creation ! property list are available ! ! INPUTS -! +! ! prp_id - data creation property list identifier ! OUTPUTS -! +! ! flag - .TRUE. if all filters are available ! .FALSE. otherwise -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal @@ -4330,13 +4330,13 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property + ! list identifier LOGICAL, INTENT(OUT) :: flag ! .TRUE. if all filters are available ! .FALSE. otherwise INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTEGER :: status INTERFACE @@ -4349,24 +4349,24 @@ CONTAINS END FUNCTION h5pall_filters_avail_c END INTERFACE flag = .TRUE. - hdferr = h5pall_filters_avail_c(prp_id, status) + hdferr = h5pall_filters_avail_c(prp_id, status) IF (status .EQ. 0 ) flag = .FALSE. - + END SUBROUTINE h5pall_filters_avail_f !****s* H5P/h5pget_filter_by_id_f ! NAME -! h5pget_filter_by_id_f +! h5pget_filter_by_id_f ! ! PURPOSE ! Returns information about a filter in a pipeline ! ! INPUTS -! -! prp_id - data creation or transfer property list +! +! prp_id - data creation or transfer property list ! identifier ! OUTPUTS -! +! ! filter_id - filter identifier ! flags - bit vector specifying certain general ! properties of the filter @@ -4374,9 +4374,9 @@ CONTAINS ! cd_values - auxiliary data for the filter ! namelen - number of characters in the name buffer ! name - buffer to retrieve filter name -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal @@ -4385,7 +4385,7 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: filter_id ! Filter identifier INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. @@ -4404,29 +4404,29 @@ CONTAINS IMPORT :: HID_T, SIZE_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter_id + INTEGER, INTENT(IN) :: filter_id INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values - INTEGER, INTENT(OUT) :: flags + INTEGER, INTENT(OUT) :: flags INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts INTEGER(SIZE_T), INTENT(IN) :: namelen CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name END FUNCTION h5pget_filter_by_id_c END INTERFACE - - hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & + + hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & cd_values, namelen, name) END SUBROUTINE h5pget_filter_by_id_f !****s* H5P/h5pmodify_filter_f ! NAME -! h5pmodify_filter_f +! h5pmodify_filter_f ! ! PURPOSE -! Adds a filter to the filter pipeline. +! Adds a filter to the filter pipeline. ! ! INPUTS -! -! prp_id - data creation or transfer property list +! +! prp_id - data creation or transfer property list ! identifier ! filter - filter to be modified ! flags - bit vector specifying certain general @@ -4434,9 +4434,9 @@ CONTAINS ! cd_nelmts - number of elements in cd_values ! cd_values - auxiliary data for the filter ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Elena Pourmal @@ -4445,7 +4445,7 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier INTEGER, INTENT(IN) :: filter ! Filter to be modified INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general ! properties of the filter @@ -4459,33 +4459,33 @@ CONTAINS BIND(C,NAME='h5pmodify_filter_c') IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(IN) :: flags - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values END FUNCTION h5pmodify_filter_c END INTERFACE - + hdferr = h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) END SUBROUTINE h5pmodify_filter_f -!****s* H5P/h5premove_filter_f +!****s* H5P/h5premove_filter_f ! NAME -! h5premove_filter_f +! h5premove_filter_f ! ! PURPOSE -! Delete one or more filters from the filter pipeline. +! Delete one or more filters from the filter pipeline. ! ! INPUTS -! -! prp_id - data creation or transfer property list +! +! prp_id - data creation or transfer property list ! identifier ! filter - filter to be removed ! OUTPUTS -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! Quincey Koziol @@ -4505,39 +4505,39 @@ CONTAINS BIND(C,NAME='h5premove_filter_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter END FUNCTION h5premove_filter_c END INTERFACE - + hdferr = h5premove_filter_c(prp_id, filter) END SUBROUTINE h5premove_filter_f !****s* H5P/H5Pget_attr_phase_change_f ! NAME -! H5Pget_attr_phase_change_f +! H5Pget_attr_phase_change_f ! ! PURPOSE -! Retrieves attribute storage phase change thresholds +! Retrieves attribute storage phase change thresholds ! ! INPUTS -! +! ! ocpl_id - Object (dataset or group) creation property list identifier ! OUTPUTS -! +! ! max_compact - Maximum number of attributes to be stored in compact storage ! (Default: 8) ! min_dense - Minimum number of attributes to be stored in dense storage ! (Default: 6) -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! January, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier @@ -4563,28 +4563,28 @@ CONTAINS hdferr = h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) END SUBROUTINE h5pget_attr_phase_change_f -!****s* H5P/H5Pset_attr_creation_order_f +!****s* H5P/H5Pset_attr_creation_order_f ! NAME -! H5Pset_attr_creation_order_f +! H5Pset_attr_creation_order_f ! ! PURPOSE ! Sets tracking and indexing of attribute creation order ! ! INPUTS -! +! ! ocpl_id - Object creation property list identifier ! crt_order_flags - Flags specifying whether to track and index attribute creation order ! OUTPUTS ! -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! January, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier @@ -4606,36 +4606,36 @@ CONTAINS hdferr = H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) END SUBROUTINE h5pset_attr_creation_order_f -!****s* H5P/H5Pset_shared_mesg_nindexes_f +!****s* H5P/H5Pset_shared_mesg_nindexes_f ! NAME -! H5Pset_shared_mesg_nindexes_f +! H5Pset_shared_mesg_nindexes_f ! ! PURPOSE -! Sets number of shared object header message indexes +! Sets number of shared object header message indexes ! ! INPUTS -! +! ! plist_id - file creation property list ! nindexes - Number of shared object header message indexes to be available in files created with this property list ! OUTPUTS ! -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! January, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list - INTEGER, INTENT(IN) :: nindexes ! Number of shared object header message indexes + INTEGER, INTENT(IN) :: nindexes ! Number of shared object header message indexes ! available in files created WITH this property list INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** ! ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -4662,7 +4662,7 @@ CONTAINS ! Configures the specified shared object header message index ! ! INPUTS -! +! ! fcpl_id - File creation property list identifier. ! index_num - Index being configured. ! mesg_type_flags - Types of messages that should be stored in this index. @@ -4670,15 +4670,15 @@ CONTAINS ! ! OUTPUTS ! -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! January, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fcpl_id ! file creation property list @@ -4687,7 +4687,7 @@ CONTAINS INTEGER, INTENT(IN) :: min_mesg_size ! Minimum message size. INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** ! ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -4696,7 +4696,7 @@ CONTAINS BIND(C,NAME='h5pset_shared_mesg_index_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fcpl_id + INTEGER(HID_T), INTENT(IN) :: fcpl_id INTEGER, INTENT(IN) :: index_num INTEGER, INTENT(IN) :: mesg_type_flags INTEGER, INTENT(IN) :: min_mesg_size @@ -4721,22 +4721,22 @@ CONTAINS ! OUTPUTS ! ! crt_order_flags - Flags specifying whether to track and index attribute creation order -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! February, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (group or dataset) creation property list identifier - INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order + INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (group or dataset) creation property list identifier + INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** ! ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -4759,7 +4759,7 @@ CONTAINS ! H5Pget_libver_bounds_f ! ! PURPOSE -! Retrieves the lower and upper bounds on the HDF5 library release versions that indirectly +! Retrieves the lower and upper bounds on the HDF5 library release versions that indirectly ! determine the object format versions used when creating objects in the file. ! ! INPUTS @@ -4828,15 +4828,15 @@ CONTAINS ! ! OUTPUTS ! -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! February 18, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier @@ -4867,9 +4867,9 @@ CONTAINS END SUBROUTINE h5pset_libver_bounds_f -!****s* H5P/H5Pset_link_creation_order_f +!****s* H5P/H5Pset_link_creation_order_f ! NAME -! H5Pset_link_creation_order_f +! H5Pset_link_creation_order_f ! ! PURPOSE ! Sets creation order tracking and indexing for links in a group. @@ -4881,15 +4881,15 @@ CONTAINS ! ! OUTPUTS ! -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! February 18, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id ! File access property list identifier @@ -4920,21 +4920,21 @@ CONTAINS ! Queries the settings for conversion between compact and dense groups. ! ! INPUTS -! +! ! gcpl_id - Group creation property list identifier ! OUTPUTS -! +! ! max_compact - Maximum number of attributes to be stored in compact storage ! min_dense - Minimum number of attributes to be stored in dense storage -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! February 20, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier @@ -4958,37 +4958,37 @@ CONTAINS hdferr = h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) END SUBROUTINE h5pget_link_phase_change_f -!****s* H5P/H5Pget_obj_track_times_f +!****s* H5P/H5Pget_obj_track_times_f ! NAME -! H5Pget_obj_track_times_f +! H5Pget_obj_track_times_f ! ! PURPOSE ! Returns whether times are tracked for an object. ! ! INPUTS -! +! ! plist_id - property list id ! flag - object timestamp setting ! .TRUE.,.FALSE. ! OUTPUTS ! -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! February 22, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property - ! list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property + ! list identifier LOGICAL, INTENT(OUT) :: flag ! Object timestamp setting INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTEGER :: status ! ! MS FORTRAN needs explicit interface for C functions called here. @@ -4997,7 +4997,7 @@ CONTAINS INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) & BIND(C,NAME='h5pget_obj_track_times_c') IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier INTEGER, INTENT(OUT) :: status END FUNCTION h5pget_obj_track_times_c END INTERFACE @@ -5007,9 +5007,9 @@ CONTAINS END SUBROUTINE h5pget_obj_track_times_f -!****s* H5P/H5Pset_obj_track_times_f +!****s* H5P/H5Pset_obj_track_times_f ! NAME -! H5Pset_obj_track_times_f +! H5Pset_obj_track_times_f ! ! PURPOSE ! Set whether the birth, access, modification & change times for @@ -5029,22 +5029,22 @@ CONTAINS ! epoch) when queried. ! ! INPUTS -! +! ! plist_id - property list id ! flag - object timestamp setting ! .TRUE.,.FALSE. ! OUTPUTS ! -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! February 22, 2008 -! -! -! Fortran90 Interface: +! +! +! Fortran90 Interface: SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property @@ -5052,7 +5052,7 @@ CONTAINS LOGICAL, INTENT(IN) :: flag ! Object timestamp setting INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTEGER :: status ! ! MS FORTRAN needs explicit interface for C functions called here. @@ -5062,7 +5062,7 @@ CONTAINS BIND(C,NAME='h5pset_obj_track_times_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier INTEGER, INTENT(IN) :: status END FUNCTION h5pset_obj_track_times_c END INTERFACE @@ -5082,22 +5082,22 @@ CONTAINS ! Specifies in property list whether to create missing intermediate groups. ! ! INPUTS -! +! ! lcpl_id - Link creation property list identifier -! crt_intermed_group - crt_intermed_group specifying whether -! to create intermediate groups upon the creation +! crt_intermed_group - crt_intermed_group specifying whether +! to create intermediate groups upon the creation ! of an object ! OUTPUTS ! -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! February 22, 2008 ! -! HISTORY +! HISTORY ! The long subroutine name (>31) on older f90 compilers causes problems ! so had to shorten the name ! Fortran90 Interface: @@ -5137,15 +5137,15 @@ CONTAINS ! OUTPUTS ! ! crt_order_flags - Creation order flag(s) -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! March 3, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier @@ -5183,15 +5183,15 @@ CONTAINS ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding ! ! OUTPUTS -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! March 3, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier @@ -5232,15 +5232,15 @@ CONTAINS ! encoding - Valid values for encoding are: ! H5T_CSET_ASCII_F -> US ASCII ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! March 3, 2008 ! -! Fortran90 Interface: +! Fortran90 Interface: SUBROUTINE h5pget_char_encoding_f(plist_id, encoding, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier @@ -5268,20 +5268,20 @@ CONTAINS !****s* H5P/h5pset_copy_object_f ! NAME -! h5pset_copy_object_f +! h5pset_copy_object_f ! ! PURPOSE ! Sets properties to be used when an object is copied. ! ! INPUTS -! +! ! ocp_plist_id - Object copy property list identifier ! copy_options - Copy option(s) to be set ! OUTPUTS -! -! hdferr - error code +! +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld @@ -5289,8 +5289,8 @@ CONTAINS ! ! HISTORY ! -! -! Fortran90 Interface: +! +! Fortran90 Interface: SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier @@ -5317,20 +5317,20 @@ CONTAINS !****s* H5P/h5pget_copy_object_f ! NAME -! h5pget_copy_object_f +! h5pget_copy_object_f ! ! PURPOSE ! Retrieves the properties to be used when an object is copied. ! ! INPUTS -! +! ! ocp_plist_id - Object copy property list identifier ! OUTPUTS -! +! ! copy_options - Copy option(s) to be get -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld @@ -5338,14 +5338,14 @@ CONTAINS ! ! HISTORY ! -! +! ! Fortran90 Interface: SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier INTEGER, INTENT(OUT) :: copy_options ! Valid copy options returned are: ! H5O_COPY_SHALLOW_HIERARCHY_F - ! H5O_COPY_EXPAND_SOFT_LINK_F + ! H5O_COPY_EXPAND_SOFT_LINK_F ! H5O_COPY_EXPAND_EXT_LINK_F ! H5O_COPY_EXPAND_REFERENCE_F ! H5O_COPY_WITHOUT_ATTR_FLAG_F @@ -5364,23 +5364,23 @@ CONTAINS hdferr = h5pget_copy_object_c(ocp_plist_id, copy_options) END SUBROUTINE h5pget_copy_object_f -!****s* H5P/h5pget_data_transform_f +!****s* H5P/h5pget_data_transform_f ! NAME -! h5pget_data_transform_f +! h5pget_data_transform_f ! ! PURPOSE ! Retrieves a data transform expression. ! ! INPUTS -! +! ! plist_id - Identifier of the property list or class ! OUTPUTS -! +! ! expression - buffer to hold transform expression ! hdferr - Error code ! Success: Actual length of the expression -! If provided buffer "expression" is -! smaller, than expression will be +! If provided buffer "expression" is +! smaller, than expression will be ! truncated to fit into ! provided user buffer ! Failure: -1 @@ -5400,7 +5400,7 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size ! Registered size of the transform expression INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTEGER :: expression_len INTEGER(SIZE_T) :: size_default @@ -5410,8 +5410,8 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: expression + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: expression INTEGER(SIZE_T) :: size_default INTEGER :: expression_len END FUNCTION h5pget_data_transform_c @@ -5426,19 +5426,19 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) END SUBROUTINE h5pget_data_transform_f -!****s* H5P/h5pset_data_transform_f +!****s* H5P/h5pset_data_transform_f ! NAME -! h5pset_data_transform_f +! h5pset_data_transform_f ! ! PURPOSE ! Sets a data transform expression. ! ! INPUTS -! -! plist_id - Identifier of the property list or class +! +! plist_id - Identifier of the property list or class ! expression - Buffer to hold transform expression ! OUTPUTS -! +! ! hdferr - error code ! Success: 0 ! Failure: -1 @@ -5454,7 +5454,7 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) CHARACTER(LEN=*), INTENT(IN) :: expression ! Buffer to hold transform expression INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTEGER :: expression_len INTERFACE @@ -5463,7 +5463,7 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) IMPORT :: C_CHAR IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HID_T), INTENT(IN) :: plist_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: expression INTEGER :: expression_len END FUNCTION h5pset_data_transform_c @@ -5474,15 +5474,15 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) END SUBROUTINE h5pset_data_transform_f -!****s* H5P/H5Pget_local_heap_size_hint_f +!****s* H5P/H5Pget_local_heap_size_hint_f ! NAME -! H5Pget_local_heap_size_hint_f +! H5Pget_local_heap_size_hint_f ! ! PURPOSE ! Queries the local heap size hint for original-style groups. ! ! INPUTS -! +! ! gcpl_id - Group creation property list identifier ! OUTPUTS ! @@ -5517,18 +5517,18 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) END SUBROUTINE h5pget_local_heap_size_hint_f -!****s* H5P/H5Pget_est_link_info_f +!****s* H5P/H5Pget_est_link_info_f ! NAME -! H5Pget_est_link_info_f +! H5Pget_est_link_info_f ! ! PURPOSE ! Queries data required to estimate required local heap or object header size. ! ! INPUTS -! +! ! gcpl_id - Group creation property list identifier ! OUTPUTS -! +! ! est_num_entries - Estimated number of links to be inserted into group ! est_name_len - Estimated average length of link names ! hdferr - Error code @@ -5541,11 +5541,11 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) ! ! HISTORY ! -! +! ! Fortran90 Interface: SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group INTEGER, INTENT(OUT) :: est_name_len ! Estimated average length of link names INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -5556,7 +5556,7 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) BIND(C,NAME='h5pget_est_link_info_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(OUT) :: est_num_entries INTEGER, INTENT(OUT) :: est_name_len END FUNCTION h5pget_est_link_info_c @@ -5566,15 +5566,15 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) END SUBROUTINE h5pget_est_link_info_f -!****s* H5P/H5Pset_local_heap_size_hint_f +!****s* H5P/H5Pset_local_heap_size_hint_f ! NAME -! H5Pset_local_heap_size_hint_f +! H5Pset_local_heap_size_hint_f ! ! PURPOSE ! Sets the local heap size hint for original-style groups. ! ! INPUTS -! +! ! gcpl_id - Group creation property list identifier ! size_hint - Hint for size of local heap ! OUTPUTS @@ -5598,7 +5598,7 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) INTERFACE INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) & BIND(C,NAME='h5pset_local_heap_size_hint_c') - IMPORT :: HID_T, SIZE_T + IMPORT :: HID_T, SIZE_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER(SIZE_T), INTENT(IN) :: size_hint @@ -5609,16 +5609,16 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) END SUBROUTINE h5pset_local_heap_size_hint_f -!****s* H5P/h5pset_est_link_info_f +!****s* H5P/h5pset_est_link_info_f ! NAME -! h5pset_est_link_info_f +! h5pset_est_link_info_f ! ! PURPOSE ! Sets estimated number of links and length of link names in a group. ! ! INPUTS -! -! gcpl_id - Group creation property list identifier +! +! gcpl_id - Group creation property list identifier ! est_num_entries - Estimated number of links to be inserted into group ! est_name_len - Estimated average length of link names ! OUTPUTS @@ -5634,7 +5634,7 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) ! Fortran90 Interface: SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier + INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group INTEGER, INTENT(IN) :: est_name_len ! Estimated average length of link names INTEGER, INTENT(OUT) :: hdferr ! Error code @@ -5645,7 +5645,7 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) BIND(C,NAME='h5pset_est_link_info_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(HID_T), INTENT(IN) :: gcpl_id INTEGER, INTENT(IN) :: est_num_entries INTEGER, INTENT(IN) :: est_name_len END FUNCTION h5pset_est_link_info_c @@ -5663,15 +5663,15 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) ! Sets the parameters for conversion between compact and dense groups. ! ! INPUTS -! -! gcpl_id - Group creation property list identifier +! +! gcpl_id - Group creation property list identifier ! max_compact - Maximum number of attributes to be stored in compact storage ! min_dense - Minimum number of attributes to be stored in dense storage ! OUTPUTS ! -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld @@ -5708,16 +5708,16 @@ SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) ! Sets up use of the direct I/O driver. ! ! INPUTS -! +! ! fapl_id - File access property list identifier ! alignment - Required memory alignment boundary ! block_size - File system block size ! cbuf_size - Copy buffer size ! OUTPUTS ! -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld @@ -5725,7 +5725,7 @@ SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) ! ! Fortran90 Interface: SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) - IMPLICIT NONE + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier INTEGER(SIZE_T), INTENT(IN) :: alignment ! Required memory alignment boundary! INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size @@ -5738,7 +5738,7 @@ SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdfer BIND(C,NAME='h5pset_fapl_direct_c') IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(HID_T), INTENT(IN) :: fapl_id INTEGER(SIZE_T), INTENT(IN) :: alignment INTEGER(SIZE_T), INTENT(IN) :: block_size INTEGER(SIZE_T), INTENT(IN) :: cbuf_size @@ -5756,16 +5756,16 @@ SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdfer ! Gets up use of the direct I/O driver. ! ! INPUTS -! +! ! fapl_id - File access property list identifier ! OUTPUTS ! ! alignment - Required memory alignment boundary ! block_size - File system block size ! cbuf_size - Copy buffer size -! hdferr - error code +! hdferr - error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld @@ -5773,7 +5773,7 @@ SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdfer ! ! Fortran90 Interface: SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) - IMPLICIT NONE + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier INTEGER(SIZE_T), INTENT(OUT) :: alignment ! Required memory alignment boundary! INTEGER(SIZE_T), INTENT(OUT) :: block_size ! File system block size @@ -5786,7 +5786,7 @@ SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdfer BIND(C,NAME='h5pget_fapl_direct_c') IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(HID_T), INTENT(IN) :: fapl_id INTEGER(SIZE_T), INTENT(OUT) :: alignment INTEGER(SIZE_T), INTENT(OUT) :: block_size INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size @@ -5798,23 +5798,23 @@ SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdfer !****s* H5P/H5Pset_attr_phase_change_f ! NAME -! H5Pset_attr_phase_change_f +! H5Pset_attr_phase_change_f ! ! PURPOSE ! Sets attribute storage phase change thresholds. ! ! INPUTS -! +! ! ocpl_id - Object (dataset or group) creation property list identifier ! OUTPUTS -! +! ! max_compact - Maximum number of attributes to be stored in compact storage ! (Default: 8) ! min_dense - Minimum number of attributes to be stored in dense storage ! (Default: 6) -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld @@ -5850,7 +5850,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !****s* H5P/H5Pset_nbit_f ! NAME -! H5Pset_nbit_f +! H5Pset_nbit_f ! ! PURPOSE ! Sets up the use of the N-Bit filter. @@ -5886,7 +5886,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !****s* H5P/h5pset_scaleoffset_f ! NAME -! h5pset_scaleoffset_f +! h5pset_scaleoffset_f ! ! PURPOSE ! Sets up the use of the scale-offset filter. @@ -5914,7 +5914,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER , INTENT(IN) :: scale_type INTEGER , INTENT(IN) :: scale_factor INTEGER , INTENT(OUT) :: hdferr -!***** +!***** INTERFACE INTEGER FUNCTION h5pset_scaleoffset_c(plist_id, scale_type, scale_factor) & @@ -5931,15 +5931,15 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_scaleoffset_f -!****s* H5P/h5pset_nlinks_f +!****s* H5P/h5pset_nlinks_f ! NAME -! h5pset_nlinks_f +! h5pset_nlinks_f ! ! PURPOSE ! Sets maximum number of soft or user-defined link traversals. ! ! INPUTS -! +! ! lapl_id - File access property list identifier ! nlinks - Maximum number of links to traverse ! @@ -5955,15 +5955,15 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! ! HISTORY ! -! +! ! Fortran90 Interface: SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTERFACE INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) & BIND(C,NAME='h5pset_nlinks_c') @@ -5978,15 +5978,15 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_nlinks_f -!****s* H5P/h5pget_nlinks_f +!****s* H5P/h5pget_nlinks_f ! NAME -! h5pget_nlinks_f +! h5pget_nlinks_f ! ! PURPOSE ! Gets maximum number of soft or user-defined link traversals. ! ! INPUTS -! +! ! lapl_id - File access property list identifier ! nlinks - Maximum number of links to traverse ! @@ -6011,7 +6011,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTERFACE INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) & BIND(C,NAME='h5pget_nlinks_c') - IMPORT :: HID_T, SIZE_T + IMPORT :: HID_T, SIZE_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: lapl_id INTEGER(SIZE_T), INTENT(OUT) :: nlinks @@ -6030,22 +6030,22 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! Determines whether property is set to enable creating missing intermediate groups. ! ! INPUTS -! +! ! lcpl_id - Link creation property list identifier -! crt_intermed_group - Specifying whether to create intermediate groups upon +! crt_intermed_group - Specifying whether to create intermediate groups upon ! the creation of an object ! OUTPUTS ! -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld ! April 4, 2008 ! ! HISTORY -! +! ! The long subroutine name (>31) on older f90 compilers causes problems ! so the name was shortened ! Fortran90 Interface: @@ -6056,7 +6056,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! upon creation of an object INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTERFACE INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) & BIND(C,NAME='h5pget_create_inter_group_c') @@ -6095,16 +6095,16 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! other chunks. ! ! INPUTS -! +! ! dapl_id - Dataset access property list identifier. ! rdcc_nslots - The number of chunk slots in the raw data chunk cache for this dataset. ! rdcc_nbytes - The total size of the raw data chunk cache for this dataset. ! rdcc_w0 - The chunk preemption policy for this dataset. ! OUTPUTS ! -! hdferr - Error code +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld @@ -6116,19 +6116,19 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data ! chunk cache for this dataset. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache ! for this dataset. REAL, INTENT(IN) :: rdcc_w0 ! The chunk preemption policy for this dataset. INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure -!***** +!***** INTERFACE INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) & BIND(C,NAME='h5pset_chunk_cache_c') - IMPORT :: HID_T, SIZE_T + IMPORT :: HID_T, SIZE_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dapl_id INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots @@ -6155,16 +6155,16 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! file access property list are returned. ! ! INPUTS -! +! ! dapl_id - Dataset access property list identifier. ! OUTPUTS -! -! rdcc_nslots - Number of chunk slots in the raw data chunk cache hash table. -! rdcc_nbytes - Total size of the raw data chunk cache, in bytes. -! rdcc_w0 - Preemption policy. -! hdferr - Error code +! +! rdcc_nslots - Number of chunk slots in the raw data chunk cache hash table. +! rdcc_nbytes - Total size of the raw data chunk cache, in bytes. +! rdcc_w0 - Preemption policy. +! hdferr - Error code ! Success: 0 -! Failure: -1 +! Failure: -1 ! ! AUTHOR ! M. Scot Breitenfeld @@ -6177,11 +6177,11 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table. - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy. INTEGER, INTENT(OUT) :: hdferr ! Error code: ! 0 on success and -1 on failure -!***** +!***** INTERFACE INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) & BIND(C,NAME='h5pget_chunk_cache_c') @@ -6234,7 +6234,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. ! ! Fortran90 Interface: -!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) +!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) !! IMPLICIT NONE !! INTEGER(HID_T), INTENT(IN) :: prp_id !! INTEGER(HID_T), INTENT(IN) :: type_id @@ -6295,7 +6295,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! ! Fortran90 Interface: !! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: prp_id !! INTEGER(HID_T), INTENT(IN) :: type_id !! TYPE(VOID) , INTENT(OUT) :: fillvalue !! INTEGER , INTENT(OUT) :: hdferr @@ -6402,7 +6402,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! ! Fortran2003 Interface: !! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: prp_id !! INTEGER(HID_T), INTENT(IN) :: type_id !! TYPE(C_PTR) , INTENT(IN) :: fillvalue !! INTEGER , INTENT(OUT) :: hdferr @@ -6458,7 +6458,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! ! Fortran2003 Interface: !! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id +!! INTEGER(HID_T), INTENT(IN) :: prp_id !! INTEGER(HID_T), INTENT(IN) :: type_id !! TYPE(C_PTR) :: fillvalue !! INTEGER , INTENT(OUT) :: hdferr @@ -6750,7 +6750,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !! CHARACTER(LEN=*), INTENT(IN) :: name !! INTEGER(SIZE_T) , INTENT(IN) :: size !! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER , INTENT(OUT) :: hdferr !***** SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) IMPLICIT NONE @@ -6832,7 +6832,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) !! CHARACTER(LEN=*), INTENT(IN) :: name !! INTEGER(SIZE_T) , INTENT(IN) :: size !! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr +!! INTEGER , INTENT(OUT) :: hdferr !***** SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr) @@ -6951,7 +6951,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! Outputs: ! hdferr - Returns 0 if successful and -1 if fails ! -! AUTHOR +! AUTHOR ! M. Scot Breitenfeld ! June 24, 2008 ! @@ -7077,7 +7077,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! ! Inputs: ! fapl_id - File access property list identifier -! buf_ptr - Pointer to the initial file image, +! buf_ptr - Pointer to the initial file image, ! or C_NULL_PTR if no initial file image is desired ! buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired ! @@ -7117,7 +7117,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! h5pget_file_image_f ! ! PURPOSE -! Retrieves a copy of the file image designated as the initial content and structure of a file. +! Retrieves a copy of the file image designated as the initial content and structure of a file. ! ! Inputs: ! fapl_id - File access property list identifier. @@ -7149,7 +7149,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr INTEGER , INTENT(OUT) :: hdferr - + !***** INTERFACE INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) & @@ -7205,7 +7205,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) BIND(C,NAME='h5pset_fapl_mpio_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER , INTENT(IN) :: comm INTEGER , INTENT(IN) :: info END FUNCTION h5pset_fapl_mpio_c @@ -7248,7 +7248,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) BIND(C,NAME='h5pget_fapl_mpio_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER , INTENT(OUT) :: comm INTEGER , INTENT(OUT) :: info END FUNCTION h5pget_fapl_mpio_c @@ -7291,7 +7291,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) BIND(C,NAME='h5pset_dxpl_mpio_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER , INTENT(IN) :: data_xfer_mode END FUNCTION h5pset_dxpl_mpio_c END INTERFACE @@ -7333,7 +7333,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) BIND(C,NAME='h5pget_dxpl_mpio_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER , INTENT(OUT) :: data_xfer_mode END FUNCTION h5pget_dxpl_mpio_c END INTERFACE @@ -7346,8 +7346,8 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! h5pget_mpio_actual_io_mode_f ! ! PURPOSE -! Retrieves the type of I/O that HDF5 actually performed on the last -! parallel I/O call. This is not necessarily the type of I/O requested. +! Retrieves the type of I/O that HDF5 actually performed on the last +! parallel I/O call. This is not necessarily the type of I/O requested. ! ! INPUTS ! dxpl_id - Dataset transfer property list identifier. @@ -7367,7 +7367,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER(HID_T), INTENT(IN) :: dxpl_id INTEGER , INTENT(OUT) :: actual_io_mode INTEGER , INTENT(OUT) :: hdferr -!***** +!***** INTERFACE INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) & BIND(C,NAME='h5pget_mpio_actual_io_mode_c') @@ -7389,9 +7389,9 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! h5pset_all_coll_metadata_ops_f ! ! PURPOSE -! Sets requirement whether HDF5 metadata read operations using the access property -! list are required to be collective or independent. If collective requirement is -! selected, the HDF5 library will optimize the metadata reads improving performance. +! Sets requirement whether HDF5 metadata read operations using the access property +! list are required to be collective or independent. If collective requirement is +! selected, the HDF5 library will optimize the metadata reads improving performance. ! The default setting is independent (false). ! ! INPUTS @@ -7414,7 +7414,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER, INTENT(OUT) :: hdferr !***** LOGICAL(C_BOOL) :: c_is_collective - + INTERFACE INTEGER FUNCTION h5pset_all_coll_metadata_ops(plist_id, is_collective) BIND(C, NAME='H5Pset_all_coll_metadata_ops') IMPORT :: HID_T, C_BOOL @@ -7426,12 +7426,12 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! Transfer value of Fortran LOGICAL to C c_bool type c_is_collective = is_collective - + hdferr = INT(H5Pset_all_coll_metadata_ops(plist_id, c_is_collective)) - + END SUBROUTINE h5pset_all_coll_metadata_ops_f -!****s* H5P/h5pget_all_coll_metadata_ops_f +!****s* H5P/h5pget_all_coll_metadata_ops_f ! NAME ! h5pget_all_coll_metadata_ops_f ! @@ -7452,14 +7452,14 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! ! SOURCE SUBROUTINE h5pget_all_coll_metadata_ops_f(plist_id, is_collective, hdferr) - + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: plist_id LOGICAL, INTENT(OUT) :: is_collective INTEGER, INTENT(OUT) :: hdferr !***** LOGICAL(C_BOOL) :: c_is_collective - + INTERFACE INTEGER FUNCTION h5pget_all_coll_metadata_ops(plist_id, is_collective) BIND(C, NAME='H5Pget_all_coll_metadata_ops') IMPORT :: HID_T, C_BOOL @@ -7468,12 +7468,12 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) LOGICAL(C_BOOL), INTENT(OUT) :: is_collective END FUNCTION h5pget_all_coll_metadata_ops END INTERFACE - + hdferr = INT(H5Pget_all_coll_metadata_ops(plist_id, c_is_collective)) - - ! Transfer value of C c_bool type to Fortran LOGICAL + + ! Transfer value of C c_bool type to Fortran LOGICAL is_collective = c_is_collective - + END SUBROUTINE h5pget_all_coll_metadata_ops_f !****s* H5P/h5pset_coll_metadata_write_f @@ -7503,7 +7503,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER, INTENT(OUT) :: hdferr !***** LOGICAL(C_BOOL) :: c_is_collective - + INTERFACE INTEGER FUNCTION h5pset_coll_metadata_write(plist_id, is_collective) BIND(C, NAME='H5Pset_coll_metadata_write') IMPORT :: HID_T, C_BOOL @@ -7512,12 +7512,12 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) LOGICAL(C_BOOL), INTENT(IN), VALUE :: is_collective END FUNCTION h5pset_coll_metadata_write END INTERFACE - + ! Transfer value of Fortran LOGICAL to C c_bool type c_is_collective = is_collective - + hdferr = INT(H5Pset_coll_metadata_write(plist_id, c_is_collective)) - + END SUBROUTINE h5pset_coll_metadata_write_f !****s* H5P/h5pget_coll_metadata_write_f @@ -7541,14 +7541,14 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! ! SOURCE SUBROUTINE h5pget_coll_metadata_write_f(plist_id, is_collective, hdferr) - + IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: plist_id LOGICAL, INTENT(OUT) :: is_collective INTEGER, INTENT(OUT) :: hdferr !***** LOGICAL(C_BOOL) :: c_is_collective - + INTERFACE INTEGER FUNCTION h5pget_coll_metadata_write(plist_id, is_collective) BIND(C, NAME='H5Pget_coll_metadata_write') IMPORT :: HID_T, C_BOOL @@ -7557,14 +7557,14 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) LOGICAL(C_BOOL), INTENT(OUT) :: is_collective END FUNCTION h5pget_coll_metadata_write END INTERFACE - + hdferr = INT(H5Pget_coll_metadata_write(plist_id, c_is_collective)) - - ! Transfer value of C c_bool type to Fortran LOGICAL + + ! Transfer value of C c_bool type to Fortran LOGICAL is_collective = c_is_collective - + END SUBROUTINE h5pget_coll_metadata_write_f - + #endif ! @@ -7584,9 +7584,9 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! Valid values are: ! H5D_VDS_FIRST_MISSING_F ! H5D_VDS_LAST_AVAILABLE_F -! +! ! OUTPUTS -! +! ! hdferr - Returns 0 if successful and -1 if fails. ! ! AUTHOR @@ -7601,7 +7601,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER(HID_T), INTENT(IN) :: dapl_id INTEGER , INTENT(IN) :: view INTEGER , INTENT(OUT) :: hdferr - + !***** INTERFACE INTEGER FUNCTION h5pset_virtual_view(dapl_id, view) BIND(C,NAME='H5Pset_virtual_view') @@ -7613,7 +7613,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END INTERFACE hdferr = INT( h5pset_virtual_view(dapl_id, INT(view,ENUM_T)) ) - + END SUBROUTINE h5pset_virtual_view_f !****s* H5P/h5pget_virtual_view_f @@ -7621,7 +7621,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! h5pget_virtual_view_f ! ! PURPOSE -! Retrieves the view of a virtual dataset accessed with dapl_id. +! Retrieves the view of a virtual dataset accessed with dapl_id. ! ! INPUTS ! dapl_id - Dataset access property list identifier for the virtual dataset @@ -7657,7 +7657,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = INT( h5pget_virtual_view(dapl_id, view_enum) ) view = INT(view_enum) - + END SUBROUTINE h5pget_virtual_view_f !****s* H5P/h5pset_virtual_printf_gap_f @@ -7665,15 +7665,15 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! h5pset_virtual_printf_gap_f ! ! PURPOSE -! Sets the maximum number of missing source files and/or datasets with the printf-style names -! when getting the extent of an unlimited virtual dataset. +! Sets the maximum number of missing source files and/or datasets with the printf-style names +! when getting the extent of an unlimited virtual dataset. ! ! INPUTS ! dapl_id - Dataset access property list identifier for the virtual dataset. -! gap_size - Maximum number of files and/or datasets allowed to be missing for determining +! gap_size - Maximum number of files and/or datasets allowed to be missing for determining ! the extent of an unlimited virtual dataset with printf-style mappings. ! -! OUTPUTS +! OUTPUTS ! hdferr - Returns 0 if successful and -1 if fails. ! ! AUTHOR @@ -7682,7 +7682,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! ! HISTORY ! -! SOURCE +! SOURCE SUBROUTINE h5pset_virtual_printf_gap_f(dapl_id, gap_size, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: dapl_id @@ -7699,7 +7699,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END INTERFACE hdferr = INT( h5pset_virtual_printf_gap(dapl_id, gap_size) ) - + END SUBROUTINE h5pset_virtual_printf_gap_f !****s* H5P/h5pget_virtual_printf_gap_f @@ -7707,15 +7707,15 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! h5pget_virtual_printf_gap_f ! ! PURPOSE -! Returns the maximum number of missing source files and/or datasets with the +! Returns the maximum number of missing source files and/or datasets with the ! printf-style names when getting the extent for an unlimited virtual dataset. ! ! INPUTS ! dapl_id - Dataset access property list identifier for the virtual dataset ! ! OUTPUTS -! gap_size - Maximum number of the files and/or datasets allowed to be missing for -! determining the extent of an unlimited virtual dataset with printf-style mappings. +! gap_size - Maximum number of the files and/or datasets allowed to be missing for +! determining the extent of an unlimited virtual dataset with printf-style mappings. ! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR @@ -7727,7 +7727,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! SOURCE SUBROUTINE h5pget_virtual_printf_gap_f(dapl_id, gap_size, hdferr) IMPLICIT NONE - + INTEGER(HID_T) , INTENT(IN) :: dapl_id INTEGER(HSIZE_T), INTENT(OUT) :: gap_size INTEGER , INTENT(OUT) :: hdferr @@ -7742,7 +7742,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END INTERFACE hdferr = INT( h5pget_virtual_printf_gap(dapl_id, gap_size) ) - + END SUBROUTINE h5pget_virtual_printf_gap_f !****s* H5P/h5pset_virtual_f @@ -7753,9 +7753,9 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! Sets the mapping between virtual and source datasets. ! ! INPUTS -! dcpl_id - The identifier of the dataset creation property list that will be +! dcpl_id - The identifier of the dataset creation property list that will be ! used when creating the virtual dataset. -! vspace_id - The dataspace identifier with the selection within the virtual +! vspace_id - The dataspace identifier with the selection within the virtual ! dataset applied, possibly an unlimited selection. ! src_file_name - The name of the HDF5 file where the source dataset is located. ! src_dset_name - The path to the HDF5 dataset in the file specified by src_file_name. @@ -7773,7 +7773,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! SOURCE SUBROUTINE h5pset_virtual_f(dcpl_id, vspace_id, src_file_name, src_dset_name, src_space_id, hdferr) IMPLICIT NONE - + INTEGER(HID_T), INTENT(IN) :: dcpl_id INTEGER(HID_T), INTENT(IN) :: vspace_id CHARACTER(LEN=*), INTENT(IN) :: src_file_name @@ -7813,7 +7813,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! Gets the number of mappings for the virtual dataset. ! ! INPUTS -! dcpl_id - The identifier of the virtual dataset creation property list. +! dcpl_id - The identifier of the virtual dataset creation property list. ! ! OUTPUTS ! count - The number of mappings. @@ -7828,7 +7828,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) SUBROUTINE h5pget_virtual_count_f(dcpl_id, count, hdferr) IMPLICIT NONE - + INTEGER(HID_T), INTENT(IN) :: dcpl_id INTEGER(SIZE_T), INTENT(OUT) :: count INTEGER, INTENT(OUT) :: hdferr @@ -7841,7 +7841,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER(SIZE_T), INTENT(OUT) :: count END FUNCTION h5pget_virtual_count END INTERFACE - + hdferr = INT( h5pget_virtual_count(dcpl_id, count)) END SUBROUTINE h5pget_virtual_count_f @@ -7856,10 +7856,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! INPUTS ! dcpl_id - The identifier of the virtual dataset creation property list. ! index - Mapping index. -! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), +! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), ! where count is the number of mappings returned by h5pget_virtual_count. ! -! OUTPUTS +! OUTPUTS ! hdferr - Returns 0 if successful and -1 if fails. ! ! AUTHOR @@ -7886,9 +7886,9 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER(SIZE_T), INTENT(IN), VALUE :: index END FUNCTION h5pget_virtual_vspace END INTERFACE - + ds_id = h5pget_virtual_vspace(dcpl_id, index) - + hdferr = 0 IF(ds_id.LT.0) hdferr = -1 @@ -7904,7 +7904,7 @@ END SUBROUTINE h5pget_virtual_vspace_f ! INPUTS ! dcpl_id - The identifier of the virtual dataset creation property list. ! index - Mapping index. -! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), +! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), ! where count is the number of mappings returned by h5pget_virtual_count. ! ! @@ -7936,7 +7936,7 @@ SUBROUTINE h5pget_virtual_srcspace_f(dcpl_id, index, ds_id, hdferr) INTEGER(SIZE_T), INTENT(IN), VALUE :: index END FUNCTION h5pget_virtual_srcspace END INTERFACE - + ds_id = h5pget_virtual_srcspace(dcpl_id, index) hdferr = 0 @@ -7954,9 +7954,9 @@ END SUBROUTINE h5pget_virtual_srcspace_f ! INPUTS ! dcpl_id - The identifier of the virtual dataset creation property list. ! index - Mapping index. -! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), +! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), ! where count is the number of mappings returned by h5pget_virtual_count. -! +! ! OUTPUTS ! name - A buffer containing the name of the file containing the source dataset. ! hdferr - Returns 0 if successful and -1 if fails. @@ -7983,7 +7983,7 @@ SUBROUTINE h5pget_virtual_filename_f(dcpl_id, index, name, hdferr, name_len) CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:LEN(name)+1), TARGET :: c_name TYPE(C_PTR) :: f_ptr - + INTERFACE INTEGER(SIZE_T) FUNCTION h5pget_virtual_filename(dcpl_id, index, name, size) BIND(C, NAME='H5Pget_virtual_filename') IMPORT :: HID_T, SIZE_T, C_PTR @@ -8022,9 +8022,9 @@ END SUBROUTINE h5pget_virtual_filename_f ! INPUTS ! dcpl_id - The identifier of the virtual dataset creation property list. ! index - Mapping index. -! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), +! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), ! where count is the number of mappings returned by h5pget_virtual_count. -! +! ! OUTPUTS ! name - A buffer containing the name of the source dataset. ! hdferr - Returns 0 if successful and -1 if fails. @@ -8051,7 +8051,7 @@ SUBROUTINE h5pget_virtual_dsetname_f(dcpl_id, index, name, hdferr, name_len) CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:LEN(name)+1), TARGET :: c_name TYPE(C_PTR) :: f_ptr - + INTERFACE INTEGER(SIZE_T) FUNCTION h5pget_virtual_dsetname(dcpl_id, index, name, size) BIND(C, NAME='H5Pget_virtual_dsetname') IMPORT :: HID_T, SIZE_T, C_PTR @@ -8120,7 +8120,7 @@ END SUBROUTINE h5pget_virtual_dsetname_f hdferr = INT(h5pget_dset_no_attrs_hint_c(dcpl_id, c_minimize)) - ! Transfer value of C C_BOOL type to Fortran LOGICAL + ! Transfer value of C C_BOOL type to Fortran LOGICAL minimize = c_minimize END SUBROUTINE h5pget_dset_no_attrs_hint_f diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90 index c911b1a..e5cfb1d 100644 --- a/fortran/src/H5Rff.F90 +++ b/fortran/src/H5Rff.F90 @@ -61,7 +61,7 @@ MODULE H5R PRIVATE h5rcreate_object_f, h5rcreate_region_f, h5rcreate_ptr_f PRIVATE h5rdereference_object_f, h5rdereference_region_f, h5rdereference_ptr_f PRIVATE h5rget_name_object_f, h5rget_name_region_f, h5rget_name_ptr_f - + INTERFACE h5rget_object_type_f MODULE PROCEDURE h5rget_object_type_obj_f diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90 index e6f8e4c..5199ed6 100644 --- a/fortran/src/H5Sff.F90 +++ b/fortran/src/H5Sff.F90 @@ -49,7 +49,7 @@ CONTAINS ! NAME ! h5screate_simple_f ! -! PURPOSE +! PURPOSE ! Creates a new simple data space and opens it for access . ! ! INPUTS @@ -104,7 +104,7 @@ CONTAINS ENDIF hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) DEALLOCATE(f_maxdims) - + END SUBROUTINE h5screate_simple_f ! @@ -142,9 +142,9 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: space_id END FUNCTION h5sclose_c END INTERFACE - + hdferr = h5sclose_c(space_id) - + END SUBROUTINE h5sclose_f ! @@ -193,9 +193,9 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: space_id END FUNCTION h5screate_c END INTERFACE - + hdferr = h5screate_c(classtype, space_id) - + END SUBROUTINE h5screate_f ! @@ -287,7 +287,7 @@ CONTAINS END INTERFACE hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) - + END SUBROUTINE h5sget_select_hyper_nblocks_f ! @@ -319,7 +319,7 @@ CONTAINS SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & num_blocks, buf, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSIZE_T), INTENT(IN) :: startblock INTEGER(HSIZE_T), INTENT(IN) :: num_blocks INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf @@ -432,7 +432,7 @@ CONTAINS END INTERFACE hdferr = h5sget_select_elem_npoints_c (space_id, num_points) - + END SUBROUTINE h5sget_select_elem_npoints_f ! @@ -481,10 +481,10 @@ CONTAINS INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf END FUNCTION h5sget_select_elem_pointlist_c END INTERFACE - + hdferr = h5sget_select_elem_pointlist_c(space_id, startpoint, & num_points, buf ) - + END SUBROUTINE h5sget_select_elem_pointlist_f ! @@ -500,8 +500,8 @@ CONTAINS ! INPUTS ! space_id - dataspace identifier ! operator - flag, valid values are: -! H5S_SELECT_SET_F -! H5S_SELECT_APPEND_F +! H5S_SELECT_SET_F +! H5S_SELECT_APPEND_F ! H5S_SELECT_PREPEND_F ! rank - number of dataspace dimensions ! num_elements - number of elements to be selected @@ -527,7 +527,7 @@ CONTAINS INTEGER, INTENT(IN) :: rank INTEGER(SIZE_T), INTENT(IN) :: num_elements INTEGER(HSIZE_T), INTENT(IN) , DIMENSION(rank,num_elements) :: coord - INTEGER, INTENT(OUT) :: hdferr + INTEGER, INTENT(OUT) :: hdferr !***** INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:,:) :: c_coord INTEGER :: error, i @@ -595,7 +595,7 @@ CONTAINS SUBROUTINE h5sselect_all_f(space_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: hdferr + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE INTEGER FUNCTION h5sselect_all_c(space_id) BIND(C,NAME='h5sselect_all_c') @@ -604,9 +604,9 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: space_id END FUNCTION h5sselect_all_c END INTERFACE - + hdferr = h5sselect_all_c(space_id) - + END SUBROUTINE h5sselect_all_f ! @@ -646,9 +646,9 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: space_id END FUNCTION h5sselect_none_c END INTERFACE - + hdferr = h5sselect_none_c(space_id) - + END SUBROUTINE h5sselect_none_f ! @@ -665,8 +665,8 @@ CONTAINS ! space_id - identifier for the dataspace for which ! selection is verified ! OUTPUTS -! status - TRUE if the selection is contained within -! the extent, FALSE otherwise. +! status - TRUE if the selection is contained within +! the extent, FALSE otherwise. ! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR @@ -695,11 +695,11 @@ CONTAINS INTEGER :: flag END FUNCTION h5sselect_valid_c END INTERFACE - + hdferr = h5sselect_valid_c(space_id, flag) status = .TRUE. IF (flag .EQ. 0) status = .FALSE. - + END SUBROUTINE h5sselect_valid_f ! @@ -729,7 +729,7 @@ CONTAINS ! SOURCE SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSIZE_T), INTENT(OUT) :: npoints INTEGER, INTENT(OUT) :: hdferr !***** @@ -783,7 +783,7 @@ CONTAINS INTEGER(HSSIZE_T), INTENT(OUT) :: npoints END FUNCTION h5sget_select_npoints_c END INTERFACE - + hdferr = h5sget_select_npoints_c(space_id, npoints) END SUBROUTINE h5sget_select_npoints_f @@ -826,9 +826,9 @@ CONTAINS INTEGER, INTENT(OUT) :: rank END FUNCTION h5sget_simple_extent_ndims_c END INTERFACE - + hdferr = h5sget_simple_extent_ndims_c(space_id, rank) - + END SUBROUTINE h5sget_simple_extent_ndims_f ! !****s* H5S/h5sget_simple_extent_dims_f @@ -873,9 +873,9 @@ CONTAINS INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims END FUNCTION h5sget_simple_extent_dims_c END INTERFACE - + hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) - + END SUBROUTINE h5sget_simple_extent_dims_f ! @@ -920,9 +920,9 @@ CONTAINS INTEGER, INTENT(OUT) :: classtype END FUNCTION h5sget_simple_extent_type_c END INTERFACE - + hdferr = h5sget_simple_extent_type_c(space_id, classtype) - + END SUBROUTINE h5sget_simple_extent_type_f ! !****s* H5S/h5sset_extent_simple_f @@ -970,7 +970,7 @@ CONTAINS INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size END FUNCTION h5sset_extent_simple_c END INTERFACE - + hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & maximum_size) @@ -1016,11 +1016,11 @@ CONTAINS INTEGER :: flag END FUNCTION h5sis_simple_c END INTERFACE - + hdferr = h5sis_simple_c(space_id, flag) status = .TRUE. IF (flag .EQ. 0) status = .FALSE. - + END SUBROUTINE h5sis_simple_f ! @@ -1156,9 +1156,9 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: space_id END FUNCTION h5sset_extent_none_c END INTERFACE - + hdferr = h5sset_extent_none_c(space_id) - + END SUBROUTINE h5sset_extent_none_f ! !****s* H5S/h5sselect_hyperslab_f @@ -1196,7 +1196,7 @@ CONTAINS SUBROUTINE h5sselect_hyperslab_f(space_id, OPERATOR, start, count, & hdferr, stride, BLOCK) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(IN) :: space_id INTEGER, INTENT(IN) :: OPERATOR INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count @@ -1208,7 +1208,7 @@ CONTAINS INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride INTEGER :: rank INTEGER :: error1, error2 - + INTERFACE INTEGER FUNCTION h5sselect_hyperslab_c(space_id, OPERATOR, & start, count, stride, BLOCK) BIND(C,NAME='h5sselect_hyperslab_c') @@ -1248,7 +1248,7 @@ CONTAINS DEALLOCATE(def_block) RETURN ENDIF - + IF (.NOT.PRESENT(stride).AND. PRESENT(BLOCK)) THEN ALLOCATE(def_stride(rank), stat=error2) IF (error2.NE.0) THEN @@ -1273,7 +1273,7 @@ CONTAINS def_stride, def_block) DEALLOCATE(def_block) DEALLOCATE(def_stride) - + END SUBROUTINE h5sselect_hyperslab_f ! !$! ! !$!****s* H5S/h5scombine_hyperslab_f @@ -1618,10 +1618,10 @@ CONTAINS INTEGER, INTENT(OUT) :: TYPE END FUNCTION h5sget_select_type_c END INTERFACE - + hdferr = h5sget_select_type_c(space_id, TYPE) RETURN - + END SUBROUTINE h5sget_select_type_f ! @@ -1779,7 +1779,7 @@ CONTAINS ! January, 28 2016 ! SOURCE SUBROUTINE h5sget_regular_hyperslab_f(space_id, start, stride, count, block, hdferr) - + IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSIZE_T), INTENT(OUT), DIMENSION(*), TARGET :: start @@ -1790,7 +1790,7 @@ CONTAINS !***** TYPE(C_PTR) :: start_c, stride_c, count_c, block_c INTEGER :: n - + INTERFACE INTEGER FUNCTION h5sget_regular_hyperslab(space_id, start, stride, count, block) BIND(C,NAME='H5Sget_regular_hyperslab') IMPORT :: HID_T, C_PTR @@ -1809,7 +1809,7 @@ CONTAINS IF(INT(h5sget_regular_hyperslab(space_id, start_c, stride_c, count_c, block_c)).LT.0) hdferr = -1 - ! Reverse the C arrays description values of the hyperslab because + ! Reverse the C arrays description values of the hyperslab because ! the hyperslab was for a C stored hyperslab CALL H5Sget_simple_extent_ndims_f(space_id,n,hdferr) @@ -1848,8 +1848,8 @@ CONTAINS LOGICAL :: IsRegular INTEGER, INTENT(OUT) :: hdferr !***** - INTEGER(C_INT) :: status - + INTEGER(C_INT) :: status + INTERFACE INTEGER(C_INT) FUNCTION H5Sis_regular_hyperslab(space_id) BIND(C,NAME='H5Sis_regular_hyperslab') IMPORT :: HID_T, C_INT diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90 index 46c8f39..25eb613 100644 --- a/fortran/src/H5Tff.F90 +++ b/fortran/src/H5Tff.F90 @@ -28,7 +28,7 @@ ! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** ! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** ! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| -! +! ! If you add a new function here then you MUST add the function name to the ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. @@ -41,7 +41,7 @@ MODULE H5T USE H5GLOBAL IMPLICIT NONE - PRIVATE h5tenum_insert_f03, h5tenum_insert_f90 + PRIVATE h5tenum_insert_f03, h5tenum_insert_f90 !****t* H5T/hvl_t ! Fortran2003 Derived Type: @@ -92,7 +92,7 @@ CONTAINS ! SOURCE SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: name INTEGER(HID_T), INTENT(OUT) :: type_id INTEGER, INTENT(OUT) :: hdferr @@ -231,7 +231,7 @@ CONTAINS ! SOURCE SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(OUT) :: new_type_id INTEGER, INTENT(OUT) :: hdferr !***** @@ -242,7 +242,7 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: new_type_id END FUNCTION h5tcopy_c END INTERFACE - + hdferr = h5tcopy_c(type_id, new_type_id) END SUBROUTINE h5tcopy_f ! @@ -288,7 +288,7 @@ CONTAINS INTEGER :: c_flag END FUNCTION h5tequal_c END INTERFACE - + flag = .FALSE. hdferr = h5tequal_c(type1_id, type2_id, c_flag) IF(c_flag .GT. 0) flag = .TRUE. @@ -329,7 +329,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: type_id END FUNCTION h5tclose_c END INTERFACE - + hdferr = h5tclose_c(type_id) END SUBROUTINE h5tclose_f ! @@ -356,7 +356,7 @@ CONTAINS ! H5T_REFERENCE_F (7) ! H5T_ENUM_F (8) ! H5T_VLEN_F (9) -! H5T_ARRAY_F (10) +! H5T_ARRAY_F (10) ! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR @@ -372,7 +372,7 @@ CONTAINS SUBROUTINE h5tget_class_f(type_id, class, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: class + INTEGER, INTENT(OUT) :: class INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE @@ -425,7 +425,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(OUT) :: size END FUNCTION h5tget_size_c END INTERFACE - + hdferr = h5tget_size_c(type_id, size) END SUBROUTINE h5tget_size_f @@ -469,7 +469,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: size END FUNCTION h5tset_size_c END INTERFACE - + hdferr = h5tset_size_c(type_id, size) END SUBROUTINE h5tset_size_f @@ -519,7 +519,7 @@ CONTAINS INTEGER, INTENT(OUT) :: order END FUNCTION h5tget_order_c END INTERFACE - + hdferr = h5tget_order_c(type_id, order) END SUBROUTINE h5tget_order_f ! @@ -567,7 +567,7 @@ CONTAINS INTEGER, INTENT(IN) :: order END FUNCTION h5tset_order_c END INTERFACE - + hdferr = h5tset_order_c(type_id, order) END SUBROUTINE h5tset_order_f @@ -600,7 +600,7 @@ CONTAINS IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(SIZE_T), INTENT(OUT) :: precision - INTEGER, INTENT(OUT) :: hdferr + INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE INTEGER FUNCTION h5tget_precision_c(type_id, PRECISION) BIND(C,NAME='h5tget_precision_c') @@ -642,7 +642,7 @@ CONTAINS SUBROUTINE h5tset_precision_f(type_id, PRECISION, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: PRECISION + INTEGER(SIZE_T), INTENT(IN) :: PRECISION INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE @@ -653,7 +653,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: PRECISION END FUNCTION h5tset_precision_c END INTERFACE - + hdferr = h5tset_precision_c(type_id, PRECISION) END SUBROUTINE h5tset_precision_f @@ -695,10 +695,10 @@ CONTAINS INTEGER(SIZE_T), INTENT(OUT) :: offset END FUNCTION h5tget_offset_c END INTERFACE - + hdferr = h5tget_offset_c(type_id, offset) END SUBROUTINE h5tget_offset_f - + ! !****s* H5T/h5tset_offset_f ! @@ -737,10 +737,10 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: offset END FUNCTION h5tset_offset_c END INTERFACE - + hdferr = h5tset_offset_c(type_id, offset) END SUBROUTINE h5tset_offset_f - + ! !****s* H5T/h5tget_pad_f ! @@ -757,7 +757,7 @@ CONTAINS ! lsbpad - least-significant bit padding type ! msbpad - most-significant bit padding type ! Possible values of padding type are: -! H5T_PAD_ERROR_F +! H5T_PAD_ERROR_F ! H5T_PAD_ZERO_F ! H5T_PAD_ONE_F ! H5T_PAD_BACKGROUND_F @@ -790,7 +790,7 @@ CONTAINS INTEGER, INTENT(OUT) :: msbpad END FUNCTION h5tget_pad_c END INTERFACE - + hdferr = h5tget_pad_c(type_id, lsbpad, msbpad) END SUBROUTINE h5tget_pad_f @@ -841,10 +841,10 @@ CONTAINS INTEGER, INTENT(IN) :: msbpad END FUNCTION h5tset_pad_c END INTERFACE - + hdferr = h5tset_pad_c(type_id, lsbpad, msbpad) END SUBROUTINE h5tset_pad_f - + ! !****s* H5T/h5tget_sign_f ! @@ -859,7 +859,7 @@ CONTAINS ! OUTPUTS ! sign - sign type ! Possible values are: -! - Unsigned integer type +! - Unsigned integer type ! H5T_SGN_NONE_F = 0 ! - Two's complement signed integer type ! H5T_SGN_2_F = 1 @@ -877,7 +877,7 @@ CONTAINS ! SOURCE SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: sign INTEGER, INTENT(OUT) :: hdferr !***** @@ -890,10 +890,10 @@ CONTAINS INTEGER, INTENT(OUT) :: sign END FUNCTION h5tget_sign_c END INTERFACE - + hdferr = h5tget_sign_c(type_id, sign) END SUBROUTINE h5tget_sign_f - + ! !****s* H5T/h5tset_sign_f ! @@ -907,7 +907,7 @@ CONTAINS ! type_id - datatype identifier ! sign - sign type ! Possible values are: -! - Unsigned integer type +! - Unsigned integer type ! H5T_SGN_NONE_F = 0 ! - Two's complement signed integer type ! H5T_SGN_2_F = 1 @@ -938,7 +938,7 @@ CONTAINS INTEGER, INTENT(IN) :: sign END FUNCTION h5tset_sign_c END INTERFACE - + hdferr = h5tset_sign_c(type_id, sign) END SUBROUTINE h5tset_sign_f @@ -994,7 +994,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(OUT) :: msize END FUNCTION h5tget_fields_c END INTERFACE - + hdferr = h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) END SUBROUTINE h5tget_fields_f @@ -1028,7 +1028,7 @@ CONTAINS ! SOURCE SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(SIZE_T), INTENT(IN) :: spos INTEGER(SIZE_T), INTENT(IN) :: epos INTEGER(SIZE_T), INTENT(IN) :: esize @@ -1050,10 +1050,10 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: msize END FUNCTION h5tset_fields_c END INTERFACE - + hdferr = h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) END SUBROUTINE h5tset_fields_f - + ! !****s* H5T/h5tget_ebias_f ! @@ -1084,7 +1084,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(OUT) :: ebias INTEGER, INTENT(OUT) :: hdferr !***** - + INTERFACE INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) BIND(C,NAME='h5tget_ebias_c') IMPORT :: HID_T, SIZE_T @@ -1093,7 +1093,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(OUT) :: ebias END FUNCTION h5tget_ebias_c END INTERFACE - + hdferr = h5tget_ebias_c(type_id, ebias) END SUBROUTINE h5tget_ebias_f @@ -1135,7 +1135,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: ebias END FUNCTION h5tset_ebias_c END INTERFACE - + hdferr = h5tset_ebias_c(type_id, ebias) END SUBROUTINE h5tset_ebias_f @@ -1182,7 +1182,7 @@ CONTAINS INTEGER, INTENT(OUT) :: norm END FUNCTION h5tget_norm_c END INTERFACE - + hdferr = h5tget_norm_c(type_id, norm) END SUBROUTINE h5tget_norm_f @@ -1228,7 +1228,7 @@ CONTAINS INTEGER, INTENT(IN) :: norm END FUNCTION h5tset_norm_c END INTERFACE - + hdferr = h5tset_norm_c(type_id, norm) END SUBROUTINE h5tset_norm_f @@ -1275,7 +1275,7 @@ CONTAINS INTEGER, INTENT(OUT) :: padtype END FUNCTION h5tget_inpad_c END INTERFACE - + hdferr = h5tget_inpad_c(type_id, padtype) END SUBROUTINE h5tget_inpad_f @@ -1321,7 +1321,7 @@ CONTAINS INTEGER, INTENT(IN) :: padtype END FUNCTION h5tset_inpad_c END INTERFACE - + hdferr = h5tset_inpad_c(type_id, padtype) END SUBROUTINE h5tset_inpad_f @@ -1366,7 +1366,7 @@ CONTAINS INTEGER, INTENT(OUT) :: cset END FUNCTION h5tget_cset_c END INTERFACE - + hdferr = h5tget_cset_c(type_id, cset) END SUBROUTINE h5tget_cset_f @@ -1411,7 +1411,7 @@ CONTAINS INTEGER, INTENT(IN) :: cset END FUNCTION h5tset_cset_c END INTERFACE - + hdferr = h5tset_cset_c(type_id, cset) END SUBROUTINE h5tset_cset_f ! @@ -1457,7 +1457,7 @@ CONTAINS INTEGER, INTENT(OUT) :: strpad END FUNCTION h5tget_strpad_c END INTERFACE - + hdferr = h5tget_strpad_c(type_id, strpad) END SUBROUTINE h5tget_strpad_f @@ -1547,7 +1547,7 @@ CONTAINS INTEGER, INTENT(OUT) :: num_members END FUNCTION h5tget_nmembers_c END INTERFACE - + hdferr = h5tget_nmembers_c(type_id, num_members) END SUBROUTINE h5tget_nmembers_f @@ -1596,7 +1596,7 @@ CONTAINS INTEGER, INTENT(OUT) :: namelen END FUNCTION h5tget_member_name_c END INTERFACE - + hdferr = h5tget_member_name_c(type_id, index, member_name, namelen) END SUBROUTINE h5tget_member_name_f @@ -1641,7 +1641,7 @@ CONTAINS INTEGER(SIZE_T), INTENT(OUT) :: offset END FUNCTION h5tget_member_offset_c END INTERFACE - + hdferr = h5tget_member_offset_c(type_id, member_no, offset ) END SUBROUTINE h5tget_member_offset_f ! @@ -1686,11 +1686,11 @@ CONTAINS INTEGER, INTENT(OUT) :: index END FUNCTION h5tget_member_index_c END INTERFACE - + namelen = LEN(name) hdferr = h5tget_member_index_c(type_id, name, namelen, index) END SUBROUTINE h5tget_member_index_f - + ! !$! ! !$!****s* H5T/h5tget_member_dim_f @@ -1774,9 +1774,9 @@ CONTAINS INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims END FUNCTION h5tget_array_dims_c END INTERFACE - + hdferr = h5tget_array_dims_c(type_id, dims) - + END SUBROUTINE h5tget_array_dims_f ! @@ -1817,9 +1817,9 @@ CONTAINS INTEGER, INTENT(OUT) :: ndims END FUNCTION h5tget_array_ndims_c END INTERFACE - + hdferr = h5tget_array_ndims_c(type_id, ndims) - + END SUBROUTINE h5tget_array_ndims_f ! @@ -1860,9 +1860,9 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: base_type_id END FUNCTION h5tget_super_c END INTERFACE - + hdferr = h5tget_super_c(type_id, base_type_id) - + END SUBROUTINE h5tget_super_f ! @@ -1908,7 +1908,7 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: datatype END FUNCTION h5tget_member_type_c END INTERFACE - + hdferr = h5tget_member_type_c(type_id, field_idx , datatype) END SUBROUTINE h5tget_member_type_f @@ -1992,7 +1992,7 @@ CONTAINS SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(IN) :: name INTEGER(SIZE_T), INTENT(IN) :: offset INTEGER(HID_T), INTENT(IN) :: field_id INTEGER, INTENT(OUT) :: hdferr @@ -2011,11 +2011,11 @@ CONTAINS INTEGER :: namelen END FUNCTION h5tinsert_c END INTERFACE - + namelen = LEN(name) hdferr = h5tinsert_c(type_id, name, namelen, offset, field_id ) END SUBROUTINE h5tinsert_f - + ! !****s* H5T/h5tpack_f ! @@ -2051,10 +2051,10 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: type_id END FUNCTION h5tpack_c END INTERFACE - + hdferr = h5tpack_c(type_id) END SUBROUTINE h5tpack_f - + ! !$! ! !$!****s* H5T/h5tinsert_array_f ! !$! @@ -2150,9 +2150,9 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: type_id END FUNCTION h5tarray_create_c END INTERFACE - + hdferr = h5tarray_create_c(base_id, rank, dims, type_id) - + END SUBROUTINE h5tarray_create_f ! @@ -2194,7 +2194,7 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: new_type_id END FUNCTION h5tenum_create_c END INTERFACE - + hdferr = h5tenum_create_c(parent_id, new_type_id) END SUBROUTINE h5tenum_create_f ! @@ -2225,9 +2225,9 @@ CONTAINS ! port). March 7, 2001 ! ! NOTE -! According to the standard: Because an INTENT(OUT) variable is considered undefined -! on entry to the procedure, any default initialization specified for its type will -! be applied. So we need to blank out the "name" to be portable and eliminate any +! According to the standard: Because an INTENT(OUT) variable is considered undefined +! on entry to the procedure, any default initialization specified for its type will +! be applied. So we need to blank out the "name" to be portable and eliminate any ! characters the "name' may contain upon entry, depending on compiler implementation. ! SOURCE SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) @@ -2249,7 +2249,7 @@ CONTAINS INTEGER, INTENT(IN) :: value END FUNCTION h5tenum_nameof_c END INTERFACE - + name(1:LEN(name)) = ' ' hdferr = h5tenum_nameof_c(type_id, value, name, namelen) @@ -2302,7 +2302,7 @@ CONTAINS INTEGER, INTENT(OUT) :: value END FUNCTION h5tenum_valueof_c END INTERFACE - + namelen = LEN(name) hdferr = h5tenum_valueof_c(type_id, name, namelen, value) END SUBROUTINE h5tenum_valueof_f @@ -2349,10 +2349,10 @@ CONTAINS INTEGER, INTENT(OUT) :: value END FUNCTION h5tget_member_value_c END INTERFACE - + hdferr = h5tget_member_value_c(type_id, member_no, value) END SUBROUTINE h5tget_member_value_f - + ! !****s* H5T/h5tset_tag_f ! @@ -2385,7 +2385,7 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr !***** INTEGER :: taglen - + INTERFACE INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen) BIND(C,NAME='h5tset_tag_c') IMPORT :: C_CHAR @@ -2396,11 +2396,11 @@ CONTAINS INTEGER :: taglen END FUNCTION h5tset_tag_c END INTERFACE - + taglen = LEN(tag) hdferr = h5tset_tag_c(type_id, tag, taglen) END SUBROUTINE h5tset_tag_f - + ! !****s* H5T/h5tget_tag_f ! @@ -2434,7 +2434,7 @@ CONTAINS INTEGER, INTENT(OUT) :: taglen INTEGER, INTENT(OUT) :: hdferr !***** - INTEGER(SIZE_T):: tag_size ! Declared character length of tab + INTEGER(SIZE_T):: tag_size ! Declared character length of tab INTERFACE INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) & BIND(C,NAME='h5tget_tag_c') @@ -2447,11 +2447,11 @@ CONTAINS INTEGER, INTENT(OUT) :: taglen END FUNCTION h5tget_tag_c END INTERFACE - + tag_size = LEN(tag) hdferr = h5tget_tag_c(type_id, tag, tag_size, taglen ) END SUBROUTINE h5tget_tag_f - + ! !****s* H5T/h5tvlen_create_f ! @@ -2489,7 +2489,7 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: vltype_id END FUNCTION h5tvlen_create_c END INTERFACE - + hdferr = h5tvlen_create_c(type_id, vltype_id) END SUBROUTINE h5tvlen_create_f @@ -2517,11 +2517,11 @@ CONTAINS SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id - LOGICAL, INTENT(OUT) :: status + LOGICAL, INTENT(OUT) :: status INTEGER, INTENT(OUT) :: hdferr !***** INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - + INTERFACE INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) & BIND(C,NAME='h5tis_variable_str_c') @@ -2531,13 +2531,13 @@ CONTAINS INTEGER :: flag END FUNCTION h5tis_variable_str_c END INTERFACE - + hdferr = h5tis_variable_str_c(type_id, flag) status = .TRUE. IF (flag .EQ. 0) status = .FALSE. - + END SUBROUTINE h5tis_variable_str_f - + ! !****s* H5T/h5tget_member_class_f ! @@ -2728,7 +2728,7 @@ CONTAINS SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id + INTEGER(HID_T), INTENT(OUT) :: obj_id INTEGER, INTENT(OUT) :: hdferr !***** INTERFACE @@ -2811,7 +2811,7 @@ CONTAINS ! SOURCE SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T), INTENT(IN) :: dtype_id INTEGER(HID_T), INTENT(OUT) :: dtpl_id INTEGER, INTENT(OUT) :: hdferr !***** @@ -2884,7 +2884,7 @@ CONTAINS ! ! INPUTS ! dtype_id - Datatype identifier for the dataset datatype. -! +! ! direction - Direction of search: ! H5T_DIR_DEFAULT, default direction is inscendent, ! H5T_DIR_ASCEND , in inscendent order, @@ -2901,8 +2901,8 @@ CONTAINS ! SOURCE SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER, INTENT(IN) :: direction + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER, INTENT(IN) :: direction INTEGER(HID_T), INTENT(OUT) :: native_dtype_id INTEGER, INTENT(OUT) :: hdferr !***** @@ -3025,7 +3025,7 @@ CONTAINS 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 @@ -3061,7 +3061,7 @@ CONTAINS 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') @@ -3074,7 +3074,7 @@ CONTAINS 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 diff --git a/fortran/src/H5VLff.F90 b/fortran/src/H5VLff.F90 index 32dd7d7..ae03cee 100644 --- a/fortran/src/H5VLff.F90 +++ b/fortran/src/H5VLff.F90 @@ -82,7 +82,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN), VALUE :: vipl_id END FUNCTION H5VLregister_connector_by_name END INTERFACE - + vipl_id_default = H5P_DEFAULT_F IF(PRESENT(vipl_id)) vipl_id_default = vipl_id @@ -136,7 +136,7 @@ CONTAINS ! INPUTS ! name - Connector name ! OUTPUTS -! registered - state of VOL class registration +! registered - state of VOL class registration ! hdferr - Returns 0 if successful and -1 if fails ! SOURCE @@ -156,7 +156,7 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name END FUNCTION H5VLis_connector_registered_by_name END INTERFACE - + c_name = TRIM(name)//C_NULL_CHAR registered_c = H5VLis_connector_registered_by_name(c_name) @@ -180,7 +180,7 @@ CONTAINS ! INPUTS ! value - Connector value ! OUTPUTS -! registered - state of VOL class registration +! registered - state of VOL class registration ! hdferr - Returns 0 if successful and -1 if fails ! SOURCE @@ -278,10 +278,10 @@ CONTAINS CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name END FUNCTION H5VLget_connector_id_by_name END INTERFACE - + c_name = TRIM(name)//C_NULL_CHAR vol_id = H5VLget_connector_id_by_name(c_name) - + hdferr = 0 IF(vol_id.LT.0)THEN hdferr = -1 @@ -367,7 +367,7 @@ CONTAINS END SUBROUTINE H5VLget_connector_name_f -! +! ! !****s* H5VL/H5VLclose_f ! diff --git a/fortran/src/H5Zff.F90 b/fortran/src/H5Zff.F90 index 848f047..6bd7b45 100644 --- a/fortran/src/H5Zff.F90 +++ b/fortran/src/H5Zff.F90 @@ -56,7 +56,7 @@ CONTAINS ! H5Z_FILTER_SCALEOFFSET_F ! H5Z_FILTER_SHUFFLE_F ! H5Z_FILTER_FLETCHER32_F -! +! ! OUTPUTS ! hdferr - Error code ! Success: 0 @@ -147,7 +147,7 @@ CONTAINS ! H5Z_FILTER_SHUFFLE_F ! H5Z_FILTER_FLETCHER32_Ffilter ! OUTPUTS -! config_flags - Flag, indicates if filter has its encoder +! config_flags - Flag, indicates if filter has its encoder ! and/or decoder available, possibly containing the ! following values: ! H5Z_FILTER_ENCODE_ENABLED_F diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 index be53806..e81e1c0 100644 --- a/fortran/src/H5_buildiface.F90 +++ b/fortran/src/H5_buildiface.F90 @@ -13,8 +13,8 @@ ! depending on which of the KIND values are found. ! ! NOTES -! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF -! depending on availablity.It generates code that makes use of +! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF +! depending on availablity.It generates code that makes use of ! STORAGE_SIZE/SIZEOF in H5_gen.F90. STORAGE_SIZE is standard ! compliant and should always be chosen over SIZEOF. ! @@ -98,7 +98,7 @@ PROGRAM H5_buildiface ! ! DEVELOPER'S NOTES: ! -! Only interfaces with arrays of rank 7 and less are provided. Even-though, the F2008 +! Only interfaces with arrays of rank 7 and less are provided. Even-though, the F2008 ! standard extended the maximum rank to 15, it was decided that user's should use the ! new APIs to handle those use cases. Handling rank 7 and less is for backward compatibility ! with the Fortran 90/95 APIs codes which could never handle ranks greater than 7. @@ -195,7 +195,7 @@ PROGRAM H5_buildiface DO k = 1, 8 WRITE(11,'(2X,A)') "PRIVATE h5dwrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) ENDDO - END DO + END DO DO k = 2, 8 WRITE(11,'(2X,A)') "PRIVATE h5dwrite_ckind_rank"//chr_rank(k) END DO @@ -211,7 +211,7 @@ PROGRAM H5_buildiface WRITE(chr2,'(I2)') j DO k = 1, 8 WRITE(11,'(2X,A)') "PRIVATE h5dread_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO + ENDDO END DO DO k = 2, 8 WRITE(11,'(2X,A)') "PRIVATE h5dread_ckind_rank"//chr_rank(k) @@ -313,7 +313,7 @@ PROGRAM H5_buildiface DO k = 1, 8 WRITE(11,'(5X,A)') "MODULE PROCEDURE h5dwrite_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) ENDDO - END DO + END DO DO k = 2, 8 WRITE(11,'(5X,A)') "MODULE PROCEDURE h5dwrite_ckind_rank"//chr_rank(k) END DO @@ -333,7 +333,7 @@ PROGRAM H5_buildiface WRITE(chr2,'(I2)') j DO k = 1, 8 WRITE(11,'(5X,A)') "MODULE PROCEDURE h5dread_ikind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) - ENDDO + ENDDO END DO DO k = 2, 8 WRITE(11,'(5X,A)') "MODULE PROCEDURE h5dread_ckind_rank"//chr_rank(k) @@ -448,7 +448,7 @@ PROGRAM H5_buildiface ! up to 7 dimensions. ! ! Fortran90 Interface: -!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, dims, hdferr) +!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, dims, hdferr) !! INTEGER(HID_T) , INTENT(IN) :: attr_id !! INTEGER(HID_T) , INTENT(IN) :: memtype_id !! TYPE , INTENT(IN) :: buf @@ -476,7 +476,7 @@ PROGRAM H5_buildiface WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - + WRITE(11,'(A)') f_ptr_line(j) WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' WRITE(11,'(A)') ' END SUBROUTINE h5awrite_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) @@ -502,7 +502,7 @@ PROGRAM H5_buildiface WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - + WRITE(11,'(A)') f_ptr_line(j) WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' WRITE(11,'(A)') ' END SUBROUTINE h5awrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) @@ -524,7 +524,7 @@ PROGRAM H5_buildiface WRITE(11,'(A)') ' CHARACTER(LEN=*) , INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - + WRITE(11,'(A)') fchr_ptr_line(j) WRITE(11,'(A)') ' hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)' WRITE(11,'(A)') ' END SUBROUTINE h5awrite_ckind_rank'//chr_rank(j) @@ -574,7 +574,7 @@ PROGRAM H5_buildiface ! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers ! up to 7 dimensions. ! Fortran90 Interface: -!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) +!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, dims, hdferr) !! INTEGER(HID_T) , INTENT(IN) :: attr_id !! INTEGER(HID_T) , INTENT(IN) :: memtype_id !! TYPE , INTENT(INOUT) :: buf @@ -599,7 +599,7 @@ PROGRAM H5_buildiface WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - + WRITE(11,'(A)') f_ptr_line(j) WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' WRITE(11,'(A)') ' END SUBROUTINE h5aread_rkind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) @@ -623,7 +623,7 @@ PROGRAM H5_buildiface WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf' WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - + WRITE(11,'(A)') f_ptr_line(j) WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' WRITE(11,'(A)') ' END SUBROUTINE h5aread_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) @@ -643,7 +643,7 @@ PROGRAM H5_buildiface WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' WRITE(11,'(A)') ' INTEGER , INTENT(OUT) :: hdferr' WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' - + WRITE(11,'(A)') fchr_ptr_line(j) WRITE(11,'(A)') ' hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)' WRITE(11,'(A)') ' END SUBROUTINE h5aread_ckind_rank'//chr_rank(j) @@ -656,7 +656,7 @@ PROGRAM H5_buildiface ! h5dread_f ! -! NAME +! NAME ! h5dread_f ! ! PURPOSE @@ -683,7 +683,7 @@ PROGRAM H5_buildiface ! Elena Pourmal ! August 12, 1999 ! -! HISTORY +! HISTORY ! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows ! port). February 28, 2001 @@ -693,7 +693,7 @@ PROGRAM H5_buildiface ! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg ! functions. April 2, 2001 ! -! NOTES +! NOTES ! This function is overloaded to read INTEGER, ! REAL, DOUBLE PRECISION and CHARACTER buffers ! up to 7 dimensions, and one dimensional buffers @@ -886,7 +886,7 @@ PROGRAM H5_buildiface WRITE(11,'(A)') ' file_space_id_default, xfer_prp_default, f_ptr)' WRITE(11,'(A)') ' END SUBROUTINE h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) ENDDO - ENDDO + ENDDO DO j = 2, 8 ! DLL definitions for windows WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)' @@ -938,7 +938,7 @@ PROGRAM H5_buildiface WRITE(11,'(A)') ' IMPLICIT NONE' WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: prp_id' WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: type_id' - WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: fillvalue' + WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), TARGET :: fillvalue' WRITE(11,'(A)') ' INTEGER, INTENT(OUT) :: hdferr ' WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr ' WRITE(11,'(A)') ' f_ptr = C_LOC(fillvalue)' @@ -989,7 +989,7 @@ PROGRAM H5_buildiface WRITE(11,'(A)') ' f_ptr = C_LOC(value)' WRITE(11,'(A)') ' name_len = LEN(name)' WRITE(11,'(A)') ' hdferr = h5pget_c(prp_id, name, name_len, f_ptr)' - + WRITE(11,'(A)') ' END SUBROUTINE h5pset_kind_'//TRIM(ADJUSTL(chr2)) ENDDO diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 7c7c751..2c32277 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -53,7 +53,7 @@ MODULE H5LIB ! INTEGER, PARAMETER :: H5generic_FLAGS_LEN = 9 INTEGER, DIMENSION(1:H5generic_FLAGS_LEN) :: H5generic_flags - + INTEGER, PARAMETER :: H5generic_haddr_FLAGS_LEN = 1 INTEGER(HADDR_T), DIMENSION(1:H5generic_haddr_FLAGS_LEN) :: H5generic_haddr_flags ! @@ -81,7 +81,7 @@ MODULE H5LIB INTEGER, PARAMETER :: H5FD_FLAGS_LEN = 11 INTEGER, DIMENSION(1:H5FD_FLAGS_LEN) :: H5FD_flags ! - ! H5FD file drivers flags declaration + ! H5FD file drivers flags declaration ! INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7 INTEGER(HID_T), DIMENSION(1:H5FD_HID_FLAGS_LEN) :: H5FD_hid_flags @@ -170,7 +170,7 @@ CONTAINS ! October 13, 2011 ! Fortran90 Interface: SUBROUTINE h5open_f(error) - USE H5F, ONLY : h5fget_obj_count_f, H5OPEN_NUM_OBJ + USE H5F, ONLY : h5fget_obj_count_f, H5OPEN_NUM_OBJ IMPLICIT NONE INTEGER, INTENT(OUT) :: error INTEGER(SIZE_T) :: H5OPEN_NUM_OBJ_LOC = 0 @@ -249,13 +249,13 @@ CONTAINS END FUNCTION h5init1_flags_c END INTERFACE - + error = h5init_types_c(predef_types, floating_types, integer_types) - H5T_NATIVE_INTEGER_KIND(1:5) = predef_types(1:5) + H5T_NATIVE_INTEGER_KIND(1:5) = predef_types(1:5) H5T_NATIVE_INTEGER = predef_types(6) H5T_NATIVE_REAL = predef_types(7) - H5T_NATIVE_DOUBLE = predef_types(8) + H5T_NATIVE_DOUBLE = predef_types(8) H5T_NATIVE_CHARACTER = predef_types(9) H5T_STD_REF_OBJ = predef_types(10) H5T_STD_REF_DSETREG = predef_types(11) @@ -267,12 +267,12 @@ CONTAINS H5T_NATIVE_B32 = predef_types(17) H5T_NATIVE_B64 = predef_types(18) H5T_NATIVE_FLOAT_128 = predef_types(19) - + H5T_IEEE_F32BE = floating_types(1) H5T_IEEE_F32LE = floating_types(2) H5T_IEEE_F64BE = floating_types(3) - H5T_IEEE_F64LE = floating_types(4) - + H5T_IEEE_F64LE = floating_types(4) + H5T_STD_I8BE = integer_types(1) H5T_STD_I8LE = integer_types(2) H5T_STD_I16BE = integer_types(3) @@ -362,12 +362,12 @@ CONTAINS H5_ITER_DEC_F = H5generic_flags(7) H5_ITER_NATIVE_F = H5generic_flags(8) H5_ITER_N_F = H5generic_flags(9) - + HADDR_UNDEF_F = H5generic_haddr_flags(1) ! ! H5G flags ! - H5G_UNKNOWN_F = H5G_flags(1) + H5G_UNKNOWN_F = H5G_flags(1) H5G_GROUP_F = H5G_flags(2) H5G_DATASET_F = H5G_flags(3) H5G_TYPE_F = H5G_flags(4) @@ -411,7 +411,7 @@ CONTAINS H5D_VDS_FIRST_MISSING_F = H5D_flags(27) H5D_VDS_LAST_AVAILABLE_F = H5D_flags(28) H5D_VIRTUAL_F = H5D_flags(29) - + H5D_CHUNK_CACHE_NSLOTS_DFLT_F = H5D_size_flags(1) H5D_CHUNK_CACHE_NBYTES_DFLT_F = H5D_size_flags(2) ! @@ -420,7 +420,7 @@ CONTAINS H5E_DEFAULT_F = H5E_hid_flags(1) H5E_MAJOR_F = H5E_flags(1) - H5E_MINOR_F = H5E_flags(2) + H5E_MINOR_F = H5E_flags(2) H5E_WALK_UPWARD_F = H5E_flags(3) H5E_WALK_DOWNWARD_F = H5E_flags(4) ! @@ -439,7 +439,7 @@ CONTAINS H5FD_MEM_NTYPES_F = H5FD_flags(11) ! ! H5FD file driver flags - ! + ! H5FD_CORE_F = H5FD_hid_flags(1) H5FD_FAMILY_F = H5FD_hid_flags(2) H5FD_LOG_F = H5FD_hid_flags(3) @@ -469,7 +469,7 @@ CONTAINS H5I_INVALID_HID_F = H5I_flags(17) ! ! H5L flags - ! + ! H5L_TYPE_ERROR_F = H5L_flags(1) H5L_TYPE_HARD_F = H5L_flags(2) H5L_TYPE_SOFT_F = H5L_flags(3) @@ -486,25 +486,25 @@ CONTAINS H5O_COPY_WITHOUT_ATTR_FLAG_F = h5o_flags(5) H5O_COPY_PRESERVE_NULL_FLAG_F = h5o_flags(6) H5O_COPY_ALL_F = h5o_flags(7) - H5O_SHMESG_NONE_FLAG_F = h5o_flags(8) + H5O_SHMESG_NONE_FLAG_F = h5o_flags(8) H5O_SHMESG_SDSPACE_FLAG_F = h5o_flags(9) H5O_SHMESG_DTYPE_FLAG_F = h5o_flags(10) - H5O_SHMESG_FILL_FLAG_F = h5o_flags(11) - H5O_SHMESG_PLINE_FLAG_F = h5o_flags(12) - H5O_SHMESG_ATTR_FLAG_F = h5o_flags(13) - H5O_SHMESG_ALL_FLAG_F = h5o_flags(14) - H5O_HDR_CHUNK0_SIZE_F = h5o_flags(15) - H5O_HDR_ATTR_CRT_ORDER_TRACK_F = h5o_flags(16) - H5O_HDR_ATTR_CRT_ORDER_INDEX_F = h5o_flags(17) - H5O_HDR_ATTR_STORE_PHASE_CHA_F = h5o_flags(18) - H5O_HDR_STORE_TIMES_F = h5o_flags(19) + H5O_SHMESG_FILL_FLAG_F = h5o_flags(11) + H5O_SHMESG_PLINE_FLAG_F = h5o_flags(12) + H5O_SHMESG_ATTR_FLAG_F = h5o_flags(13) + H5O_SHMESG_ALL_FLAG_F = h5o_flags(14) + H5O_HDR_CHUNK0_SIZE_F = h5o_flags(15) + H5O_HDR_ATTR_CRT_ORDER_TRACK_F = h5o_flags(16) + H5O_HDR_ATTR_CRT_ORDER_INDEX_F = h5o_flags(17) + H5O_HDR_ATTR_STORE_PHASE_CHA_F = h5o_flags(18) + H5O_HDR_STORE_TIMES_F = h5o_flags(19) H5O_HDR_ALL_FLAGS_F = h5o_flags(20) - H5O_SHMESG_MAX_NINDEXES_F = h5o_flags(21) - H5O_SHMESG_MAX_LIST_SIZE_F = h5o_flags(22) - H5O_TYPE_UNKNOWN_F = h5o_flags(23) - H5O_TYPE_GROUP_F = h5o_flags(24) - H5O_TYPE_DATASET_F = h5o_flags(25) - H5O_TYPE_NAMED_DATATYPE_F = h5o_flags(26) + H5O_SHMESG_MAX_NINDEXES_F = h5o_flags(21) + H5O_SHMESG_MAX_LIST_SIZE_F = h5o_flags(22) + H5O_TYPE_UNKNOWN_F = h5o_flags(23) + H5O_TYPE_GROUP_F = h5o_flags(24) + H5O_TYPE_DATASET_F = h5o_flags(25) + H5O_TYPE_NAMED_DATATYPE_F = h5o_flags(26) H5O_TYPE_NTYPES_F = h5o_flags(27) H5O_INFO_ALL_F = h5o_flags(28) H5O_INFO_BASIC_F = h5o_flags(29) @@ -514,7 +514,7 @@ CONTAINS H5O_INFO_META_SIZE_F = h5o_flags(33) ! ! H5P flags - ! + ! H5P_FILE_CREATE_F = H5P_flags(1) H5P_FILE_ACCESS_F = H5P_flags(2) H5P_DATASET_CREATE_F = H5P_flags(3) @@ -535,21 +535,21 @@ CONTAINS H5P_LINK_ACCESS_F = H5P_flags(18) ! ! H5P integers flags - ! + ! H5P_CRT_ORDER_INDEXED_F = H5P_flags_int(1) H5P_CRT_ORDER_TRACKED_F = H5P_flags_int(2) ! ! H5R flags - ! + ! H5R_OBJECT_F = H5R_flags(1) H5R_DATASET_REGION_F = H5R_flags(2) ! ! H5S flags - ! + ! H5S_ALL_F = H5S_hid_flags(1) - + H5S_UNLIMITED_F = H5S_hsize_flags(1) - + H5S_SCALAR_F = H5S_flags(1) H5S_SIMPLE_F = H5S_flags(2) H5S_NULL_F = H5S_flags(3) @@ -570,7 +570,7 @@ CONTAINS H5S_SEL_ALL_F = H5S_flags(18) ! ! H5T flags declaration - ! + ! H5T_NO_CLASS_F = H5T_flags(1) H5T_INTEGER_F = H5T_flags(2) H5T_FLOAT_F = H5T_flags(3) diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index 46759cf..8cf601e 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -49,7 +49,7 @@ MODULE H5GLOBAL ENUMERATOR :: enum_dtype END ENUM INTEGER, PARAMETER :: ENUM_T = KIND(enum_dtype) - + ! Definitions for reference datatypes. ! If you change the value of these parameters, do not forget to change corresponding ! values in the H5f90.h file. @@ -87,7 +87,7 @@ MODULE H5GLOBAL INTEGER(HID_T), DIMENSION(1:PREDEF_TYPES_LEN) :: predef_types = -1 INTEGER(HID_T), DIMENSION(1:FLOATING_TYPES_LEN) :: floating_types = -1 INTEGER(HID_T), DIMENSION(1:INTEGER_TYPES_LEN) :: integer_types = -1 - + !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: H5T_NATIVE_REAL_C_FLOAT !DEC$ATTRIBUTES DLLEXPORT :: H5T_NATIVE_REAL_C_DOUBLE @@ -95,7 +95,7 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5T_NATIVE_INTEGER !DEC$ATTRIBUTES DLLEXPORT :: H5T_NATIVE_REAL !DEC$ATTRIBUTES DLLEXPORT :: H5T_NATIVE_DOUBLE - !DEC$ATTRIBUTES DLLEXPORT :: H5T_NATIVE_CHARACTER + !DEC$ATTRIBUTES DLLEXPORT :: H5T_NATIVE_CHARACTER !DEC$ATTRIBUTES DLLEXPORT :: H5T_STD_REF_OBJ !DEC$ATTRIBUTES DLLEXPORT :: H5T_STD_REF_DSETREG !DEC$ATTRIBUTES DLLEXPORT :: H5T_IEEE_F32BE @@ -136,14 +136,14 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5T_NATIVE_INTEGER_KIND !DEC$ATTRIBUTES DLLEXPORT :: H5T_NATIVE_FLOAT_128 !DEC$endif - + INTEGER(HID_T) :: H5T_NATIVE_REAL_C_FLOAT INTEGER(HID_T) :: H5T_NATIVE_REAL_C_DOUBLE INTEGER(HID_T) :: H5T_NATIVE_REAL_C_LONG_DOUBLE INTEGER(HID_T) :: H5T_NATIVE_INTEGER INTEGER(HID_T) :: H5T_NATIVE_REAL INTEGER(HID_T) :: H5T_NATIVE_DOUBLE - INTEGER(HID_T) :: H5T_NATIVE_CHARACTER + INTEGER(HID_T) :: H5T_NATIVE_CHARACTER INTEGER(HID_T) :: H5T_STD_REF_OBJ INTEGER(HID_T) :: H5T_STD_REF_DSETREG INTEGER(HID_T) :: H5T_IEEE_F32BE @@ -202,7 +202,7 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5_ITER_N_F !DEC$ATTRIBUTES DLLEXPORT :: HADDR_UNDEF_F !DEC$endif - + INTEGER :: H5_INDEX_UNKNOWN_F INTEGER :: H5_INDEX_NAME_F INTEGER :: H5_INDEX_CRT_ORDER_F @@ -244,7 +244,7 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V112_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V114_F !DEC$endif - + INTEGER :: H5F_ACC_RDWR_F INTEGER :: H5F_ACC_RDONLY_F INTEGER :: H5F_ACC_TRUNC_F @@ -289,7 +289,7 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5G_STORAGE_TYPE_COMPACT_F !DEC$ATTRIBUTES DLLEXPORT :: H5G_STORAGE_TYPE_DENSE_F !DEC$endif - + INTEGER :: H5G_UNKNOWN_F INTEGER :: H5G_GROUP_F INTEGER :: H5G_DATASET_F @@ -340,7 +340,7 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5D_VDS_LAST_AVAILABLE_F !DEC$ATTRIBUTES DLLEXPORT :: H5D_VIRTUAL_F !DEC$endif - + INTEGER :: H5D_COMPACT_F INTEGER :: H5D_CONTIGUOUS_F INTEGER :: H5D_CHUNKED_F @@ -369,7 +369,7 @@ MODULE H5GLOBAL ! characters for variable names in Fortran. ! shortened "_CONTIGUOUS" to "_CONTIG" to satisfy the limit of 31 ! characters for variable names in Fortran. - + INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NBYTES_DFLT_F @@ -493,7 +493,7 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5L_SAME_LOC_F !DEC$ATTRIBUTES DLLEXPORT :: H5L_LINK_CLASS_T_VERS_F !DEC$endif - + INTEGER :: H5L_TYPE_ERROR_F INTEGER :: H5L_TYPE_HARD_F INTEGER :: H5L_TYPE_SOFT_F @@ -539,7 +539,7 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5O_INFO_META_SIZE_F ! !DEC$endif - + INTEGER :: H5O_COPY_SHALLOW_HIERARCHY_F ! *** THESE VARIABLES DO INTEGER :: H5O_COPY_EXPAND_SOFT_LINK_F ! NOT MATCH THE C VARIABLE INTEGER :: H5O_COPY_EXPAND_EXT_LINK_F ! IN ORDER @@ -655,7 +655,7 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5S_SEL_HYPERSLABS_F !DEC$ATTRIBUTES DLLEXPORT :: H5S_SEL_ALL_F !DEC$endif - + INTEGER(HSIZE_T) :: H5S_UNLIMITED_F INTEGER(HID_T) :: H5S_ALL_F @@ -831,11 +831,11 @@ CONTAINS f_len = LEN(f_string) ! CASE (1): C string is equal to or larger than Fortran character buffer, - ! so fill the entire Fortran buffer. + ! so fill the entire Fortran buffer. IF(c_len.GE.f_len)THEN ! f_string(1:f_len) = c_string(1:f_len) - ! CASE (2): C string is smaller than Fortran character buffer, + ! CASE (2): C string is smaller than Fortran character buffer, ! so copy C string and blank pad remaining characters. ELSE f_string(1:c_len) = c_string(1:c_len) @@ -902,6 +902,6 @@ CONTAINS !!$ fstring(j:j) = ' ' !!$ end do !!$end subroutine MPIR_Fortran_string_c2f - + END MODULE H5GLOBAL diff --git a/fortran/src/H5fortkit.F90 b/fortran/src/H5fortkit.F90 index f5eba8a..7710a4d 100644 --- a/fortran/src/H5fortkit.F90 +++ b/fortran/src/H5fortkit.F90 @@ -51,8 +51,8 @@ CONTAINS INTEGER :: i INTEGER :: len CHARACTER(LEN=len) :: fstring - CHARACTER(LEN=1), DIMENSION(1:len) :: cstring - + CHARACTER(LEN=1), DIMENSION(1:len) :: cstring + fstring = '' DO i = 1, len IF (cstring(i)(1:1)==CHAR(0)) EXIT diff --git a/fortran/test/H5_test_buildiface.F90 b/fortran/test/H5_test_buildiface.F90 index 636ded4..6cbeb68 100644 --- a/fortran/test/H5_test_buildiface.F90 +++ b/fortran/test/H5_test_buildiface.F90 @@ -13,8 +13,8 @@ ! depending on which of the KIND values are found. ! ! NOTES -! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF -! depending on availablity.It generates code that makes use of +! This program uses the Fortran 2008 intrinsic function STORAGE_SIZE or SIZEOF +! depending on availablity.It generates code that makes use of ! STORAGE_SIZE/SIZEOF in H5fortran_detect.f90. STORAGE_SIZE is standard ! compliant and should always be chosen over SIZEOF. ! @@ -94,7 +94,7 @@ PROGRAM H5_test_buildiface WRITE(11,'(a)') "MODULE TH5_MISC_gen" WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING' - + ! Interfaces for validating REALs, INTEGERs, CHARACTERs, LOGICALs WRITE(11,'(A)') ' INTERFACE verify' @@ -156,8 +156,8 @@ PROGRAM H5_test_buildiface WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_real_kind_'//TRIM(ADJUSTL(chr2)) WRITE(11,'(A)') '!DEC$endif' - -! Subroutine API + +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE verify_real_kind_'//TRIM(ADJUSTL(chr2))//'(string,value,correct_value,total_error)' WRITE(11,'(A)') ' IMPLICIT NONE' WRITE(11,'(A)') ' CHARACTER(LEN=*) :: string' @@ -186,7 +186,7 @@ PROGRAM H5_test_buildiface ! { EXPONENT(x)-DIGITS(x) ! { 2.0 for x /= 0 ! SPACING(x) = { -! { +! { ! { TINY(x) for x == 0 ! ! The ULP optional argument scales the comparison: @@ -228,7 +228,7 @@ PROGRAM H5_test_buildiface WRITE(11,'(A)') '!DEC$attributes dllexport :: verify_character' WRITE(11,'(A)') '!DEC$endif' -! Subroutine API +! Subroutine API WRITE(11,'(A)') ' SUBROUTINE verify_character(string,value,correct_value,total_error)' WRITE(11,'(A)') ' IMPLICIT NONE' WRITE(11,'(A)') ' CHARACTER*(*) :: string' @@ -258,7 +258,7 @@ PROGRAM H5_test_buildiface WRITE(11,'(A)') ' total_error = total_error + 1' WRITE(11,'(A)') ' WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string' WRITE(11,'(A)') ' ENDIF' - + WRITE(11,'(A)') ' END SUBROUTINE verify_logical' WRITE(11,'(A)') "END MODULE TH5_MISC_gen" diff --git a/fortran/test/fflush1.F90 b/fortran/test/fflush1.F90 index bd1f551..0916813 100644 --- a/fortran/test/fflush1.F90 +++ b/fortran/test/fflush1.F90 @@ -6,7 +6,7 @@ ! FUNCTION ! This is the first half of a two-part test that makes sure ! that a file can be read after an application crashes as long -! as the file was flushed first. We simulate by exit the +! as the file was flushed first. We simulate by exit the ! the program using stop statement ! ! COPYRIGHT diff --git a/fortran/test/fortranlib_test.F90 b/fortran/test/fortranlib_test.F90 index 8d5b32b..92f9279 100644 --- a/fortran/test/fortranlib_test.F90 +++ b/fortran/test/fortranlib_test.F90 @@ -81,7 +81,7 @@ PROGRAM fortranlibtest CALL file_space("file_space",cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' File free space test', total_error) -! +! ! '=========================================' ! 'Testing DATASET Interface ' ! '=========================================' @@ -97,7 +97,7 @@ PROGRAM fortranlibtest CALL test_userblock_offset(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Dataset offset with user block', total_error) -! +! ! '=========================================' ! 'Testing DATASPACE Interface ' ! '=========================================' @@ -106,7 +106,7 @@ PROGRAM fortranlibtest CALL dataspace_basic_test(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Basic dataspace test', total_error) -! +! ! '=========================================' ! 'Testing REFERENCE Interface ' ! '=========================================' @@ -119,7 +119,7 @@ PROGRAM fortranlibtest CALL refregtest(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Reference to dataset region test', total_error) -! +! ! '=========================================' ! 'Testing selection functionalities ' ! '=========================================' @@ -148,8 +148,8 @@ PROGRAM fortranlibtest ret_total_error = 0 CALL test_select_bounds(ret_total_error) CALL write_test_status(ret_total_error, ' Selection bounds test ', total_error) - -! + +! ! '=========================================' ! 'Testing DATATYPE interface ' ! '=========================================' @@ -169,7 +169,7 @@ PROGRAM fortranlibtest CALL test_derived_flt(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Derived float datatype test', total_error) -! +! ! '=========================================' ! 'Testing PROPERTY interface ' ! '=========================================' @@ -186,7 +186,7 @@ PROGRAM fortranlibtest CALL test_chunk_cache (cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Dataset chunk cache configuration', total_error) -! +! ! '=========================================' ! 'Testing ATTRIBUTE interface ' ! '=========================================' @@ -195,7 +195,7 @@ PROGRAM fortranlibtest CALL attribute_test(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Attribute test', total_error) -! +! ! '=========================================' ! 'Testing IDENTIFIER interface ' ! '=========================================' @@ -217,7 +217,7 @@ PROGRAM fortranlibtest CALL write_test_status(ret_total_error, ' SZIP filter test', total_error) ENDIF -! +! ! '=========================================' ! 'Testing GROUP interface ' ! '=========================================' diff --git a/fortran/test/fortranlib_test_F03.F90 b/fortran/test/fortranlib_test_F03.F90 index 808cb4d..377645d 100644 --- a/fortran/test/fortranlib_test_F03.F90 +++ b/fortran/test/fortranlib_test_F03.F90 @@ -24,7 +24,7 @@ !***** PROGRAM fortranlibtest_F03 - + USE HDF5 USE THDF5_F03 @@ -48,7 +48,7 @@ PROGRAM fortranlibtest_F03 IF(total_error .EQ. 0) THEN WRITE(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO") WRITE(*, '(I0)', advance="NO") majnum - WRITE(*, '(".")', advance="NO") + WRITE(*, '(".")', advance="NO") WRITE(*, '(I0)', advance="NO") minnum WRITE(*, '(" release ")', advance="NO") WRITE(*, '(I0)') relnum @@ -77,11 +77,11 @@ PROGRAM fortranlibtest_F03 ret_total_error = 0 CALL t_enum(ret_total_error) - CALL write_test_status(ret_total_error, ' Testing writing/reading enum dataset, using C_LOC', total_error) + CALL write_test_status(ret_total_error, ' Testing writing/reading enum dataset, using C_LOC', total_error) ret_total_error = 0 CALL t_enum_conv(ret_total_error) - CALL write_test_status(ret_total_error, ' Testing enumeration conversions', total_error) + CALL write_test_status(ret_total_error, ' Testing enumeration conversions', total_error) ret_total_error = 0 CALL t_bit(ret_total_error) @@ -89,7 +89,7 @@ PROGRAM fortranlibtest_F03 ret_total_error = 0 CALL t_opaque(ret_total_error) - CALL write_test_status(ret_total_error, ' Testing writing/reading opaque datatypes, using C_LOC', total_error) + CALL write_test_status(ret_total_error, ' Testing writing/reading opaque datatypes, using C_LOC', total_error) ret_total_error = 0 CALL t_objref(ret_total_error) @@ -97,7 +97,7 @@ PROGRAM fortranlibtest_F03 ret_total_error = 0 CALL t_regref(ret_total_error) - CALL write_test_status(ret_total_error, ' Testing writing/reading region references, using C_LOC', total_error) + CALL write_test_status(ret_total_error, ' Testing writing/reading region references, using C_LOC', total_error) ret_total_error = 0 CALL t_vlen(ret_total_error) @@ -150,7 +150,7 @@ PROGRAM fortranlibtest_F03 ret_total_error = 0 CALL test_h5p_file_image(ret_total_error) CALL write_test_status(ret_total_error, ' Testing h5pset/get file image', total_error) - + ! write(*,*) ! write(*,*) '=========================================' ! write(*,*) 'Testing OBJECT interface ' @@ -188,7 +188,7 @@ PROGRAM fortranlibtest_F03 WRITE(*, fmt = '(i4)', advance='NO') total_error WRITE(*, fmt = '(12a)' ) ' error(s) ! ' WRITE(*,*) ' ============================================ ' - + CALL h5close_f(error) ! if errors detected, exit with non-zero code. diff --git a/fortran/test/tH5A.F90 b/fortran/test/tH5A.F90 index 1e6fdeb..8968f59 100644 --- a/fortran/test/tH5A.F90 +++ b/fortran/test/tH5A.F90 @@ -21,7 +21,7 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES -! attribute_test +! attribute_test ! ! !***** diff --git a/fortran/test/tH5A_1_8.F90 b/fortran/test/tH5A_1_8.F90 index f2f11aa..8e59483 100644 --- a/fortran/test/tH5A_1_8.F90 +++ b/fortran/test/tH5A_1_8.F90 @@ -25,7 +25,7 @@ ! test_attr_create_by_name, test_attr_info_by_idx, attr_info_by_idx_check, ! test_attr_shared_rename, test_attr_delete_by_idx, test_attr_shared_delete, ! test_attr_dense_open, test_attr_dense_verify, test_attr_corder_create_basic, -! test_attr_basic_write, test_attr_many, attr_open_check, +! test_attr_basic_write, test_attr_many, attr_open_check, ! !***** MODULE TH5A_1_8 @@ -157,7 +157,7 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) ' - Testing creating attributes by name', & total_error) - ! More complex tests with both "new format" and "shared" attributes + ! More complex tests with both "new format" and "shared" attributes IF( use_shared(j) ) THEN ret_total_error = 0 CALL test_attr_shared_rename(my_fcpl, my_fapl, ret_total_error) @@ -243,17 +243,17 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) data_dims = 0 ! WRITE(*,*) " - Testing Compact Storage of Attributes with Creation Order Info" - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid, error, fcpl, fapl) CALL check("h5fcreate_f",error,total_error) - ! Create dataset creation property list + ! Create dataset creation property list CALL H5Pcreate_f(H5P_DATASET_CREATE_F,dcpl,error) CALL check("h5Pcreate_f",error,total_error) CALL H5Pset_attr_creation_order_f(dcpl, IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), error) CALL check("H5Pset_attr_creation_order",error,total_error) - ! Query the attribute creation properties + ! Query the attribute creation properties CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f",error,total_error) @@ -279,7 +279,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) my_dataset = dset3 END SELECT DO u = 0, max_compact - 1 - ! Create attribute + ! Create attribute WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 @@ -296,7 +296,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) END DO END DO - ! Close Datasets + ! Close Datasets CALL h5dclose_f(dset1, error) CALL check("h5dclose_f",error,total_error) CALL h5dclose_f(dset2, error) @@ -304,15 +304,15 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) CALL h5dclose_f(dset3, error) CALL check("h5dclose_f",error,total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Close dataspace + ! Close dataspace CALL h5sclose_f(sid, error) CALL check("h5sclose_f",error,total_error) - ! Close property list + ! Close property list CALL h5pclose_f(dcpl, error) CALL check("h5pclose_f",error,total_error) @@ -339,34 +339,34 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) DO u = 0,max_compact-1 WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 - ! Retrieve information for attribute + ! Retrieve information for attribute CALL H5Aget_info_by_name_f(my_dataset, ".", attrname, & f_corder_valid, corder, cset, data_size, error, lapl_id = H5P_DEFAULT_F ) !with optional CALL check("H5Aget_info_by_name_f", error, total_error) - ! Verify creation order of attribute + ! Verify creation order of attribute CALL verify("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) CALL verify("H5Aget_info_by_name_f", corder, u, total_error) - ! Retrieve information for attribute + ! Retrieve information for attribute CALL H5Aget_info_by_name_f(my_dataset, ".", attrname, & f_corder_valid, corder, cset, data_size, error) ! without optional CALL check("H5Aget_info_by_name_f", error, total_error) - ! Verify creation order of attribute + ! Verify creation order of attribute CALL verify("H5Aget_info_by_name_f", f_corder_valid, .TRUE., total_error) CALL verify("H5Aget_info_by_name_f", corder, u, total_error) END DO END DO - ! Close Datasets + ! Close Datasets CALL h5dclose_f(dset1, error) CALL check("h5dclose_f",error,total_error) CALL h5dclose_f(dset2, error) @@ -374,7 +374,7 @@ SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error) CALL h5dclose_f(dset3, error) CALL check("h5dclose_f",error,total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) @@ -423,33 +423,33 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error) data_dims = 0 - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid, error, fcpl, fapl) CALL check("h5fcreate_f",error,total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Re-open file + ! Re-open file CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error) CALL check("h5open_f",error,total_error) - ! Create dataspace for dataset attributes + ! Create dataspace for dataset attributes CALL h5screate_f(H5S_SCALAR_F, sid, error) CALL check("h5screate_f",error,total_error) - ! Create "null" dataspace for attribute + ! Create "null" dataspace for attribute CALL h5screate_f(H5S_NULL_F, null_sid, error) CALL check("h5screate_f",error,total_error) - ! Create a dataset + ! Create a dataset CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dataset, error) CALL check("h5dcreate_f",error,total_error) - ! Add attribute with 'null' dataspace + ! Add attribute with 'null' dataspace - ! Create attribute + ! Create attribute CALL h5acreate_f(dataset, "null attr", H5T_NATIVE_INTEGER, null_sid, attr, error) CALL check("h5acreate_f",error,total_error) - ! Try to read data from the attribute - ! (shouldn't fail, but should leave buffer alone) + ! Try to read data from the attribute + ! (shouldn't fail, but should leave buffer alone) value(1) = 103 data_dims(1) = 1 CALL h5aread_f(attr, H5T_NATIVE_INTEGER, value, data_dims, error) @@ -457,7 +457,7 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error) CALL verify("h5aread_f",value(1),103,total_error) ! Try to read data from the attribute again but -! for a scalar +! for a scalar value_scalar = 104 data_dims(1) = 1 @@ -479,7 +479,7 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error) CALL h5aget_info_f(attr, f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_f", error, total_error) - ! Check the attribute's information + ! Check the attribute's information CALL verify("h5aget_info_f.corder",corder,0,total_error) CALL verify("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) @@ -557,32 +557,32 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) data_dims = 0 - ! Create dataspace for dataset & attributes + ! Create dataspace for dataset & attributes CALL h5screate_f(H5S_SCALAR_F, sid, error) CALL check("h5screate_f",error,total_error) - ! Create dataset creation property list + ! Create dataset creation property list CALL H5Pcreate_f(H5P_DATASET_CREATE_F,dcpl,error) CALL check("h5Pcreate_f",error,total_error) - ! Query the attribute creation properties + ! Query the attribute creation properties CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f",error,total_error) - ! Loop over using index for creation order value + ! Loop over using index for creation order value DO i = 1, 2 - ! Print appropriate test message + ! Print appropriate test message IF(use_index(i))THEN WRITE(*,*) " - Testing Creating Attributes By Name w/Creation Order Index" ELSE WRITE(*,*) " - Testing Creating Attributes By Name w/o Creation Order Index" ENDIF - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid, error, fcpl, fapl) CALL check("h5fcreate_f",error,total_error) - ! Set attribute creation order tracking & indexing for object + ! Set attribute creation order tracking & indexing for object IF(new_format)THEN IF(use_index(i))THEN @@ -596,7 +596,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) ENDIF - ! Create datasets + ! Create datasets CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dset1, error, dcpl_id=dcpl ) CALL check("h5dcreate_f2",error,total_error) @@ -608,7 +608,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) CALL check("h5dcreate_f4",error,total_error) - ! Work on all the datasets + ! Work on all the datasets DO curr_dset = 0,NUM_DSETS-1 SELECT CASE (curr_dset) @@ -626,39 +626,39 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) END SELECT - ! Create attributes, up to limit of compact form + ! Create attributes, up to limit of compact form DO u = 0, max_compact - 1 - ! Create attribute + ! Create attribute WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 CALL H5Acreate_by_name_f(fid, dsetname, attrname, H5T_NATIVE_INTEGER, sid, & attr, error, lapl_id=H5P_DEFAULT_F, acpl_id=H5P_DEFAULT_F, aapl_id=H5P_DEFAULT_F) CALL check("H5Acreate_by_name_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, u, data_dims, error) CALL check("h5awrite_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Verify information for NEW attribute + ! Verify information for NEW attribute CALL attr_info_by_idx_check(my_dataset, attrname, INT(u,HSIZE_T), use_index(i), total_error) ! CALL check("FAILED IN attr_info_by_idx_check",total_error) ENDDO - ! Test opening attributes stored compactly + ! Test opening attributes stored compactly CALL attr_open_check(fid, dsetname, my_dataset, u, total_error) ENDDO - ! Work on all the datasets + ! Work on all the datasets DO curr_dset = 0,NUM_DSETS-1 SELECT CASE (curr_dset) CASE (0) @@ -672,7 +672,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) dsetname = DSET3_NAME END SELECT - ! Create more attributes, to push into dense form + ! Create more attributes, to push into dense form DO u = max_compact, max_compact* 2 - 1 WRITE(chr2,'(I2.2)') u @@ -682,12 +682,12 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) attr, error, lapl_id=H5P_DEFAULT_F) CALL check("H5Acreate_by_name",error,total_error) - ! Write data into the attribute + ! Write data into the attribute data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, u, data_dims, error) CALL check("h5awrite_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) @@ -695,7 +695,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) ENDDO - ! Close Datasets + ! Close Datasets CALL h5dclose_f(dset1, error) CALL check("h5dclose_f",error,total_error) CALL h5dclose_f(dset2, error) @@ -704,16 +704,16 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) CALL check("h5dclose_f",error,total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) ENDDO - ! Close property list + ! Close property list CALL h5pclose_f(dcpl, error) CALL check("h5pclose_f",error,total_error) - ! Close dataspace + ! Close dataspace CALL h5sclose_f(sid, error) CALL check("h5sclose_f",error,total_error) @@ -781,31 +781,31 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) data_dims = 0 - ! Create dataspace for dataset & attributes + ! Create dataspace for dataset & attributes CALL h5screate_f(H5S_SCALAR_F, sid, error) CALL check("h5screate_f",error,total_error) - ! Create dataset creation property list + ! Create dataset creation property list CALL H5Pcreate_f(H5P_DATASET_CREATE_F,dcpl,error) CALL check("h5Pcreate_f",error,total_error) - ! Query the attribute creation properties + ! Query the attribute creation properties CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f",error,total_error) - ! Loop over using index for creation order value + ! Loop over using index for creation order value DO i = 1, 2 - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid, error, fcpl, fapl) CALL check("h5fcreate_f",error,total_error) - ! Set attribute creation order tracking & indexing for object + ! Set attribute creation order tracking & indexing for object IF(new_format)THEN IF(use_index(i))THEN Input1 = H5P_CRT_ORDER_INDEXED_F @@ -816,7 +816,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) CALL check("H5Pset_attr_creation_order",error,total_error) ENDIF - ! Create datasets + ! Create datasets CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dset1, error ) CALL check("h5dcreate_f",error,total_error) @@ -827,7 +827,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) CALL h5dcreate_f(fid, DSET3_NAME, H5T_NATIVE_CHARACTER, sid, dset3, error ) CALL check("h5dcreate_f",error,total_error) - ! Work on all the datasets + ! Work on all the datasets DO curr_dset = 0,NUM_DSETS-1 @@ -840,7 +840,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) my_dataset = dset3 END SELECT - ! Check for query on non-existant attribute + ! Check for query on non-existant attribute n = 0 @@ -870,10 +870,10 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) CALL verify("h5aget_name_by_idx_f",error,minusone,total_error) - ! Create attributes, up to limit of compact form + ! Create attributes, up to limit of compact form DO j = 0, max_compact-1 - ! Create attribute + ! Create attribute WRITE(chr2,'(I2.2)') j attrname = 'attr '//chr2 @@ -881,19 +881,19 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) CALL h5acreate_f(my_dataset, attrname, H5T_NATIVE_INTEGER, sid, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute attr_integer_data(1) = j data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, attr_integer_data, data_dims, error) CALL check("h5awrite_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Verify information for new attribute + ! Verify information for new attribute !EP CALL attr_info_by_idx_check(my_dataset, attrname, INT(j,HSIZE_T), use_index(i), total_error ) htmp = j @@ -905,7 +905,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) ENDDO - ! Close Datasets + ! Close Datasets CALL h5dclose_f(dset1, error) CALL check("h5dclose_f",error,total_error) CALL h5dclose_f(dset2, error) @@ -913,17 +913,17 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) CALL h5dclose_f(dset3, error) CALL check("h5dclose_f",error,total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) END DO - ! Close property list + ! Close property list CALL h5pclose_f(dcpl,error) CALL check("h5pclose_f", error, total_error) - ! Close dataspace + ! Close dataspace CALL h5sclose_f(sid, error) CALL check("h5sclose_f",error,total_error) @@ -950,13 +950,13 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) INTEGER(HSIZE_T) :: hzero = 0_HSIZE_T - ! Verify the information for first attribute, in increasing creation order + ! Verify the information for first attribute, in increasing creation order CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) CALL verify("h5aget_info_by_idx_f",corder,0,total_error) - ! Verify the information for new attribute, in increasing creation order + ! Verify the information for new attribute, in increasing creation order CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, n, & f_corder_valid, corder, cset, data_size, error) @@ -964,7 +964,7 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) CALL check("h5aget_info_by_idx_f",error,total_error) CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) - ! Verify the name for new link, in increasing creation order + ! Verify the name for new link, in increasing creation order ! Try with the correct buffer size @@ -981,21 +981,21 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error ) ! Don't test "native" order if there is no creation order index, since ! * there's not a good way to easily predict the attribute's order in the name ! * index. - ! + ! IF (use_index) THEN - ! Verify the information for first attribute, in native creation order + ! Verify the information for first attribute, in native creation order CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, hzero, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) CALL verify("h5aget_info_by_idx_f",corder,0,total_error) - ! Verify the information for new attribute, in native creation order + ! Verify the information for new attribute, in native creation order CALL h5aget_info_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, n, & f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_by_idx_f",error,total_error) CALL verify("h5aget_info_by_idx_f",corder,INT(n),total_error) - ! Verify the name for new link, in increasing native order + ! Verify the name for new link, in increasing native order CALL h5aget_name_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, & n, tmpname, error) ! check with no optional parameters CALL check("h5aget_name_by_idx_f",error,total_error) @@ -1113,114 +1113,114 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) INTEGER(HSIZE_T), DIMENSION(1) :: adims2 = (/1/) ! Attribute dimension INTEGER :: arank = 1 ! Attribure rank - ! Initialize "big" attribute data + ! Initialize "big" attribute data - ! Create dataspace for dataset + ! Create dataspace for dataset CALL h5screate_f(H5S_SCALAR_F, sid, error) CALL check("h5screate_f",error,total_error) - ! Create "big" dataspace for "large" attributes + ! Create "big" dataspace for "large" attributes CALL h5screate_simple_f(arank, adims2, big_sid, error) CALL check("h5screate_simple_f",error,total_error) - ! Loop over type of shared components + ! Loop over type of shared components DO test_shared = 0, 2 - ! Make copy of file creation property list + ! Make copy of file creation property list CALL H5Pcopy_f(fcpl, my_fcpl, error) CALL check("H5Pcopy",error,total_error) - ! Set up datatype for attributes + ! Set up datatype for attributes CALL H5Tcopy_f(H5T_NATIVE_INTEGER, attr_tid, error) CALL check("H5Tcopy",error,total_error) - ! Special setup for each type of shared components + ! Special setup for each type of shared components IF( test_shared .EQ. 0) THEN - ! Make attributes > 500 bytes shared + ! Make attributes > 500 bytes shared CALL H5Pset_shared_mesg_nindexes_f(my_fcpl,1,error) CALL check("H5Pset_shared_mesg_nindexes_f",error, total_error) CALL H5Pset_shared_mesg_index_f(my_fcpl, 0, H5O_SHMESG_ATTR_FLAG_F, 500,error) CALL check(" H5Pset_shared_mesg_index_f",error, total_error) ELSE - ! Set up copy of file creation property list + ! Set up copy of file creation property list CALL H5Pset_shared_mesg_nindexes_f(my_fcpl,3,error) - ! Make attributes > 500 bytes shared + ! Make attributes > 500 bytes shared CALL H5Pset_shared_mesg_index_f(my_fcpl, 0, H5O_SHMESG_ATTR_FLAG_F, 500,error) - ! Make datatypes & dataspaces > 1 byte shared (i.e. all of them :-) + ! Make datatypes & dataspaces > 1 byte shared (i.e. all of them :-) CALL H5Pset_shared_mesg_index_f(my_fcpl, 1, H5O_SHMESG_DTYPE_FLAG_F, 1,error) CALL H5Pset_shared_mesg_index_f(my_fcpl, 2, H5O_SHMESG_SDSPACE_FLAG_F, 1,error) ENDIF - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid, error, my_fcpl, fapl) CALL check("h5fcreate_f",error,total_error) - ! Close FCPL copy + ! Close FCPL copy CALL h5pclose_f(my_fcpl, error) CALL check("h5pclose_f", error, total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Re-open file + ! Re-open file CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error,fapl) CALL check("h5open_f",error,total_error) - ! Commit datatype to file + ! Commit datatype to file IF(test_shared.EQ.2) THEN CALL H5Tcommit_f(fid, TYPE1_NAME, attr_tid, error, H5P_DEFAULT_F, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("H5Tcommit",error,total_error) ENDIF - ! Set up to query the object creation properties + ! Set up to query the object creation properties CALL H5Pcreate_f(H5P_DATASET_CREATE_F,dcpl,error) CALL check("h5Pcreate_f",error,total_error) - ! Create datasets + ! Create datasets CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dataset, error, dcpl_id=dcpl ) CALL check("h5dcreate_f",error,total_error) CALL h5dcreate_f(fid, DSET2_NAME, H5T_NATIVE_CHARACTER, sid, dataset2, error, dcpl_id=dcpl ) CALL check("h5dcreate_f",error,total_error) - ! Retrieve limits for compact/dense attribute storage + ! Retrieve limits for compact/dense attribute storage CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f",error,total_error) - ! Close property list + ! Close property list CALL h5pclose_f(dcpl,error) CALL check("h5pclose_f", error, total_error) - ! Add attributes to each dataset, until after converting to dense storage + ! Add attributes to each dataset, until after converting to dense storage DO u = 0, (max_compact * 2) - 1 - ! Create attribute name + ! Create attribute name WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 - ! Alternate between creating "small" & "big" attributes + ! Alternate between creating "small" & "big" attributes IF(MOD(u+1,2).EQ.0)THEN - ! Create "small" attribute on first dataset + ! Create "small" attribute on first dataset CALL h5acreate_f(dataset, attrname, attr_tid, sid, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute attr_integer_data(1) = u + 1 data_dims(1) = 1 CALL h5awrite_f(attr, attr_tid, attr_integer_data, data_dims, error) CALL check("h5awrite_f",error,total_error) ELSE - ! Create "big" attribute on first dataset + ! Create "big" attribute on first dataset CALL h5acreate_f(dataset, attrname, attr_tid, big_sid, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute data_dims(1) = 1 attr_integer_data(1) = u + 1 @@ -1229,19 +1229,19 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) ENDIF - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Alternate between creating "small" & "big" attributes + ! Alternate between creating "small" & "big" attributes IF(MOD(u+1,2).EQ.0)THEN - ! Create "small" attribute on second dataset + ! Create "small" attribute on second dataset CALL h5acreate_f(dataset2, attrname, attr_tid, sid, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute attr_integer_data(1) = u + 1 data_dims(1) = 1 @@ -1249,12 +1249,12 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) CALL check("h5awrite_f",error,total_error) ELSE - ! Create "big" attribute on second dataset + ! Create "big" attribute on second dataset CALL h5acreate_f(dataset2, attrname, attr_tid, big_sid, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) -! Write data into the attribute +! Write data into the attribute attr_integer_data(1) = u + 1 @@ -1263,103 +1263,103 @@ SUBROUTINE test_attr_shared_rename( fcpl, fapl, total_error) ! CALL check("h5awrite_f",error,total_error) -! Check refcount for attribute +! Check refcount for attribute ENDIF - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Create new attribute name + ! Create new attribute name WRITE(chr2,'(I2.2)') u attrname2 = 'new attr '//chr2 - ! Change second dataset's attribute's name + ! Change second dataset's attribute's name CALL H5Arename_by_name_f(fid, DSET2_NAME, attrname, attrname2, error, lapl_id=H5P_DEFAULT_F) CALL check("H5Arename_by_name_f",error,total_error) - ! Check refcount on attributes now + ! Check refcount on attributes now - ! Check refcount on renamed attribute + ! Check refcount on renamed attribute CALL H5Aopen_f(dataset2, attrname2, attr, error, aapl_id=H5P_DEFAULT_F) CALL check("H5Aopen_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Check refcount on original attribute + ! Check refcount on original attribute CALL H5Aopen_f(dataset, attrname, attr, error) CALL check("H5Aopen",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Change second dataset's attribute's name back to original + ! Change second dataset's attribute's name back to original CALL H5Arename_by_name_f(fid, DSET2_NAME, attrname2, attrname, error) CALL check("H5Arename_by_name_f",error,total_error) - ! Check refcount on attributes now + ! Check refcount on attributes now - ! Check refcount on renamed attribute + ! Check refcount on renamed attribute CALL H5Aopen_f(dataset2, attrname, attr, error) CALL check("H5Aopen",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Check refcount on original attribute + ! Check refcount on original attribute - ! Check refcount on renamed attribute + ! Check refcount on renamed attribute CALL H5Aopen_f(dataset, attrname, attr, error) CALL check("H5Aopen",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) ENDDO - ! Close attribute's datatype + ! Close attribute's datatype CALL h5tclose_f(attr_tid, error) CALL check("h5tclose_f",error,total_error) - ! Close attribute's datatype + ! Close attribute's datatype CALL h5dclose_f(dataset, error) CALL check("h5dclose_f",error,total_error) CALL h5dclose_f(dataset2, error) CALL check("h5dclose_f",error,total_error) - ! Unlink datasets with attributes + ! Unlink datasets with attributes CALL H5Ldelete_f(fid, DSET1_NAME, error, H5P_DEFAULT_F) CALL check("HLdelete",error,total_error) CALL H5Ldelete_f(fid, DSET2_NAME, error) CALL check("HLdelete",error,total_error) - ! Unlink committed datatype + ! Unlink committed datatype IF(test_shared == 2)THEN CALL H5Ldelete_f(fid, TYPE1_NAME, error) CALL check("HLdelete_f",error,total_error) ENDIF - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Check size of file + ! Check size of file !filesize = h5_get_file_size(FILENAME); !verify(filesize, empty_filesize, "h5_get_file_size"); ENDDO - ! Close dataspaces + ! Close dataspaces CALL h5sclose_f(sid, error) CALL check("h5sclose_f",error,total_error) CALL h5sclose_f(big_sid, error) @@ -1384,9 +1384,9 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) INTEGER(HID_T), INTENT(IN) :: fapl INTEGER, INTENT(INOUT) :: total_error CHARACTER(LEN=8) :: FileName = "tattr.h5" - INTEGER(HID_T) :: fid ! HDF5 File ID - INTEGER(HID_T) :: dcpl ! Dataset creation property list ID - INTEGER(HID_T) :: sid ! Dataspace ID + INTEGER(HID_T) :: fid ! HDF5 File ID + INTEGER(HID_T) :: dcpl ! Dataset creation property list ID + INTEGER(HID_T) :: sid ! Dataspace ID CHARACTER(LEN=8) :: DSET1_NAME = "Dataset1" CHARACTER(LEN=8) :: DSET2_NAME = "Dataset2" @@ -1424,40 +1424,40 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) INTEGER :: idx_type INTEGER :: order - INTEGER :: u ! Local index variable + INTEGER :: u ! Local index variable INTEGER :: Input1 INTEGER(HSIZE_T) :: hzero = 0_HSIZE_T INTEGER :: minusone = -1 data_dims = 0 - ! Create dataspace for dataset & attributes + ! Create dataspace for dataset & attributes CALL h5screate_f(H5S_SCALAR_F, sid, error) CALL check("h5screate_f",error,total_error) - ! Create dataset creation property list + ! Create dataset creation property list CALL H5Pcreate_f(H5P_DATASET_CREATE_F,dcpl,error) CALL check("h5Pcreate_f",error,total_error) - ! Query the attribute creation properties + ! Query the attribute creation properties CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f",error,total_error) - ! Loop over operating on different indices on link fields + ! Loop over operating on different indices on link fields DO idx_type = H5_INDEX_NAME_F, H5_INDEX_CRT_ORDER_F - ! Loop over operating in different orders + ! Loop over operating in different orders DO order = H5_ITER_INC_F, H5_ITER_DEC_F - ! Loop over using index for creation order value + ! Loop over using index for creation order value DO i = 1, 2 - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid, error, fcpl, fapl) CALL check("h5fcreate_f",error,total_error) - ! Set attribute creation order tracking & indexing for object + ! Set attribute creation order tracking & indexing for object IF(new_format)THEN IF(use_index(i))THEN @@ -1471,7 +1471,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ENDIF - ! Create datasets + ! Create datasets CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dset1, error, dcpl ) CALL check("h5dcreate_f2",error,total_error) @@ -1482,7 +1482,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CALL h5dcreate_f(fid, DSET3_NAME, H5T_NATIVE_CHARACTER, sid, dset3, error, dcpl ) CALL check("h5dcreate_f4",error,total_error) - ! Work on all the datasets + ! Work on all the datasets DO curr_dset = 0,NUM_DSETS-1 SELECT CASE (curr_dset) @@ -1497,36 +1497,36 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) END SELECT - ! Check for deleting non-existant attribute + ! Check for deleting non-existant attribute !EP CALL H5Adelete_by_idx_f(my_dataset, '.', idx_type, order, 0_HSIZE_T,error, lapl_id=H5P_DEFAULT_F) CALL H5Adelete_by_idx_f(my_dataset, '.', idx_type, order, hzero,error, lapl_id=H5P_DEFAULT_F) CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) - ! Create attributes, up to limit of compact form + ! Create attributes, up to limit of compact form DO u = 0, max_compact - 1 - ! Create attribute + ! Create attribute WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 CALL h5acreate_f(my_dataset, attrname, H5T_NATIVE_INTEGER, sid, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute attr_integer_data(1) = u data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, attr_integer_data, data_dims, error) CALL check("h5awrite_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Verify information for new attribute + ! Verify information for new attribute CALL attr_info_by_idx_check(my_dataset, attrname, INT(u,HSIZE_T), use_index(i), total_error ) ENDDO - ! Check for out of bound deletions + ! Check for out of bound deletions CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(u,HSIZE_T), error, lapl_id=H5P_DEFAULT_F) CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) @@ -1545,11 +1545,11 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! CALL HDassert(0.AND."Toomanydatasets!") END SELECT - ! Delete attributes from compact storage + ! Delete attributes from compact storage DO u = 0, max_compact - 2 - ! Delete first attribute in appropriate order + ! Delete first attribute in appropriate order !EP CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, 0_HSIZE_T, error) @@ -1557,7 +1557,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CALL check("H5Adelete_by_idx_f",error,total_error) - ! Verify the attribute information for first attribute in appropriate order + ! Verify the attribute information for first attribute in appropriate order ! HDmemset(&ainfo, 0, sizeof(ainfo)); !EP CALL h5aget_info_by_idx_f(my_dataset, ".", idx_type, order, 0_HSIZE_T, & @@ -1572,7 +1572,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CALL verify("H5Aget_info_by_idx_f",corder, max_compact-(u + 2),total_error) ENDIF - ! Verify the name for first attribute in appropriate order + ! Verify the name for first attribute in appropriate order size = 7 ! *CHECK* IF NOT THE SAME SIZE CALL h5aget_name_by_idx_f(my_dataset, ".", idx_type, order,INT(0,hsize_t), & @@ -1589,7 +1589,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CALL verify("h5aget_name_by_idx_f",error,0,total_error) ENDDO - ! Delete last attribute + ! Delete last attribute !EP CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, 0_HSIZE_T, error) CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, hzero, error) @@ -1597,7 +1597,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ENDDO -! Work on all the datasets +! Work on all the datasets DO curr_dset = 0,NUM_DSETS-1 SELECT CASE (curr_dset) @@ -1611,11 +1611,11 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! CALL HDassert(0.AND."Toomanydatasets!") END SELECT - ! Create more attributes, to push into dense form + ! Create more attributes, to push into dense form DO u = 0, (max_compact * 2) - 1 - ! Create attribute + ! Create attribute WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 @@ -1623,24 +1623,24 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CALL check("h5acreate_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute attr_integer_data(1) = u data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, attr_integer_data, data_dims, error) CALL check("h5awrite_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) ENDDO - ! Check for out of bound deletion + ! Check for out of bound deletion CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(u,HSIZE_T), error) CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) ENDDO - ! Work on all the datasets + ! Work on all the datasets DO curr_dset = 0,NUM_DSETS-1 SELECT CASE (curr_dset) @@ -1652,15 +1652,15 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) my_dataset = dset3 END SELECT - ! Delete attributes from dense storage + ! Delete attributes from dense storage DO u = 0, (max_compact * 2) - 1 - 1 - ! Delete first attribute in appropriate order + ! Delete first attribute in appropriate order CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(0,HSIZE_T), error) CALL check("H5Adelete_by_idx_f",error,total_error) - ! Verify the attribute information for first attribute in appropriate order + ! Verify the attribute information for first attribute in appropriate order CALL h5aget_info_by_idx_f(my_dataset, ".", idx_type, order, INT(0,HSIZE_T), & f_corder_valid, corder, cset, data_size, error) @@ -1672,7 +1672,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CALL verify("H5Aget_info_by_idx_f",corder, ((max_compact * 2) - (u + 2)), total_error) ENDIF - ! Verify the name for first attribute in appropriate order + ! Verify the name for first attribute in appropriate order ! HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); size = 7 ! *CHECK* if not the correct size @@ -1691,17 +1691,17 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ENDDO - ! Delete last attribute + ! Delete last attribute CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(0,HSIZE_T), error, lapl_id=H5P_DEFAULT_F) CALL check("H5Adelete_by_idx_f",error,total_error) - ! Check for deletion on empty attribute storage again + ! Check for deletion on empty attribute storage again CALL H5Adelete_by_idx_f(my_dataset, ".", idx_type, order, INT(0,HSIZE_T), error) CALL verify("H5Adelete_by_idx_f",error,minusone,total_error) ENDDO - ! Close Datasets + ! Close Datasets CALL h5dclose_f(dset1, error) CALL check("h5dclose_f",error,total_error) CALL h5dclose_f(dset2, error) @@ -1709,18 +1709,18 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CALL h5dclose_f(dset3, error) CALL check("h5dclose_f",error,total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) ENDDO ENDDO ENDDO - ! Close property list + ! Close property list CALL h5pclose_f(dcpl,error) CALL check("h5pclose_f", error, total_error) - ! Close dataspace + ! Close dataspace CALL h5sclose_f(sid, error) CALL check("h5sclose_f",error,total_error) @@ -1775,77 +1775,77 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) INTEGER(HSIZE_T), DIMENSION(1) :: adims2 = (/1/) ! Attribute dimension INTEGER :: arank = 1 ! Attribure rank - ! Output message about test being performed + ! Output message about test being performed - ! Initialize "big" attribute DATA - ! Create dataspace for dataset + ! Initialize "big" attribute DATA + ! Create dataspace for dataset CALL h5screate_f(H5S_SCALAR_F, sid, error) CALL check("h5screate_f",error,total_error) - ! Create "big" dataspace for "large" attributes + ! Create "big" dataspace for "large" attributes CALL h5screate_simple_f(arank, adims2, big_sid, error) CALL check("h5screate_simple_f",error,total_error) - ! Loop over type of shared components + ! Loop over type of shared components DO test_shared = 0, 2 - ! Make copy of file creation property list + ! Make copy of file creation property list CALL H5Pcopy_f(fcpl, my_fcpl, error) CALL check("H5Pcopy",error,total_error) - ! Set up datatype for attributes + ! Set up datatype for attributes CALL H5Tcopy_f(H5T_NATIVE_INTEGER, attr_tid, error) CALL check("H5Tcopy",error,total_error) - ! Special setup for each type of shared components + ! Special setup for each type of shared components IF( test_shared .EQ. 0) THEN - ! Make attributes > 500 bytes shared + ! Make attributes > 500 bytes shared CALL H5Pset_shared_mesg_nindexes_f(my_fcpl,1,error) CALL check("H5Pset_shared_mesg_nindexes_f",error, total_error) CALL H5Pset_shared_mesg_index_f(my_fcpl, 0, H5O_SHMESG_ATTR_FLAG_F, 500,error) CALL check(" H5Pset_shared_mesg_index_f",error, total_error) ELSE - ! Set up copy of file creation property list + ! Set up copy of file creation property list CALL H5Pset_shared_mesg_nindexes_f(my_fcpl,3,error) - ! Make attributes > 500 bytes shared + ! Make attributes > 500 bytes shared CALL H5Pset_shared_mesg_index_f(my_fcpl, 0, H5O_SHMESG_ATTR_FLAG_F, 500,error) - ! Make datatypes & dataspaces > 1 byte shared (i.e. all of them :-) + ! Make datatypes & dataspaces > 1 byte shared (i.e. all of them :-) CALL H5Pset_shared_mesg_index_f(my_fcpl, 1, H5O_SHMESG_DTYPE_FLAG_F, 1,error) CALL H5Pset_shared_mesg_index_f(my_fcpl, 2, H5O_SHMESG_SDSPACE_FLAG_F, 1,error) ENDIF - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid, error, my_fcpl, fapl) CALL check("h5fcreate_f",error,total_error) - ! Close FCPL copy + ! Close FCPL copy CALL h5pclose_f(my_fcpl, error) CALL check("h5pclose_f", error, total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Re-open file + ! Re-open file CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error,fapl) CALL check("h5open_f",error,total_error) - ! Commit datatype to file + ! Commit datatype to file IF(test_shared.EQ.2) THEN CALL H5Tcommit_f(fid, TYPE1_NAME, attr_tid, error, H5P_DEFAULT_F, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("H5Tcommit",error,total_error) ENDIF - ! Set up to query the object creation properties + ! Set up to query the object creation properties CALL H5Pcreate_f(H5P_DATASET_CREATE_F,dcpl,error) CALL check("h5Pcreate_f",error,total_error) - ! Create datasets + ! Create datasets CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dataset, error, dcpl_id=dcpl ) CALL check("h5dcreate_f",error,total_error) @@ -1853,42 +1853,42 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) CALL h5dcreate_f(fid, DSET2_NAME, H5T_NATIVE_CHARACTER, sid, dataset2, error, dcpl_id=dcpl ) CALL check("h5dcreate_f",error,total_error) - ! Retrieve limits for compact/dense attribute storage + ! Retrieve limits for compact/dense attribute storage CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f",error,total_error) - ! Close property list + ! Close property list CALL h5pclose_f(dcpl,error) CALL check("h5pclose_f", error, total_error) - ! Add attributes to each dataset, until after converting to dense storage + ! Add attributes to each dataset, until after converting to dense storage DO u = 0, (max_compact * 2) - 1 - ! Create attribute name + ! Create attribute name WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 - ! Alternate between creating "small" & "big" attributes + ! Alternate between creating "small" & "big" attributes IF(MOD(u+1,2).EQ.0)THEN - ! Create "small" attribute on first dataset + ! Create "small" attribute on first dataset CALL h5acreate_f(dataset, attrname, attr_tid, sid, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute attr_integer_data(1) = u + 1 data_dims(1) = 1 CALL h5awrite_f(attr, attr_tid, attr_integer_data, data_dims, error) CALL check("h5awrite_f",error,total_error) ELSE - ! Create "big" attribute on first dataset + ! Create "big" attribute on first dataset CALL h5acreate_f(dataset, attrname, attr_tid, big_sid, attr, error) CALL check("h5acreate_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute attr_integer_data(1) = u + 1 data_dims(1) = 1 @@ -1897,31 +1897,31 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) ENDIF - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Alternate between creating "small" & "big" attributes + ! Alternate between creating "small" & "big" attributes IF(MOD(u+1,2).EQ.0)THEN - ! Create "small" attribute on second dataset + ! Create "small" attribute on second dataset CALL h5acreate_f(dataset2, attrname, attr_tid, sid, attr, error) CALL check("h5acreate_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute attr_integer_data(1) = u + 1 data_dims(1) = 1 CALL h5awrite_f(attr, attr_tid, attr_integer_data, data_dims, error) CALL check("h5awrite_f",error,total_error) ELSE - ! Create "big" attribute on second dataset + ! Create "big" attribute on second dataset CALL h5acreate_f(dataset2, attrname, attr_tid, big_sid, attr, error, acpl_id=H5P_DEFAULT_F, aapl_id=H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) -! Write data into the attribute +! Write data into the attribute attr_integer_data(1) = u + 1 @@ -1930,21 +1930,21 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) CALL check("h5awrite_f",error,total_error) ENDIF - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) ENDDO - ! Delete attributes from second dataset + ! Delete attributes from second dataset DO u = 0, max_compact*2-1 - ! Create attribute name + ! Create attribute name WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 - ! Delete second dataset's attribute + ! Delete second dataset's attribute CALL H5Adelete_by_name_f(fid, DSET2_NAME, attrname,error,lapl_id=H5P_DEFAULT_F) CALL check("H5Adelete_by_name", error, total_error) @@ -1952,31 +1952,31 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) CALL check("h5aopen_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) ENDDO - ! Close attribute's datatype + ! Close attribute's datatype CALL h5tclose_f(attr_tid, error) CALL check("h5tclose_f",error,total_error) - ! Close Datasets + ! Close Datasets CALL h5dclose_f(dataset, error) CALL check("h5dclose_f",error,total_error) CALL h5dclose_f(dataset2, error) CALL check("h5dclose_f",error,total_error) - ! Unlink datasets WITH attributes + ! Unlink datasets WITH attributes CALL h5ldelete_f(fid, DSET1_NAME, error, H5P_DEFAULT_F) CALL check("H5Ldelete_f", error, total_error) CALL h5ldelete_f(fid, DSET2_NAME, error) CALL check("H5Ldelete_f", error, total_error) - ! Unlink committed datatype + ! Unlink committed datatype IF( test_shared == 2) THEN CALL h5ldelete_f(fid, TYPE1_NAME, error) @@ -1984,13 +1984,13 @@ SUBROUTINE test_attr_shared_delete(fcpl, fapl, total_error) ENDIF - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) ENDDO - ! Close dataspaces + ! Close dataspaces CALL h5sclose_f(sid, error) CALL check("h5sclose_f",error,total_error) CALL h5sclose_f(big_sid, error) @@ -2040,73 +2040,73 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) data_dims = 0 - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid, error, fcpl, fapl) CALL check("h5fcreate_f",error,total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Re-open file + ! Re-open file CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error, fapl) CALL check("h5open_f",error,total_error) - ! Create dataspace for dataset + ! Create dataspace for dataset CALL h5screate_f(H5S_SCALAR_F, sid, error) CALL check("h5screate_f",error,total_error) - ! Query the group creation properties + ! Query the group creation properties CALL H5Pcreate_f(H5P_DATASET_CREATE_F,dcpl,error) CALL check("h5Pcreate_f",error,total_error) - ! Enable creation order tracking on attributes, so creation order tests work + ! Enable creation order tracking on attributes, so creation order tests work CALL H5Pset_attr_creation_order_f(dcpl, H5P_CRT_ORDER_TRACKED_F, error) CALL check("H5Pset_attr_creation_order",error,total_error) - ! Create a dataset + ! Create a dataset CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dataset, error, & lcpl_id=H5P_DEFAULT_F, dcpl_id=dcpl, dapl_id=H5P_DEFAULT_F) CALL check("h5dcreate_f",error,total_error) - ! Retrieve limits for compact/dense attribute storage + ! Retrieve limits for compact/dense attribute storage CALL H5Pget_attr_phase_change_f(dcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f",error,total_error) - ! Close property list + ! Close property list CALL h5pclose_f(dcpl, error) CALL check("h5pclose_f",error,total_error) - ! Add attributes, until just before converting to dense storage + ! Add attributes, until just before converting to dense storage DO u = 0, max_compact - 1 - ! Create attribute + ! Create attribute WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 CALL h5acreate_f(dataset, attrname, H5T_NATIVE_INTEGER, sid, attr, error, aapl_id=H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, u, data_dims, error) CALL check("h5awrite_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Verify attributes written so far + ! Verify attributes written so far CALL test_attr_dense_verify(dataset, u, total_error) ENDDO ! -! Add one more attribute, to push into "dense" storage -! Create attribute +! Add one more attribute, to push into "dense" storage +! Create attribute WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 @@ -2114,36 +2114,36 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error) CALL h5acreate_f(dataset, attrname, H5T_NATIVE_INTEGER, sid, attr, error, aapl_id=H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - ! Write data into the attribute + ! Write data into the attribute data_dims(1) = 1 CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, u, data_dims, error) CALL check("h5awrite_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Close dataspace + ! Close dataspace CALL h5sclose_f(sid, error) CALL check("h5sclose_f",error,total_error) - ! Verify all the attributes written + ! Verify all the attributes written ! ret = test_attr_dense_verify(dataset, (u + 1)); ! CHECK(ret, FAIL, "test_attr_dense_verify"); - ! CLOSE Dataset + ! CLOSE Dataset CALL h5dclose_f(dataset, error) CALL check("h5dclose_f",error,total_error) - ! Unlink dataset with attributes + ! Unlink dataset with attributes CALL h5ldelete_f(fid, DSET1_NAME, error, H5P_DEFAULT_F) CALL check("H5Ldelete_f", error, total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Check size of file + ! Check size of file ! filesize = h5_get_file_size(FILENAME); ! verify(filesize, empty_filesize, "h5_get_file_size") @@ -2179,21 +2179,21 @@ SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) data_dims = 0 - ! Retrieve the current # of reported errors + ! Retrieve the current # of reported errors ! old_nerrs = GetTestNumErrs(); - ! Re-open all the attributes by name and verify the data + ! Re-open all the attributes by name and verify the data DO u = 0, max_attr -1 - ! Open attribute + ! Open attribute WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 CALL h5aopen_f(loc_id, attrname, attr, error) CALL check("h5aopen_f",error,total_error) - ! Read data from the attribute + ! Read data from the attribute ! value = 103 data_dims(1) = 1 @@ -2202,22 +2202,22 @@ SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) CALL CHECK("H5Aread_F", error, total_error) CALL verify("H5Aread_F", value, u, total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) ENDDO - ! Re-open all the attributes by index and verify the data + ! Re-open all the attributes by index and verify the data DO u=0, max_attr-1 - ! Open attribute + ! Open attribute CALL H5Aopen_by_idx_f(loc_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(u,HSIZE_T), & attr, error, aapl_id=H5P_DEFAULT_F) - ! Verify Name + ! Verify Name WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 @@ -2228,14 +2228,14 @@ SUBROUTINE test_attr_dense_verify(loc_id, max_attr, total_error) WRITE(*,*) 'ERROR: attribute name different: attr_name = ',check_name, ', should be ', attrname total_error = total_error + 1 ENDIF - ! Read data from the attribute + ! Read data from the attribute data_dims(1) = 1 CALL h5aread_f(attr, H5T_NATIVE_INTEGER, value, data_dims, error) CALL CHECK("H5Aread_f", error, total_error) CALL verify("H5Aread_f", value, u, total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) ENDDO @@ -2270,30 +2270,30 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) INTEGER :: crt_order_flags INTEGER :: minusone = -1 - ! Output message about test being performed + ! Output message about test being performed ! WRITE(*,*) " - Testing Basic Code for Attributes with Creation Order Info" - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid, error, fcpl, fapl) CALL check("h5fcreate_f",error,total_error) - ! Create dataset creation property list + ! Create dataset creation property list CALL H5Pcreate_f(H5P_DATASET_CREATE_F,dcpl,error) CALL check("h5Pcreate_f",error,total_error) - ! Get creation order indexing on object + ! Get creation order indexing on object CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) - ! Setting invalid combination of a attribute order creation order indexing on should fail + ! Setting invalid combination of a attribute order creation order indexing on should fail CALL H5Pset_attr_creation_order_f(dcpl, H5P_CRT_ORDER_INDEXED_F, error) CALL verify("H5Pset_attr_creation_order_f",error , minusone, total_error) CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , 0, total_error) - ! Set attribute creation order tracking & indexing for object + ! Set attribute creation order tracking & indexing for object CALL h5pset_attr_creation_order_f(dcpl, IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), error) CALL check("H5Pset_attr_creation_order_f",error,total_error) @@ -2302,60 +2302,60 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , & IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), total_error) - ! Create dataspace for dataset + ! Create dataspace for dataset CALL h5screate_f(H5S_SCALAR_F, sid, error) CALL check("h5screate_f",error,total_error) - ! Create a dataset + ! Create a dataset CALL h5dcreate_f(fid, DSET1_NAME, H5T_NATIVE_CHARACTER, sid, dataset, error, & lcpl_id=H5P_DEFAULT_F, dapl_id=H5P_DEFAULT_F, dcpl_id=dcpl) CALL check("h5dcreate_f",error,total_error) - ! Close dataspace + ! Close dataspace CALL h5sclose_f(sid, error) CALL check("h5sclose_f",error,total_error) - ! Close Dataset + ! Close Dataset CALL h5dclose_f(dataset, error) CALL check("h5dclose_f",error,total_error) - ! Close property list + ! Close property list CALL h5pclose_f(dcpl, error) CALL check("h5pclose_f",error,total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Re-open file + ! Re-open file CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error, fapl) CALL check("h5open_f",error,total_error) - ! Open dataset created + ! Open dataset created CALL h5dopen_f(fid, DSET1_NAME, dataset, error, H5P_DEFAULT_F ) CALL check("h5dopen_f",error,total_error) - ! Retrieve dataset creation property list for group + ! Retrieve dataset creation property list for group CALL H5Dget_create_plist_f(dataset, dcpl, error) CALL check("H5Dget_create_plist_f",error,total_error) - ! Query the attribute creation properties + ! Query the attribute creation properties CALL H5Pget_attr_creation_order_f(dcpl, crt_order_flags, error) CALL check("H5Pget_attr_creation_order_f",error,total_error) CALL verify("H5Pget_attr_creation_order_f",crt_order_flags , & IOR(H5P_CRT_ORDER_TRACKED_F, H5P_CRT_ORDER_INDEXED_F), total_error ) - ! Close property list + ! Close property list CALL h5pclose_f(dcpl, error) CALL check("h5pclose_f",error,total_error) - ! Close Dataset + ! Close Dataset CALL h5dclose_f(dataset, error) CALL check("h5dclose_f",error,total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) @@ -2418,97 +2418,97 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) attr_data1a(3) = -99890 - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid1, error, H5P_DEFAULT_F, fapl) CALL check("h5fcreate_f",error,total_error) - ! Create dataspace for dataset + ! Create dataspace for dataset CALL h5screate_simple_f(rank1, dims1, sid1, error, maxdims1) CALL check("h5screate_simple_f",error,total_error) - ! Create a dataset + ! Create a dataset CALL h5dcreate_f(fid1, DSET1_NAME, H5T_NATIVE_CHARACTER, sid1, dataset, error, H5P_DEFAULT_F, H5P_DEFAULT_F, H5P_DEFAULT_F ) CALL check("h5dcreate_f",error,total_error) - ! Create dataspace for attribute + ! Create dataspace for attribute CALL h5screate_simple_f(ATTR1_RANK, dimsa, sid2, error) CALL check("h5screate_simple_f",error,total_error) - ! Try to create an attribute on the file (should create an attribute on root group) + ! Try to create an attribute on the file (should create an attribute on root group) CALL h5acreate_f(fid1, ATTR1_NAME, H5T_NATIVE_INTEGER, sid2, attr, error, aapl_id=H5P_DEFAULT_F, acpl_id=H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Open the root group + ! Open the root group CALL H5Gopen_f(fid1, "/", group, error, H5P_DEFAULT_F) CALL check("H5Gopen_f",error,total_error) - ! Open attribute again + ! Open attribute again CALL h5aopen_f(group, ATTR1_NAME, attr, error) CALL check("h5aopen_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Close root group + ! Close root group CALL H5Gclose_f(group, error) CALL check("h5gclose_f",error,total_error) - ! Create an attribute for the dataset + ! Create an attribute for the dataset CALL h5acreate_f(dataset, ATTR1_NAME, H5T_NATIVE_INTEGER, sid2, attr, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - ! Write attribute information + ! Write attribute information CALL h5awrite_f(attr, H5T_NATIVE_INTEGER, attr_data1, dimsa, error) CALL check("h5awrite_f",error,total_error) - ! Create an another attribute for the dataset + ! Create an another attribute for the dataset CALL h5acreate_f(dataset, ATTR1A_NAME, H5T_NATIVE_INTEGER, sid2, attr2, error, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5acreate_f",error,total_error) - ! Write attribute information + ! Write attribute information CALL h5awrite_f(attr2, H5T_NATIVE_INTEGER, attr_data1a, dimsa, error) CALL check("h5awrite_f",error,total_error) - ! Check storage size for attribute + ! Check storage size for attribute CALL h5aget_storage_size_f(attr, attr_size, error) CALL check("h5aget_storage_size_f",error,total_error) !EP CALL verify("h5aget_storage_size_f", INT(attr_size), 2*HSIZE_T, total_error) - ! Read attribute information immediately, without closing attribute + ! Read attribute information immediately, without closing attribute CALL h5aread_f(attr, H5T_NATIVE_INTEGER, read_data1, dimsa, error) CALL check("h5aread_f",error,total_error) - ! Verify values read in + ! Verify values read in DO i = 1, ATTR1_DIM1 CALL verify('h5aread_f',attr_data1(i),read_data1(i), total_error) ENDDO - ! CLOSE attribute + ! CLOSE attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr2, error) CALL check("h5aclose_f",error,total_error) - ! change attribute name + ! change attribute name CALL H5Arename_f(dataset, ATTR1_NAME, ATTR_TMP_NAME, error) CALL check("H5Arename_f", error, total_error) - ! Open attribute again + ! Open attribute again CALL h5aopen_f(dataset, ATTR_TMP_NAME, attr, error) CALL check("h5aopen_f",error,total_error) - ! Verify new attribute name + ! Verify new attribute name ! Set a deliberately small size check_name = ' ' ! need to initialize or does not pass test @@ -2539,7 +2539,7 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) CALL check('H5Aget_name_f',error,total_error) CALL verify('H5Aget_name_f',chr_exact_size,ATTR_TMP_NAME, total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr, error) CALL check("h5aclose_f",error,total_error) @@ -2547,11 +2547,11 @@ SUBROUTINE test_attr_basic_write(fapl, total_error) CALL check("h5sclose_f",error,total_error) CALL h5sclose_f(sid2, error) CALL check("h5sclose_f",error,total_error) - ! Close Dataset + ! Close Dataset CALL h5dclose_f(dataset, error) CALL check("h5dclose_f",error,total_error) - ! Close file + ! Close file CALL h5fclose_f(fid1, error) CALL check("h5fclose_f",error,total_error) @@ -2594,20 +2594,20 @@ SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) data_dims = 0 - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid, error, fcpl, fapl) CALL check("h5fcreate_f",error,total_error) - ! Create dataspace for attribute + ! Create dataspace for attribute CALL h5screate_f(H5S_SCALAR_F, sid, error) CALL check("h5screate_f",error,total_error) - ! Create group for attributes + ! Create group for attributes CALL H5Gcreate_f(fid, GROUP1_NAME, gid, error) CALL check("H5Gcreate_f", error, total_error) - ! Create many attributes + ! Create many attributes IF(new_format)THEN nattr = 250 @@ -2651,15 +2651,15 @@ SUBROUTINE test_attr_many(new_format, fcpl, fapl, total_error) ENDDO - ! Close group + ! Close group CALL H5Gclose_f(gid, error) CALL check("h5gclose_f",error,total_error) - ! Close file + ! Close file CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Close dataspaces + ! Close dataspaces CALL h5sclose_f(sid, error) CALL check("h5sclose_f",error,total_error) @@ -2677,7 +2677,7 @@ END SUBROUTINE test_attr_many ! * March 21, 2008 ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) @@ -2699,10 +2699,10 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) INTEGER(HSIZE_T) :: storage_size ! attributes storage requirements CHARACTER(LEN=2) :: chr2 INTEGER(HID_T) attr_id - ! Open each attribute on object by index and check that it's the correct one + ! Open each attribute on object by index and check that it's the correct one DO u = 0, max_attrs-1 - ! Open the attribute + ! Open the attribute WRITE(chr2,'(I2.2)') u attrname = 'attr '//chr2 @@ -2712,12 +2712,12 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL check("h5aopen_f",error,total_error) - ! Get the attribute's information + ! Get the attribute's information CALL h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_f",error,total_error) - ! Check that the object's attributes are correct + ! Check that the object's attributes are correct CALL verify("h5aget_info_f.corder",corder,u,total_error) CALL verify("h5aget_info_f.corder_valid",f_corder_valid,.TRUE.,total_error) CALL verify("h5aget_info_f.cset", cset, H5T_CSET_ASCII_F, total_error) @@ -2727,18 +2727,18 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL verify("h5aget_info_f.data_size", INT(data_size), INT(storage_size), total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr_id, error) CALL check("h5aclose_f",error,total_error) - ! Open the attribute + ! Open the attribute CALL H5Aopen_by_name_f(obj_id, ".", attrname, attr_id, error, lapl_id=H5P_DEFAULT_F, aapl_id=H5P_DEFAULT_F) CALL check("H5Aopen_by_name_f", error, total_error) CALL h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_f",error,total_error) - ! Check the attribute's information + ! Check the attribute's information CALL verify("h5aget_info_f",corder,u,total_error) CALL verify("h5aget_info_f",f_corder_valid,.TRUE.,total_error) CALL verify("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) @@ -2746,21 +2746,21 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL check("h5aget_storage_size_f",error,total_error) CALL verify("h5aget_info_f", INT(data_size), INT(storage_size), total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr_id, error) CALL check("h5aclose_f",error,total_error) - ! Open the attribute + ! Open the attribute CALL H5Aopen_by_name_f(fid, dsetname, attrname, attr_id, error) CALL check("H5Aopen_by_name_f", error, total_error) - ! Get the attribute's information + ! Get the attribute's information CALL h5aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, error) CALL check("h5aget_info_f",error,total_error) - ! Check the attribute's information + ! Check the attribute's information CALL verify("h5aget_info_f",corder,u,total_error) CALL verify("h5aget_info_f",f_corder_valid,.TRUE.,total_error) CALL verify("h5aget_info_f", cset, H5T_CSET_ASCII_F, total_error) @@ -2768,7 +2768,7 @@ SUBROUTINE attr_open_check(fid, dsetname, obj_id, max_attrs, total_error ) CALL check("h5aget_storage_size_f",error,total_error) CALL verify("h5aget_info_f", INT(data_size), INT(storage_size), total_error) - ! Close attribute + ! Close attribute CALL h5aclose_f(attr_id, error) CALL check("h5aclose_f",error,total_error) ENDDO diff --git a/fortran/test/tH5D.F90 b/fortran/test/tH5D.F90 index 7001b98..7f8a988 100644 --- a/fortran/test/tH5D.F90 +++ b/fortran/test/tH5D.F90 @@ -44,31 +44,31 @@ CONTAINS IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(OUT) :: total_error - + CHARACTER(LEN=5), PARAMETER :: filename = "dsetf" ! File name CHARACTER(LEN=80) :: fix_filename CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name CHARACTER(LEN=9), PARAMETER :: null_dsetname = "null_dset" ! Dataset name - + INTEGER(HID_T) :: file_id ! File identifier INTEGER(HID_T) :: dset_id ! Dataset identifier INTEGER(HID_T) :: null_dset ! Null dataset identifier INTEGER(HID_T) :: dspace_id ! Dataspace identifier INTEGER(HID_T) :: null_dspace ! Null dataspace identifier INTEGER(HID_T) :: dtype_id ! Datatype identifier - + INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions INTEGER :: rank = 2 ! Dataset rank - + INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers INTEGER :: error ! Error flag - + INTEGER :: i, j !general purpose integers INTEGER(HSIZE_T), DIMENSION(2) :: data_dims INTEGER(HSIZE_T), DIMENSION(1) :: null_data_dim INTEGER :: null_dset_data = 1 ! null data INTEGER :: flag ! Space allocation status - + ! ! Initialize the dset_data array. ! @@ -157,10 +157,10 @@ CONTAINS CALL h5dget_space_status_f(dset_id, flag, error) CALL check("h5dget_space_status_f",error, total_error) CALL VERIFY("h5dget_space_status_f", flag, H5D_SPACE_STS_ALLOCATED_F, total_error) - + CALL h5dget_space_status_f(null_dset, flag, error) CALL check("h5dget_space_status_f",error, total_error) - CALL VERIFY("h5dget_space_status_f", flag, H5D_SPACE_STS_NOT_ALLOCATED_F, total_error) + CALL VERIFY("h5dget_space_status_f", flag, H5D_SPACE_STS_NOT_ALLOCATED_F, total_error) ! ! Get the dataset type. ! @@ -210,7 +210,7 @@ CONTAINS ! CALL h5sclose_f(dspace_id, error) CALL check("h5sclose_f", error, total_error) - + ! ! Terminate access to the data type. ! @@ -223,86 +223,86 @@ CONTAINS CALL check("h5fclose_f", error, total_error) IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) - + RETURN END SUBROUTINE datasettest - + ! !the following subroutine tests h5dextend_f functionality ! SUBROUTINE extenddsettest(cleanup, total_error) - + IMPLICIT NONE - + LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(OUT) :: total_error - + ! !the dataset is stored in file "extf.h5" ! CHARACTER(LEN=4), PARAMETER :: filename = "extf" CHARACTER(LEN=80) :: fix_filename - + ! !dataset name is "ExtendibleArray" ! CHARACTER(LEN=15), PARAMETER :: dsetname = "ExtendibleArray" - + ! !dataset rank is 2 ! INTEGER :: RANK = 2 - + INTEGER(HID_T) :: file_id ! File identifier INTEGER(HID_T) :: dset_id ! Dataset identifier INTEGER(HID_T) :: dataspace ! Dataspace identifier INTEGER(HID_T) :: memspace ! memory Dataspace identifier INTEGER(HID_T) :: crp_list ! dataset creatation property identifier - + ! !dataset dimensions at creation time ! INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/3,3/) - + ! !data dimensions ! INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/10,3/) - + ! !Maximum dimensions ! INTEGER(HSIZE_T), DIMENSION(2) :: maxdims - + ! !data arrays for reading and writing ! INTEGER, DIMENSION(10,3) :: data_in, data_out - + ! !Size of data in the file ! INTEGER(HSIZE_T), DIMENSION(2) :: size - + ! !general purpose integer ! INTEGER :: i, j INTEGER(HSIZE_T) :: ih, jh - + ! !flag to check operation success ! INTEGER :: error - + ! !Variables used in reading data back ! INTEGER(HSIZE_T), DIMENSION(2) :: dimsr, maxdimsr INTEGER :: rankr INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - + ! !data initialization ! @@ -311,7 +311,7 @@ CONTAINS data_in(i,j) = 2 END DO END DO - + ! !Initialize FORTRAN predifined datatypes ! @@ -328,24 +328,24 @@ CONTAINS ENDIF CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) CALL check("h5fcreate_f",error,total_error) - + ! !Create the data space with unlimited dimensions. ! maxdims = (/H5S_UNLIMITED_F, H5S_UNLIMITED_F/) - + CALL h5screate_simple_f(RANK, dims, dataspace, error, maxdims) CALL check("h5screate_simple_f",error,total_error) - + ! !Modify dataset creation properties, i.e. enable chunking ! CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error) CALL check("h5pcreate_f",error,total_error) - + CALL h5pset_chunk_f(crp_list, RANK, dims1, error) CALL check("h5pset_chunk_f",error,total_error) - + ! !Create a dataset with 3X3 dimensions using cparms creation propertie . ! @@ -359,8 +359,8 @@ CONTAINS SIZE(2) = 3 CALL h5dextend_f(dset_id, size, error) CALL check("h5dextend_f",error,total_error) - - + + ! !Extend the dataset. Dataset becomes 10 x 3. ! @@ -368,7 +368,7 @@ CONTAINS SIZE(2) = 3; CALL h5dextend_f(dset_id, size, error) CALL check("h5dextend_f",error,total_error) - + ! !Write the data of size 10X3 to the extended dataset. ! @@ -376,13 +376,13 @@ CONTAINS data_dims(2) = 3 CALL H5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data_in, data_dims, error) CALL check("h5dwrite_f",error,total_error) - + ! !Close the dataspace for the dataset. ! CALL h5sclose_f(dataspace, error) CALL check("h5sclose_f",error,total_error) - + ! !Close the property list. ! @@ -393,13 +393,13 @@ CONTAINS ! CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f",error,total_error) - + ! !Close the file. ! CALL h5fclose_f(file_id, error) CALL check("h5fclose_f",error,total_error) - + ! !read the data back ! @@ -407,19 +407,19 @@ CONTAINS ! CALL h5fopen_f (fix_filename, H5F_ACC_RDONLY_F, file_id, error) CALL check("hfopen_f",error,total_error) - + ! !Open the dataset. ! CALL h5dopen_f(file_id, dsetname, dset_id, error) CALL check("h5dopen_f",error,total_error) - + ! !Get dataset's dataspace handle. ! CALL h5dget_space_f(dset_id, dataspace, error) CALL check("h5dget_space_f",error,total_error) - + ! !Get dataspace's rank. ! @@ -429,7 +429,7 @@ CONTAINS WRITE(*,*) "dataset rank error occured" STOP END IF - + ! !Get dataspace's dimensinons. ! @@ -439,27 +439,27 @@ CONTAINS WRITE(*,*) "dataset dimensions error occured" STOP END IF - + ! !Get creation property list. ! CALL h5dget_create_plist_f(dset_id, crp_list, error) CALL check("h5dget_create_plist_f",error,total_error) - + ! !create memory dataspace. ! CALL h5screate_simple_f(rankr, dimsr, memspace, error) CALL check("h5screate_simple_f",error,total_error) - + ! !Read data ! CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error, memspace, dataspace) CALL check("h5dread_f",error,total_error) - + ! !Compare the data. ! @@ -471,31 +471,31 @@ CONTAINS END IF END DO END DO - + ! !Close the dataspace for the dataset. ! CALL h5sclose_f(dataspace, error) CALL check("h5sclose_f",error,total_error) - + ! !Close the memspace for the dataset. ! CALL h5sclose_f(memspace, error) CALL check("h5sclose_f",error,total_error) - + ! !Close the property list. ! CALL h5pclose_f(crp_list, error) CALL check("h5pclose_f",error,total_error) - + ! !Close the dataset. ! CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f",error,total_error) - + ! !Close the file. ! @@ -503,7 +503,7 @@ CONTAINS CALL check("h5fclose_f",error,total_error) IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) - + RETURN END SUBROUTINE extenddsettest @@ -549,7 +549,7 @@ CONTAINS DO i = 1, dset_dim1 DO j = 1, dset_dim2 n = n + 1 - data_in(i,j) = n + data_in(i,j) = n END DO END DO CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file, error, fcpl) @@ -557,7 +557,7 @@ CONTAINS ! Create the data space dims(1:2) = (/dset_dim1,dset_dim2/) - + CALL h5screate_simple_f(2, dims, space, error) CALL check("h5screate_simple_f",error,total_error) @@ -596,7 +596,7 @@ CONTAINS total_error = total_error + 1 RETURN ENDIF - ! The pos= specifier illustrates that positions are in bytes, + ! The pos= specifier illustrates that positions are in bytes, ! starting from byte 1 (as opposed to C, where they start from byte 0) READ(10, POS=offset+1, IOSTAT=ios) rdata IF(ios.NE.0)THEN @@ -625,7 +625,7 @@ CONTAINS CALL check("h5_cleanup_f", error, total_error) IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) - + END SUBROUTINE test_userblock_offset END MODULE TH5D diff --git a/fortran/test/tH5E_F03.F90 b/fortran/test/tH5E_F03.F90 index 1878966..a8ca103 100644 --- a/fortran/test/tH5E_F03.F90 +++ b/fortran/test/tH5E_F03.F90 @@ -5,7 +5,7 @@ ! ! FUNCTION ! Test FORTRAN HDF5 H5E APIs which are dependent on FORTRAN 2003 -! features. +! features. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -168,10 +168,10 @@ SUBROUTINE test_error(total_error) !!$#ifdef H5_USE_16_API !!$ if (old_func != (H5E_auto_t)H5Eprint) !!$ TEST_ERROR; -!!$#else H5_USE_16_API +!!$#else H5_USE_16_API !!$ if (old_func != (H5E_auto2_t)H5Eprint2) !!$ TEST_ERROR; -!!$#endif H5_USE_16_API +!!$#endif H5_USE_16_API ! set the customized error handling routine diff --git a/fortran/test/tH5F.F90 b/fortran/test/tH5F.F90 index b898c21..16464dd 100644 --- a/fortran/test/tH5F.F90 +++ b/fortran/test/tH5F.F90 @@ -25,10 +25,10 @@ ! !***** ! -! In the mountingtest subroutine we create one file with a group in it, +! In the mountingtest subroutine we create one file with a group in it, ! and another file with a dataset. Mounting is used to -! access the dataset from the second file as a member of a group -! in the first file. +! access the dataset from the second file as a member of a group +! in the first file. MODULE TH5F @@ -148,7 +148,7 @@ CONTAINS CALL check(" h5tcopy_f",error,total_error) CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t4, error) CALL check(" h5tcopy_f",error,total_error) - + CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error) CALL check(" h5fget_obj_count_f",error,total_error) @@ -280,7 +280,7 @@ CONTAINS IF(obj_count.NE.1)THEN total_error = total_error + 1 - ENDIF + ENDIF CALL h5fopen_f (fix_filename2, H5F_ACC_RDWR_F, file2_id, error) CALL check("h5fopen_f",error,total_error) @@ -290,7 +290,7 @@ CONTAINS IF(obj_count.NE.2)THEN total_error = total_error + 1 - ENDIF + ENDIF ! !Check file numbers diff --git a/fortran/test/tH5F_F03.F90 b/fortran/test/tH5F_F03.F90 index 8cc6b83..f938565 100644 --- a/fortran/test/tH5F_F03.F90 +++ b/fortran/test/tH5F_F03.F90 @@ -5,7 +5,7 @@ ! ! FUNCTION ! Test FORTRAN HDF5 H5F APIs which are dependent on FORTRAN 2003 -! features. +! features. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -37,8 +37,8 @@ MODULE TH5F_F03 USE HDF5 - USE TH5_MISC - USE TH5_MISC_GEN + USE TH5_MISC + USE TH5_MISC_GEN USE ISO_C_BINDING CONTAINS @@ -79,21 +79,21 @@ SUBROUTINE test_get_file_image(total_error) CALL h5fcreate_f("tget_file_image.h5", H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl) CALL check("h5fcreate_f", error, total_error) - ! Set up data space for new data set + ! Set up data space for new data set dims(1:2) = (/10,10/) - + CALL h5screate_simple_f(2, dims, space_id, error) CALL check("h5screate_simple_f", error, total_error) - ! Create a dataset + ! Create a dataset CALL h5dcreate_f(file_id, "dset 0", H5T_NATIVE_INTEGER, space_id, dset_id, error) CALL check("h5dcreate_f", error, total_error) - ! Write some data to the data set + ! Write some data to the data set DO i = 1, 100 data(i) = INT(i) ENDDO - + f_ptr = C_LOC(data(1)) CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, f_ptr, error) CALL check("h5dwrite_f",error, total_error) @@ -102,7 +102,7 @@ SUBROUTINE test_get_file_image(total_error) CALL h5fflush_f(file_id, H5F_SCOPE_GLOBAL_F, error) CALL check("h5fflush_f",error, total_error) - ! Open the test file using standard I/O calls + ! Open the test file using standard I/O calls OPEN(UNIT=10,FILE='tget_file_image.h5', ACCESS='STREAM') ! Get the size of the test file ! @@ -110,8 +110,8 @@ SUBROUTINE test_get_file_image(total_error) ! may be larger. This is OK, as long as (in this specialized instance) ! the remainder of the file is all '\0's. ! - ! With latest mods to truncate call in core file drive, - ! file size should match image size; get the file size + ! With latest mods to truncate call in core file drive, + ! file size should match image size; get the file size INQUIRE(UNIT=10, SIZE=file_sz) CLOSE(UNIT=10) @@ -131,7 +131,7 @@ SUBROUTINE test_get_file_image(total_error) CALL verify("h5fget_file_image_f", INT(itmp_a), 1, total_error) ! Routine should not change the value CALL verify("h5fget_file_image_f", file_sz, INT(image_size), total_error) - ! Allocate a buffer of the appropriate size + ! Allocate a buffer of the appropriate size ALLOCATE(image_ptr(1:image_size)) ! Load the image of the file into the buffer @@ -139,7 +139,7 @@ SUBROUTINE test_get_file_image(total_error) CALL h5fget_file_image_f(file_id, f_ptr, image_size, error) CALL check("h5fget_file_image_f",error, total_error) - ! Close dset and space + ! Close dset and space CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f", error, total_error) CALL h5sclose_f(space_id, error) @@ -151,7 +151,7 @@ SUBROUTINE test_get_file_image(total_error) ! Allocate a buffer for the test file image ALLOCATE(file_image_ptr(1:image_size)) - ! Open the test file using standard I/O calls + ! Open the test file using standard I/O calls OPEN(UNIT=10,FILE='tget_file_image.h5', FORM='UNFORMATTED', ACCESS='STREAM') ! Read the test file from disk into the buffer diff --git a/fortran/test/tH5G_1_8.F90 b/fortran/test/tH5G_1_8.F90 index 58431a1..c35edad 100644 --- a/fortran/test/tH5G_1_8.F90 +++ b/fortran/test/tH5G_1_8.F90 @@ -22,7 +22,7 @@ ! ! CONTAINS SUBROUTINES ! group_test, group_info, timestamps, mklinks, test_move_preserves, lifecycle -! cklinks, delete_by_idx, link_info_by_idx_check, test_lcpl, objcopy, +! cklinks, delete_by_idx, link_info_by_idx_check, test_lcpl, objcopy, ! lapl_nlinks ! !***** @@ -41,7 +41,7 @@ SUBROUTINE group_test(cleanup, total_error) LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error - INTEGER(HID_T) :: fapl, fapl2, my_fapl ! File access property lists + INTEGER(HID_T) :: fapl, fapl2, my_fapl ! File access property lists INTEGER :: error, ret_total_error @@ -49,15 +49,15 @@ SUBROUTINE group_test(cleanup, total_error) CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl, error) CALL check("H5Pcreate_f",error, total_error) - ! Copy the file access property list + ! Copy the file access property list CALL H5Pcopy_f(fapl, fapl2, error) CALL check("H5Pcopy_f",error, total_error) - ! Set the "use the latest version of the format" bounds for creating objects in the file + ! Set the "use the latest version of the format" bounds for creating objects in the file CALL H5Pset_libver_bounds_f(fapl2, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, error) CALL check("H5Pset_libver_bounds_f",error, total_error) - ! Check for FAPL to USE + ! Check for FAPL to USE my_fapl = fapl2 ret_total_error = 0 @@ -135,7 +135,7 @@ END SUBROUTINE group_test ! * February 18, 2008 ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE group_info(cleanup, fapl, total_error) @@ -143,21 +143,21 @@ SUBROUTINE group_info(cleanup, fapl, total_error) INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl - INTEGER(HID_T) :: gcpl_id ! Group creation property list ID + INTEGER(HID_T) :: gcpl_id ! Group creation property list ID - INTEGER :: max_compact ! Maximum # of links to store in group compactly - INTEGER :: min_dense ! Minimum # of links to store in group "densely" + INTEGER :: max_compact ! Maximum # of links to store in group compactly + INTEGER :: min_dense ! Minimum # of links to store in group "densely" - INTEGER :: idx_type ! Type of index to operate on - INTEGER :: order, iorder ! Order within in the index - LOGICAL, DIMENSION(1:2) :: use_index = (/.FALSE.,.TRUE./) ! Use index on creation order values + INTEGER :: idx_type ! Type of index to operate on + INTEGER :: order, iorder ! Order within in the index + LOGICAL, DIMENSION(1:2) :: use_index = (/.FALSE.,.TRUE./) ! Use index on creation order values CHARACTER(LEN=6), PARAMETER :: prefix = 'links0' - CHARACTER(LEN=9), PARAMETER :: filename = prefix//'.h5' ! File name + CHARACTER(LEN=9), PARAMETER :: filename = prefix//'.h5' ! File name INTEGER :: Input1 - INTEGER(HID_T) :: group_id ! Group ID - INTEGER(HID_T) :: soft_group_id ! Group ID for soft links + INTEGER(HID_T) :: group_id ! Group ID + INTEGER(HID_T) :: soft_group_id ! Group ID for soft links - INTEGER :: i ! Local index variables + INTEGER :: i ! Local index variables INTEGER :: storage_type ! Type of storage for links in group: ! H5G_STORAGE_TYPE_COMPACT: Compact storage ! H5G_STORAGE_TYPE_DENSE: Indexed storage @@ -165,34 +165,34 @@ SUBROUTINE group_info(cleanup, fapl, total_error) INTEGER :: nlinks ! Number of links in group INTEGER :: max_corder ! Current maximum creation order value for group - INTEGER :: u,v ! Local index variables + INTEGER :: u,v ! Local index variables CHARACTER(LEN=2) :: chr2 - INTEGER(HID_T) :: group_id2, group_id3 ! Group IDs - CHARACTER(LEN=7) :: objname ! Object name - CHARACTER(LEN=7) :: objname2 ! Object name - CHARACTER(LEN=19) :: valname ! Link value + INTEGER(HID_T) :: group_id2, group_id3 ! Group IDs + CHARACTER(LEN=7) :: objname ! Object name + CHARACTER(LEN=7) :: objname2 ! Object name + CHARACTER(LEN=19) :: valname ! Link value CHARACTER(LEN=12), PARAMETER :: CORDER_GROUP_NAME = "corder_group" CHARACTER(LEN=17), PARAMETER :: CORDER_SOFT_GROUP_NAME = "corder_soft_group" - INTEGER(HID_T) :: file_id ! File ID - INTEGER :: error ! Generic return value + INTEGER(HID_T) :: file_id ! File ID + INTEGER :: error ! Generic return value LOGICAL :: mounted LOGICAL :: cleanup - ! Create group creation property list + ! Create group creation property list CALL H5Pcreate_f(H5P_GROUP_CREATE_F, gcpl_id, error ) CALL check("H5Pcreate_f", error, total_error) - ! Query the group creation properties + ! Query the group creation properties CALL H5Pget_link_phase_change_f(gcpl_id, max_compact, min_dense, error) CALL check("H5Pget_link_phase_change_f", error, total_error) - ! Loop over operating on different indices on link fields + ! Loop over operating on different indices on link fields DO idx_type = H5_INDEX_NAME_F, H5_INDEX_CRT_ORDER_F - ! Loop over operating in different orders + ! Loop over operating in different orders DO iorder = H5_ITER_INC_F, H5_ITER_NATIVE_F - ! Loop over using index for creation order value + ! Loop over using index for creation order value DO i = 1, 2 - ! Print appropriate test message + ! Print appropriate test message IF(idx_type == H5_INDEX_CRT_ORDER_F)THEN IF(iorder == H5_ITER_INC_F)THEN order = H5_ITER_INC_F @@ -241,11 +241,11 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ENDIF END IF - ! Create file + ! Create file CALL H5Fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl) CALL check("H5Fcreate_f", error, total_error) - ! Set creation order tracking & indexing on group + ! Set creation order tracking & indexing on group IF(use_index(i))THEN Input1 = H5P_CRT_ORDER_INDEXED_F ELSE @@ -254,103 +254,103 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL H5Pset_link_creation_order_f(gcpl_id, IOR(H5P_CRT_ORDER_TRACKED_F, Input1), error) CALL check("H5Pset_link_creation_order_f", error, total_error) - ! Create group with creation order tracking on + ! Create group with creation order tracking on CALL H5Gcreate_f(file_id, CORDER_GROUP_NAME, group_id, error, gcpl_id=gcpl_id) CALL check("H5Gcreate_f", error, total_error) - ! Create group with creation order tracking on for soft links + ! Create group with creation order tracking on for soft links CALL H5Gcreate_f(file_id, CORDER_SOFT_GROUP_NAME, soft_group_id, error, & OBJECT_NAMELEN_DEFAULT_F, H5P_DEFAULT_F, gcpl_id) CALL check("H5Gcreate_f", error, total_error) - ! Check for out of bound query by index on empty group, should fail + ! Check for out of bound query by index on empty group, should fail CALL H5Gget_info_by_idx_f(group_id, ".", H5_INDEX_NAME_F, order, INT(0,HSIZE_T), & storage_type, nlinks, max_corder, error) CALL verify("H5Gget_info_by_idx_f", error, -1, total_error) - ! Create several links, up to limit of compact form + ! Create several links, up to limit of compact form DO u = 0, max_compact-1 - ! Make name for link + ! Make name for link WRITE(chr2,'(I2.2)') u objname = 'fill '//chr2 - ! Create hard link, with group object + ! Create hard link, with group object CALL H5Gcreate_f(group_id, objname, group_id2, error, OBJECT_NAMELEN_DEFAULT_F, H5P_DEFAULT_F, gcpl_id) CALL check("H5Gcreate_f", error, total_error) - ! Retrieve group's information + ! Retrieve group's information CALL H5Gget_info_f(group_id2, storage_type, nlinks, max_corder, error, mounted) CALL check("H5Gget_info_f", error, total_error) - ! Check (new/empty) group's information + ! Check (new/empty) group's information CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL verify("H5Gget_info_f", max_corder, 0, total_error) CALL verify("H5Gget_info_f", nlinks, 0, total_error) CALL verify("H5Gget_info_f.mounted", mounted,.FALSE.,total_error) - ! Retrieve group's information + ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id, objname, storage_type, nlinks, max_corder, error, mounted=mounted) CALL check("H5Gget_info_by_name_f", error, total_error) - ! Check (new/empty) group's information + ! Check (new/empty) group's information CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL verify("H5Gget_info_by_name_f", max_corder, 0, total_error) CALL verify("H5Gget_info_by_name_f", nlinks, 0, total_error) CALL verify("H5Gget_info_by_name_f.mounted", mounted,.FALSE.,total_error) - ! Retrieve group's information + ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id2, ".", storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name", error, total_error) - ! Check (new/empty) group's information + ! Check (new/empty) group's information CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL verify("H5Gget_info_by_name_f", max_corder, 0, total_error) CALL verify("H5Gget_info_by_name_f", nlinks, 0, total_error) - ! Create objects in new group created + ! Create objects in new group created DO v = 0, u - ! Make name for link + ! Make name for link WRITE(chr2,'(I2.2)') v objname2 = 'fill '//chr2 - ! Create hard link, with group object + ! Create hard link, with group object CALL H5Gcreate_f(group_id2, objname2, group_id3, error ) CALL check("H5Gcreate_f", error, total_error) - ! Close group created + ! Close group created CALL H5Gclose_f(group_id3, error) CALL check("H5Gclose_f", error, total_error) ENDDO - ! Retrieve group's information + ! Retrieve group's information CALL H5Gget_info_f(group_id2, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_f", error, total_error) - ! Check (new) group's information + ! Check (new) group's information CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL verify("H5Gget_info_f", max_corder, u+1, total_error) CALL verify("H5Gget_info_f", nlinks, u+1, total_error) - ! Retrieve group's information + ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id, objname, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) - ! Check (new) group's information + ! Check (new) group's information CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL verify("H5Gget_info_by_name_f",max_corder, u+1, total_error) CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) - ! Retrieve group's information + ! Retrieve group's information CALL H5Gget_info_by_name_f(group_id2, ".", storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) - ! Check (new) group's information + ! Check (new) group's information CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) - ! Retrieve group's information + ! Retrieve group's information IF(order.NE.H5_ITER_NATIVE_F)THEN IF(order.EQ.H5_ITER_INC_F) THEN CALL H5Gget_info_by_idx_f(group_id, ".", idx_type, order, INT(u,HSIZE_T), & @@ -363,72 +363,72 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL verify("H5Gget_info_by_idx_f", mounted,.FALSE.,total_error) CALL check("H5Gget_info_by_idx_f", error, total_error) ENDIF - ! Check (new) group's information + ! Check (new) group's information CALL verify("H5Gget_info_by_idx_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL verify("H5Gget_info_by_idx_f", max_corder, u+1, total_error) CALL verify("H5Gget_info_by_idx_f", nlinks, u+1, total_error) ENDIF - ! Close group created + ! Close group created CALL H5Gclose_f(group_id2, error) CALL check("H5Gclose_f", error, total_error) - ! Retrieve main group's information + ! Retrieve main group's information CALL H5Gget_info_f(group_id, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_f", error, total_error) - ! Check main group's information + ! Check main group's information CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL verify("H5Gget_info_f", max_corder, u+1, total_error) CALL verify("H5Gget_info_f", nlinks, u+1, total_error) - ! Retrieve main group's information, by name + ! Retrieve main group's information, by name CALL H5Gget_info_by_name_f(file_id, CORDER_GROUP_NAME, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_by_name_f", error, total_error) - ! Check main group's information + ! Check main group's information CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) - ! Retrieve main group's information, by name + ! Retrieve main group's information, by name CALL H5Gget_info_by_name_f(group_id, ".", storage_type, nlinks, max_corder, error, H5P_DEFAULT_F) CALL check("H5Gget_info_by_name_f", error, total_error) - ! Check main group's information + ! Check main group's information CALL verify("H5Gget_info_by_name_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL verify("H5Gget_info_by_name_f", max_corder, u+1, total_error) CALL verify("H5Gget_info_by_name_f", nlinks, u+1, total_error) - ! Create soft link in another group, to objects in main group + ! Create soft link in another group, to objects in main group valname = CORDER_GROUP_NAME//objname CALL H5Lcreate_soft_f(valname, soft_group_id, objname, error, H5P_DEFAULT_F, H5P_DEFAULT_F) - ! Retrieve soft link group's information, by name + ! Retrieve soft link group's information, by name CALL H5Gget_info_f(soft_group_id, storage_type, nlinks, max_corder, error) CALL check("H5Gget_info_f", error, total_error) - ! Check soft link group's information + ! Check soft link group's information CALL verify("H5Gget_info_f", storage_type, H5G_STORAGE_TYPE_COMPACT_F, total_error) CALL verify("H5Gget_info_f", max_corder, u+1, total_error) CALL verify("H5Gget_info_f", nlinks, u+1, total_error) ENDDO - ! Close the groups + ! Close the groups CALL H5Gclose_f(group_id, error) CALL check("H5Gclose_f", error, total_error) CALL H5Gclose_f(soft_group_id, error) CALL check("H5Gclose_f", error, total_error) - ! Close the file + ! Close the file CALL H5Fclose_f(file_id, error) CALL check("H5Fclose_f", error, total_error) ENDDO ENDDO ENDDO - ! Free resources + ! Free resources CALL H5Pclose_f(gcpl_id, error) CALL check("H5Pclose_f", error, total_error) @@ -449,7 +449,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! * February 20, 2008 ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE timestamps(cleanup, fapl, total_error) @@ -457,15 +457,15 @@ SUBROUTINE group_info(cleanup, fapl, total_error) INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl - INTEGER(HID_T) :: file_id ! File ID - INTEGER(HID_T) :: group_id ! Group ID - INTEGER(HID_T) :: group_id2 ! Group ID - INTEGER(HID_T) :: gcpl_id ! Group creation property list ID - INTEGER(HID_T) :: gcpl_id2 ! Group creation property list ID + INTEGER(HID_T) :: file_id ! File ID + INTEGER(HID_T) :: group_id ! Group ID + INTEGER(HID_T) :: group_id2 ! Group ID + INTEGER(HID_T) :: gcpl_id ! Group creation property list ID + INTEGER(HID_T) :: gcpl_id2 ! Group creation property list ID CHARACTER(LEN=6), PARAMETER :: prefix = 'links9' - CHARACTER(LEN=9), PARAMETER :: filename = prefix//'.h5' ! File name - ! Timestamp macros + CHARACTER(LEN=9), PARAMETER :: filename = prefix//'.h5' ! File name + ! Timestamp macros CHARACTER(LEN=10), PARAMETER :: TIMESTAMP_GROUP_1="timestamp1" CHARACTER(LEN=10), PARAMETER :: TIMESTAMP_GROUP_2="timestamp2" LOGICAL :: track_times @@ -473,58 +473,58 @@ SUBROUTINE group_info(cleanup, fapl, total_error) INTEGER :: error - ! Print test message + ! Print test message ! WRITE(*,*) "timestamps on objects" - ! Create group creation property list + ! Create group creation property list CALL H5Pcreate_f(H5P_GROUP_CREATE_F, gcpl_id, error ) CALL check("H5Pcreate_f", error, total_error) - ! Query the object timestamp setting + ! Query the object timestamp setting CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - ! Check default timestamp information + ! Check default timestamp information CALL verify("H5Pget_obj_track_times",track_times,.TRUE.,total_error) - ! Set a non-default object timestamp setting + ! Set a non-default object timestamp setting CALL H5Pset_obj_track_times_f(gcpl_id, .FALSE., error) CALL check("H5Pset_obj_track_times_f", error, total_error) - ! Query the object timestamp setting + ! Query the object timestamp setting CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) - ! Check default timestamp information + ! Check default timestamp information CALL verify("H5Pget_obj_track_times",track_times,.FALSE.,total_error) - ! Create file + ! Create file !h5_fixname(FILENAME[0], fapl, filename, sizeof filename); CALL H5Fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl) CALL check("h5fcreate_f",error,total_error) - ! Create group with non-default object timestamp setting + ! Create group with non-default object timestamp setting CALL h5gcreate_f(file_id, TIMESTAMP_GROUP_1, group_id, error, & OBJECT_NAMELEN_DEFAULT_F, H5P_DEFAULT_F, gcpl_id, H5P_DEFAULT_F) CALL check("h5fcreate_f",error,total_error) - ! Close the group creation property list + ! Close the group creation property list CALL H5Pclose_f(gcpl_id, error) CALL check("H5Pclose_f", error, total_error) - ! Create group with default object timestamp setting + ! Create group with default object timestamp setting CALL h5gcreate_f(file_id, TIMESTAMP_GROUP_2, group_id2, error, & OBJECT_NAMELEN_DEFAULT_F, H5P_DEFAULT_F, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5fcreate_f",error,total_error) - ! Retrieve the new groups' creation properties + ! Retrieve the new groups' creation properties CALL H5Gget_create_plist_f(group_id, gcpl_id, error) CALL check("H5Gget_create_plist", error, total_error) CALL H5Gget_create_plist_f(group_id2, gcpl_id2, error) CALL check("H5Gget_create_plist", error, total_error) - ! Query & verify the object timestamp settings + ! Query & verify the object timestamp settings CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) CALL verify("H5Pget_obj_track_times1",track_times,.FALSE.,total_error) @@ -532,11 +532,11 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pget_obj_track_times_f", error, total_error) CALL verify("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) -! Query the object information for each group +! Query the object information for each group ! if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR ! if(H5Oget_info(group_id2, &oinfo2) < 0) TEST_ERROR -!!$ Sanity check object information for each group +!!$ Sanity check object information for each group !!$ if(oinfo.atime != 0) TEST_ERROR !!$ if(oinfo.mtime != 0) TEST_ERROR !!$ if(oinfo.ctime != 0) TEST_ERROR @@ -550,40 +550,40 @@ SUBROUTINE group_info(cleanup, fapl, total_error) !!$ if(oinfo.hdr.space.total >= oinfo2.hdr.space.total) TEST_ERROR !!$ if(oinfo.hdr.space.meta >= oinfo2.hdr.space.meta) TEST_ERROR - ! Close the property lists + ! Close the property lists CALL H5Pclose_f(gcpl_id, error) CALL check("H5Pclose_f", error, total_error) CALL H5Pclose_f(gcpl_id2, error) CALL check("H5Pclose_f", error, total_error) - ! Close the groups + ! Close the groups CALL H5Gclose_f(group_id, error) CALL check("H5Gclose_f", error, total_error) CALL H5Gclose_f(group_id2, error) CALL check("H5Gclose_f", error, total_error) - ! Close the file + ! Close the file CALL H5Fclose_f(file_id, error) CALL check("H5Fclose_f", error, total_error) - ! Re-open the file + ! Re-open the file CALL h5fopen_f(FileName, H5F_ACC_RDONLY_F, file_id, error, H5P_DEFAULT_F) CALL check("h5fopen_f",error,total_error) - ! Open groups + ! Open groups CALL H5Gopen_f(file_id, TIMESTAMP_GROUP_1, group_id, error) ! with no optional param. CALL check("H5Gopen_f", error, total_error) CALL H5Gopen_f(file_id, TIMESTAMP_GROUP_2, group_id2, error, H5P_DEFAULT_F) ! with optional param. CALL check("H5Gopen_f", error, total_error) - ! Retrieve the new groups' creation properties + ! Retrieve the new groups' creation properties CALL H5Gget_create_plist_f(group_id, gcpl_id, error) CALL check("H5Gget_create_plist", error, total_error) CALL H5Gget_create_plist_f(group_id2, gcpl_id2, error) CALL check("H5Gget_create_plist", error, total_error) - ! Query & verify the object timestamp settings + ! Query & verify the object timestamp settings CALL H5Pget_obj_track_times_f(gcpl_id, track_times, error) CALL check("H5Pget_obj_track_times_f", error, total_error) @@ -592,11 +592,11 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pget_obj_track_times_f", error, total_error) CALL verify("H5Pget_obj_track_times2",track_times,.TRUE.,total_error) !!$ -!!$ Query the object information for each group +!!$ Query the object information for each group !!$ if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR !!$ if(H5Oget_info(group_id2, &oinfo2) < 0) TEST_ERROR !!$ -!!$ Sanity check object information for each group +!!$ Sanity check object information for each group !!$ if(oinfo.atime != 0) TEST_ERROR !!$ if(oinfo.mtime != 0) TEST_ERROR !!$ if(oinfo.ctime != 0) TEST_ERROR @@ -610,19 +610,19 @@ SUBROUTINE group_info(cleanup, fapl, total_error) !!$ if(oinfo.hdr.space.total >= oinfo2.hdr.space.total) TEST_ERROR !!$ if(oinfo.hdr.space.meta >= oinfo2.hdr.space.meta) TEST_ERROR - ! Close the property lists + ! Close the property lists CALL H5Pclose_f(gcpl_id, error) CALL check("H5Pclose_f", error, total_error) CALL H5Pclose_f(gcpl_id2, error) CALL check("H5Pclose_f", error, total_error) - ! Close the groups + ! Close the groups CALL H5Gclose_f(group_id, error) CALL check("H5Gclose_f", error, total_error) CALL H5Gclose_f(group_id2, error) CALL check("H5Gclose_f", error, total_error) - ! Close the file + ! Close the file CALL H5Fclose_f(file_id, error) CALL check("H5Fclose_f", error, total_error) @@ -643,7 +643,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! * Modifications: ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE mklinks(fapl, total_error) @@ -671,29 +671,29 @@ SUBROUTINE group_info(cleanup, fapl, total_error) WRITE(*,*) "link creation (w/new group format)" - ! Create a file + ! Create a file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, file, error, H5P_DEFAULT_F, fapl) CALL check("mklinks.h5fcreate_f",error,total_error) CALL h5screate_simple_f(arank, adims2, scalar, error) CALL check("mklinks.h5screate_simple_f",error,total_error) - ! Create a group + ! Create a group CALL H5Gcreate_f(file, "grp1", grp, error) CALL check("H5Gcreate_f", error, total_error) CALL H5Gclose_f(grp, error) CALL check("h5gclose_f",error,total_error) - ! Create a dataset + ! Create a dataset CALL h5dcreate_f(file, "d1", H5T_NATIVE_INTEGER, scalar, d1, error) CALL check("h5dcreate_f",error,total_error) CALL h5dclose_f(d1, error) CALL check("h5dclose_f",error,total_error) - ! Create a hard link + ! Create a hard link CALL H5Lcreate_hard_f(file, "d1", INT(H5L_SAME_LOC_F,HID_T), "grp1/hard", error) CALL check("H5Lcreate_hard_f", error, total_error) - ! Create a symbolic link + ! Create a symbolic link CALL H5Lcreate_soft_f("/d1", file, "grp1/soft",error) CALL check("H5Lcreate_soft_f", error, total_error) @@ -709,14 +709,14 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! should be '/d1' + NULL character = 4 CALL verify("H5Lget_info_by_idx_f", INT(val_size), 4, total_error) - ! Create a symbolic link to something that doesn't exist + ! Create a symbolic link to something that doesn't exist CALL H5Lcreate_soft_f("foobar", file, "grp1/dangle",error) - ! Create a recursive symbolic link + ! Create a recursive symbolic link CALL H5Lcreate_soft_f("/grp1/recursive", file, "/grp1/recursive",error) - ! Close + ! Close CALL h5sclose_f(scalar, error) CALL check("h5sclose_f",error,total_error) CALL h5fclose_f(file, error) @@ -736,7 +736,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! * Modifications: ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE test_move_preserves(fapl_id, total_error) @@ -746,20 +746,20 @@ SUBROUTINE group_info(cleanup, fapl, total_error) INTEGER(HID_T):: file_id INTEGER(HID_T):: group_id - INTEGER(HID_T):: fcpl_id ! Group creation property list ID + INTEGER(HID_T):: fcpl_id ! Group creation property list ID INTEGER(HID_T):: lcpl_id !H5O_info_t oinfo; !H5L_info_t linfo; INTEGER :: old_cset INTEGER :: old_corder !H5T_cset_t old_cset; - !int64_t old_corder; Creation order value of link + !int64_t old_corder; Creation order value of link !time_t old_modification_time; !time_t curr_time; - !unsigned crt_order_flags; Status of creation order info for GCPL + !unsigned crt_order_flags; Status of creation order info for GCPL !char filename[1024]; - INTEGER :: crt_order_flags ! Status of creation order info for GCPL + INTEGER :: crt_order_flags ! Status of creation order info for GCPL CHARACTER(LEN=12), PARAMETER :: filename = 'TestLinks.h5' INTEGER :: cset ! Indicates the character set used for the link’s name. @@ -779,7 +779,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! Create a file creation property list with creation order stored for links ! * in the root group - ! + ! CALL H5Pcreate_f(H5P_FILE_CREATE_F, fcpl_id, error) CALL check("H5Pcreate_f",error, total_error) @@ -795,26 +795,26 @@ SUBROUTINE group_info(cleanup, fapl, total_error) CALL check("H5Pget_link_creation_order_f",error, total_error) CALL verify("H5Pget_link_creation_order_f",crt_order_flags, H5P_CRT_ORDER_TRACKED_F, total_error) - ! Create file - ! (with creation order tracking for the root group) + ! Create file + ! (with creation order tracking for the root group) CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, file_id, error, fcpl_id, fapl_id) CALL check("h5fcreate_f",error,total_error) - ! Create a link creation property list with the UTF-8 character encoding + ! Create a link creation property list with the UTF-8 character encoding CALL H5Pcreate_f(H5P_LINK_CREATE_F, lcpl_id, error) CALL check("H5Pcreate_f",error, total_error) CALL H5Pset_char_encoding_f(lcpl_id, H5T_CSET_UTF8_F, error) CALL check("H5Pset_char_encoding_f",error, total_error) - ! Create a group with that lcpl + ! Create a group with that lcpl CALL H5Gcreate_f(file_id, "group", group_id, error,lcpl_id=lcpl_id, gcpl_id=H5P_DEFAULT_F, gapl_id=H5P_DEFAULT_F) CALL check("H5Gcreate_f", error, total_error) CALL H5Gclose_f(group_id, error) CALL check("H5Gclose_f", error, total_error) - ! Get the group's link's information + ! Get the group's link's information CALL H5Lget_info_f(file_id, "group", & cset, corder, f_corder_valid, link_type, token, val_size, & error, H5P_DEFAULT_F) @@ -830,18 +830,18 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! old_modification_time = oinfo.mtime; -! If this test happens too quickly, the times will all be the same. Make sure the time changes. +! If this test happens too quickly, the times will all be the same. Make sure the time changes. ! curr_time = HDtime(NULL); ! while(HDtime(NULL) <= curr_time) ! ; -! Close the file and reopen it +! Close the file and reopen it CALL H5Fclose_f(file_id, error) CALL check("H5Fclose_f", error, total_error) !!$ if((file_id = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0) TEST_ERROR !!$ -!!$ Get the link's character set & modification time . They should be unchanged +!!$ Get the link's character set & modification time . They should be unchanged !!$ if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(old_modification_time != oinfo.mtime) TEST_ERROR @@ -849,7 +849,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) !!$ if(linfo.corder_valid != TRUE) TEST_ERROR !!$ if(old_corder != linfo.corder) TEST_ERROR !!$ -!!$ Create a new link to the group. It should have a different creation order value but the same modification time +!!$ Create a new link to the group. It should have a different creation order value but the same modification time !!$ if(H5Lcreate_hard(file_id, "group", file_id, "group2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(H5Oget_info_by_name(file_id, "group2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(old_modification_time != oinfo.mtime) TEST_ERROR @@ -862,7 +862,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) !!$ Copy the first link to a UTF-8 name. !!$ * Its creation order value should be different, but modification time !!$ * should not change. -!!$ +!!$ !!$ if(H5Lcopy(file_id, "group", file_id, "group_copied", lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(H5Oget_info_by_name(file_id, "group_copied", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(old_modification_time != oinfo.mtime) TEST_ERROR @@ -870,10 +870,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) !!$ if(linfo.corder_valid != TRUE) TEST_ERROR !!$ if(linfo.corder != 2) TEST_ERROR !!$ -!!$ Check that its character encoding is UTF-8 +!!$ Check that its character encoding is UTF-8 !!$ if(linfo.cset != H5T_CSET_UTF8) TEST_ERROR !!$ -!!$ Move the link with the default property list. +!!$ Move the link with the default property list. !!$ if(H5Lmove(file_id, "group_copied", file_id, "group_copied2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(H5Oget_info_by_name(file_id, "group_copied2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(old_modification_time != oinfo.mtime) TEST_ERROR @@ -881,10 +881,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) !!$ if(linfo.corder_valid != TRUE) TEST_ERROR !!$ if(linfo.corder != 3) TEST_ERROR !!$ -!!$ Check that its character encoding is not UTF-8 +!!$ Check that its character encoding is not UTF-8 !!$ if(linfo.cset == H5T_CSET_UTF8) TEST_ERROR !!$ -!!$ Check that the original link is unchanged +!!$ Check that the original link is unchanged !!$ if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(old_modification_time != oinfo.mtime) TEST_ERROR !!$ if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR @@ -894,7 +894,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) !!$ !!$ Move the first link to a UTF-8 name. !!$ * Its creation order value will change, but modification time should not -!!$ * change. +!!$ * change. !!$ if(H5Lmove(file_id, "group", file_id, "group_moved", lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(H5Oget_info_by_name(file_id, "group_moved", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(old_modification_time != oinfo.mtime) TEST_ERROR @@ -902,10 +902,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) !!$ if(linfo.corder_valid != TRUE) TEST_ERROR !!$ if(linfo.corder != 4) TEST_ERROR !!$ -!!$ Check that its character encoding is UTF-8 +!!$ Check that its character encoding is UTF-8 !!$ if(linfo.cset != H5T_CSET_UTF8) TEST_ERROR !!$ -!!$ Move the link again using the default property list. +!!$ Move the link again using the default property list. !!$ if(H5Lmove(file_id, "group_moved", file_id, "group_moved_again", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(H5Oget_info_by_name(file_id, "group_moved_again", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR !!$ if(old_modification_time != oinfo.mtime) TEST_ERROR @@ -913,10 +913,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error) !!$ if(linfo.corder_valid != TRUE) TEST_ERROR !!$ if(linfo.corder != 5) TEST_ERROR !!$ -!!$ Check that its character encoding is not UTF-8 +!!$ Check that its character encoding is not UTF-8 !!$ if(linfo.cset == H5T_CSET_UTF8) TEST_ERROR - ! Close open IDs + ! Close open IDs CALL H5Pclose_f(fcpl_id, error) CALL check("H5Pclose_f", error, total_error) CALL H5Pclose_f(lcpl_id, error) @@ -941,7 +941,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error) ! * Monday, October 17, 2005 ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE lifecycle(cleanup, fapl2, total_error) IMPLICIT NONE @@ -951,14 +951,14 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) INTEGER, PARAMETER :: NAME_BUF_SIZE =7 - INTEGER(HID_T) :: fid ! File ID - INTEGER(HID_T) :: gid ! Group ID - INTEGER(HID_T) :: gcpl ! Group creation property list ID - INTEGER(size_t) :: lheap_size_hint ! Local heap size hint - INTEGER :: max_compact ! Maximum # of links to store in group compactly - INTEGER :: min_dense ! Minimum # of links to store in group "densely" - INTEGER :: est_num_entries ! Estimated # of entries in group - INTEGER :: est_name_len ! Estimated length of entry name + INTEGER(HID_T) :: fid ! File ID + INTEGER(HID_T) :: gid ! Group ID + INTEGER(HID_T) :: gcpl ! Group creation property list ID + INTEGER(size_t) :: lheap_size_hint ! Local heap size hint + INTEGER :: max_compact ! Maximum # of links to store in group compactly + INTEGER :: min_dense ! Minimum # of links to store in group "densely" + INTEGER :: est_num_entries ! Estimated # of entries in group + INTEGER :: est_name_len ! Estimated length of entry name CHARACTER(LEN=NAME_BUF_SIZE) :: filename = 'fixx.h5' INTEGER(SIZE_T) :: LIFECYCLE_LOCAL_HEAP_SIZE_HINT = 256 INTEGER :: LIFECYCLE_MAX_COMPACT = 4 @@ -975,29 +975,29 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) ! WRITE(*,*) 'group lifecycle' - ! Create file + ! Create file CALL H5Fcreate_f(filename, H5F_ACC_TRUNC_F, fid, error, access_prp=fapl2) CALL check("H5Fcreate_f",error,total_error) - ! Close file + ! Close file CALL H5Fclose_f(fid,error) CALL check("H5Fclose_f",error,total_error) - ! Get size of file as empty + ! Get size of file as empty ! if((empty_size = h5_get_file_size(filename)) < 0) TEST_ERROR - ! Re-open file + ! Re-open file CALL H5Fopen_f(filename, H5F_ACC_RDWR_F, fid, error,access_prp=fapl2) CALL check("H5Fopen_f",error,total_error) - ! Set up group creation property list + ! Set up group creation property list CALL H5Pcreate_f(H5P_GROUP_CREATE_F,gcpl,error) CALL check("H5Pcreate_f",error,total_error) - ! Query default group creation property settings + ! Query default group creation property settings CALL H5Pget_local_heap_size_hint_f(gcpl, lheap_size_hint, error) CALL check("H5Pget_local_heap_size_hint_f",error,total_error) CALL verify("H5Pget_local_heap_size_hint_f", INT(lheap_size_hint),0,total_error) @@ -1014,7 +1014,7 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) CALL verify("H5Pget_est_link_info_f", est_name_len, H5G_CRT_GINFO_EST_NAME_LEN,total_error) - ! Set GCPL parameters + ! Set GCPL parameters CALL H5Pset_local_heap_size_hint_f(gcpl, LIFECYCLE_LOCAL_HEAP_SIZE_HINT, error) CALL check("H5Pset_local_heap_size_hint_f", error, total_error) @@ -1023,12 +1023,12 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) CALL H5Pset_est_link_info_f(gcpl, LIFECYCLE_EST_NUM_ENTRIES, LIFECYCLE_EST_NAME_LEN, error) CALL check("H5Pset_est_link_info_f", error, total_error) - ! Create group for testing lifecycle + ! Create group for testing lifecycle CALL H5Gcreate_f(fid, LIFECYCLE_TOP_GROUP, gid, error, gcpl_id=gcpl) CALL check("H5Gcreate_f", error, total_error) - ! Query group creation property settings + ! Query group creation property settings CALL H5Pget_local_heap_size_hint_f(gcpl, lheap_size_hint, error) CALL check("H5Pget_local_heap_size_hint_f",error,total_error) @@ -1046,20 +1046,20 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) - ! Close top group + ! Close top group CALL H5Gclose_f(gid, error) CALL check("H5Gclose_f", error, total_error) - ! Unlink top group + ! Unlink top group CALL H5Ldelete_f(fid, LIFECYCLE_TOP_GROUP, error) CALL check("H5Ldelete_f", error, total_error) - ! Close GCPL + ! Close GCPL CALL H5Pclose_f(gcpl, error) CALL check("H5Pclose_f", error, total_error) - ! Close file + ! Close file CALL H5Fclose_f(fid,error) CALL check("H5Fclose_f",error,total_error) @@ -1084,7 +1084,7 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) ! * Modifications: Modified original C code ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE cklinks(fapl, total_error) @@ -1104,25 +1104,25 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) LOGICAL :: Lexists - ! Open the file + ! Open the file CALL H5Fopen_f(filename, H5F_ACC_RDONLY_F, file, error,access_prp=fapl) CALL check("H5Fopen_f",error,total_error) - ! Hard link + ! Hard link !!$ IF(H5Oget_info_by_name(file, "d1", &oinfo1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR !!$ IF(H5Oget_info_by_name(file, "grp1/hard", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR !!$ IF(H5O_TYPE_DATASET != oinfo2.type) { !!$ H5_FAILED(); !!$ printf(" %d: Unexpected object type should have been a dataset\n", __LINE__); !!$ TEST_ERROR -!!$ } end if +!!$ } end if !!$ if(H5F_addr_ne(oinfo1.addr, oinfo2.addr)) { !!$ H5_FAILED(); !!$ puts(" Hard link test failed. Link seems not to point to the "); !!$ puts(" expected file location."); !!$ TEST_ERROR -!!$ } end if +!!$ } end if CALL H5Lexists_f(file,"d1",Lexists, error) @@ -1131,7 +1131,7 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error) CALL H5Lexists_f(file,"grp1/hard",Lexists, error) CALL verify("H5Lexists", Lexists,.TRUE.,total_error) - ! Cleanup + ! Cleanup CALL H5Fclose_f(file,error) CALL check("H5Fclose_f",error,total_error) @@ -1153,25 +1153,25 @@ END SUBROUTINE cklinks ! * March 3, 2008 ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE delete_by_idx(cleanup, fapl, total_error) IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T), INTENT(IN) :: fapl - INTEGER(HID_T) :: file_id ! File ID - INTEGER(HID_T) :: group_id ! Group ID - INTEGER(HID_T) :: gcpl_id ! Group creation property list ID + INTEGER(HID_T) :: file_id ! File ID + INTEGER(HID_T) :: group_id ! Group ID + INTEGER(HID_T) :: gcpl_id ! Group creation property list ID - INTEGER :: idx_type ! Type of index to operate on + INTEGER :: idx_type ! Type of index to operate on LOGICAL, DIMENSION(1:2) :: use_index = (/.FALSE.,.TRUE./) - ! Use index on creation order values - INTEGER :: max_compact ! Maximum # of links to store in group compactly - INTEGER :: min_dense ! Minimum # of links to store in group "densely" + ! Use index on creation order values + INTEGER :: max_compact ! Maximum # of links to store in group compactly + INTEGER :: min_dense ! Minimum # of links to store in group "densely" - CHARACTER(LEN=7) :: objname ! Object name - CHARACTER(LEN=8) :: filename = 'file0.h5' ! File name + CHARACTER(LEN=7) :: objname ! Object name + CHARACTER(LEN=8) :: filename = 'file0.h5' ! File name CHARACTER(LEN=12), PARAMETER :: CORDER_GROUP_NAME = "corder_group" LOGICAL :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute @@ -1181,11 +1181,11 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) INTEGER :: link_type TYPE(H5O_TOKEN_T_F) :: token - INTEGER :: u ! Local index variable + INTEGER :: u ! Local index variable INTEGER :: Input1, i INTEGER(HID_T) :: group_id2 INTEGER(HID_T) :: grp - INTEGER :: iorder ! Order within in the index + INTEGER :: iorder ! Order within in the index CHARACTER(LEN=2) :: chr2 INTEGER :: error INTEGER :: id_type @@ -1203,13 +1203,13 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) fix_filename2(i:i) = " " ENDDO - ! Loop over operating on different indices on link fields + ! Loop over operating on different indices on link fields DO idx_type = H5_INDEX_NAME_F, H5_INDEX_CRT_ORDER_F - ! Loop over operating in different orders + ! Loop over operating in different orders DO iorder = H5_ITER_INC_F, H5_ITER_DEC_F - ! Loop over using index for creation order value + ! Loop over using index for creation order value DO i = 1, 2 - ! Print appropriate test message + ! Print appropriate test message !!$ IF(idx_type == H5_INDEX_CRT_ORDER_F)THEN !!$ IF(iorder == H5_ITER_INC_F)THEN !!$ IF(use_index(i))THEN @@ -1240,15 +1240,15 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) !!$ ENDIF !!$ ENDIF - ! Create file + ! Create file CALL H5Fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error, access_prp=fapl) CALL check("delete_by_idx.H5Fcreate_f", error, total_error) - ! Create group creation property list + ! Create group creation property list CALL H5Pcreate_f(H5P_GROUP_CREATE_F, gcpl_id, error ) CALL check("delete_by_idx.H5Pcreate_f", error, total_error) - ! Set creation order tracking & indexing on group + ! Set creation order tracking & indexing on group IF(use_index(i))THEN Input1 = H5P_CRT_ORDER_INDEXED_F ELSE @@ -1258,54 +1258,54 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) CALL H5Pset_link_creation_order_f(gcpl_id, IOR(H5P_CRT_ORDER_TRACKED_F, Input1), error) CALL check("delete_by_idx.H5Pset_link_creation_order_f", error, total_error) - ! Create group with creation order tracking on + ! Create group with creation order tracking on CALL H5Gcreate_f(file_id, CORDER_GROUP_NAME, group_id, error, gcpl_id=gcpl_id) CALL check("delete_by_idx.H5Gcreate_f", error, total_error) - ! Query the group creation properties + ! Query the group creation properties CALL H5Pget_link_phase_change_f(gcpl_id, max_compact, min_dense, error) CALL check("delete_by_idx.H5Pget_link_phase_change_f", error, total_error) - ! Delete links from one end + ! Delete links from one end - ! Check for deletion on empty group + ! Check for deletion on empty group CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(0,HSIZE_T), error) CALL verify("delete_by_idx.H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) - ! Create several links, up to limit of compact form + ! Create several links, up to limit of compact form DO u = 0, max_compact-1 - ! Make name for link + ! Make name for link WRITE(chr2,'(I2.2)') u objname = 'fill '//chr2 - ! Create hard link, with group object + ! Create hard link, with group object CALL H5Gcreate_f(group_id, objname, group_id2, error) CALL check("delete_by_idx.H5Gcreate_f", error, total_error) CALL H5Gclose_f(group_id2, error) CALL check("delete_by_idx.H5Gclose_f", error, total_error) - ! Verify link information for new link + ! Verify link information for new link CALL link_info_by_idx_check(group_id, objname, u, & .TRUE., use_index(i), total_error) ENDDO - ! Verify state of group (compact) + ! Verify state of group (compact) ! IF(H5G_has_links_test(group_id, NULL) != TRUE) TEST_ERROR - ! Check for out of bound deletion + ! Check for out of bound deletion htmp =9 !EP CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(u,HSIZE_T), error) CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, htmp, error) CALL verify("H5Ldelete_by_idx_f", error, -1, total_error) ! test should fail (error = -1) - ! Delete links from compact group + ! Delete links from compact group DO u = 0, (max_compact - 1) -1 - ! Delete first link in appropriate order + ! Delete first link in appropriate order CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(0,HSIZE_T), error) CALL check("H5Ldelete_by_idx_f", error, total_error) - ! Verify the link information for first link in appropriate order + ! Verify the link information for first link in appropriate order ! HDmemset(&linfo, 0, sizeof(linfo)); CALL H5Lget_info_by_idx_f(group_id, ".", idx_type, iorder, INT(0,HSIZE_T), & @@ -1335,7 +1335,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) - ! Verify the name for first link in appropriate order + ! Verify the name for first link in appropriate order ! HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); !!$ size_tmp = 20 !!$ CALL H5Lget_name_by_idx_f(group_id, ".", idx_type, order, INT(0,HSIZE_T), size_tmp, tmpname, error) @@ -1351,15 +1351,15 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) !!$ CALL verify("delete_by_idx.H5Lget_name_by_idx_f", objname, tmpname, total_error) ENDDO - ! Close the group + ! Close the group CALL H5Gclose_f(group_id, error) CALL check("delete_by_idx.H5Gclose_f", error, total_error) - ! Close the group creation property list + ! Close the group creation property list CALL H5Pclose_f(gcpl_id, error) CALL check("delete_by_idx.H5Pclose_f", error, total_error) - ! Close the file + ! Close the file CALL H5Fclose_f(file_id, error) CALL check("delete_by_idx.H5Fclose_f", error, total_error) @@ -1391,7 +1391,7 @@ END SUBROUTINE delete_by_idx ! * Tuesday, November 7, 2006 ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & hard_link, use_index, total_error) @@ -1410,35 +1410,35 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & TYPE(H5O_TOKEN_T_F) :: token INTEGER(SIZE_T) :: val_size ! Indicates the size, in the number of characters, of the attribute - CHARACTER(LEN=7) :: tmpname ! Temporary link name - CHARACTER(LEN=3) :: tmpname_small ! to small temporary link name - CHARACTER(LEN=10) :: tmpname_big ! to big temporary link name + CHARACTER(LEN=7) :: tmpname ! Temporary link name + CHARACTER(LEN=3) :: tmpname_small ! to small temporary link name + CHARACTER(LEN=10) :: tmpname_big ! to big temporary link name - CHARACTER(LEN=7) :: valname ! Link value name + CHARACTER(LEN=7) :: valname ! Link value name CHARACTER(LEN=2) :: chr2 INTEGER(SIZE_T) :: size_tmp INTEGER :: error - ! Make link value for increasing/native order queries + ! Make link value for increasing/native order queries WRITE(chr2,'(I2.2)') n valname = 'valn.'//chr2 - ! Verify the link information for first link, in increasing creation order + ! Verify the link information for first link, in increasing creation order ! HDmemset(&linfo, 0, sizeof(linfo)); CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(0,HSIZE_T), & link_type, f_corder_valid, corder, cset, token, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) CALL verify("H5Lget_info_by_idx_f", corder, 0, total_error) - ! Verify the link information for new link, in increasing creation order + ! Verify the link information for new link, in increasing creation order ! HDmemset(&linfo, 0, sizeof(linfo)); CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), & link_type, f_corder_valid, corder, cset, token, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) CALL verify("H5Lget_info_by_idx_f", corder, n, total_error) - ! Verify value for new soft link, in increasing creation order + ! Verify value for new soft link, in increasing creation order !!$ IF(hard_link)THEN !!$ ! HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE); !!$ @@ -1448,7 +1448,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & !!$! IF(HDstrcmp(valname, tmpval)) TEST_ERROR !!$ ENDIF - ! Verify the name for new link, in increasing creation order + ! Verify the name for new link, in increasing creation order ! HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); ! The actual size of tmpname should be 7 @@ -1492,7 +1492,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & ! * Modifications: ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE test_lcpl(cleanup, fapl, total_error) @@ -1537,34 +1537,34 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & ! Actually, intermediate group creation is tested elsewhere (tmisc). - ! * Here we only need to test the character encoding property + ! * Here we only need to test the character encoding property - ! Create file + ! Create file ! h5_fixname(FILENAME[0], fapl, filename, sizeof filename); CALL H5Fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl) CALL check("H5Fcreate_f", error, total_error) - ! Create and link a group with the default LCPL + ! Create and link a group with the default LCPL CALL H5Gcreate_f(file_id, "/group", group_id, error) CALL check("H5Gcreate_f", error, total_error) - ! Check that its character encoding is the default + ! Check that its character encoding is the default CALL H5Lget_info_f(file_id, "group", & cset, corder, f_corder_valid, link_type, token, val_size, & error, H5P_DEFAULT_F) ! File-wide default character encoding can not yet be set via the file -! * creation property list and is always ASCII. +! * creation property list and is always ASCII. !#define H5F_DEFAULT_CSET H5T_CSET_ASCII -- FROM H5Fprivate.h -- CALL verify("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) - ! Create and commit a datatype with the default LCPL + ! Create and commit a datatype with the default LCPL CALL h5tcopy_f(H5T_NATIVE_INTEGER, type_id, error) CALL check("h5tcopy_f",error,total_error) CALL h5tcommit_f(file_id, "/type", type_id, error) @@ -1573,19 +1573,19 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL check("h5tclose_f", error, total_error) - ! Check that its character encoding is the default + ! Check that its character encoding is the default CALL H5Lget_info_f(file_id, "type", & cset, corder, f_corder_valid, link_type, token, val_size, & error) CALL check("h5tclose_f", error, total_error) ! File-wide default character encoding can not yet be set via the file -! * creation property list and is always ASCII. +! * creation property list and is always ASCII. !#define H5F_DEFAULT_CSET H5T_CSET_ASCII -- FROM H5Fprivate.h -- CALL verify("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) - ! Create a dataspace + ! Create a dataspace CALL h5screate_simple_f(2, dims, space_id, error) CALL check("h5screate_simple_f",error,total_error) CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error) @@ -1595,7 +1595,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error) CALL h5pset_chunk_f(crp_list, 2, dims, error) - ! Create a dataset using the default LCPL + ! Create a dataset using the default LCPL CALL h5dcreate_f(file_id, "/dataset", H5T_NATIVE_INTEGER, space_id, dset_id, error, crp_list) CALL check("h5dcreate_f", error, total_error) @@ -1607,10 +1607,10 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL H5Dopen_f(file_id, "/dataset", dset_id, error) CALL check("h5dopen_f", error, total_error) - ! Extend the dataset + ! Extend the dataset CALL H5Dset_extent_f(dset_id, extend_dim, error) CALL check("H5Dset_extent_f", error, total_error) - ! Verify the dataspaces + ! Verify the dataspaces ! !Get dataset's dataspace handle. ! @@ -1629,37 +1629,37 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL verify("H5Sget_simple_extent_dims", tmp1, tmp2, total_error) ENDDO - ! close data set + ! close data set CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f", error, total_error) - ! Check that its character encoding is the default + ! Check that its character encoding is the default CALL H5Lget_info_f(file_id, "dataset", & cset, corder, f_corder_valid, link_type, token, val_size, & error) CALL check("H5Lget_info_f", error, total_error) ! File-wide default character encoding can not yet be set via the file -! * creation property list and is always ASCII. +! * creation property list and is always ASCII. !#define H5F_DEFAULT_CSET H5T_CSET_ASCII -- FROM H5Fprivate.h -- CALL verify("h5tclose_f",cset, H5T_CSET_ASCII_F,total_error) - ! Create a link creation property list with the UTF-8 character encoding + ! Create a link creation property list with the UTF-8 character encoding CALL H5Pcreate_f(H5P_LINK_CREATE_F,lcpl_id,error) CALL check("h5Pcreate_f",error,total_error) CALL H5Pset_char_encoding_f(lcpl_id, H5T_CSET_UTF8_F, error) CALL check("H5Pset_char_encoding_f",error, total_error) - ! Create and link a group with the new LCPL + ! Create and link a group with the new LCPL CALL H5Gcreate_f(file_id, "/group2", group_id, error,lcpl_id=lcpl_id) CALL check("H5Gcreate_f", error, total_error) CALL H5Gclose_f(group_id, error) CALL check("H5Gclose_f", error, total_error) - ! Check that its character encoding is UTF-8 + ! Check that its character encoding is UTF-8 CALL H5Lget_info_f(file_id, "group2", & cset, corder, f_corder_valid, link_type, token, val_size, & error) @@ -1667,7 +1667,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL verify("H5Lget_info_f",cset, H5T_CSET_UTF8_F,total_error) - ! Create and commit a datatype with the new LCPL + ! Create and commit a datatype with the new LCPL CALL h5tcopy_f(H5T_NATIVE_INTEGER, type_id, error) CALL check("h5tcopy_f",error,total_error) @@ -1677,14 +1677,14 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL check("h5tclose_f", error, total_error) - ! Check that its character encoding is UTF-8 + ! Check that its character encoding is UTF-8 CALL H5Lget_info_f(file_id, "type2", & cset, corder, f_corder_valid, link_type, token, val_size, & error) CALL check("H5Lget_info_f", error, total_error) CALL verify("H5Lget_info_f",cset, H5T_CSET_UTF8_F,total_error) - ! Create a dataset using the new LCPL + ! Create a dataset using the new LCPL CALL h5dcreate_f(file_id, "/dataset2", H5T_NATIVE_INTEGER, space_id, dset_id, error,lcpl_id=lcpl_id) CALL check("h5dcreate_f", error, total_error) @@ -1695,14 +1695,14 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL check("H5Pget_char_encoding_f", error, total_error) CALL verify("H5Pget_char_encoding_f", encoding, H5T_CSET_UTF8_F, total_error) - ! Check that its character encoding is UTF-8 + ! Check that its character encoding is UTF-8 CALL H5Lget_info_f(file_id, "dataset2", & cset, corder, f_corder_valid, link_type, token, val_size, & error) CALL check("H5Lget_info_f", error, total_error) CALL verify("H5Lget_info_f2",cset, H5T_CSET_UTF8_F,total_error) - ! Create a new link to the dataset with a different character encoding. + ! Create a new link to the dataset with a different character encoding. CALL H5Pclose_f(lcpl_id, error) CALL check("H5Pclose_f", error, total_error) @@ -1717,14 +1717,14 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL check("H5Lexists",error, total_error) CALL verify("H5Lexists", Lexists,.TRUE.,total_error) - ! Check that its character encoding is ASCII + ! Check that its character encoding is ASCII CALL H5Lget_info_f(file_id, "/dataset2_link", & cset, corder, f_corder_valid, link_type, token, val_size, & error) CALL check("H5Lget_info_f", error, total_error) CALL verify("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) - ! Check that the first link's encoding hasn't changed + ! Check that the first link's encoding hasn't changed CALL H5Lget_info_f(file_id, "/dataset2", & cset, corder, f_corder_valid, link_type, token, val_size, & @@ -1733,8 +1733,8 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL verify("H5Lget_info_f3",cset, H5T_CSET_UTF8_F,total_error) - ! Make sure that LCPLs work properly for other API calls: - ! H5Lcreate_soft + ! Make sure that LCPLs work properly for other API calls: + ! H5Lcreate_soft CALL H5Pset_char_encoding_f(lcpl_id, H5T_CSET_UTF8_F, error) CALL check("H5Pset_char_encoding_f",error, total_error) @@ -1748,7 +1748,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL verify("H5Lget_info_f",cset, H5T_CSET_UTF8_F,total_error) - ! H5Lmove + ! H5Lmove CALL H5Pset_char_encoding_f(lcpl_id, H5T_CSET_ASCII_F, error) CALL check("H5Pset_char_encoding_f",error, total_error) @@ -1762,7 +1762,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL verify("H5Lget_info_f",cset, H5T_CSET_ASCII_F,total_error) - ! H5Lcopy + ! H5Lcopy CALL H5Pset_char_encoding_f(lcpl_id, H5T_CSET_UTF8_F, error) CALL check("H5Pset_char_encoding_f",error, total_error) @@ -1776,7 +1776,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL verify("H5Lget_info_f",cset, H5T_CSET_UTF8_F,total_error) - ! H5Lcreate_external + ! H5Lcreate_external CALL H5Lcreate_external_f("filename", "path", file_id, "extlink", error, lcpl_id) CALL check("H5Lcreate_external_f", error, total_error) @@ -1788,7 +1788,7 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & CALL verify("H5Lget_info_f",cset, H5T_CSET_UTF8_F,total_error) - ! Close open IDs + ! Close open IDs CALL H5Pclose_f(lcpl_id, error) CALL check("H5Pclose_f", error, total_error) @@ -1817,22 +1817,22 @@ SUBROUTINE objcopy(fapl, total_error) flag = H5O_COPY_SHALLOW_HIERARCHY_F -! Copy the file access property list +! Copy the file access property list CALL H5Pcopy_f(fapl, fapl2, error) CALL check("H5Pcopy_f", error, total_error) -! Set the "use the latest version of the format" bounds for creating objects in the file +! Set the "use the latest version of the format" bounds for creating objects in the file CALL H5Pset_libver_bounds_f(fapl2, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, error) - ! create property to pass copy options + ! create property to pass copy options CALL h5pcreate_f(H5P_OBJECT_COPY_F, pid, error) CALL check("h5pcreate_f",error, total_error) - ! set options for object copy + ! set options for object copy CALL H5Pset_copy_object_f(pid, flag, error) CALL check("H5Pset_copy_object_f",error, total_error) - ! Verify object copy flags + ! Verify object copy flags CALL H5Pget_copy_object_f(pid, cpy_flags, error) CALL check("H5Pget_copy_object_f",error, total_error) CALL verify("H5Pget_copy_object_f", cpy_flags, flag, total_error) @@ -1862,7 +1862,7 @@ END SUBROUTINE objcopy ! * Modifications: ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE lapl_nlinks( fapl, total_error) @@ -1872,30 +1872,30 @@ SUBROUTINE lapl_nlinks( fapl, total_error) INTEGER :: error - INTEGER(HID_T) :: fid = (-1) ! File ID - INTEGER(HID_T) :: gid = (-1), gid2 = (-1) ! Group IDs - INTEGER(HID_T) :: plist = (-1) ! lapl ID - INTEGER(HID_T) :: tid = (-1) ! Other IDs - INTEGER(HID_T) :: gapl = (-1), dapl = (-1), tapl = (-1) ! Other property lists + INTEGER(HID_T) :: fid = (-1) ! File ID + INTEGER(HID_T) :: gid = (-1), gid2 = (-1) ! Group IDs + INTEGER(HID_T) :: plist = (-1) ! lapl ID + INTEGER(HID_T) :: tid = (-1) ! Other IDs + INTEGER(HID_T) :: gapl = (-1), dapl = (-1), tapl = (-1) ! Other property lists - CHARACTER(LEN=7) :: objname ! Object name - INTEGER(size_t) :: name_len ! Length of object name + CHARACTER(LEN=7) :: objname ! Object name + INTEGER(size_t) :: name_len ! Length of object name CHARACTER(LEN=12) :: filename = 'TestLinks.h5' - INTEGER(size_t) :: nlinks ! nlinks for H5Pset_nlinks + INTEGER(size_t) :: nlinks ! nlinks for H5Pset_nlinks INTEGER(size_t) :: buf_size = 7 ! WRITE(*,*) "adjusting nlinks with LAPL (w/new group format)" - ! Create file + ! Create file CALL h5fcreate_f(FileName, H5F_ACC_TRUNC_F, fid, error, access_prp=fapl) CALL check(" lapl_nlinks.h5fcreate_f",error,total_error) - ! Create group with short name in file (used as target for links) + ! Create group with short name in file (used as target for links) CALL H5Gcreate_f(fid, "final", gid, error) CALL check(" lapl_nlinks.H5Gcreate_f", error, total_error) - ! Create chain of soft links to existing object (limited) + ! Create chain of soft links to existing object (limited) CALL H5Lcreate_soft_f("final", fid, "soft1", error) CALL H5Lcreate_soft_f("soft1", fid, "soft2", error) CALL H5Lcreate_soft_f("soft2", fid, "soft3", error) @@ -1914,26 +1914,26 @@ SUBROUTINE lapl_nlinks( fapl, total_error) CALL H5Lcreate_soft_f("soft15", fid, "soft16", error) CALL H5Lcreate_soft_f("soft16", fid, "soft17", error) - ! Close objects + ! Close objects CALL H5Gclose_f(gid, error) CALL check("h5gclose_f",error,total_error) CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Open file + ! Open file CALL h5fopen_f(FileName, H5F_ACC_RDWR_F, fid, error, fapl) CALL check("h5open_f",error,total_error) - ! Create LAPL with higher-than-usual nlinks value - ! Create a non-default lapl with udata set to point to the first group + ! Create LAPL with higher-than-usual nlinks value + ! Create a non-default lapl with udata set to point to the first group CALL H5Pcreate_f(H5P_LINK_ACCESS_F,plist,error) CALL check("h5Pcreate_f",error,total_error) nlinks = 20 CALL H5Pset_nlinks_f(plist, nlinks, error) CALL check("H5Pset_nlinks_f",error,total_error) - ! Ensure that nlinks was set successfully + ! Ensure that nlinks was set successfully nlinks = 0 CALL H5Pget_nlinks_f(plist, nlinks, error) CALL check("H5Pset_nlinks_f",error,total_error) @@ -1941,71 +1941,71 @@ SUBROUTINE lapl_nlinks( fapl, total_error) ! Open object through what is normally too many soft links using - ! * new property list + ! * new property list CALL H5Oopen_f(fid,"soft17",gid,error,plist) CALL check("H5Oopen_f",error,total_error) - ! Check name + ! Check name CALL h5iget_name_f(gid, objname, buf_size, name_len, error) CALL check("h5iget_name_f",error,total_error) CALL verify("h5iget_name_f", TRIM(objname),"/soft17", total_error) - ! Create group using soft link + ! Create group using soft link CALL H5Gcreate_f(gid, "new_soft", gid2, error) CALL check("H5Gcreate_f", error, total_error) - ! Close groups + ! Close groups CALL H5Gclose_f(gid2, error) CALL check("H5Gclose_f", error, total_error) CALL H5Gclose_f(gid, error) CALL check("H5Gclose_f", error, total_error) - ! Set nlinks to a smaller number + ! Set nlinks to a smaller number nlinks = 4 CALL H5Pset_nlinks_f(plist, nlinks, error) CALL check("H5Pset_nlinks_f", error, total_error) - ! Ensure that nlinks was set successfully + ! Ensure that nlinks was set successfully nlinks = 0 CALL H5Pget_nlinks_f(plist, nlinks, error) CALL check("H5Pget_nlinks_f",error,total_error) CALL verify("H5Pget_nlinks_f", INT(nlinks), 4, total_error) - ! Try opening through what is now too many soft links + ! Try opening through what is now too many soft links CALL H5Oopen_f(fid,"soft5",gid,error,plist) CALL verify("H5Oopen_f", error, -1, total_error) ! should fail - ! Open object through lesser soft link + ! Open object through lesser soft link CALL H5Oopen_f(fid,"soft4",gid,error,plist) CALL check("H5Oopen_",error,total_error) - ! Check name + ! Check name CALL h5iget_name_f(gid, objname, buf_size, name_len, error) CALL check("h5iget_name_f",error,total_error) CALL verify("h5iget_name_f", TRIM(objname),"/soft4", total_error) - ! Test other functions that should use a LAPL + ! Test other functions that should use a LAPL nlinks = 20 CALL H5Pset_nlinks_f(plist, nlinks, error) CALL check("H5Pset_nlinks_f", error, total_error) ! Try copying and moving when both src and dst contain many soft links ! * using a non-default LAPL - ! + ! CALL H5Lcopy_f(fid, "soft17", fid, "soft17/newer_soft", error, H5P_DEFAULT_F, plist) CALL check("H5Lcopy_f",error,total_error) CALL H5Lmove_f(fid, "soft17/newer_soft", fid, "soft17/newest_soft", error, lapl_id=plist) CALL check("H5Lmove_f",error, total_error) - ! H5Olink + ! H5Olink CALL H5Olink_f(gid, fid, "soft17/link_to_group", error, H5P_DEFAULT_F, plist) CALL check("H5Olink_f", error, total_error) - ! H5Lcreate_hard and H5Lcreate_soft + ! H5Lcreate_hard and H5Lcreate_soft CALL H5Lcreate_hard_f(fid, "soft17", fid, "soft17/link2_to_group", error, H5P_DEFAULT_F, plist) CALL check("H5Lcreate_hard_f", error, total_error) @@ -2013,27 +2013,27 @@ SUBROUTINE lapl_nlinks( fapl, total_error) CALL H5Lcreate_soft_f("/soft4", fid, "soft17/soft_link",error, H5P_DEFAULT_F, plist) CALL check("H5Lcreate_soft_f", error, total_error) - ! H5Ldelete + ! H5Ldelete CALL h5ldelete_f(fid, "soft17/soft_link", error, plist) CALL check("H5Ldelete_f", error, total_error) -!!$ H5Lget_val and H5Lget_info +!!$ H5Lget_val and H5Lget_info !!$ if(H5Lget_val(fid, "soft17", NULL, (size_t)0, plist) < 0) TEST_ERROR !!$ if(H5Lget_info(fid, "soft17", NULL, plist) < 0) TEST_ERROR !!$ - ! H5Lcreate_external and H5Lcreate_ud + ! H5Lcreate_external and H5Lcreate_ud CALL H5Lcreate_external_f("filename", "path", fid, "soft17/extlink", error, H5P_DEFAULT_F, plist) CALL check("H5Lcreate_external_f", error, total_error) !!$ if(H5Lregister(UD_rereg_class) < 0) TEST_ERROR !!$ if(H5Lcreate_ud(fid, "soft17/udlink", UD_HARD_TYPE, NULL, (size_t)0, H5P_DEFAULT, plist) < 0) TEST_ERROR !!$ - ! Close plist + ! Close plist CALL h5pclose_f(plist, error) CALL check("h5pclose_f", error, total_error) - ! Create a datatype and dataset as targets inside the group + ! Create a datatype and dataset as targets inside the group CALL h5tcopy_f(H5T_NATIVE_INTEGER, tid, error) CALL check("h5tcopy_f",error,total_error) CALL h5tcommit_f(gid, "datatype", tid, error) @@ -2048,12 +2048,12 @@ SUBROUTINE lapl_nlinks( fapl, total_error) !!$ if((did = H5Dcreate2(gid, "dataset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR !!$ if(H5Dclose(did) < 0) TEST_ERROR !!$ - ! Close group + ! Close group CALL h5gclose_f(gid, error) CALL check("h5gclose_f",error,total_error) !!$ -!!$ Try to open the objects using too many symlinks with default *APLs +!!$ Try to open the objects using too many symlinks with default *APLs !!$ H5E_BEGIN_TRY { !!$ if((gid = H5Gopen2(fid, "soft17", H5P_DEFAULT)) >= 0) !!$ FAIL_PUTS_ERROR(" Should have failed for too many nested links.") @@ -2063,7 +2063,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) !!$ FAIL_PUTS_ERROR(" Should have failed for too many nested links.") !!$ } H5E_END_TRY !!$ - ! Create property lists with nlinks set + ! Create property lists with nlinks set CALL H5Pcreate_f(H5P_GROUP_ACCESS_F,gapl,error) CALL check("h5Pcreate_f",error,total_error) @@ -2083,7 +2083,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) ! We should now be able to use these property lists to open each kind ! * of object. - ! + ! CALL H5Gopen_f(fid, "soft17", gid, error, gapl) CALL check("H5Gopen_f",error,total_error) @@ -2093,7 +2093,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) !!$ if((did = H5Dopen2(fid, "soft17/dataset", dapl)) < 0) TEST_ERROR - ! Close objects + ! Close objects CALL h5gclose_f(gid, error) CALL check("h5gclose_f",error,total_error) @@ -2102,7 +2102,7 @@ SUBROUTINE lapl_nlinks( fapl, total_error) !!$ if(H5Dclose(did) < 0) TEST_ERROR !!$ - ! Close plists + ! Close plists CALL h5pclose_f(gapl, error) CALL check("h5pclose_f", error, total_error) @@ -2111,11 +2111,11 @@ SUBROUTINE lapl_nlinks( fapl, total_error) !!$ if(H5Pclose(dapl) < 0) TEST_ERROR !!$ -!!$ Unregister UD hard link class +!!$ Unregister UD hard link class !!$ if(H5Lunregister(UD_HARD_TYPE) < 0) TEST_ERROR !!$ - ! Close file + ! Close file CALL H5Fclose_f(fid, error) CALL check("H5Fclose_f", error, total_error) diff --git a/fortran/test/tH5I.F90 b/fortran/test/tH5I.F90 index 5ce37fd..1934acf 100644 --- a/fortran/test/tH5I.F90 +++ b/fortran/test/tH5I.F90 @@ -25,8 +25,8 @@ ! !***** MODULE TH5I - - USE HDF5 ! This module contains all necessary modules + + USE HDF5 ! This module contains all necessary modules USE TH5_MISC USE TH5_MISC_GEN @@ -87,21 +87,21 @@ CONTAINS ! check that the ID is not valid dtype = -1 CALL H5Iis_valid_f(dtype, tri_ret, error) - CALL check("H5Iis_valid_f", error, total_error) + CALL check("H5Iis_valid_f", error, total_error) CALL verify("H5Iis_valid_f", tri_ret, .FALSE., total_error) - + ! Create a datatype id CALL H5Tcopy_f(H5T_NATIVE_INTEGER,dtype,error) - CALL check("H5Tcopy_f", error, total_error) - + CALL check("H5Tcopy_f", error, total_error) + ! Check that the ID is valid CALL H5Iis_valid_f(dtype, tri_ret, error) - CALL check("H5Iis_valid_f", error, total_error) + CALL check("H5Iis_valid_f", error, total_error) CALL verify("H5Tequal_f", tri_ret, .TRUE., total_error) - + CALL H5Tclose_f(dtype, error) - CALL check("H5Tclose_f", error, total_error) - + CALL check("H5Tclose_f", error, total_error) + ! ! Create a new file using default properties. ! diff --git a/fortran/test/tH5L_F03.F90 b/fortran/test/tH5L_F03.F90 index bdb5c55..a8a8c65 100644 --- a/fortran/test/tH5L_F03.F90 +++ b/fortran/test/tH5L_F03.F90 @@ -5,7 +5,7 @@ ! ! FUNCTION ! Test FORTRAN HDF5 H5L APIs which are dependent on FORTRAN 2003 -! features. +! features. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -30,8 +30,8 @@ !***** MODULE liter_cb_mod - USE HDF5 - USE TH5_MISC + USE HDF5 + USE TH5_MISC USE TH5_MISC_GEN USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE @@ -43,11 +43,11 @@ MODULE liter_cb_mod INTEGER RET_CHANGE2 END TYPE iter_enum - ! Custom group iteration callback data + ! Custom group iteration callback data TYPE, bind(c) :: iter_info - CHARACTER(KIND=C_CHAR), DIMENSION(1:10) :: name ! The name of the object - INTEGER(c_int) :: TYPE ! The TYPE of the object - INTEGER(c_int) :: command ! The TYPE of RETURN value + CHARACTER(KIND=C_CHAR), DIMENSION(1:10) :: name ! The name of the object + INTEGER(c_int) :: TYPE ! The TYPE of the object + INTEGER(c_int) :: command ! The TYPE of RETURN value END TYPE iter_info CONTAINS @@ -73,7 +73,7 @@ CONTAINS INTEGER, SAVE :: count INTEGER, SAVE :: count2 -!!$ +!!$ !!$ iter_info *info = (iter_info *)op_data; !!$ static int count = 0; !!$ static int count2 = 0; @@ -126,17 +126,17 @@ SUBROUTINE test_iter_group(total_error) INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T) :: fapl - INTEGER(HID_T) :: file ! File ID - INTEGER(hid_t) :: dataset ! Dataset ID - INTEGER(hid_t) :: datatype ! Common datatype ID - INTEGER(hid_t) :: filespace ! Common dataspace ID - INTEGER(hid_t) :: grp ! Group ID - INTEGER i,j ! counting variable - INTEGER(hsize_t) idx ! Index in the group + INTEGER(HID_T) :: file ! File ID + INTEGER(hid_t) :: dataset ! Dataset ID + INTEGER(hid_t) :: datatype ! Common datatype ID + INTEGER(hid_t) :: filespace ! Common dataspace ID + INTEGER(hid_t) :: grp ! Group ID + INTEGER i,j ! counting variable + INTEGER(hsize_t) idx ! Index in the group CHARACTER(LEN=11) :: DATAFILE = "titerate.h5" INTEGER, PARAMETER :: ndatasets = 50 - CHARACTER(LEN=10) :: name ! temporary name buffer - CHARACTER(LEN=10), DIMENSION(1:ndatasets+2) :: lnames ! Names of the links created + CHARACTER(LEN=10) :: name ! temporary name buffer + CHARACTER(LEN=10), DIMENSION(1:ndatasets+2) :: lnames ! Names of the links created TYPE(iter_info), TARGET :: info @@ -147,15 +147,15 @@ SUBROUTINE test_iter_group(total_error) CHARACTER(LEN=2) :: ichr2 CHARACTER(LEN=10) :: ichr10 - ! Get the default FAPL + ! Get the default FAPL CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl, error) CALL check("h5pcreate_f", error, total_error) - ! Set the "use the latest version of the format" bounds for creating objects in the file + ! Set the "use the latest version of the format" bounds for creating objects in the file CALL H5Pset_libver_bounds_f(fapl, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, error) CALL check("H5Pset_libver_bounds_f",error, total_error) - ! Create the test file with the datasets + ! Create the test file with the datasets CALL h5fcreate_f(DATAFILE, H5F_ACC_TRUNC_F, file, error, H5P_DEFAULT_F, fapl) CALL check("h5fcreate_f", error, total_error) @@ -190,12 +190,12 @@ SUBROUTINE test_iter_group(total_error) ENDDO - ! Create a group and named datatype under root group for testing + ! Create a group and named datatype under root group for testing CALL H5Gcreate_f(file, "grp0000000", grp, error) CALL check("H5Gcreate_f", error, total_error) - lnames(ndatasets+2) = "grp0000000" + lnames(ndatasets+2) = "grp0000000" !!$ !!$ lnames[NDATASETS] = HDstrdup("grp"); @@ -205,9 +205,9 @@ SUBROUTINE test_iter_group(total_error) CALL H5Tcommit_f(file, "dtype00000", datatype, error) CALL check("H5Tcommit_f", error, total_error) - lnames(ndatasets+1) = "dtype00000" + lnames(ndatasets+1) = "dtype00000" - ! Close everything up + ! Close everything up CALL H5Tclose_f(datatype, error) CALL check("H5Tclose_f", error, total_error) @@ -221,11 +221,11 @@ SUBROUTINE test_iter_group(total_error) CALL H5Fclose_f(file, error) CALL check("H5Fclose_f", error, total_error) - ! Iterate through the datasets in the root group in various ways + ! Iterate through the datasets in the root group in various ways CALL H5Fopen_f(DATAFILE, H5F_ACC_RDONLY_F, file, error, access_prp=fapl) CALL check("h5fopen_f", error, total_error) - ! Test all objects in group, when callback always returns 0 + ! Test all objects in group, when callback always returns 0 info%command = 0 idx = 0 CALL H5Literate_f(file, H5_INDEX_NAME_F, H5_ITER_INC_F, idx, f1, f2, ret_value, error) @@ -234,28 +234,28 @@ SUBROUTINE test_iter_group(total_error) CALL verify("H5Literate_f", error, -1, total_error) ENDIF - ! Test all objects in group, when callback always returns 1 - ! This also tests the "restarting" ability, because the index changes + ! Test all objects in group, when callback always returns 1 + ! This also tests the "restarting" ability, because the index changes info%command = 2 idx = 0 i = 0 f1 = C_FUNLOC(liter_cb) f2 = C_LOC(info) - DO + DO CALL H5Literate_f(file, H5_INDEX_NAME_F, H5_ITER_INC_F, idx, f1, f2, ret_value, error) IF(error.LT.0) EXIT - ! Verify return value from iterator gets propagated correctly + ! Verify return value from iterator gets propagated correctly CALL verify("H5Literate", ret_value, 2, total_error) - ! Increment the number of times "2" is returned + ! Increment the number of times "2" is returned i = i + 1 - ! Verify that the index is the correct value + ! Verify that the index is the correct value CALL verify("H5Literate", INT(idx), INT(i), total_error) IF(idx .GT.ndatasets+2)THEN PRINT*,"ERROR: Group iteration function walked too far!" ENDIF - ! Verify the correct name is retrieved + ! Verify the correct name is retrieved DO j = 1, 10 ichr10(j:j) = info%name(j)(1:1) ENDDO @@ -270,8 +270,8 @@ SUBROUTINE test_iter_group(total_error) PRINT*,"ERROR: Group iteration function didn't perform multiple iterations correctly" ENDIF - ! Test all objects in group, when callback changes return value - ! This also tests the "restarting" ability, because the index changes + ! Test all objects in group, when callback changes return value + ! This also tests the "restarting" ability, because the index changes info%command = 3 idx = 0 @@ -285,10 +285,10 @@ SUBROUTINE test_iter_group(total_error) IF(error.LT.0) EXIT CALL verify("H5Literate_f", ret_value, 1, total_error) - ! Increment the number of times "1" is returned + ! Increment the number of times "1" is returned i = i + 1 - ! Verify that the index is the correct value + ! Verify that the index is the correct value CALL verify("H5Literate_f", INT(idx), INT(i+10), total_error) IF(idx .GT.ndatasets+2)THEN @@ -298,7 +298,7 @@ SUBROUTINE test_iter_group(total_error) DO j = 1, 10 ichr10(j:j) = info%name(j)(1:1) ENDDO - ! Verify that the correct name is retrieved + ! Verify that the correct name is retrieved CALL verify("H5Literate_f", ichr10, lnames(INT(idx)), total_error) IF(i.EQ.42)EXIT ! prints out error message otherwise (for gcc/gfortran/g95) not intel (why) -FIX- scot ENDDO diff --git a/fortran/test/tH5MISC_1_8.F90 b/fortran/test/tH5MISC_1_8.F90 index b8c777c..bad77d0 100644 --- a/fortran/test/tH5MISC_1_8.F90 +++ b/fortran/test/tH5MISC_1_8.F90 @@ -95,18 +95,18 @@ SUBROUTINE test_genprop_basic_class(total_error) IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error - INTEGER(HID_T) :: cid1 ! Generic Property class ID - INTEGER(HID_T) :: cid2 ! Generic Property class ID + INTEGER(HID_T) :: cid1 ! Generic Property class ID + INTEGER(HID_T) :: cid2 ! Generic Property class ID CHARACTER(LEN=7) :: CLASS1_NAME = "Class 1" - CHARACTER(LEN=7) :: name ! Name of class - CHARACTER(LEN=10) :: name_big ! Name of class bigger buffer + CHARACTER(LEN=7) :: name ! Name of class + CHARACTER(LEN=10) :: name_big ! Name of class bigger buffer CHARACTER(LEN=4) :: name_small ! Name of class smaller buffer INTEGER :: error INTEGER :: size LOGICAL :: flag - ! Output message about test being performed + ! Output message about test being performed !WRITE(*,*) "Testing Basic Generic Property List Class Creation Functionality" @@ -116,11 +116,11 @@ SUBROUTINE test_genprop_basic_class(total_error) CALL H5Pget_class_name_f(cid1, name, size, error) CALL verify("H5Pget_class_name", error, -1, error) - ! Create a new generic class, derived from the root of the class hierarchy + ! Create a new generic class, derived from the root of the class hierarchy CALL H5Pcreate_class_f(H5P_ROOT_F, CLASS1_NAME, cid1, error) CALL check("H5Pcreate_class", error, total_error) - ! Check class name + ! Check class name CALL H5Pget_class_name_f(cid1, name, size, error) CALL check("H5Pget_class_name", error, total_error) CALL verify("H5Pget_class_name", size,7,error) @@ -150,27 +150,27 @@ SUBROUTINE test_genprop_basic_class(total_error) total_error = total_error + 1 ENDIF - ! Check class parent + ! Check class parent CALL H5Pget_class_parent_f(cid1, cid2, error) CALL check("H5Pget_class_parent_f", error, total_error) - ! Verify class parent correct + ! Verify class parent correct CALL H5Pequal_f(cid2, H5P_ROOT_F, flag, error) CALL check("H5Pequal_f", error, total_error) CALL verify("H5Pequal_f", flag, .TRUE., total_error) - ! Make certain false postives aren't being returned + ! Make certain false postives aren't being returned CALL H5Pequal_f(cid2, H5P_FILE_CREATE_F, flag, error) CALL check("H5Pequal_f", error, total_error) CALL verify("H5Pequal_f", flag, .FALSE., total_error) - ! Close parent class + ! Close parent class CALL H5Pclose_class_f(cid2, error) CALL check("H5Pclose_class_f", error, total_error) - ! Close class + ! Close class CALL H5Pclose_class_f(cid1, error) CALL check("H5Pclose_class_f", error, total_error) @@ -187,17 +187,17 @@ SUBROUTINE test_h5s_encode(total_error) IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error - INTEGER(hid_t) :: sid1, sid3! Dataspace ID + INTEGER(hid_t) :: sid1, sid3! Dataspace ID INTEGER(hid_t) :: decoded_sid1, decoded_sid3 INTEGER(hid_t) :: fapl ! File access property - INTEGER :: rank ! LOGICAL rank of dataspace + INTEGER :: rank ! LOGICAL rank of dataspace INTEGER(size_t) :: new_size = 0, old_size = 0, orig_size=0, scalar_size=0 ! Make sure the size is large CHARACTER(LEN=288) :: sbuf CHARACTER(LEN=288) :: scalar_buf - INTEGER(hsize_t) :: n ! Number of dataspace elements + INTEGER(hsize_t) :: n ! Number of dataspace elements INTEGER(hsize_t), DIMENSION(1:3) :: start = (/0, 0, 0/) INTEGER(hsize_t), DIMENSION(1:3) :: stride = (/2, 5, 3/) @@ -217,7 +217,7 @@ SUBROUTINE test_h5s_encode(total_error) !------------------------------------------------------------------------- ! * Test encoding and decoding of simple dataspace and hyperslab selection. ! *------------------------------------------------------------------------- - ! + ! CALL H5Screate_simple_f(SPACE1_RANK, dims1, sid1, error) CALL check("H5Screate_simple", error, total_error) @@ -227,13 +227,13 @@ SUBROUTINE test_h5s_encode(total_error) CALL check("h5sselect_hyperslab_f", error, total_error) - ! Encode simple data space in a buffer + ! Encode simple data space in a buffer ! Find the buffer size without fapl CALL H5Sencode_f(sid1, sbuf, orig_size, error) CALL check("H5Sencode_f", error, total_error) CALL verify("H5Sencode_f", INT(orig_size), 279, total_error) - + ! Create file access property list CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error) CALL check("h5pcreate_f", error, total_error) @@ -252,7 +252,7 @@ SUBROUTINE test_h5s_encode(total_error) CALL check("H5Sencode_f", error, total_error) CALL verify("H5Sencode_f", INT(new_size), 101, total_error) - ! Try decoding bogus buffer + ! Try decoding bogus buffer CALL H5Sdecode_f(sbuf, decoded_sid1, error) CALL verify("H5Sdecode", error, -1, total_error) @@ -260,12 +260,12 @@ SUBROUTINE test_h5s_encode(total_error) CALL H5Sencode_f(sid1, sbuf, new_size, error, fapl) CALL check("H5Sencode_f", error, total_error) - ! Decode from the dataspace buffer and return an object handle + ! Decode from the dataspace buffer and return an object handle CALL H5Sdecode_f(sbuf, decoded_sid1, error) CALL check("H5Sdecode", error, total_error) - ! Verify the decoded dataspace + ! Verify the decoded dataspace CALL h5sget_simple_extent_npoints_f(decoded_sid1, n, error) CALL check("h5sget_simple_extent_npoints_f", error, total_error) CALL verify("h5sget_simple_extent_npoints_f", INT(n), INT(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3), & @@ -283,13 +283,13 @@ SUBROUTINE test_h5s_encode(total_error) ! ------------------------------------------------------------------------- ! * Test encoding and decoding of scalar dataspace. ! *------------------------------------------------------------------------- - ! - ! Create scalar dataspace + ! + ! Create scalar dataspace CALL H5Screate_f(H5S_SCALAR_F, sid3, error) CALL check("H5Screate_f",error, total_error) - ! Encode scalar data space in a buffer + ! Encode scalar data space in a buffer ! First find the buffer size CALL H5Sencode_f(sid3, scalar_buf, scalar_size, error) @@ -301,19 +301,19 @@ SUBROUTINE test_h5s_encode(total_error) CALL check("H5Sencode_f", error, total_error) - ! Decode from the dataspace buffer and return an object handle + ! Decode from the dataspace buffer and return an object handle CALL H5Sdecode_f(scalar_buf, decoded_sid3, error) CALL check("H5Sdecode_f", error, total_error) - ! Verify extent type + ! Verify extent type CALL H5Sget_simple_extent_type_f(decoded_sid3, space_type, error) CALL check("H5Sget_simple_extent_type_f", error, total_error) CALL verify("H5Sget_simple_extent_type_f", space_type, H5S_SCALAR_F, total_error) - ! Verify decoded dataspace + ! Verify decoded dataspace CALL h5sget_simple_extent_npoints_f(decoded_sid3, n, error) CALL check("h5sget_simple_extent_npoints_f", error, total_error) CALL verify("h5sget_simple_extent_npoints_f", INT(n), 1, total_error) @@ -359,7 +359,7 @@ SUBROUTINE test_scaleoffset(cleanup, total_error ) INTEGER(hsize_t), DIMENSION(1:2) :: chunk_dim = (/2, 5/) INTEGER, DIMENSION(1:2,1:5) :: orig_data INTEGER, DIMENSION(1:2,1:5) :: new_data - INTEGER(hsize_t), DIMENSION(1:2) :: start ! Start of hyperslab + INTEGER(hsize_t), DIMENSION(1:2) :: start ! Start of hyperslab INTEGER(hsize_t), DIMENSION(1:2) :: stride ! Stride of hyperslab INTEGER(hsize_t), DIMENSION(1:2) :: count ! BLOCK count INTEGER(hsize_t), DIMENSION(1:2) :: BLOCK ! BLOCK sizes @@ -390,11 +390,11 @@ SUBROUTINE test_scaleoffset(cleanup, total_error ) CALL H5Screate_simple_f(2, dims, space, error) CALL CHECK(" H5Screate_simple_f", error, total_error) - ! Create the dataset property list + ! Create the dataset property list CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dc, error) CALL CHECK(" H5Pcreate_f", error, total_error) - ! Set fill value + ! Set fill value fillval = 10000 CALL H5Pset_fill_value_f(dc, H5T_NATIVE_INTEGER, fillval, error) CALL CHECK(" H5Pset_fill_value_f", error, total_error) @@ -402,10 +402,10 @@ SUBROUTINE test_scaleoffset(cleanup, total_error ) ! Set up to use scaleoffset filter, let library calculate minbits CALL H5Pset_chunk_f(dc, 2, chunk_dim, error) CALL CHECK(" H5Pset_chunk_f", error, total_error) - + CALL H5Pset_scaleoffset_f(dc, H5Z_SO_INT_F, H5Z_SO_INT_MINBITS_DEFAULT_F, error) CALL CHECK(" H5Pset_scaleoffset_f", error, total_error) - + ! Create the dataset CALL H5Dcreate_f(file, "scaleoffset_int", datatype, & space, dataset, error, dc) @@ -417,7 +417,7 @@ SUBROUTINE test_scaleoffset(cleanup, total_error ) ! Select hyperslab for data to write, using 1x5 blocks, ! (1,1) stride and (1,1) count starting at the position (0,0) - + start(1:2) = (/0,0/) stride(1:2) = (/1,1/) COUNT(1:2) = (/1,1/) @@ -441,21 +441,21 @@ SUBROUTINE test_scaleoffset(cleanup, total_error ) ! STEP 1: Test scaleoffset by setting up a chunked dataset and writing ! to it. !---------------------------------------------------------------------- - - ! Only data in the hyperslab will be written, other value should be fill value + + ! Only data in the hyperslab will be written, other value should be fill value CALL H5Dwrite_f(dataset, H5T_NATIVE_INTEGER, orig_data, dims, error, mspace, mspace, H5P_DEFAULT_F) CALL CHECK(" H5Dwrite_f", error, total_error) !---------------------------------------------------------------------- ! STEP 2: Try to read the data we just wrote. !---------------------------------------------------------------------- - + ! Read the dataset back - + CALL H5Dread_f(dataset, H5T_NATIVE_INTEGER, new_data, dims, error, mspace, mspace, H5P_DEFAULT_F) CALL CHECK(" H5Dread_f", error, total_error) - ! Check that the values read are the same as the values written + ! Check that the values read are the same as the values written DO j = 1, INT(dims(2)) IF(new_data(1,j) .NE. orig_data(1,j))THEN total_error = total_error + 1 diff --git a/fortran/test/tH5O.F90 b/fortran/test/tH5O.F90 index fa3787e..e8a226e 100644 --- a/fortran/test/tH5O.F90 +++ b/fortran/test/tH5O.F90 @@ -77,22 +77,22 @@ SUBROUTINE test_h5o_link(total_error) INTEGER, PARAMETER :: TRUE = 1 - LOGICAL :: committed ! Whether the named datatype is committed + LOGICAL :: committed ! Whether the named datatype is committed INTEGER :: i, j - INTEGER :: error ! Value returned from API calls + INTEGER :: error ! Value returned from API calls CHARACTER(LEN=14) :: NAME_DATATYPE_SIMPLE="H5T_NATIVE_INT" CHARACTER(LEN=16) :: NAME_DATATYPE_SIMPLE2="H5T_NATIVE_INT-2" INTEGER(HID_T) :: tid, tid2 LOGICAL :: flag - + ! Data for tested h5ocopy_f CHARACTER(LEN=3) , PARAMETER :: dataset = "DS1" INTEGER , PARAMETER :: dim0 = 4 INTEGER(HSIZE_T), DIMENSION(1:1) :: dims2 = (/dim0/) ! size read/write buffer - INTEGER , DIMENSION(1:dim0) :: wdata2 ! Write buffer + INTEGER , DIMENSION(1:dim0) :: wdata2 ! Write buffer LOGICAL :: link_exists CHARACTER(LEN=8) :: chr_exact CHARACTER(LEN=10) :: chr_lg @@ -107,45 +107,45 @@ SUBROUTINE test_h5o_link(total_error) INTEGER(HSSIZE_T) :: comment_size INTEGER(SIZE_T) :: comment_size2 - ! Initialize the raw data + ! Initialize the raw data DO i = 1, TEST6_DIM1 DO j = 1, TEST6_DIM2 wdata(i,j) = i*j ENDDO ENDDO - ! Create the dataspace + ! Create the dataspace CALL h5screate_simple_f(2, dims, space_id, error) CALL check("h5screate_simple_f",error,total_error) - ! Create LCPL with intermediate group creation flag set + ! Create LCPL with intermediate group creation flag set CALL H5Pcreate_f(H5P_LINK_CREATE_F, lcpl_id, error) CALL check("h5Pcreate_f",error,total_error) CALL H5Pset_create_inter_group_f(lcpl_id, TRUE, error) CALL check("H5Pset_create_inter_group_f",error,total_error) - ! Loop over using new group format + ! Loop over using new group format ! for(new_format = FALSE; new_format <= TRUE; new_format++) { - ! Make a FAPL that uses the "use the latest version of the format" bounds + ! Make a FAPL that uses the "use the latest version of the format" bounds CALL H5Pcreate_f(H5P_FILE_ACCESS_F,fapl_id,error) CALL check("h5Pcreate_f",error,total_error) - ! Set the "use the latest version of the format" bounds for creating objects in the file + ! Set the "use the latest version of the format" bounds for creating objects in the file CALL H5Pset_libver_bounds_f(fapl_id, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, error) CALL check("H5Pset_libver_bounds_f",error, total_error) - ! Create a new HDF5 file + ! Create a new HDF5 file CALL H5Fcreate_f(TEST_FILENAME, H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl_id) CALL check("H5Fcreate_f", error, total_error) - ! Close the FAPL + ! Close the FAPL CALL h5pclose_f(fapl_id, error) CALL check("h5pclose_f",error,total_error) - ! Create and commit a datatype with no name + ! Create and commit a datatype with no name CALL H5Tcopy_f( H5T_NATIVE_INTEGER, type_id, error) CALL check("H5Tcopy_F",error,total_error) @@ -160,22 +160,22 @@ SUBROUTINE test_h5o_link(total_error) CALL H5Dcreate_anon_f(file_id, type_id, space_id, dset_id, error ) ! using no optional parameters CALL check("H5Dcreate_anon_f",error,total_error) ! - ! Verify that we can write to and read from the dataset + ! Verify that we can write to and read from the dataset ! - ! Write the data to the dataset + ! Write the data to the dataset !EP CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, wdata, dims, error, & !EP mem_space_id=H5S_ALL_F, file_space_id=H5S_ALL_F, xfer_prp = H5P_DEFAULT_F) CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, wdata, dims, error) CALL check("h5dwrite_f", error, total_error) - ! Read the data back + ! Read the data back !EP CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, rdata, dims, error, & !EP mem_space_id=H5S_ALL_F, file_space_id=H5S_ALL_F, xfer_prp = H5P_DEFAULT_F) CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, rdata, dims, error) CALL check("h5dread_f", error, total_error) - ! Verify the data + ! Verify the data DO i = 1, TEST6_DIM1 DO j = 1, TEST6_DIM2 CALL verify("H5Dread_f",wdata(i,j),rdata(i,j),total_error) @@ -188,21 +188,21 @@ SUBROUTINE test_h5o_link(total_error) CALL H5Gcreate_anon_f(file_id, group_id, error) CALL check("H5Gcreate_anon", error, total_error) - ! Link nameless datatype into nameless group + ! Link nameless datatype into nameless group CALL H5Olink_f(type_id, group_id, "datatype", error, H5P_DEFAULT_F) CALL check("H5Olink_f", error, total_error) - ! Link nameless dataset into nameless group with intermediate group + ! Link nameless dataset into nameless group with intermediate group CALL H5Olink_f(dset_id, group_id, "inter_group/dataset", error, lcpl_id, H5P_DEFAULT_F) CALL check("H5Olink_f", error, total_error) - ! Close IDs for dataset and datatype + ! Close IDs for dataset and datatype CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f", error, total_error) CALL h5tclose_f(type_id, error) CALL check("h5tclose_f", error, total_error) - ! Re-open datatype using new link + ! Re-open datatype using new link CALL H5Topen_f(group_id, "datatype", type_id, error) CALL check("h5topen_f", error, total_error) @@ -213,30 +213,30 @@ SUBROUTINE test_h5o_link(total_error) CALL h5gclose_f(group_id, error) CALL check("h5gclose_f",error,total_error) - ! Open dataset through root group and verify its data + ! Open dataset through root group and verify its data CALL H5Dopen_f(file_id, "/group/inter_group/dataset", dset_id, error) CALL check("test_lcpl.h5dopen_f", error, total_error) - ! Read data from dataset + ! Read data from dataset !EP CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, rdata, dims, error, & !EP H5S_ALL_F, H5S_ALL_F, xfer_prp = H5P_DEFAULT_F) CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, rdata, dims, error) CALL check("h5dread_f", error, total_error) - ! Verify the data + ! Verify the data DO i = 1, TEST6_DIM1 DO j = 1, TEST6_DIM2 CALL verify("H5Dread",wdata(i,j),rdata(i,j),total_error) ENDDO ENDDO - ! Close open IDs + ! Close open IDs CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f",error,total_error) CALL h5tclose_f(type_id, error) CALL check("h5tclose_f",error,total_error) - ! Close remaining IDs + ! Close remaining IDs CALL h5sclose_f(space_id, error) CALL check("h5sclose_f",error,total_error) CALL h5pclose_f(lcpl_id,error) @@ -270,7 +270,7 @@ SUBROUTINE test_h5o_link(total_error) comment_lg = ' ' - CALL h5oget_comment_by_name_f(file_id, "/G1/G2/G3", comment_lg, error) + CALL h5oget_comment_by_name_f(file_id, "/G1/G2/G3", comment_lg, error) CALL check("h5oget_comment_by_name_f", error, total_error) IF(comment_lg(1:13).NE.grp_comment)THEN @@ -287,7 +287,7 @@ SUBROUTINE test_h5o_link(total_error) comment_lg = ' ' - CALL h5oget_comment_by_name_f(file_id, "/G1/G2/G3"//' ', comment_lg, error) + CALL h5oget_comment_by_name_f(file_id, "/G1/G2/G3"//' ', comment_lg, error) CALL check("h5oget_comment_by_name_f", error, total_error) IF(comment_lg(1:13).NE.grp_comment)THEN @@ -309,7 +309,7 @@ SUBROUTINE test_h5o_link(total_error) ! Try reading into a buffer that is the correct size - CALL h5oget_comment_f(dset_id, comment, error) + CALL h5oget_comment_f(dset_id, comment, error) CALL check("h5oget_comment_f", error, total_error) IF(comment(1:15).NE.dset_comment(1:15))THEN @@ -318,18 +318,18 @@ SUBROUTINE test_h5o_link(total_error) ! Try reading into a buffer that is to small - CALL h5oget_comment_f(dset_id, comment_sm, error) + CALL h5oget_comment_f(dset_id, comment_sm, error) CALL check("h5oget_comment_f", error, total_error) IF(comment_sm(1:10).NE.dset_comment(1:10))THEN CALL check("h5oget_comment_f", -1, total_error) - ENDIF + ENDIF ! Try reading into a buffer that is larger then needed comment_lg = ' ' - CALL h5oget_comment_f(dset_id, comment_lg, error) + CALL h5oget_comment_f(dset_id, comment_lg, error) CALL check("h5oget_comment_f", error, total_error) IF(comment_lg(1:15).NE.dset_comment)THEN @@ -341,7 +341,7 @@ SUBROUTINE test_h5o_link(total_error) ! ! Check optional parameter ! - CALL h5oget_comment_f(dset_id, comment_lg, error, comment_size) + CALL h5oget_comment_f(dset_id, comment_lg, error, comment_size) CALL check("h5oget_comment_f", error, total_error) IF( comment_size.NE.15)THEN @@ -352,7 +352,7 @@ SUBROUTINE test_h5o_link(total_error) ! Try reading into a buffer that is the correct size - CALL h5oget_comment_by_name_f(dset_id, ".", comment, error) + CALL h5oget_comment_by_name_f(dset_id, ".", comment, error) CALL check("h5oget_comment_by_name_f", error, total_error) IF(comment(1:15).NE.dset_comment(1:15))THEN @@ -361,7 +361,7 @@ SUBROUTINE test_h5o_link(total_error) ! Try with trailing blanks in the name - CALL h5oget_comment_by_name_f(dset_id, ". ", comment, error) + CALL h5oget_comment_by_name_f(dset_id, ". ", comment, error) CALL check("h5oget_comment_by_name_f", error, total_error) IF(comment(1:15).NE.dset_comment(1:15))THEN @@ -371,7 +371,7 @@ SUBROUTINE test_h5o_link(total_error) ! ! Check optional parameter ! - CALL h5oget_comment_by_name_f(dset_id, ". ", comment_lg, error, comment_size2) + CALL h5oget_comment_by_name_f(dset_id, ". ", comment_lg, error, comment_size2) CALL check("h5oget_comment_by_name_f", error, total_error) IF( comment_size2.NE.15)THEN @@ -481,7 +481,7 @@ SUBROUTINE test_h5o_link(total_error) CALL h5gclose_f(group_id, error) CALL check("h5gclose_f", error, total_error) - ! Test opening an object by index, note + ! Test opening an object by index, note CALL h5oopen_by_idx_f(file_id, "/G1/G2/G3", H5_INDEX_NAME_F, H5_ITER_INC_F, 0_hsize_t, group_id, error) CALL check("h5oopen_by_idx_f", error, total_error) @@ -508,13 +508,13 @@ SUBROUTINE test_h5o_link(total_error) CALL h5pcreate_f(H5P_OBJECT_COPY_F, ocpypl_id, error) CALL check("h5Pcreate_f",error,total_error) - CALL h5pset_copy_object_f(ocpypl_id, H5O_COPY_SHALLOW_HIERARCHY_F, error) + CALL h5pset_copy_object_f(ocpypl_id, H5O_COPY_SHALLOW_HIERARCHY_F, error) CALL check("H5Pset_copy_object_f",error,total_error) - CALL h5ocopy_f(file_id, "/G1/G2", file_id, "/G1/G_cp2", error, ocpypl_id=ocpypl_id) + CALL h5ocopy_f(file_id, "/G1/G2", file_id, "/G1/G_cp2", error, ocpypl_id=ocpypl_id) CALL check("h5ocopy_f",error,total_error) - ! Makes sure the "DS1" dataset was not copied since we set a + ! Makes sure the "DS1" dataset was not copied since we set a ! flag to copy only immediate members of a group. ! Therefore, this should fail. CALL h5dopen_f(file_id, "/G1/G_cp2/DS1", dset_id, error) @@ -578,31 +578,31 @@ SUBROUTINE test_h5o_plist(total_error) IMPLICIT NONE INTEGER, INTENT(INOUT) :: total_error - INTEGER(hid_t) :: fid ! HDF5 File ID - INTEGER(hid_t) :: grp, dset, dtype, dspace ! Object identifiers - INTEGER(hid_t) :: fapl ! File access property list - INTEGER(hid_t) :: gcpl, dcpl, tcpl ! Object creation properties - INTEGER :: def_max_compact, def_min_dense ! Default phase change parameters - INTEGER :: max_compact, min_dense ! Actual phase change parameters - INTEGER :: error ! Value returned from API calls + INTEGER(hid_t) :: fid ! HDF5 File ID + INTEGER(hid_t) :: grp, dset, dtype, dspace ! Object identifiers + INTEGER(hid_t) :: fapl ! File access property list + INTEGER(hid_t) :: gcpl, dcpl, tcpl ! Object creation properties + INTEGER :: def_max_compact, def_min_dense ! Default phase change parameters + INTEGER :: max_compact, min_dense ! Actual phase change parameters + INTEGER :: error ! Value returned from API calls CHARACTER(LEN=7), PARAMETER :: TEST_FILENAME = 'test.h5' ! PRINT*,'Testing object creation properties' - ! Make a FAPL that uses the "use the latest version of the format" flag + ! Make a FAPL that uses the "use the latest version of the format" flag CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl, error) CALL check("H5Pcreate_f", error, total_error) - ! Set the "use the latest version of the format" bounds for creating objects in the file + ! Set the "use the latest version of the format" bounds for creating objects in the file CALL H5Pset_libver_bounds_f(fapl, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, error) CALL check("H5Pcreate_f", error, total_error) - ! Create a new HDF5 file + ! Create a new HDF5 file CALL H5Fcreate_f(TEST_FILENAME, H5F_ACC_TRUNC_F, fid, error, access_prp=fapl) CALL check("H5Fcreate_f", error, total_error) - ! Create group, dataset & named datatype creation property lists + ! Create group, dataset & named datatype creation property lists CALL H5Pcreate_f(H5P_GROUP_CREATE_F, gcpl, error) CALL check("H5Pcreate_f", error, total_error) CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dcpl, error) @@ -610,11 +610,11 @@ SUBROUTINE test_h5o_plist(total_error) CALL H5Pcreate_f(H5P_DATATYPE_CREATE_F, tcpl, error) CALL check("H5Pcreate_f", error, total_error) - ! Retrieve default attribute phase change values + ! Retrieve default attribute phase change values CALL H5Pget_attr_phase_change_f(gcpl, def_max_compact, def_min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - ! Set non-default attribute phase change values on each creation property list + ! Set non-default attribute phase change values on each creation property list CALL H5Pset_attr_phase_change_f(gcpl, def_max_compact+1, def_min_dense-1, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) CALL H5Pset_attr_phase_change_f(dcpl, def_max_compact+1, def_min_dense-1, error) @@ -622,7 +622,7 @@ SUBROUTINE test_h5o_plist(total_error) CALL H5Pset_attr_phase_change_f(tcpl, def_max_compact+1, def_min_dense-1, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) - ! Retrieve attribute phase change values on each creation property list and verify + ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) @@ -640,16 +640,16 @@ SUBROUTINE test_h5o_plist(total_error) ! Create a group, dataset, and committed datatype within the file, ! using the respective type of creation property lists. - ! + ! - ! Create the group anonymously and link it in + ! Create the group anonymously and link it in CALL H5Gcreate_anon_f(fid, grp, error, gcpl_id=gcpl) CALL check("H5Gcreate_anon_f", error, total_error) CALL H5Olink_f(grp, fid, "group", error) CALL check("H5Olink_f", error, total_error) - ! Commit the type inside the group anonymously and link it in + ! Commit the type inside the group anonymously and link it in CALL h5tcopy_f(H5T_NATIVE_INTEGER, dtype, error) CALL check("h5tcopy_f", error, total_error) @@ -659,11 +659,11 @@ SUBROUTINE test_h5o_plist(total_error) CALL H5Olink_f(dtype, fid, "datatype", error) CALL check("H5Olink_f", error, total_error) - ! Create the dataspace for the dataset. + ! Create the dataspace for the dataset. CALL h5screate_f(H5S_SCALAR_F, dspace, error) CALL check("h5screate_f",error,total_error) - ! Create the dataset anonymously and link it in + ! Create the dataset anonymously and link it in CALL H5Dcreate_anon_f(fid, H5T_NATIVE_INTEGER, dspace, dset, error, dcpl ) CALL check("H5Dcreate_anon_f",error,total_error) @@ -673,7 +673,7 @@ SUBROUTINE test_h5o_plist(total_error) CALL h5sclose_f(dspace, error) CALL check("h5sclose_f",error,total_error) - ! Close current creation property lists + ! Close current creation property lists CALL h5pclose_f(gcpl,error) CALL check("h5pclose_f", error, total_error) CALL h5pclose_f(dcpl,error) @@ -681,7 +681,7 @@ SUBROUTINE test_h5o_plist(total_error) CALL h5pclose_f(tcpl,error) CALL check("h5pclose_f", error, total_error) - ! Retrieve each object's creation property list + ! Retrieve each object's creation property list CALL H5Gget_create_plist_f(grp, gcpl, error) CALL check("H5Gget_create_plist", error, total_error) @@ -691,7 +691,7 @@ SUBROUTINE test_h5o_plist(total_error) CALL H5Dget_create_plist_f(dset, dcpl, error) CALL check("H5Dget_create_plist_f", error, total_error) - ! Retrieve attribute phase change values on each creation property list and verify + ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) @@ -707,7 +707,7 @@ SUBROUTINE test_h5o_plist(total_error) CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) - ! Close current objects + ! Close current objects CALL h5pclose_f(gcpl,error) CALL check("h5pclose_f", error, total_error) CALL h5pclose_f(dcpl,error) @@ -724,11 +724,11 @@ SUBROUTINE test_h5o_plist(total_error) CALL check("h5dclose_f",error,total_error) CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Re-open the file and check that the object creation properties persist + ! Re-open the file and check that the object creation properties persist CALL h5fopen_f(TEST_FILENAME, H5F_ACC_RDONLY_F, fid, error, access_prp=fapl) CALL check("H5fopen_f",error,total_error) - ! Re-open objects + ! Re-open objects CALL H5Gopen_f(fid, "group", grp, error) CALL check("h5gopen_f", error, total_error) @@ -738,7 +738,7 @@ SUBROUTINE test_h5o_plist(total_error) CALL H5Dopen_f(fid, "dataset", dset, error) CALL check("h5dopen_f", error, total_error) - ! Retrieve each object's creation property list + ! Retrieve each object's creation property list CALL H5Gget_create_plist_f(grp, gcpl, error) CALL check("H5Gget_create_plist", error, total_error) @@ -748,7 +748,7 @@ SUBROUTINE test_h5o_plist(total_error) CALL H5Dget_create_plist_f(dset, dcpl, error) CALL check("H5Dget_create_plist_f", error, total_error) - ! Retrieve attribute phase change values on each creation property list and verify + ! Retrieve attribute phase change values on each creation property list and verify CALL H5Pget_attr_phase_change_f(gcpl, max_compact, min_dense, error) CALL check("H5Pget_attr_phase_change_f", error, total_error) CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) @@ -764,7 +764,7 @@ SUBROUTINE test_h5o_plist(total_error) CALL verify("H5Pget_attr_phase_change_f", max_compact, (def_max_compact + 1), total_error) CALL verify("H5Pget_attr_phase_change_f", min_dense, (def_min_dense - 1), total_error) - ! Close current objects + ! Close current objects CALL h5pclose_f(gcpl,error) CALL check("h5pclose_f", error, total_error) CALL h5pclose_f(dcpl,error) @@ -782,7 +782,7 @@ SUBROUTINE test_h5o_plist(total_error) CALL h5fclose_f(fid, error) CALL check("h5fclose_f",error,total_error) - ! Close the FAPL + ! Close the FAPL CALL H5Pclose_f(fapl, error) CALL check("H5Pclose_f", error, total_error) diff --git a/fortran/test/tH5O_F03.F90 b/fortran/test/tH5O_F03.F90 index c9ecccc..cb6273e 100644 --- a/fortran/test/tH5O_F03.F90 +++ b/fortran/test/tH5O_F03.F90 @@ -5,7 +5,7 @@ ! ! FUNCTION ! Test FORTRAN HDF5 H5O APIs which are dependent on FORTRAN 2003 -! features. +! features. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -28,9 +28,9 @@ ! ***************************************** MODULE visit_cb - USE HDF5 + USE HDF5 USE, INTRINSIC :: ISO_C_BINDING - + IMPLICIT NONE INTEGER, PARAMETER :: info_size = 9 @@ -283,7 +283,7 @@ CONTAINS SUBROUTINE test_h5o_refcount(total_error) - USE HDF5 + USE HDF5 USE TH5_MISC USE ISO_C_BINDING IMPLICIT NONE @@ -301,7 +301,7 @@ SUBROUTINE test_h5o_refcount(total_error) ! Create a new HDF5 file CALL h5fcreate_f(FILENAME,H5F_ACC_TRUNC_F,fid,error) - CALL check("h5fcreate_f", error, total_error) + CALL check("h5fcreate_f", error, total_error) ! Create a group, dataset, and committed datatype within the file ! Create the group @@ -567,13 +567,13 @@ SUBROUTINE test_obj_info(total_error) INTEGER, INTENT(INOUT) :: total_error - INTEGER(hid_t) :: fid = -1 ! File ID - INTEGER(hid_t) :: gid = -1, gid2 = -1 ! Group IDs - INTEGER(hid_t) :: did ! Dataset ID - INTEGER(hid_t) :: sid ! Dataspace ID - TYPE(hobj_ref_t_f), TARGET :: wref ! Reference to write + INTEGER(hid_t) :: fid = -1 ! File ID + INTEGER(hid_t) :: gid = -1, gid2 = -1 ! Group IDs + INTEGER(hid_t) :: did ! Dataset ID + INTEGER(hid_t) :: sid ! Dataspace ID + TYPE(hobj_ref_t_f), TARGET :: wref ! Reference to write TYPE(hobj_ref_t_f), TARGET :: rref ! Reference to read - TYPE(H5O_info_t) :: oinfo ! Object info struct + TYPE(H5O_info_t) :: oinfo ! Object info struct INTEGER :: error TYPE(C_PTR) :: f_ptr @@ -595,7 +595,7 @@ SUBROUTINE test_obj_info(total_error) CALL h5gcreate_f(fid, GROUPNAME, gid, error) CALL check("h5gcreate_f",error,total_error) - ! Create nested groups + ! Create nested groups CALL h5gcreate_f(gid, GROUPNAME2, gid2, error) CALL check("h5gcreate_f",error,total_error) CALL h5gclose_f(gid2, error) @@ -630,7 +630,7 @@ SUBROUTINE test_obj_info(total_error) CALL h5dwrite_f(did, H5T_STD_REF_OBJ, f_ptr, error) CALL check("h5dwrite_f",error, total_error) - ! Close objects + ! Close objects CALL h5dclose_f(did, error) CALL check("h5dclose_f", error, total_error) CALL h5sclose_f(sid, error) @@ -718,7 +718,7 @@ SUBROUTINE build_visit_file(fid) USE TH5_MISC IMPLICIT NONE - INTEGER(hid_t) :: fid ! File ID + INTEGER(hid_t) :: fid ! File ID INTEGER(hid_t) :: gid = -1, gid2 = -1 ! Group IDs INTEGER(hid_t) :: sid = -1 ! Dataspace ID INTEGER(hid_t) :: did = -1 ! Dataset ID @@ -726,7 +726,7 @@ SUBROUTINE build_visit_file(fid) INTEGER(hid_t) :: aid = -1, aid2 = -1, aid3 = -1 ! Attribute ID CHARACTER(LEN=20) :: filename = 'visit.h5' INTEGER :: error - + ! Create file for visiting CALL H5Fcreate_f(filename, H5F_ACC_TRUNC_F, fid, error) diff --git a/fortran/test/tH5P.F90 b/fortran/test/tH5P.F90 index c42dd7e..7fe3971 100644 --- a/fortran/test/tH5P.F90 +++ b/fortran/test/tH5P.F90 @@ -25,7 +25,7 @@ ! !***** MODULE TH5P - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules USE TH5_MISC USE TH5_MISC_GEN @@ -37,11 +37,11 @@ SUBROUTINE external_test(cleanup, total_error) ! h5pset_external_f, h5pget_external_count_f, ! h5pget_external_f - + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error - + CHARACTER(LEN=8), PARAMETER :: filename = "external" CHARACTER(LEN=80) :: fix_filename INTEGER(HID_T) :: file_id @@ -75,7 +75,7 @@ SUBROUTINE external_test(cleanup, total_error) ENDIF CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error) CALL check("h5fcreate_f",error,total_error) - + CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, error) CALL check("h5pcreate_f", error, total_error) CALL h5pset_buffer_f(plist_id, buf_size, error) @@ -88,7 +88,7 @@ SUBROUTINE external_test(cleanup, total_error) ENDIF CALL h5pclose_f(plist_id, error) CALL check("h5pclose_f", error, total_error) - + CALL h5pcreate_f(H5P_DATASET_CREATE_F, plist_id, error) CALL check("h5pcreate_f",error,total_error) cur_size(1) =100 @@ -103,7 +103,7 @@ SUBROUTINE external_test(cleanup, total_error) CALL h5dcreate_f(file_id, "dset1", H5T_NATIVE_INTEGER, space_id, & dataset_id, error, plist_id) CALL check("h5dcreate_f", error, total_error) - + CALL h5dclose_f(dataset_id, error) CALL check("h5dclose_f", error, total_error) CALL h5pclose_f(plist_id, error) @@ -111,11 +111,11 @@ SUBROUTINE external_test(cleanup, total_error) CALL h5sclose_f(space_id, error) CALL check("h5sclose_f", error, total_error) CALL h5fclose_f(file_id, error) - + CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, file_id, error) CALL h5dopen_f(file_id, "dset1", dataset_id, error) CALL check("h5dopen_f",error,total_error) - + ! Read dataset creation information CALL h5dget_create_plist_f(dataset_id, plist_id, error) CALL check("h5dget_create_plist_f",error,total_error) @@ -138,7 +138,7 @@ SUBROUTINE external_test(cleanup, total_error) WRITE (*,*) "got external file size is not correct" total_error = total_error + 1 END IF - + CALL h5dclose_f(dataset_id, error) CALL check("h5dclose_f", error, total_error) CALL h5pclose_f(plist_id, error) @@ -152,15 +152,15 @@ SUBROUTINE external_test(cleanup, total_error) END SUBROUTINE external_test SUBROUTINE multi_file_test(cleanup, total_error) - + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error - + CHARACTER(LEN=9), PARAMETER :: filename = "multidset" ! File name CHARACTER(LEN=80) :: fix_filename CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name - + INTEGER(HID_T) :: file_id ! File identifier INTEGER(HID_T) :: dset_id ! Dataset identifier INTEGER(HID_T) :: dspace_id ! Dataspace identifier @@ -173,10 +173,10 @@ SUBROUTINE multi_file_test(cleanup, total_error) !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F) :: memb_addr LOGICAL :: relax = .TRUE. LOGICAL :: relax_out = .TRUE. - + INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions INTEGER :: rank = 2 ! Dataset rank - + INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers INTEGER :: error ! Error flag INTEGER(HID_T) :: driver @@ -201,7 +201,7 @@ SUBROUTINE multi_file_test(cleanup, total_error) memb_addr(H5FD_MEM_LHEAP_F) = 0.3 memb_map(H5FD_MEM_OHDR_F) = H5FD_MEM_OHDR_F memb_addr(H5FD_MEM_OHDR_F) = 0.4 - + memb_name = ' ' memb_name(H5FD_MEM_SUPER_F) = '%s-s.h5' memb_name(H5FD_MEM_BTREE_F) = '%s-b.h5' @@ -218,7 +218,7 @@ SUBROUTINE multi_file_test(cleanup, total_error) dset_data(i,j) = (i-1)*6 + j END DO END DO - + ! ! Create a new file using default properties. ! @@ -244,8 +244,8 @@ SUBROUTINE multi_file_test(cleanup, total_error) ! CALL h5pget_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, & rdcc_w0, error) - CALL check("h5pget_cache_f", error, total_error) - + CALL check("h5pget_cache_f", error, total_error) + ! ! Set cache to some number ! @@ -284,13 +284,13 @@ SUBROUTINE multi_file_test(cleanup, total_error) ! CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f", error, total_error) - + ! ! Terminate access to the data space. ! CALL h5sclose_f(dspace_id, error) CALL check("h5sclose_f", error, total_error) - + ! ! Close the file. ! @@ -318,31 +318,31 @@ SUBROUTINE multi_file_test(cleanup, total_error) ! write(*,*) memb_name_out ! write(*,*) memb_addr_out ! CALL check("h5pget_fapl_multi_f", error, total_error) - + ! ! Open the existing dataset. ! CALL h5dopen_f(file_id, dsetname, dset_id, error) CALL check("h5dopen_f", error, total_error) - + ! ! Get the dataset type. ! CALL h5dget_type_f(dset_id, dtype_id, error) CALL check("h5dget_type_f", error, total_error) - + ! ! Get the data space. ! CALL h5dget_space_f(dset_id, dspace_id, error) CALL check("h5dget_space_f", error, total_error) - + ! ! Read the dataset. ! CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error) CALL check("h5dread_f", error, total_error) - + ! !Compare the data. ! @@ -354,19 +354,19 @@ SUBROUTINE multi_file_test(cleanup, total_error) END IF END DO END DO - + ! ! End access to the dataset and release resources used by it. ! CALL h5dclose_f(dset_id, error) CALL check("h5dclose_f", error, total_error) - + ! ! Terminate access to the data space. ! CALL h5sclose_f(dspace_id, error) CALL check("h5sclose_f", error, total_error) - + ! ! Terminate access to the data type. ! @@ -383,7 +383,7 @@ SUBROUTINE multi_file_test(cleanup, total_error) CALL check("h5pclose_f", error, total_error) IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) - + IF(cleanup) CALL h5_cleanup_f(filename//'.h5-b', H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) IF(cleanup) CALL h5_cleanup_f(filename//'.h5-g', H5P_DEFAULT_F, error) @@ -396,7 +396,7 @@ SUBROUTINE multi_file_test(cleanup, total_error) CALL check("h5_cleanup_f", error, total_error) IF(cleanup) CALL h5_cleanup_f(filename//'.h5-s', H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) - + RETURN END SUBROUTINE multi_file_test @@ -419,27 +419,27 @@ END SUBROUTINE multi_file_test !------------------------------------------------------------------------- ! SUBROUTINE test_chunk_cache(cleanup, total_error) - + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error - + CHARACTER(LEN=14), PARAMETER :: filename="chunk_cache" CHARACTER(LEN=80) :: fix_filename - INTEGER(hid_t) :: fid = -1 ! File ID - INTEGER(hid_t) :: fapl_local = -1 ! Local fapl - INTEGER(hid_t) :: fapl_def = -1 ! Default fapl - INTEGER(hid_t) :: dcpl = -1 ! Dataset creation property list ID - INTEGER(hid_t) :: dapl1 = -1 ! Dataset access property list ID - INTEGER(hid_t) :: dapl2 = -1 ! Dataset access property list ID - INTEGER(hid_t) :: sid = -1 ! Dataspace ID - INTEGER(hid_t) :: dsid = -1 ! Dataset ID - INTEGER(hsize_t), DIMENSION(1:1) :: chunk_dim, NDIM = (/100/) ! Dataset and chunk dimensions - INTEGER(size_t) :: nslots_1, nslots_2, nslots_3, nslots_4 ! rdcc number of elements - INTEGER(size_t) :: nbytes_1, nbytes_2, nbytes_3, nbytes_4 ! rdcc number of bytes + INTEGER(hid_t) :: fid = -1 ! File ID + INTEGER(hid_t) :: fapl_local = -1 ! Local fapl + INTEGER(hid_t) :: fapl_def = -1 ! Default fapl + INTEGER(hid_t) :: dcpl = -1 ! Dataset creation property list ID + INTEGER(hid_t) :: dapl1 = -1 ! Dataset access property list ID + INTEGER(hid_t) :: dapl2 = -1 ! Dataset access property list ID + INTEGER(hid_t) :: sid = -1 ! Dataspace ID + INTEGER(hid_t) :: dsid = -1 ! Dataset ID + INTEGER(hsize_t), DIMENSION(1:1) :: chunk_dim, NDIM = (/100/) ! Dataset and chunk dimensions + INTEGER(size_t) :: nslots_1, nslots_2, nslots_3, nslots_4 ! rdcc number of elements + INTEGER(size_t) :: nbytes_1, nbytes_2, nbytes_3, nbytes_4 ! rdcc number of bytes INTEGER :: mdc_nelmts - INTEGER(size_t) ::nlinks ! Number of link traversals - REAL :: w0_1, w0_2, w0_3, w0_4 ! rdcc preemption policy + INTEGER(size_t) ::nlinks ! Number of link traversals + REAL :: w0_1, w0_2, w0_3, w0_4 ! rdcc preemption policy INTEGER :: error INTEGER(size_t) rdcc_nelmts INTEGER(size_t) rdcc_nbytes @@ -452,7 +452,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) STOP ENDIF - ! Create a default fapl and dapl + ! Create a default fapl and dapl CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl_def, error) CALL check("H5Pcreate_f", error, total_error) CALL H5Pcreate_f(H5P_DATASET_ACCESS_F, dapl1, error) @@ -460,7 +460,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) ! Verify that H5Pget_chunk_cache(dapl) returns the same values as are in ! the default fapl. - ! + ! CALL H5Pget_cache_f(fapl_def, mdc_nelmts, nslots_1, nbytes_1, w0_1, error) CALL check("H5Pget_cache_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl1, nslots_4, nbytes_4, w0_4, error) @@ -469,7 +469,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL verify("H5Pget_chunk_cache_f", nbytes_1, nbytes_4, total_error) CALL verify("H5Pget_chunk_cache_f", w0_1, w0_4, total_error) - ! Set a lapl property on dapl1 (to verify inheritance) + ! Set a lapl property on dapl1 (to verify inheritance) CALL H5Pset_nlinks_f(dapl1, 134_size_t , error) CALL check("H5Pset_nlinks_f", error, total_error) CALL H5Pget_nlinks_f(dapl1, nlinks, error) @@ -494,29 +494,29 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL H5Pset_cache_f(fapl_local, 0, nslots_2, nbytes_2, w0_2, error) CALL check("H5Pset_cache_f", error, total_error) - ! Create file + ! Create file CALL H5Fcreate_f(fix_filename, H5F_ACC_TRUNC_F, fid, error, H5P_DEFAULT_F, fapl_local) CALL check("H5Fcreate_f", error, total_error) - ! Create dataset creation property list + ! Create dataset creation property list CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dcpl, error) CALL check("H5Pcreate_f", error, total_error) - ! Set chunking + ! Set chunking chunk_dim(1) = 10 CALL H5Pset_chunk_f(dcpl, 1, chunk_dim, error) CALL check("H5Pset_chunk_f", error, total_error) - ! Create 1-D dataspace + ! Create 1-D dataspace ndim(1) = 100 CALL H5Screate_simple_f(1, ndim, sid, error) CALL check("H5Pcreate_f", error, total_error) - ! Create dataset with default dapl + ! Create dataset with default dapl CALL H5Dcreate_f(fid, "dset", H5T_NATIVE_INTEGER, sid, dsid, error, dcpl, H5P_DEFAULT_F, dapl1) CALL check("H5Pcreate_f", error, total_error) - - ! Retrieve dapl from dataset, verify cache values are the same as on fapl_local + + ! Retrieve dapl from dataset, verify cache values are the same as on fapl_local CALL H5Dget_access_plist_f(dsid, dapl2, error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) @@ -524,9 +524,9 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) - CALL H5Pclose_f(dapl2,error) + CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) - + ! Set new values on dapl1. nbytes will be set to default, so the file ! property will override this setting @@ -537,7 +537,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL H5Pset_chunk_cache_f(dapl1, nslots_3, nbytes_3, w0_3, error) CALL check("H5Pset_chunk_cache_f", error, total_error) - ! Close dataset, reopen with dapl1. Note the use of a dapl with H5Oopen + ! Close dataset, reopen with dapl1. Note the use of a dapl with H5Oopen CALL H5Dclose_f(dsid, error) CALL H5Oopen_f(fid, "dset", dsid, error, dapl1) @@ -572,11 +572,11 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL verify("H5Pget_chunk_cache_f", INT(nslots_2), INT(nslots_4), total_error) CALL verify("H5Pget_chunk_cache_f", INT(nbytes_2), INT(nbytes_4), total_error) CALL verify("H5Pget_chunk_cache_f", w0_2, w0_4, total_error) - CALL H5Pclose_f(dapl2,error) + CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) ! Similary, test use of H5Dcreate2 with H5P_DEFAULT - CALL H5Dclose_f(dsid, error) + CALL H5Dclose_f(dsid, error) CALL check("H5Dclose_f", error, total_error) CALL H5Dcreate_f(fid, "dset2", H5T_NATIVE_INTEGER, sid, dsid, error, dcpl, H5P_DEFAULT_F, H5P_DEFAULT_F) @@ -599,7 +599,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL check("H5Pset_cache_f", error, total_error) ! Close and reopen file with new fapl_local - + CALL H5Dclose_f(dsid, error) CALL check("H5Dclose_f", error, total_error) CALL H5Fclose_f(fid,error) @@ -611,13 +611,13 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) ! Verify that dapl2 retrieved earlier (using values from the old fapl) ! sets its values in the new file (test use of H5Dopen2 with a dapl) ! - + CALL h5dopen_f (fid, "dset", dsid, error, dapl2) CALL check("h5dopen_f", error, total_error) - + CALL H5Pclose_f(dapl2,error) CALL check("H5Pclose_f", error, total_error) ! Close dapl2, to avoid id leak - + CALL H5Dget_access_plist_f(dsid, dapl2, error) CALL check("H5Dget_access_plist_f", error, total_error) CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error) @@ -707,15 +707,15 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) CALL H5Sclose_f(sid,error) CALL check("H5Sclose_f", error, total_error) CALL H5Pclose_f(fapl_local,error) - CALL check("H5Pclose_f", error, total_error) + CALL check("H5Pclose_f", error, total_error) CALL H5Pclose_f(fapl_def,error) - CALL check("H5Pclose_f", error, total_error) + CALL check("H5Pclose_f", error, total_error) CALL H5Pclose_f(dapl1,error) - CALL check("H5Pclose_f", error, total_error) + CALL check("H5Pclose_f", error, total_error) CALL H5Pclose_f(dapl2,error) - CALL check("H5Pclose_f", error, total_error) + CALL check("H5Pclose_f", error, total_error) CALL H5Pclose_f(dcpl,error) - CALL check("H5Pclose_f", error, total_error) + CALL check("H5Pclose_f", error, total_error) CALL H5Fclose_f(fid,error) CALL check("H5Fclose_f", error, total_error) diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90 index 083c312..3e7c552 100644 --- a/fortran/test/tH5P_F03.F90 +++ b/fortran/test/tH5P_F03.F90 @@ -5,7 +5,7 @@ ! ! FUNCTION ! Test FORTRAN HDF5 H5P APIs which are dependent on FORTRAN 2003 -! features. +! features. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -40,35 +40,35 @@ MODULE test_genprop_cls_cb1_mod USE HDF5 USE ISO_C_BINDING IMPLICIT NONE - - TYPE, BIND(C) :: cop_cb_struct_ ! Struct for iterations + + TYPE, BIND(C) :: cop_cb_struct_ ! Struct for iterations INTEGER :: count INTEGER(HID_T) :: id END TYPE cop_cb_struct_ CONTAINS - + INTEGER FUNCTION test_genprop_cls_cb1_f(list_id, create_data ) bind(C) - + IMPLICIT NONE INTEGER(HID_T), INTENT(IN), VALUE :: list_id - + TYPE(cop_cb_struct_) :: create_data create_data%count = create_data%count + 1 create_data%id = list_id test_genprop_cls_cb1_f = 0 - + END FUNCTION test_genprop_cls_cb1_f END MODULE test_genprop_cls_cb1_mod MODULE TH5P_F03 - USE HDF5 - USE TH5_MISC + USE HDF5 + USE TH5_MISC USE TH5_MISC_GEN USE ISO_C_BINDING @@ -89,7 +89,7 @@ CONTAINS ! * Modifications: ! * ! *------------------------------------------------------------------------- -! +! SUBROUTINE test_create(total_error) @@ -116,9 +116,9 @@ SUBROUTINE test_create(total_error) ! ! * Create a file. - ! + ! CALL h5fcreate_f(filename,H5F_ACC_TRUNC_F,file,error) - CALL check("h5fcreate_f", error, total_error) + CALL check("h5fcreate_f", error, total_error) CALL h5screate_simple_f(5, cur_size, space, error, cur_size) CALL check("h5screate_simple_f", error, total_error) @@ -129,7 +129,7 @@ SUBROUTINE test_create(total_error) CALL h5pset_chunk_f(dcpl, 5, ch_size, error) CALL check("h5pset_chunk_f",error, total_error) - ! Create a compound datatype + ! Create a compound datatype CALL h5tcreate_f(H5T_COMPOUND_F, H5_SIZEOF(fill_ctype), comp_type_id, error) CALL check("h5tcreate_f", error, total_error) h5off = H5OFFSETOF(C_LOC(fill_ctype), C_LOC(fill_ctype%a)) @@ -150,7 +150,7 @@ SUBROUTINE test_create(total_error) CALL H5Pset_fill_time_f(dcpl, H5D_FILL_TIME_ALLOC_F, error) CALL check("H5Pset_fill_time_f",error, total_error) - ! Compound datatype test + ! Compound datatype test f_ptr = C_LOC(fill_ctype) @@ -205,7 +205,7 @@ SUBROUTINE test_create(total_error) CALL h5fclose_f(file,error) CALL check("h5fclose_f", error, total_error) - ! Open the file and get the dataset fill value from each dataset + ! Open the file and get the dataset fill value from each dataset CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error) CALL check("h5pcreate_f",error, total_error) @@ -252,7 +252,7 @@ SUBROUTINE test_create(total_error) CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, file, error, fapl) CALL check("h5fopen_f", error, total_error) - ! Compound datatype test + ! Compound datatype test CALL h5dopen_f(file, "dset9", dset9, error) CALL check("h5dopen_f", error, total_error) @@ -306,9 +306,9 @@ SUBROUTINE test_genprop_class_callback(total_error) INTEGER, INTENT(INOUT) :: total_error - INTEGER(hid_t) :: cid1, cid2 ! Generic Property class ID - INTEGER(hid_t) :: lid1, lid2 ! Generic Property list ID - INTEGER(size_t) :: nprops ! Number of properties in class + INTEGER(hid_t) :: cid1, cid2 ! Generic Property class ID + INTEGER(hid_t) :: lid1, lid2 ! Generic Property list ID + INTEGER(size_t) :: nprops ! Number of properties in class TYPE(cop_cb_struct_), TARGET :: crt_cb_struct, cls_cb_struct INTEGER :: CLASS1_NAME_SIZE = 7 ! length of class string @@ -329,7 +329,7 @@ SUBROUTINE test_genprop_class_callback(total_error) INTEGER :: PROP3_DEF_VALUE = 10 INTEGER :: PROP4_DEF_VALUE = 10 - INTEGER :: error ! Generic RETURN value + INTEGER :: error ! Generic RETURN value LOGICAL :: flag ! for tests f1 = C_FUNLOC(test_genprop_cls_cb1_f) @@ -338,45 +338,45 @@ SUBROUTINE test_genprop_class_callback(total_error) f2 = C_LOC(crt_cb_struct) f6 = C_LOC(cls_cb_struct) - ! Create a new generic class, derived from the root of the class hierarchy + ! Create a new generic class, derived from the root of the class hierarchy CALL h5pcreate_class_f(h5p_ROOT_F, CLASS1_NAME, cid1, error, f1, f2, c_null_funptr, c_null_ptr, f5, f6) CALL check("h5pcreate_class_f", error, total_error) - ! Insert first property into class (with no callbacks) + ! Insert first property into class (with no callbacks) CALL h5pregister_f(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, error) CALL check("h5pregister_f", error, total_error) - ! Insert second property into class (with no callbacks) + ! Insert second property into class (with no callbacks) CALL h5pregister_f(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, error) CALL check("h5pregister_f", error, total_error) - ! Insert third property into class (with no callbacks) + ! Insert third property into class (with no callbacks) CALL h5pregister_f(cid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, error) CALL check("h5pregister_f", error, total_error) - ! Insert fourth property into class (with no callbacks) + ! Insert fourth property into class (with no callbacks) CALL h5pregister_f(cid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, error) CALL check("h5pregister_f", error, total_error) - ! Check the number of properties in class + ! Check the number of properties in class CALL h5pget_nprops_f(cid1, nprops, error) CALL check("h5pget_nprops_f", error, total_error) CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) - ! Initialize class callback structs + ! Initialize class callback structs crt_cb_struct%count = 0 crt_cb_struct%id = -1 cls_cb_struct%count = 0 cls_cb_struct%id = -1 - ! Create a property list from the class + ! Create a property list from the class CALL h5pcreate_f(cid1, lid1, error) CALL check("h5pcreate_f", error, total_error) - ! Get the list's class + ! Get the list's class CALL H5Pget_class_f(lid1, cid2, error) CALL check("H5Pget_class_f", error, total_error) - ! Check that the list's class is correct + ! Check that the list's class is correct CALL H5Pequal_f(cid2, cid1, flag, error) CALL check("H5Pequal_f", error, total_error) CALL verify("H5Pequal_f", flag, .TRUE., total_error) @@ -389,41 +389,41 @@ SUBROUTINE test_genprop_class_callback(total_error) WRITE(*,*) 'Class names do not match! name=',CLASS1_NAME_BUF, 'CLASS1_NAME=',CLASS1_NAME total_error = total_error + 1 ENDIF - ! Close class + ! Close class CALL h5pclose_class_f(cid2, error) CALL check("h5pclose_class_f", error, total_error) - ! Verify that the creation callback occurred + ! Verify that the creation callback occurred CALL verify("h5pcreate_f", crt_cb_struct%count, 1, total_error) CALL verify("h5pcreate_f", crt_cb_struct%id, lid1, total_error) - ! Check the number of properties in list + ! Check the number of properties in list CALL h5pget_nprops_f(lid1,nprops, error) CALL check("h5pget_nprops_f", error, total_error) CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) - ! Create another property list from the class + ! Create another property list from the class CALL h5pcreate_f(cid1, lid2, error) CALL check("h5pcreate_f", error, total_error) - ! Verify that the creation callback occurred + ! Verify that the creation callback occurred CALL verify("h5pcreate_f", crt_cb_struct%count, 2, total_error) CALL verify("h5pcreate_f", crt_cb_struct%id, lid2, total_error) - ! Check the number of properties in list + ! Check the number of properties in list CALL h5pget_nprops_f(lid2,nprops, error) CALL check("h5pget_nprops_f", error, total_error) CALL verify("h5pget_nprops_f", INT(nprops), 4, total_error) - ! Close first list + ! Close first list CALL h5pclose_f(lid1, error); CALL check("h5pclose_f", error, total_error) - ! Verify that the close callback occurred + ! Verify that the close callback occurred CALL verify("h5pcreate_f", cls_cb_struct%count, 1, total_error) CALL verify("h5pcreate_f", cls_cb_struct%id, lid1, total_error) - ! Close second list + ! Close second list CALL h5pclose_f(lid2, error); CALL check("h5pclose_f", error, total_error) @@ -431,7 +431,7 @@ SUBROUTINE test_genprop_class_callback(total_error) CALL verify("h5pcreate_f", cls_cb_struct%count, 2, total_error) CALL verify("h5pcreate_f", cls_cb_struct%id, lid2, total_error) - ! Close class + ! Close class CALL h5pclose_class_f(cid1, error) CALL check("h5pclose_class_f", error, total_error) @@ -459,7 +459,7 @@ SUBROUTINE test_h5p_file_image(total_error) INTEGER, PARAMETER :: count = 10 INTEGER, DIMENSION(1:count), TARGET :: buffer INTEGER, DIMENSION(1:count), TARGET :: temp - INTEGER :: i + INTEGER :: i INTEGER(size_t) :: size INTEGER(size_t) :: temp_size INTEGER :: error ! error return value @@ -489,7 +489,7 @@ SUBROUTINE test_h5p_file_image(total_error) CALL h5pset_file_image_f(fapl_1, f_ptr, size, error) CALL check("h5pset_file_image_f", error, total_error) - + ! Get the same data back DO i = 1, count f_ptr1(i) = C_LOC(temp(i)) @@ -501,7 +501,7 @@ SUBROUTINE test_h5p_file_image(total_error) ! Check that sizes are the same, and that the buffers are identical but separate CALL verify("h5pget_file_image_f", INT(temp_size), INT(size), total_error) - + ! Verify the image data is correct DO i = 1, count CALL verify("h5pget_file_image_f", temp(i), buffer(i), total_error) @@ -529,18 +529,18 @@ SUBROUTINE external_test_offset(cleanup,total_error) LOGICAL, INTENT(IN) :: cleanup INTEGER(hid_t) :: fapl=-1 ! file access property list - INTEGER(hid_t) :: file=-1 ! file to write to - INTEGER(hid_t) :: dcpl=-1 ! dataset creation properties - INTEGER(hid_t) :: space=-1 ! data space - INTEGER(hid_t) :: dset=-1 ! dataset + INTEGER(hid_t) :: file=-1 ! file to write to + INTEGER(hid_t) :: dcpl=-1 ! dataset creation properties + INTEGER(hid_t) :: space=-1 ! data space + INTEGER(hid_t) :: dset=-1 ! dataset INTEGER(hid_t) :: grp=-1 ! group to emit diagnostics - INTEGER(size_t) :: i, j ! miscellaneous counters + INTEGER(size_t) :: i, j ! miscellaneous counters CHARACTER(LEN=180) :: filename ! file names INTEGER, DIMENSION(1:25) :: part - INTEGER, DIMENSION(1:100), TARGET :: whole ! raw data buffers - INTEGER(hsize_t), DIMENSION(1:1) :: cur_size ! current data space size - INTEGER(hid_t) :: hs_space ! hyperslab data space - INTEGER(hsize_t), DIMENSION(1:1) :: hs_start = (/30/) ! hyperslab starting offset + INTEGER, DIMENSION(1:100), TARGET :: whole ! raw data buffers + INTEGER(hsize_t), DIMENSION(1:1) :: cur_size ! current data space size + INTEGER(hid_t) :: hs_space ! hyperslab data space + INTEGER(hsize_t), DIMENSION(1:1) :: hs_start = (/30/) ! hyperslab starting offset INTEGER(hsize_t), DIMENSION(1:1) :: hs_count = (/25/) ! hyperslab size CHARACTER(LEN=1) :: ichr1 ! character conversion holder INTEGER :: error ! error status @@ -559,23 +559,23 @@ SUBROUTINE external_test_offset(cleanup,total_error) WRITE(ichr1,'(I1.1)') i filename = "extern_"//ichr1//"a.raw" OPEN(10, FILE=filename, ACCESS='STREAM', form='UNFORMATTED') - + WRITE(10) temparray(1:(i-1)*10) WRITE(10) part CLOSE(10) ENDDO ! - ! Create the file and an initial group. + ! Create the file and an initial group. CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error) CALL h5fcreate_f('extren_raw.h5', H5F_ACC_TRUNC_F, file, error, access_prp=fapl) CALL check("h5fcreate_f",error,total_error) - + CALL h5gcreate_f(file, "emit-diagnostics", grp, error) CALL check("h5gcreate_f",error, total_error) - + ! Create the dataset - sizeof_part = INT(H5_SIZEOF(part(1))*25, hsize_t) + sizeof_part = INT(H5_SIZEOF(part(1))*25, hsize_t) CALL h5pcreate_f(H5P_DATASET_CREATE_F, dcpl, error) CALL check("h5pcreate_f", error, total_error) @@ -587,7 +587,7 @@ SUBROUTINE external_test_offset(cleanup,total_error) CALL check("h5pset_external_f",error,total_error) CALL h5pset_external_f(dcpl, "extern_4a.raw", INT(30,off_t), sizeof_part, error) CALL check("h5pset_external_f",error,total_error) - + cur_size(1) = 100 CALL h5screate_simple_f(1, cur_size, space, error) CALL check("h5screate_simple_f", error, total_error) @@ -629,7 +629,7 @@ SUBROUTINE external_test_offset(cleanup,total_error) EXIT ENDIF ENDDO - + CALL h5dclose_f(dset, error) CALL check("h5dclose_f", error, total_error) CALL h5pclose_f(dcpl, error) @@ -678,12 +678,12 @@ SUBROUTINE test_vds(total_error) CHARACTER(LEN=3), PARAMETER :: DATASET="VDS" INTEGER(hsize_t) :: VDSDIM0 INTEGER(hsize_t), PARAMETER :: VDSDIM1 = 10 - INTEGER(hsize_t), PARAMETER :: VDSDIM2 = 15 + INTEGER(hsize_t), PARAMETER :: VDSDIM2 = 15 INTEGER(hsize_t) :: DIM0 INTEGER, PARAMETER :: DIM0_1= 4 ! Initial size of the source datasets - INTEGER, PARAMETER :: DIM1 = 10 - INTEGER, PARAMETER :: DIM2 = 15 + INTEGER, PARAMETER :: DIM1 = 10 + INTEGER, PARAMETER :: DIM2 = 15 INTEGER, PARAMETER :: RANK = 3 INTEGER(hsize_t), PARAMETER :: PLANE_STRIDE = 4 @@ -709,15 +709,15 @@ SUBROUTINE test_vds(total_error) src_count, block INTEGER(hsize_t), DIMENSION(1:2,1:3) :: vdsdims_out_correct - INTEGER(hsize_t), DIMENSION(1:3) :: start_out, & !Hyperslab PARAMETER out + INTEGER(hsize_t), DIMENSION(1:3) :: start_out, & !Hyperslab PARAMETER out stride_out, count_out, block_out INTEGER(hsize_t), DIMENSION(1:3,1:PLANE_STRIDE) :: start_correct INTEGER :: i, j - INTEGER(size_t) :: i_sz + INTEGER(size_t) :: i_sz INTEGER :: layout ! Storage layout - INTEGER(size_t) :: num_map ! Number of mappings - INTEGER(size_t) :: len ! Length of the string also a RETURN value + INTEGER(size_t) :: num_map ! Number of mappings + INTEGER(size_t) :: len ! Length of the string also a RETURN value ! Different sized character buffers CHARACTER(len=LEN(SRC_FILE(1))-3) :: SRC_FILE_LEN_TINY CHARACTER(len=LEN(SRC_FILE(1))-1) :: SRC_FILE_LEN_SMALL @@ -726,7 +726,7 @@ SUBROUTINE test_vds(total_error) CHARACTER(len=LEN(SRC_FILE(1))+10) :: SRC_FILE_LEN_HUGE CHARACTER(len=LEN(SRC_DATASET(1))) :: SRC_DATASET_LEN_EXACT - INTEGER(HID_T) :: space_out + INTEGER(HID_T) :: space_out INTEGER :: s_type, virtual_view INTEGER :: type1, type2 @@ -735,13 +735,13 @@ SUBROUTINE test_vds(total_error) TYPE(C_PTR) :: f_ptr INTEGER(SIZE_T) :: nsize LOGICAL :: IsRegular - INTEGER(HSIZE_T) :: gap_size + INTEGER(HSIZE_T) :: gap_size ! For testing against vdsdims_out_correct(1,1) = DIM0_1*5 vdsdims_out_correct(2,1) = DIM0_1*8 - vdsdims_out_correct(1:2,2) = VDSDIM1 - vdsdims_out_correct(1:2,3) = VDSDIM2 + vdsdims_out_correct(1:2,2) = VDSDIM1 + vdsdims_out_correct(1:2,3) = VDSDIM2 VDSDIM0 = H5S_UNLIMITED_F DIM0 = H5S_UNLIMITED_F @@ -749,7 +749,7 @@ SUBROUTINE test_vds(total_error) dims_max = (/INT(DIM0,hsize_t), INT(DIM1,hsize_t), INT(DIM2,hsize_t)/) ! - ! Create source files and datasets. + ! Create source files and datasets. ! DO i = 1, PLANE_STRIDE ! @@ -758,7 +758,7 @@ SUBROUTINE test_vds(total_error) wdata(j) = i ENDDO ! - ! Create the source files and datasets. Write data to each dataset and + ! Create the source files and datasets. Write data to each dataset and ! close all resources. CALL h5fcreate_f(SRC_FILE(i), H5F_ACC_TRUNC_F, file, error) CALL check("h5fcreate_f", error, total_error) @@ -769,7 +769,7 @@ SUBROUTINE test_vds(total_error) CALL check("h5pcreate_f", error, total_error) CALL h5pset_chunk_f(dcpl, RANK, chunk_dims, error) CALL check("h5pset_chunk_f",error, total_error) - + CALL h5dcreate_f(file, SRC_DATASET(i), H5T_NATIVE_INTEGER, src_space, dset, error, dcpl, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("h5dcreate_f",error, total_error) f_ptr = C_LOC(wdata(1)) @@ -795,20 +795,20 @@ SUBROUTINE test_vds(total_error) ! Create dataspaces for the source dataset. CALL H5Screate_simple_f(RANK, dims, src_space, error, dims_max) CALL check("H5Screate_simple_f", error, total_error) - + ! Create VDS creation property CALL H5Pcreate_f (H5P_DATASET_CREATE_F, dcpl, error) CALL check("H5Pcreate_f", error, total_error) - - ! Initialize hyperslab values + + ! Initialize hyperslab values start(1:3) = 0 - stride(1:3) = (/PLANE_STRIDE,1_hsize_t,1_hsize_t/) ! we will select every fifth plane in VDS + stride(1:3) = (/PLANE_STRIDE,1_hsize_t,1_hsize_t/) ! we will select every fifth plane in VDS count(1:3) = (/H5S_UNLIMITED_F,1_hsize_t,1_hsize_t/) src_count(1:3) = (/H5S_UNLIMITED_F,1_hsize_t,1_hsize_t/) block(1:3) = (/1, DIM1, DIM2/) - - ! - ! Build the mappings + + ! + ! Build the mappings ! start_correct = 0 CALL H5Sselect_hyperslab_f(src_space, H5S_SELECT_SET_F, start, src_count, error, block=block) @@ -827,10 +827,10 @@ SUBROUTINE test_vds(total_error) start(1) = start(1) + 1 ENDDO - CALL H5Sselect_none_f(vspace, error) + CALL H5Sselect_none_f(vspace, error) CALL check("H5Sselect_none_f", error, total_error) - ! Create a virtual dataset + ! Create a virtual dataset CALL H5Dcreate_f(vfile, DATASET, H5T_NATIVE_INTEGER, vspace, vdset, error, dcpl, H5P_DEFAULT_F, H5P_DEFAULT_F) CALL check("H5Dcreate_f", error, total_error) CALL H5Sclose_f(vspace, error) @@ -840,9 +840,9 @@ SUBROUTINE test_vds(total_error) CALL H5Pclose_f(dcpl, error) CALL check("H5Pclose_f", error, total_error) - ! Let's add data to the source datasets and check new dimensions for VDS + ! Let's add data to the source datasets and check new dimensions for VDS ! We will add only one plane to the first source dataset, two planes to the - ! second one, three to the third, and four to the forth. + ! second one, three to the third, and four to the forth. DO i = 1, PLANE_STRIDE ! @@ -852,15 +852,15 @@ SUBROUTINE test_vds(total_error) ENDDO ! - ! Open the source files and datasets. Append data to each dataset and + ! Open the source files and datasets. Append data to each dataset and ! close all resources. CALL H5Fopen_f (SRC_FILE(i), H5F_ACC_RDWR_F, file, error) CALL check("H5Fopen_f", error, total_error) CALL H5Dopen_f (file, SRC_DATASET(i), dset, error) CALL check("H5Dopen_f", error, total_error) extdims(1) = DIM0_1+i - CALL H5Dset_extent_f(dset, extdims, error) - CALL check("H5Dset_extent_f", error, total_error) + CALL H5Dset_extent_f(dset, extdims, error) + CALL check("H5Dset_extent_f", error, total_error) CALL H5Dget_space_f(dset, src_space, error) CALL check("H5Dget_space_f", error, total_error) @@ -870,13 +870,13 @@ SUBROUTINE test_vds(total_error) memdims(1) = i - CALL H5Screate_simple_f(RANK, memdims, mem_space, error) + CALL H5Screate_simple_f(RANK, memdims, mem_space, error) CALL check("H5Screate_simple_f", error, total_error) - CALL H5Sselect_hyperslab_f(src_space, H5S_SELECT_SET_F, start,count, error,block=block) + CALL H5Sselect_hyperslab_f(src_space, H5S_SELECT_SET_F, start,count, error,block=block) CALL check("H5Sselect_hyperslab_f", error, total_error) f_ptr = C_LOC(wdata(1)) - CALL H5Dwrite_f(dset, H5T_NATIVE_INTEGER, f_ptr, error, mem_space, src_space, H5P_DEFAULT_F) + CALL H5Dwrite_f(dset, H5T_NATIVE_INTEGER, f_ptr, error, mem_space, src_space, H5P_DEFAULT_F) CALL check("H5Dwrite_f", error, total_error) CALL H5Sclose_f(src_space, error) CALL check("H5Sclose_f", error, total_error) @@ -888,38 +888,38 @@ SUBROUTINE test_vds(total_error) call H5Dclose_f(vdset, error) CALL check("H5Dclose_f", error, total_error) - call H5Fclose_f(vfile, error) + call H5Fclose_f(vfile, error) CALL check("H5Fclose_f", error, total_error) - + ! ! begin the read section ! ! Open file and dataset using the default properties. CALL H5Fopen_f(VFILENAME, H5F_ACC_RDONLY_F, vfile, error) - CALL check("H5Fopen_f", error, total_error) - - ! + CALL check("H5Fopen_f", error, total_error) + + ! ! Open VDS using different access properties to use max or ! min extents depending on the sizes of the underlying datasets CALL H5Pcreate_f(H5P_DATASET_ACCESS_F, dapl, error) - CALL check("H5Pcreate_f", error, total_error) + CALL check("H5Pcreate_f", error, total_error) DO i = 1, 2 IF(i.NE.1)THEN CALL H5Pset_virtual_view_f(dapl, H5D_VDS_LAST_AVAILABLE_F, error) - CALL check("H5Pset_virtual_view_f", error, total_error) + CALL check("H5Pset_virtual_view_f", error, total_error) ELSE CALL H5Pset_virtual_view_f(dapl, H5D_VDS_FIRST_MISSING_F, error) - CALL check("H5Pset_virtual_view_f", error, total_error) + CALL check("H5Pset_virtual_view_f", error, total_error) ENDIF - + CALL H5Dopen_f(vfile, DATASET, vdset, error, dapl) - CALL check("H5Dopen_f", error, total_error) + CALL check("H5Dopen_f", error, total_error) ! Let's get space of the VDS and its dimension we should get 32(or 20)x10x10 CALL H5Dget_space_f(vdset, vspace, error) - CALL check("H5Dget_space_f", error, total_error) + CALL check("H5Dget_space_f", error, total_error) CALL H5Sget_simple_extent_dims_f(vspace, vdsdims_out, vdsdims_max_out, error) CALL check("H5Sget_simple_extent_dims_f", error, total_error) @@ -927,12 +927,12 @@ SUBROUTINE test_vds(total_error) DO j = 1, RANK IF(vdsdims_out(j).NE.vdsdims_out_correct(i,j))THEN total_error = total_error + 1 - EXIT + EXIT ENDIF ENDDO CALL H5Pget_virtual_view_f(dapl, virtual_view, error) - CALL check("h5pget_virtual_view_f", error, total_error) + CALL check("h5pget_virtual_view_f", error, total_error) IF(i.EQ.1)THEN IF(virtual_view .NE. H5D_VDS_FIRST_MISSING_F)THEN @@ -942,10 +942,10 @@ SUBROUTINE test_vds(total_error) IF(virtual_view .NE. H5D_VDS_LAST_AVAILABLE_F)THEN total_error = total_error + 1 ENDIF - + ENDIF - ! Close + ! Close CALL H5Dclose_f(vdset, error) CALL check("H5Dclose_f", error, total_error) CALL H5Sclose_f(vspace, error) @@ -957,7 +957,7 @@ SUBROUTINE test_vds(total_error) ! ! Get creation property list and mapping properties. - ! + ! CALL H5Dget_create_plist_f (vdset, dcpl, error) CALL check("H5Dget_create_plist_f", error, total_error) @@ -973,7 +973,7 @@ SUBROUTINE test_vds(total_error) ! ! Find number of mappings. - + CALL H5Pget_virtual_count_f(dcpl, num_map, error) CALL check("H5Pget_virtual_count_f", error, total_error) @@ -981,7 +981,7 @@ SUBROUTINE test_vds(total_error) PRINT*,"Number of mappings is incorrect" total_error = total_error + 1 ENDIF - ! + ! ! Get mapping parameters for each mapping. ! DO i_sz = 1, num_map @@ -1105,7 +1105,7 @@ SUBROUTINE test_vds(total_error) PRINT*,"gapsize is incorrect" total_error = total_error + 1 ENDIF - + CALL H5Dclose_f(vdset, error) CALL check("H5Dclose_f", error, total_error) CALL H5Sclose_f(vspace, error) @@ -1114,7 +1114,7 @@ SUBROUTINE test_vds(total_error) CALL check("H5Pclose_f", error, total_error) CALL H5Fclose_f(vfile, error) CALL check("H5Fclose_f", error, total_error) - + END SUBROUTINE test_vds diff --git a/fortran/test/tH5R.F90 b/fortran/test/tH5R.F90 index f7cccfa..708d290 100644 --- a/fortran/test/tH5R.F90 +++ b/fortran/test/tH5R.F90 @@ -21,7 +21,7 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES -! Tests h5rcreate_f, h5rdereference_f, h5rget_name_f +! Tests h5rcreate_f, h5rdereference_f, h5rget_name_f ! and H5Rget_object_type functions ! ! CONTAINS SUBROUTINES @@ -262,20 +262,20 @@ SUBROUTINE refregtest(cleanup, total_error) INTEGER(HID_T) :: dsetv_id ! Dataset identifier INTEGER(HID_T) :: dsetr_id ! Dataset identifier INTEGER :: error -! TYPE(hdset_reg_ref_t_f) , DIMENSION(1:2), TARGET :: ref - TYPE(hdset_reg_ref_t_f) , DIMENSION(1:2) :: ref +! TYPE(hdset_reg_ref_t_f) , DIMENSION(1:2), TARGET :: ref + TYPE(hdset_reg_ref_t_f) , DIMENSION(1:2) :: ref TYPE(hdset_reg_ref_t_f) , DIMENSION(1:2) :: ref_out INTEGER(HSIZE_T), DIMENSION(2) :: ref_dim = (/0,0/) INTEGER(HSIZE_T), DIMENSION(2) :: data_dims ! = (/0,0/) INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/2,9/) ! Datasets dimensions - INTEGER(HSIZE_T), DIMENSION(1) :: dimsr = (/2/) ! + INTEGER(HSIZE_T), DIMENSION(1) :: dimsr = (/2/) ! INTEGER(HSIZE_T), DIMENSION(2) :: start ! = (/0,0/) INTEGER(HSIZE_T), DIMENSION(2) :: count ! = (/0,0/) INTEGER :: rankr = 1 INTEGER :: rank = 2 -! INTEGER , DIMENSION(2,9), TARGET :: DATA - INTEGER , DIMENSION(2,9) :: DATA +! INTEGER , DIMENSION(2,9), TARGET :: DATA + INTEGER , DIMENSION(2,9) :: DATA INTEGER , DIMENSION(2,9) :: data_out = 0 INTEGER(HSIZE_T) , DIMENSION(2,3) :: coord INTEGER(SIZE_T) ::num_points = 3 ! Number of selected points @@ -353,7 +353,7 @@ SUBROUTINE refregtest(cleanup, total_error) CALL check("h5sselect_hyperslab_f", error, total_error) ref(1)%ref(:) = 0 ! f_ptr = C_LOC(ref(1)) -! CALL h5rcreate_f(file_id, dsetnamev, 1, space_id, f_ptr, error) +! CALL h5rcreate_f(file_id, dsetnamev, 1, space_id, f_ptr, error) CALL h5rcreate_f(file_id, dsetnamev, space_id, ref(1), error) CALL check("h5rcreate_f", error, total_error) diff --git a/fortran/test/tH5S.F90 b/fortran/test/tH5S.F90 index a4f5f4a..a839d8b 100644 --- a/fortran/test/tH5S.F90 +++ b/fortran/test/tH5S.F90 @@ -176,14 +176,14 @@ CONTAINS CALL check("h5sget_simple_extent_type_f", error, total_error) IF (classtype .NE. 1) write(*,*)"class type not H5S_SIMPLE_f" - ! + ! !set the copied space to none before extend the dimensions. ! CALL h5sset_extent_none_f(space2_id, error) CALL check("h5sset_extent_none_f", error, total_error) ! - !set the copied space to dim2 size. + !set the copied space to dim2 size. ! CALL h5sset_extent_simple_f(space2_id, rank2, dims2, maxdims2, error) CALL check("h5sset_extent_simple_f", error, total_error) diff --git a/fortran/test/tH5Sselect.F90 b/fortran/test/tH5Sselect.F90 index 8415bce..5f7ece7 100644 --- a/fortran/test/tH5Sselect.F90 +++ b/fortran/test/tH5Sselect.F90 @@ -26,12 +26,12 @@ ! h5sselect_none_f, h5sselect_valid_f, h5sselect_hyperslab_f, ! h5sget_select_bounds_f, h5sget_select_elem_pointlist_f, ! h5sget_select_elem_npoints_f, h5sget_select_hyper_blocklist_f, -! h5sget_select_hyper_nblocks_f, h5sget_select_npoints_f +! h5sget_select_hyper_nblocks_f, h5sget_select_npoints_f ! ! CONTAINS SUBROUTINES ! test_select_hyperslab, test_select_element, test_basic_select, ! test_select_point, test_select_combine, test_select_bounds -! +! ! !***** MODULE TH5SSELECT @@ -1033,12 +1033,12 @@ CONTAINS !*************************************************************** SUBROUTINE test_select_point(cleanup, total_error) - + IMPLICIT NONE LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(INOUT) :: total_error INTEGER(HID_T) :: xfer_plist - + INTEGER, PARAMETER :: SPACE1_DIM1=3 INTEGER, PARAMETER :: SPACE1_DIM2=15 INTEGER, PARAMETER :: SPACE1_DIM3=13 @@ -1046,36 +1046,36 @@ SUBROUTINE test_select_point(cleanup, total_error) INTEGER, PARAMETER :: SPACE2_DIM2=26 INTEGER, PARAMETER :: SPACE3_DIM1=15 INTEGER, PARAMETER :: SPACE3_DIM2=26 - + INTEGER, PARAMETER :: SPACE1_RANK=3 INTEGER, PARAMETER :: SPACE2_RANK=2 INTEGER, PARAMETER :: SPACE3_RANK=2 - - ! Element selection information + + ! Element selection information INTEGER, PARAMETER :: POINT1_NPOINTS=10 - INTEGER(hid_t) ::fid1 ! HDF5 File IDs - INTEGER(hid_t) ::dataset ! Dataset ID - INTEGER(hid_t) ::sid1,sid2 ! Dataspace ID + INTEGER(hid_t) ::fid1 ! HDF5 File IDs + INTEGER(hid_t) ::dataset ! Dataset ID + INTEGER(hid_t) ::sid1,sid2 ! Dataspace ID INTEGER(hsize_t), DIMENSION(1:3) :: dims1 = (/SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3/) INTEGER(hsize_t), DIMENSION(1:2) :: dims2 = (/SPACE2_DIM1, SPACE2_DIM2/) INTEGER(hsize_t), DIMENSION(1:2) :: dims3 = (/SPACE3_DIM1, SPACE3_DIM2/) - - INTEGER(hsize_t), DIMENSION(1:SPACE1_RANK,1:POINT1_NPOINTS) :: coord1 ! Coordinates for point selection - INTEGER(hsize_t), DIMENSION(1:SPACE1_RANK,1:POINT1_NPOINTS) :: temp_coord1 ! Coordinates for point selection - INTEGER(hsize_t), DIMENSION(1:SPACE2_RANK,1:POINT1_NPOINTS) :: coord2 ! Coordinates for point selection - INTEGER(hsize_t), DIMENSION(1:SPACE2_RANK,1:POINT1_NPOINTS) :: temp_coord2 ! Coordinates for point selection - INTEGER(hsize_t), DIMENSION(1:SPACE3_RANK,1:POINT1_NPOINTS) :: coord3 ! Coordinates for point selection - INTEGER(hsize_t), DIMENSION(1:SPACE3_RANK,1:POINT1_NPOINTS) :: temp_coord3 ! Coordinates for point selection + + INTEGER(hsize_t), DIMENSION(1:SPACE1_RANK,1:POINT1_NPOINTS) :: coord1 ! Coordinates for point selection + INTEGER(hsize_t), DIMENSION(1:SPACE1_RANK,1:POINT1_NPOINTS) :: temp_coord1 ! Coordinates for point selection + INTEGER(hsize_t), DIMENSION(1:SPACE2_RANK,1:POINT1_NPOINTS) :: coord2 ! Coordinates for point selection + INTEGER(hsize_t), DIMENSION(1:SPACE2_RANK,1:POINT1_NPOINTS) :: temp_coord2 ! Coordinates for point selection + INTEGER(hsize_t), DIMENSION(1:SPACE3_RANK,1:POINT1_NPOINTS) :: coord3 ! Coordinates for point selection + INTEGER(hsize_t), DIMENSION(1:SPACE3_RANK,1:POINT1_NPOINTS) :: temp_coord3 ! Coordinates for point selection INTEGER(hssize_t) :: npoints -!!$ uint8_t *wbuf, buffer to write to disk -!!$ *rbuf, buffer read from disk -!!$ *tbuf; temporary buffer pointer - INTEGER :: i,j; ! Counters -! struct pnt_iter pi; Custom Pointer iterator struct - INTEGER :: error ! Generic return value +!!$ uint8_t *wbuf, buffer to write to disk +!!$ *rbuf, buffer read from disk +!!$ *tbuf; temporary buffer pointer + INTEGER :: i,j; ! Counters +! struct pnt_iter pi; Custom Pointer iterator struct + INTEGER :: error ! Generic return value CHARACTER(LEN=9) :: filename = 'h5s_hyper' - CHARACTER(LEN=80) :: fix_filename + CHARACTER(LEN=80) :: fix_filename CHARACTER(LEN=1), DIMENSION(1:SPACE2_DIM1,1:SPACE2_DIM2) :: wbuf CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) @@ -1086,11 +1086,11 @@ SUBROUTINE test_select_point(cleanup, total_error) xfer_plist = H5P_DEFAULT_F ! MESSAGE(5, ("Testing Element Selection Functions\n")); - ! Allocate write & read buffers + ! Allocate write & read buffers !!$ wbuf = HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); !!$ rbuf = HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); !!$ - ! Initialize WRITE buffer + ! Initialize WRITE buffer DO i = 1, SPACE2_DIM1 DO j = 1, SPACE2_DIM2 @@ -1101,20 +1101,20 @@ SUBROUTINE test_select_point(cleanup, total_error) !!$ for(i=0, tbuf=wbuf; i Date: Wed, 27 May 2020 17:41:59 -0700 Subject: Minor tweaks to testhdf5 code after normalization with 1.10. --- test/trefer.c | 12 ++++----- test/tselect.c | 78 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/test/trefer.c b/test/trefer.c index 15f9d64..12651c7 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -247,9 +247,9 @@ test_reference_params(void) /* Test parameters to H5Ropen_object */ dset2 = H5Ropen_object(&rbuf[0], H5I_INVALID_HID, H5I_INVALID_HID); - VERIFY(dset2, FAIL, "H5Ropen_object oapl_id"); + VERIFY(dset2, H5I_INVALID_HID, "H5Ropen_object oapl_id"); dset2 = H5Ropen_object(NULL, H5P_DEFAULT, dapl_id); - VERIFY(dset2, FAIL, "H5Ropen_object ref"); + VERIFY(dset2, H5I_INVALID_HID, "H5Ropen_object ref"); /* Test parameters to H5Ropen_region */ ret_id = H5Ropen_region(NULL, H5I_INVALID_HID, H5I_INVALID_HID); @@ -2258,7 +2258,7 @@ test_reference_compat_conv(void) /* Create a dataset with region reference datatype */ dataset = H5Dcreate2(fid1, "Dataset4", H5T_STD_REF_DSETREG, sid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(dataset, FAIL, "H5Dcreate2"); + CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2"); /* Select 6x6 hyperslab for first reference */ start[0] = 2; @@ -2316,11 +2316,11 @@ test_reference_compat_conv(void) /* Re-open the file */ fid1 = H5Fopen(FILE_REF_COMPAT, H5F_ACC_RDWR, H5P_DEFAULT); - CHECK(fid1, FAIL, "H5Fopen"); + CHECK(fid1, H5I_INVALID_HID, "H5Fopen"); /* Open the object reference dataset */ dataset = H5Dopen2(fid1, "/Dataset3", H5P_DEFAULT); - CHECK(dataset, FAIL, "H5Dopen2"); + CHECK(dataset, H5I_INVALID_HID, "H5Dopen2"); /* Read selection from disk */ ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf_obj); @@ -2376,7 +2376,7 @@ test_reference_compat_conv(void) /* Open the dataset region reference dataset */ dataset = H5Dopen2(fid1, "/Dataset4", H5P_DEFAULT); - CHECK(ret, H5I_INVALID_HID, "H5Dopen2"); + CHECK(dataset, H5I_INVALID_HID, "H5Dopen2"); /* Read selection from disk */ ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf_reg); diff --git a/test/tselect.c b/test/tselect.c index 492a917..45806ae 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -1666,10 +1666,10 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, /**************************************************************** ** ** test_select_hyper_contig_dr__run_test(): Test H5S (dataspace) -** selection code with contiguous source and target having -** different ranks but the same shape. We have already -** tested H5Sselect_shape_same in isolation, so now we try to do -** I/O. +** selection code with contiguous source and target having +** different ranks but the same shape. We have already +** tested H5Sselect_shape_same in isolation, so now we try to do +** I/O. ** ****************************************************************/ static void @@ -6118,8 +6118,8 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist) */ tmpdata = data; for (j = 0; j < X; j++) - for (i = 0; i < Y; i++) - for (k = 0; k < Z; k++) + for (i = 0; i < Y; i++) + for (k = 0; k < Z; k++) *tmpdata++ = (short)((k+1)%256); /* @@ -6281,8 +6281,8 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist) tmpdata = data; tmpdata_out = data_out; for (j = 0; j < X; j++) - for (i = 0; i < Y; i++) - for (k = 0; k < Z; k++,tmpdata++,tmpdata_out++) { + for (i = 0; i < Y; i++) + for (k = 0; k < Z; k++,tmpdata++,tmpdata_out++) { if(*tmpdata!=*tmpdata_out) TestErrPrintf("Line %d: Error! j=%d, i=%d, k=%d, *tmpdata=%x, *tmpdata_out=%x\n",__LINE__,j,i,k,(unsigned)*tmpdata,(unsigned)*tmpdata_out); } /* end for */ @@ -6350,7 +6350,7 @@ test_select_point_chunk(void) */ tmpdata = data; for (i = 0; i < SPACE7_DIM1; i++) - for (j = 0; j < SPACE7_DIM1; j++) + for (j = 0; j < SPACE7_DIM1; j++) *tmpdata++ = ((i*SPACE7_DIM2)+j)%256; /* @@ -12026,16 +12026,16 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(ret != FAIL) { /* In this case, rebuild_check should be TRUE. */ rebuild_check = H5Sselect_shape_same(sid_reg1, sid_reg_ori1); CHECK(rebuild_check, FALSE, "H5Sselect_shape_same"); - } /* end if */ + } /* For irregular hyperslab */ sid_irreg1 = H5Screate_simple(SPACERE1_RANK,dims1,NULL); @@ -12062,11 +12062,11 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } /* No need to do shape comparision */ @@ -12114,7 +12114,7 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); @@ -12123,7 +12123,7 @@ test_space_rebuild(void) /* In this case, rebuild_check should be TRUE. */ rebuild_check = H5Sselect_shape_same(sid_reg2, sid_reg_ori2); CHECK(rebuild_check, FALSE, "H5Sselect_shape_same"); - } /* end if */ + } /* 2-D irregular case */ sid_irreg2 = H5Screate_simple(SPACERE2_RANK,dims2,NULL); @@ -12155,11 +12155,11 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } /* No need to do shape comparision */ MESSAGE(7, ("Testing functionality to rebuild 3-D hyperslab selection\n")); @@ -12212,16 +12212,16 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(ret != FAIL) { /* In this case, rebuild_check should be TRUE. */ rebuild_check = H5Sselect_shape_same(sid_reg3, sid_reg_ori3); CHECK(rebuild_check, FALSE, "H5Sselect_shape_same"); - } /* end if */ + } sid_irreg3 = H5Screate_simple(SPACERE3_RANK,dims3,NULL); @@ -12258,11 +12258,11 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } /* No need to do shape comparision */ MESSAGE(7, ("Testing functionality to rebuild 4-D hyperslab selection\n")); @@ -12323,16 +12323,16 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(ret != FAIL) { /* In this case, rebuild_check should be TRUE. */ rebuild_check = H5Sselect_shape_same(sid_reg4, sid_reg_ori4); CHECK(rebuild_check, FALSE, "H5Sselect_shape_same"); - } /* end if */ + } /* Testing irregular selection */ sid_irreg4 = H5Screate_simple(SPACERE4_RANK,dims4,NULL); @@ -12380,11 +12380,11 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } /* No need to do shape comparision */ MESSAGE(7, ("Testing functionality to rebuild 5-D hyperslab selection\n")); @@ -12449,16 +12449,16 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(ret != FAIL) { /* In this case, rebuild_check should be TRUE. */ rebuild_check = H5Sselect_shape_same(sid_reg5, sid_reg_ori5); CHECK(rebuild_check, FALSE, "H5Sselect_shape_same"); - } /* end if */ + } sid_irreg5 = H5Screate_simple(SPACERE5_RANK,dims5,NULL); @@ -12511,11 +12511,11 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } /* No need to do shape comparision */ /* We use 5-D to test a special case with @@ -12558,11 +12558,11 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } /* No need to do shape comparision */ /* Adding some selections to make it real irregular */ @@ -12586,11 +12586,11 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } /* No need to do shape comparision */ /* Add more selections to make it regular again */ @@ -12614,11 +12614,11 @@ test_space_rebuild(void) if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) { ret = FAIL; CHECK(ret,FAIL,"H5S_hyper_rebuild"); - } /* end if */ + } /* No need to do shape comparision */ H5Sclose(sid_reg1); -- cgit v0.12 From 6462c67b6578e48c1ef6d847be59c0b5e3598a50 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Fri, 29 May 2020 14:27:14 -0500 Subject: Patch a few holes in the Splitter VFD implementation. * Missing logfile close on driver-open failure. * Initialize empty string in test/vfd (logfile path in W/O compat check). --- src/H5FDsplitter.c | 3 +++ test/vfd.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index 13816a5..4ed3c4a 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -818,6 +818,9 @@ done: if (file_ptr->wo_file) { H5FD_close(file_ptr->wo_file); } + if (file_ptr->logfp) { + HDfclose(file_ptr->logfp); + } H5FL_FREE(H5FD_splitter_t, file_ptr); } } /* end if error */ diff --git a/test/vfd.c b/test/vfd.c index 97995d2..d94aec6 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -2490,7 +2490,7 @@ driver_is_splitter_compatible(hid_t fapl_id) { H5FD_splitter_vfd_config_t vfd_config; hid_t split_fapl_id = H5I_INVALID_HID; - herr_t ret; + herr_t ret = SUCCEED; int ret_value = 0; split_fapl_id = H5Pcreate(H5P_FILE_ACCESS); @@ -2503,6 +2503,7 @@ driver_is_splitter_compatible(hid_t fapl_id) vfd_config.rw_fapl_id = H5P_DEFAULT; vfd_config.wo_fapl_id = fapl_id; HDstrncpy(vfd_config.wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX); + *vfd_config.log_file_path = '\0'; H5E_BEGIN_TRY { ret = H5Pset_fapl_splitter(split_fapl_id, &vfd_config); -- cgit v0.12 From 5f0eed3fdc4fff9b714b5aa3d0d43114a95c0f29 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 1 Jun 2020 11:37:52 -0700 Subject: Normalization with hdf5_1_10 --- src/H5AC.c | 283 +++++++++++++++++++++++++++--------------------------- src/H5CX.c | 7 +- src/H5Dchunk.c | 17 ++-- src/H5Dfarray.c | 206 +++++++++++++++++++-------------------- src/H5Dnone.c | 42 ++++---- src/H5Dvirtual.c | 2 +- src/H5EA.c | 9 +- src/H5FA.c | 5 - src/H5FAhdr.c | 2 +- src/H5FD.c | 22 ++--- src/H5FDmpio.c | 2 +- src/H5Fint.c | 16 +-- src/H5Fquery.c | 1 + src/H5HLcache.c | 2 +- src/H5L.c | 42 ++++---- src/H5Lexternal.c | 2 +- src/H5Lprivate.h | 2 +- src/H5PB.c | 164 +++++++++++++++---------------- src/H5Pacpl.c | 1 - src/H5Pint.c | 2 +- src/H5Plapl.c | 4 +- src/H5Plcpl.c | 2 +- src/H5Ptest.c | 10 +- src/H5Shyper.c | 94 +++++++++--------- 24 files changed, 466 insertions(+), 473 deletions(-) diff --git a/src/H5AC.c b/src/H5AC.c index 1756107..f8805b3 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -136,14 +136,14 @@ static const H5AC_class_t *const H5AC_class_s[] = { /*------------------------------------------------------------------------- - * Function: H5AC_init + * Function: H5AC_init * - * Purpose: Initialize the interface from some other layer. + * Purpose: Initialize the interface from some other layer. * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, January 18, 2003 * *------------------------------------------------------------------------- @@ -162,13 +162,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5AC__init_package + * Function H5AC__init_package * - * Purpose: Initialize interface-specific information + * Purpose: Initialize interface-specific information * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, July 18, 2002 * *------------------------------------------------------------------------- @@ -198,15 +198,15 @@ H5AC__init_package(void) /*------------------------------------------------------------------------- - * Function: H5AC_term_package + * Function: H5AC_term_package * - * Purpose: Terminate this interface. + * Purpose: Terminate this interface. * - * Return: Success: Positive if anything was done that might - * affect other interfaces; zero otherwise. - * Failure: Negative. + * Return: Success: Positive if anything was done that might + * affect other interfaces; zero otherwise. + * Failure: Negative. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, July 18, 2002 * *------------------------------------------------------------------------- @@ -284,7 +284,7 @@ herr_t H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_config_t * image_config_ptr) { #ifdef H5_HAVE_PARALLEL - char prefix[H5C__PREFIX_LEN] = ""; + char prefix[H5C__PREFIX_LEN] = ""; H5AC_aux_t * aux_ptr = NULL; #endif /* H5_HAVE_PARALLEL */ struct H5C_cache_image_ctl_t int_ci_config = H5C__DEFAULT_CACHE_IMAGE_CTL; @@ -309,9 +309,9 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co #ifdef H5_HAVE_PARALLEL if(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) { - MPI_Comm mpi_comm; - int mpi_rank; - int mpi_size; + MPI_Comm mpi_comm; + int mpi_rank; + int mpi_size; if(MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(f))) HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI communicator") @@ -400,7 +400,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co #endif /* H5_HAVE_PARALLEL */ if(NULL == f->shared->cache) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed") #ifdef H5_HAVE_PARALLEL if(aux_ptr != NULL) @@ -561,12 +561,12 @@ done: * Function: H5AC_evict * * Purpose: Evict all entries except the pinned entries - * in the cache. + * in the cache. * * Return: Non-negative on success/Negative on failure * * Programmer: Vailin Choi - * Dec 2013 + * Dec 2013 * *------------------------------------------------------------------------- */ @@ -600,9 +600,9 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_expunge_entry * - * Purpose: Expunge the target entry from the cache without writing it - * to disk even if it is dirty. The entry must not be either - * pinned or protected. + * Purpose: Expunge the target entry from the cache without writing it + * to disk even if it is dirty. The entry must not be either + * pinned or protected. * * Return: Non-negative on success/Negative on failure * @@ -643,13 +643,13 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_flush * - * Purpose: Flush (and possibly destroy) the metadata cache associated - * with the specified file. + * Purpose: Flush (and possibly destroy) the metadata cache associated + * with the specified file. * - * If the cache contains protected entries, the function will - * fail, as protected entries cannot be flushed. However - * all unprotected entries should be flushed before the - * function returns failure. + * If the cache contains protected entries, the function will + * fail, as protected entries cannot be flushed. However + * all unprotected entries should be flushed before the + * function returns failure. * * Return: Non-negative on success/Negative on failure if there was a * request to flush all items and something was protected. @@ -701,15 +701,15 @@ done: * Function: H5AC_get_entry_status * * Purpose: Given a file address, determine whether the metadata - * cache contains an entry at that location. If it does, - * also determine whether the entry is dirty, protected, - * pinned, etc. and return that information to the caller - * in *status. + * cache contains an entry at that location. If it does, + * also determine whether the entry is dirty, protected, + * pinned, etc. and return that information to the caller + * in *status. * - * If the specified entry doesn't exist, set *status_ptr - * to zero. + * If the specified entry doesn't exist, set *status_ptr + * to zero. * - * On error, the value of *status is undefined. + * On error, the value of *status is undefined. * * Return: Non-negative on success/Negative on failure * @@ -721,14 +721,14 @@ done: herr_t H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status) { - hbool_t in_cache; /* Entry @ addr is in the cache */ - hbool_t is_dirty; /* Entry @ addr is in the cache and dirty */ - hbool_t is_protected; /* Entry @ addr is in the cache and protected */ - hbool_t is_pinned; /* Entry @ addr is in the cache and pinned */ - hbool_t is_corked; - hbool_t is_flush_dep_child; /* Entry @ addr is in the cache and is a flush dependency child */ - hbool_t is_flush_dep_parent; /* Entry @ addr is in the cache and is a flush dependency parent */ - hbool_t image_is_up_to_date; /* Entry @ addr is in the cache and has an up to date image */ + hbool_t in_cache; /* Entry @ addr is in the cache */ + hbool_t is_dirty; /* Entry @ addr is in the cache and dirty */ + hbool_t is_protected; /* Entry @ addr is in the cache and protected */ + hbool_t is_pinned; /* Entry @ addr is in the cache and pinned */ + hbool_t is_corked; + hbool_t is_flush_dep_child; /* Entry @ addr is in the cache and is a flush dependency child */ + hbool_t is_flush_dep_parent; /* Entry @ addr is in the cache and is a flush dependency parent */ + hbool_t image_is_up_to_date; /* Entry @ addr is in the cache and has an up to date image */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -741,21 +741,21 @@ H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_entry_status() failed") if(in_cache) { - *status |= H5AC_ES__IN_CACHE; - if(is_dirty) - *status |= H5AC_ES__IS_DIRTY; - if(is_protected) - *status |= H5AC_ES__IS_PROTECTED; - if(is_pinned) - *status |= H5AC_ES__IS_PINNED; - if(is_corked) - *status |= H5AC_ES__IS_CORKED; - if(is_flush_dep_parent) - *status |= H5AC_ES__IS_FLUSH_DEP_PARENT; - if(is_flush_dep_child) - *status |= H5AC_ES__IS_FLUSH_DEP_CHILD; - if(image_is_up_to_date) - *status |= H5AC_ES__IMAGE_IS_UP_TO_DATE; + *status |= H5AC_ES__IN_CACHE; + if(is_dirty) + *status |= H5AC_ES__IS_DIRTY; + if(is_protected) + *status |= H5AC_ES__IS_PROTECTED; + if(is_pinned) + *status |= H5AC_ES__IS_PINNED; + if(is_corked) + *status |= H5AC_ES__IS_CORKED; + if(is_flush_dep_parent) + *status |= H5AC_ES__IS_FLUSH_DEP_PARENT; + if(is_flush_dep_child) + *status |= H5AC_ES__IS_FLUSH_DEP_CHILD; + if(image_is_up_to_date) + *status |= H5AC_ES__IMAGE_IS_UP_TO_DATE; } /* end if */ else *status = 0; @@ -875,8 +875,8 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_mark_entry_dirty * - * Purpose: Mark a pinned or protected entry as dirty. The target - * entry MUST be either pinned, protected, or both. + * Purpose: Mark a pinned or protected entry as dirty. The target + * entry MUST be either pinned, protected, or both. * * Return: Non-negative on success/Negative on failure * @@ -929,8 +929,8 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_mark_entry_clean * - * Purpose: Mark a pinned entry as clean. The target - * entry MUST be pinned. + * Purpose: Mark a pinned entry as clean. The target + * entry MUST be pinned. * * Return: Non-negative on success/Negative on failure * @@ -982,8 +982,8 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_mark_entry_unserialized * - * Purpose: Mark a pinned or protected entry as unserialized. The target - * entry MUST be either pinned, protected, or both. + * Purpose: Mark a pinned or protected entry as unserialized. The target + * entry MUST be either pinned, protected, or both. * * Return: Non-negative on success/Negative on failure * @@ -1024,8 +1024,8 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_mark_entry_serialized * - * Purpose: Mark a pinned entry as serialized. The target - * entry MUST be pinned. + * Purpose: Mark a pinned entry as serialized. The target + * entry MUST be pinned. * * Return: Non-negative on success/Negative on failure * @@ -1124,7 +1124,7 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_pin_protected_entry() * - * Purpose: Pin a protected cache entry. The entry must be protected + * Purpose: Pin a protected cache entry. The entry must be protected * at the time of call, and must be unpinned. * * Return: Non-negative on success/Negative on failure @@ -1205,7 +1205,7 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_create_flush_dependency() * - * Purpose: Create a flush dependency between two entries in the metadata + * Purpose: Create a flush dependency between two entries in the metadata * cache. * * Return: Non-negative on success/Negative on failure @@ -1250,16 +1250,16 @@ done: * Function: H5AC_protect * * Purpose: If the target entry is not in the cache, load it. If - * necessary, attempt to evict one or more entries to keep - * the cache within its maximum size. + * necessary, attempt to evict one or more entries to keep + * the cache within its maximum size. * - * Mark the target entry as protected, and return its address - * to the caller. The caller must call H5AC_unprotect() when - * finished with the entry. + * Mark the target entry as protected, and return its address + * to the caller. The caller must call H5AC_unprotect() when + * finished with the entry. * - * While it is protected, the entry may not be either evicted - * or flushed -- nor may it be accessed by another call to - * H5AC_protect. Any attempt to do so will result in a failure. + * While it is protected, the entry may not be either evicted + * or flushed -- nor may it be accessed by another call to + * H5AC_protect. Any attempt to do so will result in a failure. * * Return: Success: Ptr to the object. * Failure: NULL @@ -1301,7 +1301,7 @@ H5AC_protect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *udata, /* Check for invalid access request */ if((0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) && (0 == (flags & H5C__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file") #if H5AC_DO_TAGGING_SANITY_CHECKS if(!H5C_get_ignore_tags(f->shared->cache) && H5AC__verify_tag(type) < 0) @@ -1331,7 +1331,7 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_resize_entry * - * Purpose: Resize a pinned or protected entry. + * Purpose: Resize a pinned or protected entry. * * Return: Non-negative on success/Negative on failure * @@ -1384,8 +1384,8 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_unpin_entry() * - * Purpose: Unpin a cache entry. The entry must be unprotected at - * the time of call, and must be pinned. + * Purpose: Unpin a cache entry. The entry must be unprotected at + * the time of call, and must be pinned. * * Return: Non-negative on success/Negative on failure * @@ -1427,7 +1427,7 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_destroy_flush_dependency() * - * Purpose: Destroy a flush dependency between two entries. + * Purpose: Destroy a flush dependency between two entries. * * Return: Non-negative on success/Negative on failure * @@ -1470,27 +1470,27 @@ done: /*------------------------------------------------------------------------- * Function: H5AC_unprotect * - * Purpose: Undo an H5AC_protect() call -- specifically, mark the - * entry as unprotected, remove it from the protected list, - * and give it back to the replacement policy. + * Purpose: Undo an H5AC_protect() call -- specifically, mark the + * entry as unprotected, remove it from the protected list, + * and give it back to the replacement policy. * - * The TYPE and ADDR arguments must be the same as those in - * the corresponding call to H5AC_protect() and the THING - * argument must be the value returned by that call to - * H5AC_protect(). + * The TYPE and ADDR arguments must be the same as those in + * the corresponding call to H5AC_protect() and the THING + * argument must be the value returned by that call to + * H5AC_protect(). * - * If the deleted flag is TRUE, simply remove the target entry - * from the cache, clear it, and free it without writing it to - * disk. + * If the deleted flag is TRUE, simply remove the target entry + * from the cache, clear it, and free it without writing it to + * disk. * - * This version of the function is a complete re-write to - * use the new metadata cache. While there isn't all that - * much difference between the old and new Purpose sections, - * the original version is given below. + * This version of the function is a complete re-write to + * use the new metadata cache. While there isn't all that + * much difference between the old and new Purpose sections, + * the original version is given below. * - * Original purpose section: + * Original purpose section: * - * This function should be called to undo the effect of + * This function should be called to undo the effect of * H5AC_protect(). The TYPE and ADDR arguments should be the * same as the corresponding call to H5AC_protect() and the * THING argument should be the value returned by H5AC_protect(). @@ -1509,8 +1509,8 @@ herr_t H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, unsigned flags) { - hbool_t dirtied; - hbool_t deleted; + hbool_t dirtied; + hbool_t deleted; #ifdef H5_HAVE_PARALLEL H5AC_aux_t * aux_ptr = NULL; #endif /* H5_HAVE_PARALLEL */ @@ -1531,14 +1531,14 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, HDassert( ((H5AC_info_t *)thing)->type == type ); dirtied = (hbool_t)(((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG) || - (((H5AC_info_t *)thing)->dirtied)); + (((H5AC_info_t *)thing)->dirtied)); deleted = (hbool_t)((flags & H5C__DELETED_FLAG) == H5C__DELETED_FLAG); /* Check if the size changed out from underneath us, if we're not deleting * the entry. */ if(dirtied && !deleted) { - size_t curr_size = 0; + size_t curr_size = 0; if((type->image_len)(thing, &curr_size) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTGETSIZE, FAIL, "Can't get size of thing") @@ -1625,7 +1625,7 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr, if(internal_config.rpt_fcn == NULL) config_ptr->rpt_fcn_enabled = FALSE; else - config_ptr->rpt_fcn_enabled = TRUE; + config_ptr->rpt_fcn_enabled = TRUE; config_ptr->open_trace_file = FALSE; config_ptr->close_trace_file = FALSE; config_ptr->trace_file_name[0] = '\0'; @@ -1658,12 +1658,12 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr, if(NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr))) { config_ptr->dirty_bytes_threshold = aux_ptr->dirty_bytes_threshold; - config_ptr->metadata_write_strategy = aux_ptr->metadata_write_strategy; + config_ptr->metadata_write_strategy = aux_ptr->metadata_write_strategy; } /* end if */ else { #endif /* H5_HAVE_PARALLEL */ config_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD; - config_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY; + config_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY; #ifdef H5_HAVE_PARALLEL } /* end else */ } @@ -1800,7 +1800,7 @@ herr_t H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, H5AC_cache_config_t *config_ptr) { H5C_auto_size_ctl_t internal_config; - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1880,16 +1880,16 @@ done: * Function: H5AC_validate_config() * * Purpose: Run a sanity check on the contents of the supplied - * instance of H5AC_cache_config_t. + * instance of H5AC_cache_config_t. * * Do nothing and return SUCCEED if no errors are detected, * and flag an error and return FAIL otherwise. * - * At present, this function operates by packing the data - * from the instance of H5AC_cache_config_t into an instance - * of H5C_auto_size_ctl_t, and then calling - * H5C_validate_resize_config(). As H5AC_cache_config_t and - * H5C_auto_size_ctl_t diverge, we may have to change this. + * At present, this function operates by packing the data + * from the instance of H5AC_cache_config_t into an instance + * of H5C_auto_size_ctl_t, and then calling + * H5C_validate_resize_config(). As H5AC_cache_config_t and + * H5C_auto_size_ctl_t diverge, we may have to change this. * * Return: Non-negative on success/Negative on failure * @@ -1914,7 +1914,7 @@ H5AC_validate_config(H5AC_cache_config_t *config_ptr) /* don't bother to test trace_file_name unless open_trace_file is TRUE */ if(config_ptr->open_trace_file) { - size_t name_len; + size_t name_len; /* Can't really test the trace_file_name field without trying to * open the file, so we will content ourselves with a couple of @@ -1957,17 +1957,17 @@ done: * Function: H5AC_validate_cache_image_config() * * Purpose: Run a sanity check on the contents of the supplied - * instance of H5AC_cache_image_config_t. + * instance of H5AC_cache_image_config_t. * * Do nothing and return SUCCEED if no errors are detected, * and flag an error and return FAIL otherwise. * - * At present, this function operates by packing the data - * from the instance of H5AC_cache_image_config_t into an - * instance of H5C_cache_image_ctl_t, and then calling - * H5C_validate_cache_image_config(). If and when + * At present, this function operates by packing the data + * from the instance of H5AC_cache_image_config_t into an + * instance of H5C_cache_image_ctl_t, and then calling + * H5C_validate_cache_image_config(). If and when * H5AC_cache_image_config_t and H5C_cache_image_ctl_t - * diverge, we may have to change this. + * diverge, we may have to change this. * * Return: Non-negative on success/Negative on failure * @@ -2013,13 +2013,13 @@ done: * Function: H5AC__check_if_write_permitted * * Purpose: Determine if a write is permitted under the current - * circumstances, and set *write_permitted_ptr accordingly. - * As a general rule it is, but when we are running in parallel - * mode with collective I/O, we must ensure that a read cannot - * cause a write. + * circumstances, and set *write_permitted_ptr accordingly. + * As a general rule it is, but when we are running in parallel + * mode with collective I/O, we must ensure that a read cannot + * cause a write. * - * In the event of failure, the value of *write_permitted_ptr - * is undefined. + * In the event of failure, the value of *write_permitted_ptr + * is undefined. * * Return: Non-negative on success/Negative on failure. * @@ -2035,9 +2035,9 @@ H5_ATTR_UNUSED *f, hbool_t *write_permitted_ptr) { #ifdef H5_HAVE_PARALLEL - H5AC_aux_t * aux_ptr = NULL; + H5AC_aux_t * aux_ptr = NULL; #endif /* H5_HAVE_PARALLEL */ - hbool_t write_permitted = TRUE; + hbool_t write_permitted = TRUE; FUNC_ENTER_STATIC_NOERR @@ -2051,9 +2051,9 @@ H5_ATTR_UNUSED HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); if((aux_ptr->mpi_rank == 0) || (aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED)) - write_permitted = aux_ptr->write_permitted; + write_permitted = aux_ptr->write_permitted; else - write_permitted = FALSE; + write_permitted = FALSE; } /* end if */ #endif /* H5_HAVE_PARALLEL */ @@ -2067,12 +2067,12 @@ H5_ATTR_UNUSED * Function: H5AC__ext_config_2_int_config() * * Purpose: Utility function to translate an instance of - * H5AC_cache_config_t to an instance of H5C_auto_size_ctl_t. + * H5AC_cache_config_t to an instance of H5C_auto_size_ctl_t. * - * Places translation in *int_conf_ptr and returns SUCCEED - * if successful. Returns FAIL on failure. + * Places translation in *int_conf_ptr and returns SUCCEED + * if successful. Returns FAIL on failure. * - * Does only minimal sanity checking. + * Does only minimal sanity checking. * * Return: Non-negative on success/Negative on failure * @@ -2453,7 +2453,7 @@ done: * Purpose: Given a file address, retrieve the ring for an entry at that * address. * - * On error, the value of *ring is not modified. + * On error, the value of *ring is not modified. * * Return: Non-negative on success/Negative on failure * @@ -2531,11 +2531,11 @@ H5AC_set_ring(H5AC_ring_t ring, H5AC_ring_t *orig_ring) * are in the process of a file shutdown, post an error * message, and return FAIL. * - * Note that this function simply passes the call on to - * the metadata cache proper, and returns the result. + * Note that this function simply passes the call on to + * the metadata cache proper, and returns the result. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * * Programmer: Quincey Koziol * September 17, 2016 @@ -2608,7 +2608,7 @@ done: * Function: H5AC_remove_entry() * * Purpose: Remove an entry from the cache. Must be not protected, pinned, - * dirty, involved in flush dependencies, etc. + * dirty, involved in flush dependencies, etc. * * Return: Non-negative on success/Negative on failure * @@ -2669,3 +2669,4 @@ H5AC_get_mdc_image_info(H5AC_t *cache_ptr, haddr_t *image_addr, hsize_t *image_l done: FUNC_LEAVE_NOAPI(ret_value) } /* H5AC_get_mdc_image_info() */ + diff --git a/src/H5CX.c b/src/H5CX.c index df335ea..6f4caa8 100644 --- a/src/H5CX.c +++ b/src/H5CX.c @@ -295,8 +295,8 @@ typedef struct H5CX_t { hbool_t nlinks_valid; /* Whether number of soft / UD links to traverse is valid */ /* Cached DCPL properties */ - hbool_t do_min_dset_ohdr; /* Whether to minimize dataset object header */ - hbool_t do_min_dset_ohdr_valid; /* Whether minimize dataset object header flag is valid */ + hbool_t do_min_dset_ohdr; /* Whether to minimize dataset object header */ + hbool_t do_min_dset_ohdr_valid; /* Whether minimize dataset object header flag is valid */ uint8_t ohdr_flags; /* Object header flags */ hbool_t ohdr_flags_valid; /* Whether the object headers flags are valid */ @@ -581,7 +581,6 @@ H5CX__init_package(void) if(H5P_get(la_plist, H5L_ACS_NLINKS_NAME, &H5CX_def_lapl_cache.nlinks) < 0) HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve number of soft / UD links to traverse") - /* Reset the "default DCPL cache" information */ HDmemset(&H5CX_def_dcpl_cache, 0, sizeof(H5CX_dcpl_cache_t)); @@ -1171,6 +1170,7 @@ H5CX_set_dcpl(hid_t dcpl_id) FUNC_LEAVE_NOAPI_VOID } /* end H5CX_set_dcpl() */ + /*------------------------------------------------------------------------- * Function: H5CX_set_libver_bounds * @@ -2593,6 +2593,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5CX_get_nlinks() */ + /*------------------------------------------------------------------------- * Function: H5CX_get_libver_bounds * diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index e760f63..90516c6 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -216,6 +216,7 @@ typedef struct H5D_chunk_readvv_ud_t { const H5D_t *dset; /* Dataset to operate on */ } H5D_chunk_readvv_ud_t; +/* Typedef for chunk info iterator callback */ typedef struct H5D_chunk_info_iter_ud_t { hsize_t scaled[H5O_LAYOUT_NDIMS]; /* Logical offset of the chunk */ hsize_t ndims; /* Number of dimensions in the dataset */ @@ -433,7 +434,7 @@ H5D__chunk_direct_write(const H5D_t *dset, uint32_t filters, hsize_t *offset, /* Allocate storage */ if(H5D__alloc_storage(&io_info, 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); @@ -4852,7 +4853,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[]) /* Check if the dataspace expanded enough to cause the old edge chunks * in this dimension to become full */ - if((space_dim[op_dim]/chunk_dim[op_dim]) >= (old_edge_chunk_sc[op_dim] + 1)) + if((space_dim[op_dim]/chunk_dim[op_dim]) >= (old_edge_chunk_sc[op_dim] + 1)) new_full_dim[op_dim] = TRUE; } /* end for */ @@ -7306,9 +7307,9 @@ H5D__get_chunk_info(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_ idx_info.storage = &dset->shared->layout.storage.u.chunk; /* Set addr & size for when dset is not written or queried chunk is not found */ - if(addr) + if (addr) *addr = HADDR_UNDEF; - if(size) + if (size) *size = 0; /* If the chunk is written, get its info, otherwise, return without error */ @@ -7374,12 +7375,12 @@ H5D__get_chunk_info_by_coord_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) HDassert(chunk_info); /* Going through the scaled, stop when a mismatch is found */ - for(ii = 0; ii < chunk_info->ndims && !different; ii++) - if(chunk_info->scaled[ii] != chunk_rec->scaled[ii]) + for (ii = 0; ii < chunk_info->ndims && !different; ii++) + if (chunk_info->scaled[ii] != chunk_rec->scaled[ii]) different = TRUE; /* Same scaled coords means the chunk is found, copy the chunk info */ - if(!different) { + if (!different) { chunk_info->nbytes = chunk_rec->nbytes; chunk_info->filter_mask = chunk_rec->filter_mask; chunk_info->chunk_addr = chunk_rec->chunk_addr; @@ -7387,7 +7388,7 @@ H5D__get_chunk_info_by_coord_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Stop iterating */ ret_value = H5_ITER_STOP; - } /* end if */ + } FUNC_LEAVE_NOAPI(ret_value) } /* H5D__get_chunk_info_by_coord_cb() */ diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c index cbaa52d..4eedf04 100644 --- a/src/H5Dfarray.c +++ b/src/H5Dfarray.c @@ -11,12 +11,12 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Programmer: Vailin Choi - * Thursday, April 30, 2009 +/* Programmer: Vailin Choi + * Thursday, April 30, 2009 * - * Purpose: Fixed array indexed (chunked) I/O functions. - * The chunk coordinate is mapped as an index into an array of - * disk addresses for the chunks. + * Purpose: Fixed array indexed (chunked) I/O functions. + * The chunk coordinate is mapped as an index into an array of + * disk addresses for the chunks. * */ @@ -30,13 +30,13 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Dpkg.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FAprivate.h" /* Fixed arrays */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5MFprivate.h" /* File space management */ -#include "H5VMprivate.h" /* Vector functions */ +#include "H5private.h" /* Generic Functions */ +#include "H5Dpkg.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FAprivate.h" /* Fixed arrays */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5MFprivate.h" /* File space management */ +#include "H5VMprivate.h" /* Vector functions */ /****************/ @@ -212,14 +212,14 @@ H5FL_DEFINE_STATIC(H5D_farray_ctx_ud_t); /*------------------------------------------------------------------------- - * Function: H5D__farray_crt_context + * Function: H5D__farray_crt_context * - * Purpose: Create context for callbacks + * Purpose: Create context for callbacks * - * Return: Success: non-NULL - * Failure: NULL + * Return: Success: non-NULL + * Failure: NULL * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -534,7 +534,7 @@ done: static herr_t H5D__farray_dst_dbg_context(void *_dbg_ctx) { - H5D_farray_ctx_ud_t *dbg_ctx = (H5D_farray_ctx_ud_t *)_dbg_ctx; /* Context for fixed array callback */ + H5D_farray_ctx_ud_t *dbg_ctx = (H5D_farray_ctx_ud_t *)_dbg_ctx; /* Context for fixed array callback */ FUNC_ENTER_STATIC_NOERR @@ -612,7 +612,7 @@ H5D__farray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx /* Encode element */ /* (advances 'raw' pointer) */ H5F_addr_encode_len(ctx->file_addr_len, &raw, elmt->addr); - UINT64ENCODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len); + UINT64ENCODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len); UINT32ENCODE(raw, elmt->filter_mask); /* Advance native element pointer */ @@ -658,7 +658,7 @@ H5D__farray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx /* Decode element */ /* (advances 'raw' pointer) */ H5F_addr_decode_len(ctx->file_addr_len, &raw, &elmt->addr); - UINT64DECODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len); + UINT64DECODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len); UINT32DECODE(raw, elmt->filter_mask); /* Advance native element pointer */ @@ -836,7 +836,7 @@ H5D__farray_idx_open(const H5D_chk_idx_info_t *idx_info) /* Open the fixed array for the chunk index */ if(NULL == (idx_info->storage->u.farray.fa = H5FA_open(idx_info->f, idx_info->storage->idx_addr, &udata))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open fixed array") /* Check for SWMR writes to the file */ if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) @@ -887,7 +887,7 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info) /* General parameters */ if(idx_info->pline->nused > 0) { - unsigned chunk_size_len; /* Size of encoded chunk size */ + unsigned chunk_size_len; /* Size of encoded chunk size */ /* Compute the size required for encoding the size of a chunk, allowing * for an extra byte, in case the filter makes the chunk larger. @@ -913,11 +913,11 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info) /* Create the fixed array for the chunk index */ if(NULL == (idx_info->storage->u.farray.fa = H5FA_create(idx_info->f, &cparam, &udata))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create fixed array") /* Get the address of the fixed array in file */ if(H5FA_get_addr(idx_info->storage->u.farray.fa, &(idx_info->storage->idx_addr)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array address") /* Check for SWMR writes to the file */ if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) @@ -988,7 +988,7 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata if(H5D__farray_idx_open(idx_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array") } else /* Patch the top level file pointer contained in fa if needed */ - H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f); + H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f); /* Set convenience pointer to fixed array structure */ fa = idx_info->storage->u.farray.fa; @@ -1002,13 +1002,13 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata if(idx_info->pline->nused > 0) { H5D_farray_filt_elmt_t elmt; /* Fixed array element */ - elmt.addr = udata->chunk_block.offset; + elmt.addr = udata->chunk_block.offset; H5_CHECKED_ASSIGN(elmt.nbytes, uint32_t, udata->chunk_block.length, hsize_t); elmt.filter_mask = udata->filter_mask; /* Set the info for the chunk */ if(H5FA_set(fa, udata->chunk_idx, &elmt) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info") } /* end if */ else { /* Set the address for the chunk */ @@ -1022,15 +1022,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__farray_idx_get_addr + * Function: H5D__farray_idx_get_addr * - * Purpose: Get the file address of a chunk if file space has been - * assigned. Save the retrieved information in the udata - * supplied. + * Purpose: Get the file address of a chunk if file space has been + * assigned. Save the retrieved information in the udata + * supplied. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1038,9 +1038,9 @@ done: static herr_t H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata) { - H5FA_t *fa; /* Pointer to fixed array structure */ - hsize_t idx; /* Array index of chunk */ - herr_t ret_value = SUCCEED; /* Return value */ + H5FA_t *fa; /* Pointer to fixed array structure */ + hsize_t idx; /* Array index of chunk */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1059,7 +1059,7 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda if(H5D__farray_idx_open(idx_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array") } else /* Patch the top level file pointer contained in fa if needed */ - H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f); + H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f); /* Set convenience pointer to fixed array structure */ fa = idx_info->storage->u.farray.fa; @@ -1088,12 +1088,12 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address") /* Update the other (constant) information for the chunk */ - udata->chunk_block.length = idx_info->layout->size; + udata->chunk_block.length = idx_info->layout->size; udata->filter_mask = 0; } /* end else */ if(!H5F_addr_defined(udata->chunk_block.offset)) - udata->chunk_block.length = 0; + udata->chunk_block.length = 0; done: FUNC_LEAVE_NOAPI(ret_value) @@ -1101,13 +1101,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__farray_idx_iterate_cb + * Function: H5D__farray_idx_iterate_cb * - * Purpose: Callback routine for fixed array element iteration. + * Purpose: Callback routine for fixed array element iteration. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1135,8 +1135,8 @@ H5D__farray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void * /* Make "generic chunk" callback */ if(H5F_addr_defined(udata->chunk_rec.chunk_addr)) - if((ret_value = (udata->cb)(&udata->chunk_rec, udata->udata)) < 0) - HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback"); + if((ret_value = (udata->cb)(&udata->chunk_rec, udata->udata)) < 0) + HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback"); /* Update coordinates of chunk in dataset */ ndims = udata->common.layout->ndims - 1; @@ -1161,14 +1161,14 @@ H5D__farray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void * /*------------------------------------------------------------------------- - * Function: H5D__farray_idx_iterate + * Function: H5D__farray_idx_iterate * - * Purpose: Iterate over the chunks in an index, making a callback + * Purpose: Iterate over the chunks in an index, making a callback * for each one. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1199,35 +1199,35 @@ H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info, if(H5D__farray_idx_open(idx_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array") } else /* Patch the top level file pointer contained in fa if needed */ - H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f); + H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f); /* Set convenience pointer to fixed array structure */ fa = idx_info->storage->u.farray.fa; /* Get the fixed array statistics */ if(H5FA_get_stats(fa, &fa_stat) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics") /* Check if there are any array elements */ if(fa_stat.nelmts > 0) { H5D_farray_it_ud_t udata; /* User data for iteration callback */ - /* Initialize userdata */ - HDmemset(&udata, 0, sizeof udata); - udata.common.layout = idx_info->layout; - udata.common.storage = idx_info->storage; + /* Initialize userdata */ + HDmemset(&udata, 0, sizeof udata); + udata.common.layout = idx_info->layout; + udata.common.storage = idx_info->storage; HDmemset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec)); udata.filtered = (idx_info->pline->nused > 0); if(!udata.filtered) { udata.chunk_rec.nbytes = idx_info->layout->size; udata.chunk_rec.filter_mask = 0; } /* end if */ - udata.cb = chunk_cb; - udata.udata = chunk_udata; + udata.cb = chunk_cb; + udata.udata = chunk_udata; /* Iterate over the fixed array elements */ - if((ret_value = H5FA_iterate(fa, H5D__farray_idx_iterate_cb, &udata)) < 0) - HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over fixed array chunk index"); + if((ret_value = H5FA_iterate(fa, H5D__farray_idx_iterate_cb, &udata)) < 0) + HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over fixed array chunk index"); } /* end if */ done: @@ -1236,13 +1236,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__farray_idx_remove + * Function: H5D__farray_idx_remove * - * Purpose: Remove chunk from index. + * Purpose: Remove chunk from index. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1250,9 +1250,9 @@ done: static herr_t H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata) { - H5FA_t *fa; /* Pointer to fixed array structure */ - hsize_t idx; /* Array index of chunk */ - herr_t ret_value = SUCCEED; /* Return value */ + H5FA_t *fa; /* Pointer to fixed array structure */ + hsize_t idx; /* Array index of chunk */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1271,7 +1271,7 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t if(H5D__farray_idx_open(idx_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array") } else /* Patch the top level file pointer contained in fa if needed */ - if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0) + if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch fixed array file pointer") /* Set convenience pointer to fixed array structure */ @@ -1330,14 +1330,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__farray_idx_delete_cb + * Function: H5D__farray_idx_delete_cb * - * Purpose: Delete space for chunk in file + * Purpose: Delete space for chunk in file * - * Return: Success: Non-negative - * Failure: negative + * Return: Success: Non-negative + * Failure: negative * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1367,15 +1367,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__farray_idx_delete + * Function: H5D__farray_idx_delete * - * Purpose: Delete index and raw data storage for entire dataset + * Purpose: Delete index and raw data storage for entire dataset * (i.e. all chunks) * - * Return: Success: Non-negative - * Failure: negative + * Return: Success: Non-negative + * Failure: negative * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1398,7 +1398,7 @@ H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info) if(H5F_addr_defined(idx_info->storage->idx_addr)) { H5D_farray_ctx_ud_t ctx_udata; /* User data for fixed array open call */ - /* Iterate over the chunk addresses in the fixed array, deleting each chunk */ + /* Iterate over the chunk addresses in the fixed array, deleting each chunk */ if(H5D__farray_idx_iterate(idx_info, H5D__farray_idx_delete_cb, idx_info->f) < 0) HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk addresses") @@ -1425,13 +1425,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__farray_idx_copy_setup + * Function: H5D__farray_idx_copy_setup * - * Purpose: Set up any necessary information for copying chunks + * Purpose: Set up any necessary information for copying chunks * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1480,13 +1480,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__farray_idx_copy_shutdown + * Function: H5D__farray_idx_copy_shutdown * - * Purpose: Shutdown any information from copying chunks + * Purpose: Shutdown any information from copying chunks * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1526,7 +1526,7 @@ done: * Return: Success: Non-negative * Failure: negative * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1558,7 +1558,7 @@ H5D__farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size) /* Get the fixed array statistics */ if(H5FA_get_stats(fa, &fa_stat) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics") *index_size = fa_stat.hdr_size; *index_size += fa_stat.dblk_size; @@ -1575,13 +1575,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__farray_idx_reset + * Function: H5D__farray_idx_reset * - * Purpose: Reset indexing information. + * Purpose: Reset indexing information. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1596,7 +1596,7 @@ H5D__farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr) /* Reset index info */ if(reset_addr) - storage->idx_addr = HADDR_UNDEF; + storage->idx_addr = HADDR_UNDEF; storage->u.farray.fa = NULL; FUNC_LEAVE_NOAPI(SUCCEED) @@ -1604,13 +1604,13 @@ H5D__farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr) /*------------------------------------------------------------------------- - * Function: H5D__farray_idx_dump + * Function: H5D__farray_idx_dump * - * Purpose: Dump indexing information to a stream. + * Purpose: Dump indexing information to a stream. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1631,13 +1631,13 @@ H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) /*------------------------------------------------------------------------- - * Function: H5D__farray_idx_dest + * Function: H5D__farray_idx_dest * - * Purpose: Release indexing information in memory. + * Purpose: Release indexing information in memory. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Thursday, April 30, 2009 * *------------------------------------------------------------------------- @@ -1657,8 +1657,8 @@ H5D__farray_idx_dest(const H5D_chk_idx_info_t *idx_info) /* Check if the fixed array is open */ if(idx_info->storage->u.farray.fa) { - /* Patch the top level file pointer contained in fa if needed */ - if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0) + /* Patch the top level file pointer contained in fa if needed */ + if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch fixed array file pointer") /* Close fixed array */ diff --git a/src/H5Dnone.c b/src/H5Dnone.c index 5ba3f5b..40ddcb8 100644 --- a/src/H5Dnone.c +++ b/src/H5Dnone.c @@ -267,31 +267,31 @@ H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info, /* Iterate over all the chunks in the dataset's dataspace */ for(u = 0; u < idx_info->layout->nchunks && ret_value == H5_ITER_CONT; u++) { - /* Calculate the index of this chunk */ - idx = H5VM_array_offset_pre(ndims, idx_info->layout->max_down_chunks, chunk_rec.scaled); + /* Calculate the index of this chunk */ + idx = H5VM_array_offset_pre(ndims, idx_info->layout->max_down_chunks, chunk_rec.scaled); - /* Calculate the address of the chunk */ - chunk_rec.chunk_addr = idx_info->storage->idx_addr + idx * idx_info->layout->size; + /* Calculate the address of the chunk */ + chunk_rec.chunk_addr = idx_info->storage->idx_addr + idx * idx_info->layout->size; - /* Make "generic chunk" callback */ - if((ret_value = (*chunk_cb)(&chunk_rec, chunk_udata)) < 0) + /* Make "generic chunk" callback */ + if((ret_value = (*chunk_cb)(&chunk_rec, chunk_udata)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CALLBACK, H5_ITER_ERROR, "failure in generic chunk iterator callback") - /* Update coordinates of chunk in dataset */ - curr_dim = (int)(ndims - 1); - while(curr_dim >= 0) { - /* Increment coordinate in current dimension */ - chunk_rec.scaled[curr_dim]++; - - /* Check if we went off the end of the current dimension */ - if(chunk_rec.scaled[curr_dim] >= idx_info->layout->chunks[curr_dim]) { - /* Reset coordinate & move to next faster dimension */ - chunk_rec.scaled[curr_dim] = 0; - curr_dim--; - } /* end if */ - else - break; - } /* end while */ + /* Update coordinates of chunk in dataset */ + curr_dim = (int)(ndims - 1); + while(curr_dim >= 0) { + /* Increment coordinate in current dimension */ + chunk_rec.scaled[curr_dim]++; + + /* Check if we went off the end of the current dimension */ + if(chunk_rec.scaled[curr_dim] >= idx_info->layout->chunks[curr_dim]) { + /* Reset coordinate & move to next faster dimension */ + chunk_rec.scaled[curr_dim] = 0; + curr_dim--; + } /* end if */ + else + break; + } /* end while */ } /* end for */ done: diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 877aadb..e07f538 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1120,7 +1120,7 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, /* Copy string to *p. Note that since src in not NULL terminated, we must * use memcpy */ - (void)H5MM_memcpy(*p, src, src_len); + H5MM_memcpy(*p, src, src_len); /* Advance *p */ *p += src_len; diff --git a/src/H5EA.c b/src/H5EA.c index 96eee12..56663dc 100644 --- a/src/H5EA.c +++ b/src/H5EA.c @@ -991,11 +991,6 @@ END_FUNC(PRIV) /* end H5EA_delete() */ * * Programmer: Vailin Choi; Feb 2015 * - * Modification: - * Prototype changed (HDFFV-10661) - * - herr_t to int - * - SUCCEED/FAIL to H5_ITER_CONT/H5_ITER_ERROR - * June 6, 2019 -BMR *------------------------------------------------------------------------- */ BEGIN_FUNC(PRIV, ERR, @@ -1007,9 +1002,7 @@ H5EA_iterate(H5EA_t *ea, H5EA_operator_t op, void *udata)) hsize_t u; int cb_ret = H5_ITER_CONT; /* Return value from callback */ - /* - * Check arguments. - */ + /* Check arguments */ HDassert(ea); HDassert(op); HDassert(udata); diff --git a/src/H5FA.c b/src/H5FA.c index df53f27..f8bb094 100644 --- a/src/H5FA.c +++ b/src/H5FA.c @@ -691,11 +691,6 @@ END_FUNC(PRIV) /* end H5FA_delete() */ * Programmer: Vailin Choi * Thursday, April 30, 2009 * - * Modification: - * Prototype changed (HDFFV-10661) - * - herr_t to int - * - SUCCEED/FAIL to H5_ITER_CONT/H5_ITER_ERROR - * June 6, 2019 -BMR *------------------------------------------------------------------------- */ BEGIN_FUNC(PRIV, ERR, diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c index 8f29b83..506c767 100644 --- a/src/H5FAhdr.c +++ b/src/H5FAhdr.c @@ -39,7 +39,7 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5FApkg.h" /* Fixed Arrays */ #include "H5MFprivate.h" /* File memory management */ -#include "H5MMprivate.h" /* Memory management */ +#include "H5MMprivate.h" /* Memory management */ /****************/ diff --git a/src/H5FD.c b/src/H5FD.c index 63112bd..2e80c7f 100644 --- a/src/H5FD.c +++ b/src/H5FD.c @@ -789,7 +789,7 @@ done: * will be all zero during the driver close callback like during * the 'open' callback. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ @@ -1088,7 +1088,7 @@ done: * doesn't map to a free list then either the application 'free' * callback is invoked (if defined) or the memory is leaked. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ @@ -1382,11 +1382,11 @@ done: * be the constant H5P_DEFAULT). The result is written into the * buffer BUF. * - * Return: Success: SUCCEED + * Return: Success: Non-negative * The read result is written into the BUF buffer * which should be allocated by the caller. * - * Failure: FAIL + * Failure: Negative * The contents of BUF are undefined. * *------------------------------------------------------------------------- @@ -1436,7 +1436,7 @@ done: * constant H5P_DEFAULT). The bytes to be written come from the * buffer BUF. * - * Return: SUCCEED/FAIL + * Return: SNon-negative on success/Negative on failure * *------------------------------------------------------------------------- */ @@ -1483,7 +1483,7 @@ done: * Purpose: Notify driver to flush all cached data. If the driver has no * flush method then nothing happens. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failureL * *------------------------------------------------------------------------- */ @@ -1553,7 +1553,7 @@ done: * * Purpose: Notify driver to truncate the file back to the allocated size. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ @@ -1622,7 +1622,7 @@ done: * * Purpose: Set a file lock * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ @@ -1684,7 +1684,7 @@ done: * * Purpose: Remove a file lock * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ @@ -1773,7 +1773,7 @@ H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum) * Purpose: Returns a pointer to the file handle of low-level virtual * file driver. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * *-------------------------------------------------------------------------- */ @@ -1919,7 +1919,7 @@ H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged) * can't use the file to get the driver, the driver ID is passed * in as a parameter. * -* Return: SUCCEED/FAIL +* Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 8c7e91a..3d2e0cf 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -15,7 +15,7 @@ * Programmer: Robb Matzke * Thursday, July 29, 1999 * - * Purpose: This is the MPI-2 I/O driver. + * Purpose: This is the MPI-2 I/O driver. * */ diff --git a/src/H5Fint.c b/src/H5Fint.c index e4c8229..d50baad 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -391,7 +391,7 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id if(H5I_iterate(H5I_DATASET, H5F__get_objects_cb, &olist, app_ref) < 0) HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(2)") } /* end if */ - } /* end if */ + } /* If the caller just wants to count the number of objects (OLIST.MAX_NOBJS is zero), * or the caller wants to get the list of IDs and the list isn't full, @@ -402,8 +402,8 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id olist.obj_type = H5I_GROUP; if(H5I_iterate(H5I_GROUP, H5F__get_objects_cb, &olist, app_ref) < 0) HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(3)") - } /* end if */ - } /* end if */ + } + } /* If the caller just wants to count the number of objects (OLIST.MAX_NOBJS is zero), * or the caller wants to get the list of IDs and the list isn't full, @@ -415,7 +415,7 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id if(H5I_iterate(H5I_DATATYPE, H5F__get_objects_cb, &olist, app_ref) < 0) HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(4)") } /* end if */ - } /* end if */ + } /* If the caller just wants to count the number of objects (OLIST.MAX_NOBJS is zero), * or the caller wants to get the list of IDs and the list isn't full, @@ -427,7 +427,7 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id if(H5I_iterate(H5I_ATTR, H5F__get_objects_cb, &olist, app_ref) < 0) HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(5)") } /* end if */ - } /* end if */ + } /* Set the number of objects currently open */ *obj_id_count_ptr = obj_id_count; @@ -1066,12 +1066,12 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F f->shared->feature_flags &= ~(unsigned)H5FD_FEAT_ACCUMULATE_METADATA; if(H5FD_set_feature_flags(f->shared->lf, f->shared->feature_flags) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "can't set feature_flags in VFD") - } /* end if */ + } else { /* If no value for read attempts has been set, use the default */ if(!f->shared->read_attempts) f->shared->read_attempts = H5F_METADATA_READ_ATTEMPTS; - } /* end else */ + } /* Determine the # of bins for metdata read retries */ if(H5F_set_retries(f) < 0) @@ -2298,7 +2298,7 @@ H5F_get_id(H5F_t *file) if((ret_value = H5VL_wrap_register(H5I_FILE, file, FALSE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group") file->id_exists = TRUE; - } /* end if */ + } else { /* Increment reference count on existing ID */ if(H5I_inc_ref(ret_value, FALSE) < 0) diff --git a/src/H5Fquery.c b/src/H5Fquery.c index 68ad8e5..db01dac 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -1259,6 +1259,7 @@ H5F_get_point_of_no_return(const H5F_t *f) FUNC_LEAVE_NOAPI(f->shared->point_of_no_return) } /* end H5F_get_point_of_no_return() */ + /*------------------------------------------------------------------------- * Function: H5F_get_null_fsm_addr * diff --git a/src/H5HLcache.c b/src/H5HLcache.c index cff3942..734ec5c 100644 --- a/src/H5HLcache.c +++ b/src/H5HLcache.c @@ -36,7 +36,7 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5HLpkg.h" /* Local Heaps */ #include "H5MFprivate.h" /* File memory management */ -#include "H5MMprivate.h" /* Memory management */ +#include "H5MMprivate.h" /* Memory management */ #include "H5WBprivate.h" /* Wrapped Buffers */ diff --git a/src/H5L.c b/src/H5L.c index 15f2b7d..4ef045d 100644 --- a/src/H5L.c +++ b/src/H5L.c @@ -264,7 +264,7 @@ H5L_term_package(void) * are interpreted relative to SRC_LOC_ID and DST_LOC_ID, * which are either file IDs or group ID. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * * Programmer: James Laird * Wednesday, March 29, 2006 @@ -308,13 +308,13 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, ((src_loc_id != H5L_SAME_LOC) ? src_loc_id : dst_loc_id), TRUE) < 0) HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") - /* Set location paramter for source object */ + /* Set location parameter for source object */ loc_params1.type = H5VL_OBJECT_BY_NAME; loc_params1.loc_data.loc_by_name.name = src_name; loc_params1.loc_data.loc_by_name.lapl_id = lapl_id; loc_params1.obj_type = H5I_get_type(src_loc_id); - /* Set location paramter for destination object */ + /* Set location parameter for destination object */ loc_params2.type = H5VL_OBJECT_BY_NAME; loc_params2.loc_data.loc_by_name.name = dst_name; loc_params2.loc_data.loc_by_name.lapl_id = lapl_id; @@ -354,7 +354,7 @@ done: * time and target. The new link can have a different name * and be in a different location than the original. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * * Programmer: James Laird * Wednesday, March 29, 2006 @@ -398,13 +398,13 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, ((src_loc_id != H5L_SAME_LOC) ? src_loc_id : dst_loc_id), TRUE) < 0) HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") - /* Set location paramter for source object */ + /* Set location parameter for source object */ loc_params1.type = H5VL_OBJECT_BY_NAME; loc_params1.loc_data.loc_by_name.name = src_name; loc_params1.loc_data.loc_by_name.lapl_id = lapl_id; loc_params1.obj_type = H5I_get_type(src_loc_id); - /* Set location paramter for destination object */ + /* Set location parameter for destination object */ loc_params2.type = H5VL_OBJECT_BY_NAME; loc_params2.loc_data.loc_by_name.name = dst_name; loc_params2.loc_data.loc_by_name.lapl_id = lapl_id; @@ -448,7 +448,7 @@ done: * LINK_NAME is `./x/y/bar' and a request is made for `./x/y/bar' * then the actual object looked up is `./x/y/./foo'. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke * Monday, April 6, 1998 @@ -519,7 +519,7 @@ done: * NEW_NAME are interpreted relative to CUR_LOC_ID and * NEW_LOC_ID, which are either file IDs or group IDs. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke * Monday, April 6, 1998 @@ -621,7 +621,7 @@ done: * The link class of the new link must already be registered * with the library. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * * Programmer: James Laird * Tuesday, December 13, 2005 @@ -687,7 +687,7 @@ done: * object is open, then the reclamation of the file space is * delayed until all handles to the object are closed). * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke * Monday, April 6, 1998 @@ -966,11 +966,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5Lget_info2 + * Function: H5Lget_info2 * - * Purpose: Gets metadata for a link. + * Purpose: Gets metadata for a link. * - * Return: Success: Non-negative with information in LINFO + * Return: Success: Non-negative with information in LINFO * Failure: Negative * * Programmer: James Laird @@ -1016,13 +1016,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5Lget_info_by_idx2 + * Function: H5Lget_info_by_idx2 * - * Purpose: Gets metadata for a link, according to the order within an + * Purpose: Gets metadata for a link, according to the order within an * index. * - * Return: Success: Non-negative with information in LINFO - * Failure: Negative + * Return: Success: Non-negative with information in LINFO + * Failure: Negative * * Programmer: Quincey Koziol * Monday, November 6, 2006 @@ -1221,7 +1221,7 @@ done: * Return: Success: Non-negative length of name, with information * in NAME buffer * - * Failure: -1 + * Failure: -1 * * Programmer: Quincey Koziol * Saturday, November 11, 2006 @@ -3178,11 +3178,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5L_get_info + * Function: H5L_get_info * - * Purpose: Returns metadata about a link. + * Purpose: Returns metadata about a link. * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * * Programmer: James Laird * Monday, April 17 2006 diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c index 1b007b6..8a3e3e1 100644 --- a/src/H5Lexternal.c +++ b/src/H5Lexternal.c @@ -125,7 +125,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, size_t fname_len; /* Length of external link file name */ unsigned intent; /* File access permissions */ H5L_elink_cb_t cb_info; /* Callback info struct */ - hid_t fapl_id = -1; /* File access property list for external link's file */ + hid_t fapl_id = H5I_INVALID_HID; /* File access property list for external link's file */ void *ext_obj = NULL; /* External link's object */ hid_t ext_obj_id = H5I_INVALID_HID; /* ID for external link's object */ H5I_type_t opened_type; /* ID type of external link's object */ diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h index ab68b84..0487557 100644 --- a/src/H5Lprivate.h +++ b/src/H5Lprivate.h @@ -68,7 +68,7 @@ typedef struct { hsize_t n; /* Offset of link within index */ /* Out */ - H5L_info2_t *linfo; /* Buffer to return to user */ + H5L_info2_t *linfo; /* Buffer to return to user */ } H5L_trav_gibi_t; /* User data for path traversal routine for getting name by index */ diff --git a/src/H5PB.c b/src/H5PB.c index 45f24e3..8ac863e 100644 --- a/src/H5PB.c +++ b/src/H5PB.c @@ -24,21 +24,21 @@ /* Module Setup */ /****************/ -#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_FRIEND /* Suppress error about including H5Fpkg */ #include "H5PBmodule.h" /* This source code file is part of the H5PB module */ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* Files */ -#include "H5FDprivate.h" /* File drivers */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5PBpkg.h" /* File access */ -#include "H5SLprivate.h" /* Skip List */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* Files */ +#include "H5FDprivate.h" /* File drivers */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5PBpkg.h" /* File access */ +#include "H5SLprivate.h" /* Skip List */ /****************/ @@ -153,7 +153,7 @@ H5FL_DEFINE_STATIC(H5PB_entry_t); /*------------------------------------------------------------------------- - * Function: H5PB_reset_stats + * Function: H5PB_reset_stats * * Purpose: This function was created without documentation. * What follows is my best understanding of Mohamad's intent. @@ -162,7 +162,7 @@ H5FL_DEFINE_STATIC(H5PB_entry_t); * * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -190,7 +190,7 @@ H5PB_reset_stats(H5PB_t *page_buf) /*------------------------------------------------------------------------- - * Function: H5PB_get_stats + * Function: H5PB_get_stats * * Purpose: This function was created without documentation. * What follows is my best understanding of Mohamad's intent. @@ -202,9 +202,9 @@ H5PB_reset_stats(H5PB_t *page_buf) * --evictions: the number of metadata and raw data evictions from the page buffer layer * --bypasses: the number of metadata and raw data accesses that bypass the page buffer layer * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -233,16 +233,16 @@ H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsigned hits[2], /*------------------------------------------------------------------------- - * Function: H5PB_print_stats() + * Function: H5PB_print_stats() * * Purpose: This function was created without documentation. * What follows is my best understanding of Mohamad's intent. * * Print out statistics collected for the page buffer layer. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -278,13 +278,13 @@ H5PB_print_stats(const H5PB_t *page_buf) /*------------------------------------------------------------------------- - * Function: H5PB_create + * Function: H5PB_create * - * Purpose: Create and setup the PB on the file. + * Purpose: Create and setup the PB on the file. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -355,13 +355,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5PB__flush_cb + * Function: H5PB__flush_cb * - * Purpose: Callback to flush PB skiplist entries. + * Purpose: Callback to flush PB skiplist entries. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -389,13 +389,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5PB_flush + * Function: H5PB_flush * - * Purpose: Flush/Free all the PB entries to the file. + * Purpose: Flush/Free all the PB entries to the file. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -424,13 +424,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5PB__dest_cb + * Function: H5PB__dest_cb * - * Purpose: Callback to free PB skiplist entries. + * Purpose: Callback to free PB skiplist entries. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -461,13 +461,13 @@ H5PB__dest_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data) /*------------------------------------------------------------------------- - * Function: H5PB_dest + * Function: H5PB_dest * - * Purpose: Flush and destroy the PB on the file if it exists. + * Purpose: Flush and destroy the PB on the file if it exists. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -515,16 +515,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5PB_add_new_page + * Function: H5PB_add_new_page * - * Purpose: Add a new page to the new page skip list. This is called + * Purpose: Add a new page to the new page skip list. This is called * from the MF layer when a new page is allocated to * indicate to the page buffer layer that a read of the page * from the file is not necessary since it's an empty page. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -575,16 +575,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5PB_update_entry + * Function: H5PB_update_entry * - * Purpose: In PHDF5, entries that are written by other processes and just + * Purpose: In PHDF5, entries that are written by other processes and just * marked clean by this process have to have their corresponding * pages updated if they exist in the page buffer. * This routine checks and update the pages. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -675,14 +675,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5PB_read + * Function: H5PB_read * - * Purpose: Reads in the data from the page containing it if it exists + * Purpose: Reads in the data from the page containing it if it exists * in the PB cache; otherwise reads in the page through the VFD. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -971,15 +971,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5PB_write + * Function: H5PB_write * - * Purpose: Write data into the Page Buffer. If the page exists in the - * cache, update it; otherwise read it from disk, update it, and - * insert into cache. + * Purpose: Write data into the Page Buffer. If the page exists in the + * cache, update it; otherwise read it from disk, update it, and + * insert into cache. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -1311,26 +1311,24 @@ done: /*------------------------------------------------------------------------- - * Function: H5PB__insert_entry() - * - * Purpose: ??? + * Function: H5PB__insert_entry() * - * This function was created without documentation. - * What follows is my best understanding of Mohamad's intent. + * Purpose: This function was created without documentation. + * What follows is my best understanding of Mohamad's intent. * - * Insert the supplied page into the page buffer, both the - * skip list and the LRU. + * Insert the supplied page into the page buffer, both the + * skip list and the LRU. * - * As best I can tell, this function imposes no limit on the - * number of entries in the page buffer beyond an assertion - * failure it the page count exceeds the limit. + * As best I can tell, this function imposes no limit on the + * number of entries in the page buffer beyond an assertion + * failure it the page count exceeds the limit. * * JRM -- 12/22/16 * * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -1361,16 +1359,21 @@ done: /*------------------------------------------------------------------------- - * Function: H5PB__make_space() + * Function: H5PB__make_space() * - * Purpose: If necessary and if possible, evict a page from the page - * buffer to make space for the supplied page. Depending on - * the page buffer configuration and contents, and the page - * supplied this may or may not be possible. + * Purpose: This function was created without documentation. + * What follows is my best understanding of Mohamad's intent. * - * Return: Non-negative on success/Negative on failure + * If necessary and if possible, evict a page from the page + * buffer to make space for the supplied page. Depending on + * the page buffer configuration and contents, and the page + * supplied this may or may not be possible. * - * Programmer: Mohamad Chaarawi + * JRM -- 12/22/16 + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -1459,17 +1462,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5PB__write_entry() - * - * Purpose: ??? + * Function: H5PB__write_entry() * - * This function was created without documentation. - * What follows is my best understanding of Mohamad's intent. + * Purpose: ??? * + * This function was created without documentation. + * What follows is my best understanding of Mohamad's intent. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ diff --git a/src/H5Pacpl.c b/src/H5Pacpl.c index 53e68fa..166a35f 100644 --- a/src/H5Pacpl.c +++ b/src/H5Pacpl.c @@ -33,7 +33,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Ppkg.h" /* Property lists */ -#include "H5VLprivate.h" /* Virtual Object Layer */ /****************/ diff --git a/src/H5Pint.c b/src/H5Pint.c index 3cefb64..2e463b2 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -1481,7 +1481,7 @@ H5P__free_del_name_cb(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED NAME H5P__access_class PURPOSE - Internal routine to increment or decrement list & class dependancies on a + Internal routine to increment or decrement list & class dependencies on a property list class USAGE herr_t H5P__access_class(pclass,mod) diff --git a/src/H5Plapl.c b/src/H5Plapl.c index 3d00c12..8fdcc8b 100644 --- a/src/H5Plapl.c +++ b/src/H5Plapl.c @@ -344,7 +344,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size) uint8_t **pp = (uint8_t **)_pp; H5P_genplist_t *fapl_plist; /* Pointer to property list */ hbool_t non_default_fapl = FALSE; /* Whether the FAPL is non-default */ - size_t fapl_size = 0; /* FAPL's encoded size */ + size_t fapl_size = 0; /* FAPL's encoded size */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -595,7 +595,7 @@ static herr_t H5P__lacc_elink_fapl_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { hid_t l_fapl_id; - herr_t ret_value = SUCCEED; + herr_t ret_value = SUCCEED; FUNC_ENTER_STATIC diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c index fc1a3b9..9c32552 100644 --- a/src/H5Plcpl.c +++ b/src/H5Plcpl.c @@ -119,7 +119,7 @@ static const unsigned H5L_def_intmd_group_g = H5L_CRT_INTERMEDIATE_GROUP_DEF; herr_t H5P_lcrt_reg_prop(H5P_genclass_t *pclass) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) diff --git a/src/H5Ptest.c b/src/H5Ptest.c index 114b37b..303fbf7 100644 --- a/src/H5Ptest.c +++ b/src/H5Ptest.c @@ -82,7 +82,7 @@ done: PURPOSE Routine to open a [copy of] a class with its full path name USAGE - hid_t H5P__open_class_name_test(path) + hid_t H5P__open_class_path_test(path) const char *path; IN: Full path name of class to open [copy of] RETURNS Success: ID of generic property class @@ -105,19 +105,19 @@ H5P__open_class_path_test(const char *path) FUNC_ENTER_PACKAGE /* Check arguments. */ - if(NULL == path || *path=='\0') + if (NULL == path || *path=='\0') HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid class path"); /* Open the property list class */ - if(NULL == (pclass = H5P__open_class_path(path))) + if (NULL == (pclass = H5P__open_class_path(path))) HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5I_INVALID_HID, "unable to find class with full path"); /* Get an atom for the class */ - if((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0) + if ((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize property list class"); done: - if(H5I_INVALID_HID == ret_value && pclass) + if (H5I_INVALID_HID == ret_value && pclass) H5P__close_class(pclass); FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index dc97ea2..b352374 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -6059,7 +6059,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_add_span_element_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_add_span_element @@ -6169,7 +6169,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_add_span_element() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_intersect_block_helper @@ -6259,7 +6259,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_intersect_block_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_intersect_block @@ -6391,7 +6391,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_intersect_block() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_adjust_u_helper @@ -6458,7 +6458,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, FUNC_LEAVE_NOAPI_VOID } /* end H5S__hyper_adjust_u_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_adjust_u @@ -6529,7 +6529,7 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_adjust_u() */ - + /*------------------------------------------------------------------------- * Function: H5S__hyper_project_scalar * @@ -6605,7 +6605,7 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_project_scalar() */ - + /*------------------------------------------------------------------------- * Function: H5S__hyper_project_simple_lower * @@ -6652,7 +6652,7 @@ H5S__hyper_project_simple_lower(const H5S_t *base_space, H5S_t *new_space) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_project_simple_lower() */ - + /*------------------------------------------------------------------------- * Function: H5S__hyper_project_simple_higher * @@ -6752,7 +6752,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_project_simple_higher() */ - + /*------------------------------------------------------------------------- * Function: H5S__hyper_project_simple * @@ -6926,7 +6926,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_project_simple() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_adjust_s_helper @@ -6993,7 +6993,7 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, FUNC_LEAVE_NOAPI_VOID } /* end H5S__hyper_adjust_s_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_adjust_s @@ -7066,7 +7066,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_adjust_s() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_normalize_offset @@ -7124,7 +7124,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_normalize_offset() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_denormalize_offset @@ -7168,7 +7168,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_denormalize_offset() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_append_span @@ -7199,7 +7199,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, FUNC_ENTER_STATIC - /* Sanity check */ + /* Sanity checks */ HDassert(span_tree); /* Check for adding first node to merged spans */ @@ -7306,7 +7306,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_append_span() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_clip_spans @@ -7902,7 +7902,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_clip_spans() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_merge_spans_helper @@ -8218,7 +8218,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_merge_spans_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_merge_spans @@ -8273,7 +8273,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_merge_spans() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_spans_nelem_helper @@ -8346,7 +8346,7 @@ H5S__hyper_spans_nelem_helper(H5S_hyper_span_info_t *spans, unsigned op_info_i, FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_spans_nelem_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_spans_nelem @@ -8435,7 +8435,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_add_disjoint_spans */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_make_spans @@ -8802,7 +8802,7 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_update_diminfo() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_rebuild_helper @@ -8911,7 +8911,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_rebuild_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_rebuild @@ -8961,7 +8961,7 @@ H5S__hyper_rebuild(H5S_t *space) FUNC_LEAVE_NOAPI_VOID } /* end H5S__hyper_rebuild() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_generate_spans @@ -9101,7 +9101,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__check_spans_overlap() */ - + /*-------------------------------------------------------------------------- NAME H5S__fill_in_new_space @@ -9400,7 +9400,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__fill_in_new_space() */ - + /*------------------------------------------------------------------------- * Function: H5S__generate_hyperlab * @@ -9490,7 +9490,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__generate_hyperslab() */ - + /*------------------------------------------------------------------------- * Function: H5S__set_regular_hyperslab * @@ -9820,7 +9820,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_regular_and_single_block() */ - + /*------------------------------------------------------------------------- * Function: H5S_select_hyperslab * @@ -10138,7 +10138,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_select_hyperslab() */ - + /*-------------------------------------------------------------------------- NAME H5Sselect_hyperslab @@ -10202,7 +10202,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sselect_hyperslab() */ - + /*-------------------------------------------------------------------------- NAME H5S_combine_hyperslab @@ -10408,7 +10408,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_combine_hyperslab() */ - + /*------------------------------------------------------------------------- * Function: H5S__fill_in_select * @@ -10461,7 +10461,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__fill_in_select() */ - + /*-------------------------------------------------------------------------- NAME H5Scombine_hyperslab @@ -10525,7 +10525,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Scombine_hyperslab() */ - + /*------------------------------------------------------------------------- * Function: H5S__combine_select * @@ -10593,7 +10593,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__combine_select() */ - + /*-------------------------------------------------------------------------- NAME H5Scombine_select @@ -10728,7 +10728,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__modify_select() */ - + /*-------------------------------------------------------------------------- NAME H5Smodify_select @@ -10810,7 +10810,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Smodify_select() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_proj_int_build_proj @@ -11204,7 +11204,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_proj_int_build_proj() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_proj_int_iterate @@ -11455,7 +11455,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_proj_int_iterate() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_project_intersection @@ -11645,7 +11645,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_project_intersection() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_get_clip_diminfo @@ -11700,7 +11700,7 @@ H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, FUNC_LEAVE_NOAPI_VOID } /* end H5S__hyper_get_clip_diminfo() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_clip_unlim @@ -11826,7 +11826,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_clip_unlim() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_get_clip_extent_real @@ -11908,7 +11908,7 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_get_clip_extent_real() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_get_clip_extent @@ -11971,7 +11971,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_get_clip_extent() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_get_clip_extent_match @@ -12061,7 +12061,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_get_clip_extent_match() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_get_unlim_block @@ -12144,7 +12144,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_get_unlim_block */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_get_first_inc_block @@ -12212,7 +12212,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_get_first_inc_block */ - + /*-------------------------------------------------------------------------- NAME H5Sis_regular_hyperslab @@ -12254,7 +12254,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sis_regular_hyperslab() */ - + /*-------------------------------------------------------------------------- NAME H5Sget_regular_hyperslab -- cgit v0.12 From cc15d1039af86deb77c9dc9188412ce361599b17 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 2 Jun 2020 07:33:00 -0700 Subject: Normalizations with 1.10 branch. --- src/H5CX.c | 4 ++-- src/H5Dint.c | 29 ++++++++++++++++------------- src/H5FS.c | 2 +- test/freespace.c | 8 ++++---- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/H5CX.c b/src/H5CX.c index 6f4caa8..b78d9ec 100644 --- a/src/H5CX.c +++ b/src/H5CX.c @@ -33,11 +33,11 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Dprivate.h" /* Datasets */ +#include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ -#include "H5Lprivate.h" /* Links */ +#include "H5Lprivate.h" /* Links */ #include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ diff --git a/src/H5Dint.c b/src/H5Dint.c index 574bc0d..c063bb9 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -78,7 +78,7 @@ typedef struct { /********************/ /* General stuff */ -static H5D_shared_t *H5D__new(hid_t dcpl_id, hid_t dapl, hbool_t creating, hbool_t vl_type); +static H5D_shared_t *H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type); static herr_t H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type); static herr_t H5D__cache_dataspace_info(const H5D_t *dset); static herr_t H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space); @@ -743,7 +743,7 @@ H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT; + FUNC_ENTER_STATIC HDassert(file); HDassert(minimize); @@ -784,7 +784,7 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr) size_t get_value = 0; size_t ret_value = 0; - FUNC_ENTER_NOAPI_NOINIT; + FUNC_ENTER_STATIC HDassert(file); HDassert(dset); @@ -902,7 +902,7 @@ H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc) size_t ohdr_size = 0; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT; + FUNC_ENTER_STATIC HDassert(file); HDassert(dset); @@ -947,7 +947,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) hbool_t fill_changed = FALSE; /* Flag indicating the fill value was changed */ hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */ hbool_t use_at_least_v18; /* Flag indicating to use at least v18 format versions */ - hbool_t minimize_header = FALSE; + hbool_t use_minimized_header = FALSE; /* Flag to use minimized dataset object headers */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1016,10 +1016,10 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fill value info") } /* end if */ - if(H5D__use_minimized_dset_headers(file, &minimize_header) == FAIL) + if(H5D__use_minimized_dset_headers(file, &use_minimized_header) == FAIL) HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get minimize settings") - if(TRUE == minimize_header) { + if(TRUE == use_minimized_header) { if(H5D__prepare_minimized_oh(file, dset, oloc) == FAIL) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create minimized dataset object header") } else { @@ -1032,7 +1032,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) /* Create an object header for the dataset */ if(H5O_create(file, ohdr_size, (size_t)1, dset->shared->dcpl_id, oloc/*out*/) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset object header") - } /* If use minimum/standard object header space */ + } /* if using default/minimized object headers */ HDassert(file == dset->oloc.file); @@ -1165,17 +1165,19 @@ H5D__build_file_prefix(const H5D_t *dset, H5F_prefix_open_t prefix_type, char ** if(H5F_PREFIX_VDS == prefix_type) { prefix = H5D_prefix_vds_env; - if(prefix == NULL || *prefix == '\0') + if(prefix == NULL || *prefix == '\0') { if(H5CX_get_vds_prefix(&prefix) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get the prefix for vds file") - } /* end if */ + } + } else if(H5F_PREFIX_EFILE == prefix_type) { prefix = H5D_prefix_ext_env; - if(prefix == NULL || *prefix == '\0') + if(prefix == NULL || *prefix == '\0') { if(H5CX_get_ext_file_prefix(&prefix) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get the prefix for the external file") - } /* end else-if */ + } + } else HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "prefix name is not sensible") @@ -1281,6 +1283,7 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, /* Initialize the shared dataset space */ if(NULL == (new_dset->shared = H5D__new(dcpl_id, dapl_id, TRUE, has_vl_type))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + /* Copy & initialize datatype for dataset */ if(H5D__init_type(file, new_dset, type_id, type) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't copy datatype") @@ -2033,7 +2036,7 @@ H5D_close(H5D_t *dataset) if(H5AC_cork(dataset->oloc.file, dataset->oloc.addr, H5AC__UNCORK, NULL) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTUNCORK, FAIL, "unable to uncork an object") - /* Release datatype, dataspace and creation and access property lists -- there isn't + /* Release datatype, dataspace, and creation and access property lists -- there isn't * much we can do if one of these fails, so we just continue. */ free_failed |= (H5I_dec_ref(dataset->shared->type_id) < 0) || diff --git a/src/H5FS.c b/src/H5FS.c index 4fe0927..6d574c0 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -36,7 +36,7 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5FSpkg.h" /* File free space */ #include "H5MFprivate.h" /* File memory management */ -#include "H5MMprivate.h" /* Memory management */ +#include "H5MMprivate.h" /* Memory management */ /****************/ diff --git a/test/freespace.c b/test/freespace.c index f9f1932..124ae3e 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -880,7 +880,7 @@ test_fs_sect_add(hid_t fapl) FAIL_STACK_ERROR fs_addr = HADDR_UNDEF; - /* Close the file and dxpl */ + /* Close the file */ if(H5Fclose(file) < 0) FAIL_STACK_ERROR @@ -1249,7 +1249,7 @@ test_fs_sect_find(hid_t fapl) FAIL_STACK_ERROR fs_addr = HADDR_UNDEF; - /* Close the file and dxpl */ + /* Close the file */ if(H5Fclose(file) < 0) FAIL_STACK_ERROR @@ -2737,7 +2737,7 @@ test_fs_sect_extend(hid_t fapl) PASSED(); - /* Close the file and dxpl */ + /* Close the file */ if(H5Fclose(file) < 0) FAIL_STACK_ERROR @@ -2839,7 +2839,7 @@ test_fs_sect_iterate(hid_t fapl) FAIL_STACK_ERROR fs_addr = HADDR_UNDEF; - /* Close the file and dxpl */ + /* Close the file */ if(H5Fclose(file) < 0) FAIL_STACK_ERROR -- cgit v0.12 From c6b836527f31a731e022083ebe1b9b18f8cdd29a Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 2 Jun 2020 14:34:00 -0500 Subject: Eliminate unneccesary creation of DXPL --- hl/src/H5DO.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c index 0fbdab3..66997cb 100644 --- a/hl/src/H5DO.c +++ b/hl/src/H5DO.c @@ -106,7 +106,6 @@ herr_t H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, hid_t memtype, const void *buf) { - hbool_t created_dxpl = FALSE; /* Whether we created a DXPL */ hsize_t size[H5S_MAX_RANK]; /* The new size (after extension */ hsize_t old_size = 0; /* The size of the dimension to be extended */ int sndims; /* Number of dimensions in dataspace (signed) */ @@ -135,14 +134,10 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, if(H5I_DATASET != H5Iget_type(dset_id)) goto done; - /* If the user passed in a default DXPL, create one to pass to H5Dwrite() */ - if(H5P_DEFAULT == dxpl_id) { - if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) + /* If the user passed in a default DXPL, sanity check it */ + if(H5P_DEFAULT != dxpl_id) + if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER)) goto done; - created_dxpl = TRUE; - } /* end if */ - else if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER)) - goto done; /* Get the dataspace of the dataset */ if(FAIL == (space_id = H5Dget_space(dset_id))) @@ -240,12 +235,6 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, ret_value = SUCCEED; done: - /* Close dxpl if we created it vs. one was passed in */ - if(created_dxpl) { - if(H5Pclose(dxpl_id) < 0) - ret_value = FAIL; - } /* end if */ - /* Close old dataspace */ if(space_id != FAIL && H5Sclose(space_id) < 0) ret_value = FAIL; -- cgit v0.12 From f7bc306c19a3bd8f9a31a78d81a7bb5160bbbaf8 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 2 Jun 2020 15:53:58 -0500 Subject: Add files for adding warning flags for clang compilers in autotools configure. --- config/apple | 3 + config/clang-cxxflags | 218 +++++++++++++++++++++++++++++ config/clang-flags | 218 +++++++++++++++++++++++++++++ config/clang-warnings/cxx-error-general | 32 +++++ config/clang-warnings/cxx-general | 31 ++++ config/clang-warnings/no-developer-general | 2 +- config/linux-gnulibc1 | 21 +++ configure.ac | 52 +++++++ 8 files changed, 576 insertions(+), 1 deletion(-) create mode 100644 config/clang-cxxflags create mode 100644 config/clang-flags create mode 100644 config/clang-warnings/cxx-error-general create mode 100644 config/clang-warnings/cxx-general diff --git a/config/apple b/config/apple index 0b15dfe..aba48d1 100644 --- a/config/apple +++ b/config/apple @@ -49,6 +49,7 @@ fi # Figure out compiler flags . $srcdir/config/gnu-flags +. $srcdir/config/clang-flags # temp patch: if GCC 4.2.1 is used in Lion or Mountain Lion systems, do not # use -O option as it causes failures in test/dt_arith. case "$host_os" in @@ -155,11 +156,13 @@ esac # get c++ version info case $CXX in clang++) + . $srcdir/config/clang-cxxflags cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ grep 'Apple' | sed 's/(.*//'` ;; *g++*) + . $srcdir/config/gnu-cxxflags cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'` ;; diff --git a/config/clang-cxxflags b/config/clang-cxxflags new file mode 100644 index 0000000..c6b84c4 --- /dev/null +++ b/config/clang-cxxflags @@ -0,0 +1,218 @@ +# -*- shell-script -*- +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# 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 COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. + + +# This file should be sourced into configure if the compiler is the +# Clang clang++ compiler or a derivative. It is careful not to do anything +# if the compiler is not Clang; otherwise 'cxx_flags_set' is set to 'yes' +# + +# +# For now, do not promote any warnings to errors. +# +PROMOTE_ERRORS_DFLT=no + +# +# This filter rewrites -Werror= as -W, in that way demoting warnings +# promoted to errors back to warnings, if PROMOTE_ERRORS is no. +# +demote_errors() +{ + if [ ${PROMOTE_ERRORS:-${PROMOTE_ERRORS_DFLT}} = no ]; then + sed 's,-Werror=,-W,g' + else + cat + fi +} + +# +# Prepend `$srcdir/config/clang-warnings/` to the filename suffix(es) given as +# subroutine argument(s), remove comments starting with # and ending +# at EOL, replace spans of whitespace (including newlines) with spaces, +# and re-emit the file(s) thus filtered on the standard output stream. +# +load_clang_arguments() +{ + set -- $(for arg; do + sed 's,#.*$,,' $srcdir/config/clang-warnings/${arg} + done) + IFS=' ' echo "$*" +} +# Get the compiler version in a way that works for clang++ +# unless a compiler version is already known +# +# cxx_vendor: The compiler name: clang++ +# cxx_version: Version number: 6.0.0, 7.3.0, ... 10.0.1 +# +if test "X-" = "X-$cxx_flags_set"; then + # clang++ -v will return version number following "clang" on Linux machines, + # but on Macs the version number will follow "Apple LLVM version" + cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 |\ + grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`" + if test -n "$cxx_version"; then + cxx_vendor="clang" + else + cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 |\ + grep 'Apple LLVM version' | sed 's/.*Apple LLVM version \([-a-z0-9\.]*\).*/\1/'`" + cxx_vendor="Apple LLVM" + fi + if test "X-" != "X-$cxx_version"; then + echo "compiler '$CXX' is $cxx_vendor-$cxx_version" + + # Get the compiler version numbers + cxx_vers_major=`echo $cxx_version | cut -f1 -d.` + cxx_vers_minor=`echo $cxx_version | cut -f2 -d.` + cxx_vers_patch=`echo $cxx_version | cut -f3 -d.` + test -n "$cxx_vers_major" || cxx_vers_major=0 + test -n "$cxx_vers_minor" || cxx_vers_minor=0 + test -n "$cxx_vers_patch" || cxx_vers_patch=0 + fi +fi + +if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then + echo "compiler '$CXX' is $cxx_vendor-$cxx_version" + ############################### + # Architecture-specific flags # + ############################### + + arch= + case "$host_os-$host_cpu" in + # FreeBSD sets the information from "uname -m" to the general machine + # architecture, not the specific CPU for the machine, so even our + # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD + # machine, use the "sysctl" command to get the CPU hardware model. + freebsd*-i386) + host_cpu_model=`sysctl -n hw.model` + case "$host_cpu_model" in + # Hmm.. this might not catch Celerons, but it won't hurt them either... + *Pro*|*II*|*III*|*IV*|*Athlon*) + # architecture-specific optimizations cause problems + # for some users who build binaries to be used on + # multiple architectures. + # arch="-march=i686" + ;; + esac + ;; + + *-i686) + # architecture-specific optimizations cause problems + # for some users who build binaries to be used on + # multiple architectures. + # arch="-march=i686" + ;; + esac + + case "$host_os-$host_cpu" in + # cygwin needs the "-std=c99" flag removed, so make + # a specific case for Cygwin without the flag and a default + # case to add the flag everywhere else + cygwin-*) + ;; + + *) + H5_CXXFLAGS="$H5_CXXFLAGS -std=c++11" + ;; + esac + + H5_CXXFLAGS="$H5_CXXFLAGS $arch" + + ############## + # Production # + ############## + + # NDEBUG is handled explicitly by the configure script + if test $cxx_vers_major -le 4; then + PROD_CXXFLAGS= + else + PROD_CXXFLAGS="-fstdarg-opt" + fi + + ######### + # Debug # + ######### + + # NDEBUG is handled explicitly by the configure script + # -g is handled by the symbols flags + if test $cxx_vers_major -le 4; then + DEBUG_CXXFLAGS= + else + DEBUG_CXXFLAGS="-ftrapv -fno-common -fsanitize=address" + fi + + ########### + # Symbols # + ########### + + NO_SYMBOLS_CXXFLAGS="-s" + SYMBOLS_CXXFLAGS="-g -fno-omit-frame-pointer" + + ############# + # Profiling # + ############# + + PROFILE_CXXFLAGS="-pg" + + ################ + # Optimization # + ################ + + if test $cxx_vers_major -le 4; then + HIGH_OPT_CXXFLAGS="-O3" + DEBUG_OPT_CXXFLAGS= + else + HIGH_OPT_CXXFLAGS="-O3" + DEBUG_OPT_CXXFLAGS="-g" + fi + NO_OPT_CXXFLAGS="-O0" + + ############ + # Warnings # + ############ + + ########### + # General # + ########### + + if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2 -o $cxx_vers_major -gt 4; then + H5_CXXFLAGS="$H5_CXXFLAGS $(load_clang_arguments general)" + fi +# if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8 -o $cxx_vers_major -gt 4; then +# H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_clang_arguments error-general)" +# fi + +echo "H5_CXXFLAGS: $H5_CXXFLAGS" + + ###################### + # Developer warnings # + ###################### + + NO_DEVELOPER_WARNING_CXXFLAGS=$(load_clang_arguments no-developer-general) + DEVELOPER_WARNING_CXXFLAGS=$(load_clang_arguments developer-general) + + ############################# + # Version-specific warnings # + ############################# + + + ################# + # Flags are set # + ################# + cxx_flags_set=yes +fi + +# Clear cxx info if no flags set +if test "X$cxx_flags_set" = "X"; then + cxx_vendor= + cxx_version= +fi + diff --git a/config/clang-flags b/config/clang-flags new file mode 100644 index 0000000..32c29d4 --- /dev/null +++ b/config/clang-flags @@ -0,0 +1,218 @@ +# -*- shell-script -*- +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# 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 COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. + + +# This file should be sourced into configure if the compiler is the +# Clang compiler or a derivative. It is careful not to do anything +# if the compiler is not Clang; otherwise 'cc_flags_set' is set to 'yes' +# + +# +# For now, do not promote any warnings to errors. +# +PROMOTE_ERRORS_DFLT=no + +# +# This filter rewrites -Werror= as -W, in that way demoting warnings +# promoted to errors back to warnings, if PROMOTE_ERRORS is no. +# +demote_errors() +{ + if [ ${PROMOTE_ERRORS:-${PROMOTE_ERRORS_DFLT}} = no ]; then + sed 's,-Werror=,-W,g' + else + cat + fi +} + +# +# Prepend `$srcdir/config/clang-warnings/` to the filename suffix(es) given as +# subroutine argument(s), remove comments starting with # and ending +# at EOL, replace spans of whitespace (including newlines) with spaces, +# and re-emit the file(s) thus filtered on the standard output stream. +# +load_clang_arguments() +{ + set -- $(for arg; do + sed 's,#.*$,,' $srcdir/config/clang-warnings/${arg} + done) + IFS=' ' echo "$*" +} +# Get the compiler version in a way that works for clang +# unless a compiler version is already known +# +# cc_vendor: The compiler name: clang +# cc_version: Version number: 6.0.0, 7.3.0, ... 10.0.1 +# +if test "X-" = "X-$cc_flags_set"; then + # clang -v will return version number following "clang" on Linux machines, + # but on Macs the version number will follow "Apple LLVM version" + cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\ + grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`" + if test -n "$cc_version"; then + cc_vendor="clang" + else + cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\ + grep 'Apple LLVM version' | sed 's/.*Apple LLVM version \([-a-z0-9\.]*\).*/\1/'`" + cc_vendor="Apple LLVM" + fi + if test "X-" != "X-$cc_version"; then + echo "compiler '$CC' is $cc_vendor-$cc_version" + + # Get the compiler version numbers + cc_vers_major=`echo $cc_version | cut -f1 -d.` + cc_vers_minor=`echo $cc_version | cut -f2 -d.` + cc_vers_patch=`echo $cc_version | cut -f3 -d.` + test -n "$cc_vers_major" || cc_vers_major=0 + test -n "$cc_vers_minor" || cc_vers_minor=0 + test -n "$cc_vers_patch" || cc_vers_patch=0 + fi +fi + +if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then + echo "compiler '$CC' is $cc_vendor-$cc_version" + ############################### + # Architecture-specific flags # + ############################### + + arch= + case "$host_os-$host_cpu" in + # FreeBSD sets the information from "uname -m" to the general machine + # architecture, not the specific CPU for the machine, so even our + # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD + # machine, use the "sysctl" command to get the CPU hardware model. + freebsd*-i386) + host_cpu_model=`sysctl -n hw.model` + case "$host_cpu_model" in + # Hmm.. this might not catch Celerons, but it won't hurt them either... + *Pro*|*II*|*III*|*IV*|*Athlon*) + # architecture-specific optimizations cause problems + # for some users who build binaries to be used on + # multiple architectures. + # arch="-march=i686" + ;; + esac + ;; + + *-i686) + # architecture-specific optimizations cause problems + # for some users who build binaries to be used on + # multiple architectures. + # arch="-march=i686" + ;; + esac + + case "$host_os-$host_cpu" in + # cygwin needs the "-std=c99" flag removed, so make + # a specific case for Cygwin without the flag and a default + # case to add the flag everywhere else + cygwin-*) + ;; + + *) + H5_CFLAGS="$H5_CFLAGS -std=c99" + ;; + esac + + H5_CFLAGS="$H5_CFLAGS $arch" + + ############## + # Production # + ############## + + # NDEBUG is handled explicitly by the configure script + if test $cc_vers_major -le 4; then + PROD_CFLAGS= + else + PROD_CFLAGS="-fstdarg-opt" + fi + + ######### + # Debug # + ######### + + # NDEBUG is handled explicitly by the configure script + # -g is handled by the symbols flags + if test $cc_vers_major -le 4; then + DEBUG_CFLAGS= + else + DEBUG_CFLAGS="-ftrapv -fno-common" + fi + + ########### + # Symbols # + ########### + + NO_SYMBOLS_CFLAGS="-s" + SYMBOLS_CFLAGS="-g" + + ############# + # Profiling # + ############# + + PROFILE_CFLAGS="-pg" + + ################ + # Optimization # + ################ + + if test $cc_vers_major -le 4; then + HIGH_OPT_CFLAGS="-O3" + DEBUG_OPT_CFLAGS= + else + HIGH_OPT_CFLAGS="-O3" + DEBUG_OPT_CFLAGS="-g" + fi + NO_OPT_CFLAGS="-O0" + + ############ + # Warnings # + ############ + + ########### + # General # + ########### + + if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -gt 4; then + H5_CFLAGS="$H5_CFLAGS $(load_clang_arguments general)" + fi +# if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8 -o $cc_vers_major -gt 4; then +# H5_ECFLAGS="$H5_ECFLAGS $(load_clang_arguments error-general)" +# fi + +echo "H5_CFLAGS: $H5_CFLAGS" + + ###################### + # Developer warnings # + ###################### + + NO_DEVELOPER_WARNING_CFLAGS=$(load_clang_arguments no-developer-general) + DEVELOPER_WARNING_CFLAGS=$(load_clang_arguments developer-general) + + ############################# + # Version-specific warnings # + ############################# + + + ################# + # Flags are set # + ################# + cc_flags_set=yes +fi + +# Clear cc info if no flags set +if test "X$cc_flags_set" = "X"; then + cc_vendor= + cc_version= +fi + diff --git a/config/clang-warnings/cxx-error-general b/config/clang-warnings/cxx-error-general new file mode 100644 index 0000000..85cd9a3 --- /dev/null +++ b/config/clang-warnings/cxx-error-general @@ -0,0 +1,32 @@ +# +# HDF5 code should not trigger the following warnings under any +# circumstances, so ask the compiler to treat them as errors: +# +# NOTE: c++/test files are not compatible with these warnings as errors +# c++/test/tcompound.cpp +# -Werror=cast-align +-Wcast-align +# NOTE: c++/src files are not compatible with these warnings as errors +# c++/src/H5Object.cpp +# -Werror=missing-declarations +-Wmissing-declarations +-Werror=packed +-Werror=redundant-decls +-Werror=switch +# NOTE: c++/test files are not compatible with these warnings as errors +# c++/test/tattr.cpp +# -Werror=unused-but-set-variable +-Wunused-but-set-variable +-Werror=unused-function +-Werror=unused-variable +# NOTE: c++/src files are not compatible with these warnings as errors +# c++/src/H5Object.cpp,c++/src/H5StrType.cpp,c++/src/H5PredType.cpp +# -Werror=unused-parameter +-Wunused-parameter +# +# Other files not compatible +# NOTE: c++/test files are not compatible with these warnings as errors +# c++/test/titerate.cpp,c++/test/tarray.cpp +# -Werror=missing-declarations +# c++/test/titerate.cpp,c++/test/tarray.cpp,c++/test/tlinks.cpp,c++/test/ttypes.cpp,c++/test/dsets.cpp +# -Werror=unused-parameter diff --git a/config/clang-warnings/cxx-general b/config/clang-warnings/cxx-general new file mode 100644 index 0000000..9548cc0 --- /dev/null +++ b/config/clang-warnings/cxx-general @@ -0,0 +1,31 @@ +# Note that some of the flags listed here really should be developer +# flags (listed in separate files, gnu-warnings-developer*) but we put +# them here because they are not raised by the current code and we'd like to +# know if they do start showing up. +# +# NOTE: Don't add -Wpadded here since we can't/won't fix the (many) +# warnings that are emitted. If you need it, add it from the +# environment variable at configure time. +-Wall +-Wcast-qual +-Wconversion +-Wctor-dtor-privacy +-Weffc++ +-Wextra +-Wfloat-equal +-Wformat=2 +-Winit-self +-Winvalid-pch +-Wmissing-include-dirs +-Wno-format-nonliteral +-Wnon-virtual-dtor +-Wold-style-cast +-Woverloaded-virtual +-Wreorder +-Wshadow +-Wsign-promo +##-Wunreachable-code +-Wundef +##-Wvariadic-macros +-Wwrite-strings +-pedantic diff --git a/config/clang-warnings/no-developer-general b/config/clang-warnings/no-developer-general index 2f4e0c5..2bf1703 100644 --- a/config/clang-warnings/no-developer-general +++ b/config/clang-warnings/no-developer-general @@ -1 +1 @@ --Wmissing-noreturn +-Wno-missing-noreturn diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1 index 39225e7..1a12006 100644 --- a/config/linux-gnulibc1 +++ b/config/linux-gnulibc1 @@ -42,6 +42,9 @@ fi # Figure out Intel C compiler flags . $srcdir/config/intel-flags +# Figure out Clang C compiler flags +. $srcdir/config/clang-flags + # Use default Fortran 90 compiler according to what C compiler is used. if test "X-" = "X-$FC"; then case $CC_BASENAME in @@ -61,6 +64,10 @@ if test "X-" = "X-$FC"; then FC=mpif90 FC_BASENAME=mpif90 ;; + clang*) + FC=gfortran + FC_BASENAME=gfortran + ;; esac else case $FC in @@ -194,6 +201,9 @@ fi # Figure out GNU CXX compiler flags . $srcdir/config/gnu-cxxflags +# Figure out Clang CXX compiler flags +. $srcdir/config/clang-cxxflags + # compiler version strings # check if the compiler_version_info is already set @@ -223,6 +233,17 @@ case $CC in sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` ;; + *clang*) + # clang -v will return version number following "clang" on Linux machines, + # but on Macs the version number will follow "Apple LLVM version" + cc_version_info="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\ + grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`" + else + cc_version_info="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\ + grep 'Apple LLVM version' | sed 's/.*Apple LLVM version \([-a-z0-9\.]*\).*/\1/'`" + fi + ;; + *) echo "No match to get cc_version_info for $CC" ;; diff --git a/configure.ac b/configure.ac index db0cddf..50f823e 100644 --- a/configure.ac +++ b/configure.ac @@ -289,6 +289,58 @@ while test -n "$hname"; do test "$hname_tmp" = "$hname" && break done +## +## Enable/disable sanitizer checks for clang compilers, initially address sanitizer +## +AC_MSG_CHECKING([for clang sanitizer checks]) +AC_ARG_ENABLE([sanitize-checks], + [AS_HELP_STRING([--enable-sanitize-checks=address], + [(clang/clang++ compilers only) Enable sanitize checks. + Address is useful for detecting issues dealing with + memory. See AddressSanitizer in config/sanitizer/README.md + for more information. + [default=none] + ])], + [CLANG_SANITIZE_CHECKS=$enableval]) + +# Set default +if test "X-$CLANG_SANITIZE_CHECKS" = X- ; then + CLANG_SANITIZE_CHECKS=none +fi + +if test "X$CC_BASENAME" = "Xclang"; then + AC_SUBST([CLANG_SANITIZE_CHECKS]) + + ## These are all the packages that use H5*_DEBUG. + ## There is no harm in specifying a package not in this list; + ## you'll just get an unused H5_DEBUG symbol. + ## + ## Some packages that define debug checks or output are + ## too specialized or have huge performance hits. These + ## are not listed in the "all" packages list. + ## + ##all_packages="Address" + + case "X-$CLANG_SANITIZE_CHECKS" in + X-no|X-none) + CLANG_SANITIZE_CHECKS=none + CLANG_SANITIZE_LIST= + ;; + *) + CLANG_SANITIZE_LIST=$CLANG_SANITIZE_CHECKS + ;; + esac + AC_MSG_RESULT([$CLANG_SANITIZE_CHECKS]) + + ## Define H5*_DEBUG symbols that control package output + ## NOTE: No sanity checking done here! + if test -n "$CLANG_SANITIZE_LIST"; then + H5_CFLAGS="$H5_CFLAGS -fno-omit-frame-pointer" + for sanitizer in `echo $CLANG_SANITIZE_LIST`; do + H5_CFLAGS="$H5_CFLAGS -fsanitize=${sanitizer}" + done + fi +fi ## ---------------------------------------------------------------------- ## Determine build mode (debug, production, clean). -- cgit v0.12 From a0d9959b431fa21566ab6e3d83b8fbdbeb015c37 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 3 Jun 2020 23:07:14 -0700 Subject: Normalization of H5D.c with 1.10. --- src/H5D.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/H5D.c b/src/H5D.c index 37b3b39..3428d77 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -150,9 +150,9 @@ H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, if(NULL == (dset = H5VL_dataset_create(vol_obj, &loc_params, name, lcpl_id, type_id, space_id, dcpl_id, dapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset") - /* Get an atom for the dataset */ + /* Get an ID for the dataset */ if((ret_value = H5VL_register(H5I_DATASET, dset, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize dataset handle") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset") done: if(H5I_INVALID_HID == ret_value) @@ -315,7 +315,7 @@ done: * it. It is illegal to subsequently use that same dataset * ID in calls to other dataset functions. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ @@ -382,7 +382,7 @@ done: * * Purpose: Returns the status of dataspace allocation. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ @@ -719,8 +719,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, - hsize_t *size) +H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *size) { H5VL_object_t *vol_obj; /* Dataset for this operation */ hbool_t supported; /* Whether 'get vlen buf size' operation is supported by VOL connector */ @@ -765,7 +764,7 @@ done: * Purpose: Modifies the dimensions of a dataset. * Can change to a smaller dimension. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success, negative on failure * *------------------------------------------------------------------------- */ @@ -802,7 +801,7 @@ done: * * Purpose: Flushes all buffers associated with a dataset. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success, negative on failure * *------------------------------------------------------------------------- */ @@ -840,7 +839,7 @@ done: * * Purpose: Refreshes all buffers associated with a dataset. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success, negative on failure * *------------------------------------------------------------------------- */ @@ -880,7 +879,7 @@ done: * For virtual: * No conversion * - * Return: SUCCEED/FAIL + * Return: Non-negative on success, negative on failure * * Programmer: Vailin Choi * Feb 2015 @@ -957,7 +956,7 @@ done: * Intended for use with the H5D(O)read_chunk API call so * the caller can construct an appropriate buffer. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success, negative on failure * * Programmer: Matthew Strong (GE Healthcare) * 20 October 2016 -- cgit v0.12 From e22d126639e139518e4b5f1ac35a008ec429f698 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 3 Jun 2020 23:34:16 -0700 Subject: Normalization of H5T.c with 1.10. --- src/H5T.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/H5T.c b/src/H5T.c index 5d3c4a1..47c4e4e 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -1755,15 +1755,16 @@ H5Tcopy(hid_t obj_id) switch(H5I_get_type(obj_id)) { case H5I_DATATYPE: + /* The argument is a datatype handle */ if(NULL == (dt = (H5T_t *)H5I_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "type_id is not a datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "obj_id is not a datatype ID") break; case H5I_DATASET: { H5VL_object_t *vol_obj = NULL; /* Dataset structure */ - /* Check args */ + /* The argument is a dataset handle */ if(NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(obj_id, H5I_DATASET))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "type_id is not a dataset ID") @@ -1776,9 +1777,8 @@ H5Tcopy(hid_t obj_id) /* Unwrap the type ID */ if(NULL == (dt = (H5T_t *)H5I_object(dset_tid))) HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5I_INVALID_HID, "received invalid datatype from the dataset") - - break; } + break; case H5I_UNINIT: case H5I_BADID: @@ -1802,7 +1802,7 @@ H5Tcopy(hid_t obj_id) /* Copy datatype */ if(NULL == (new_dt = H5T_copy(dt, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy"); /* Get an ID for the copied datatype */ if((ret_value = H5I_register(H5I_DATATYPE, new_dt, TRUE)) < 0) @@ -2345,9 +2345,9 @@ H5T_get_super(const H5T_t *dt) HDassert(dt); if(!dt->shared->parent) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "not a derived data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "not a derived data type"); if(NULL == (ret_value = H5T_copy(dt->shared->parent, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy parent data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy parent data type"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3222,7 +3222,7 @@ H5T__create(H5T_class_t type, size_t size) /* Copy the default string datatype */ if(NULL == (dt = H5T_copy(origin_dt, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy"); /* Modify the datatype */ if(H5T__set_size(dt, size) < 0) @@ -4000,7 +4000,7 @@ H5T_close_real(H5T_t *dt) /* Clean up resources, depending on shared state */ if(dt->shared->state != H5T_STATE_OPEN) { if(H5T__free(dt) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype"); dt->shared = H5FL_FREE(H5T_shared_t, dt->shared); } /* end if */ @@ -4094,7 +4094,7 @@ H5T_close(H5T_t *dt) /* Clean up resources */ if(H5T_close_real(dt) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "unable to free datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "unable to free datatype"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4143,7 +4143,7 @@ H5T__set_size(H5T_t *dt, size_t size) if(dt->shared->parent) { if(H5T__set_size(dt->shared->parent, size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set size for parent data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set size for parent data type"); /* Adjust size of datatype appropriately */ if(dt->shared->type==H5T_ARRAY) @@ -4185,7 +4185,7 @@ H5T__set_size(H5T_t *dt, size_t size) size_t max_size; if((num_membs = H5T_get_nmembers(dt)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to get number of members") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to get number of members"); if(num_membs) { for(i = 0; i < (unsigned)num_membs; i++) { @@ -4199,7 +4199,7 @@ H5T__set_size(H5T_t *dt, size_t size) max_size = H5T__get_member_size(dt, max_index); if(size < (max_offset + max_size)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size shrinking will cut off last member ") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size shrinking will cut off last member "); } /* end if */ /* Compound must not have been packed previously */ @@ -4219,7 +4219,7 @@ H5T__set_size(H5T_t *dt, size_t size) /* Get a copy of unsigned char type as the base/parent type */ if(NULL == (base = (H5T_t *)H5I_object(H5T_NATIVE_UCHAR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid base datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid base datatype"); dt->shared->parent=H5T_copy(base,H5T_COPY_ALL); /* change this datatype into a VL string */ @@ -4245,7 +4245,7 @@ H5T__set_size(H5T_t *dt, size_t size) /* Set up VL information */ if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY)<0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location"); } /* end if */ else { prec = 8 * size; @@ -4261,7 +4261,7 @@ H5T__set_size(H5T_t *dt, size_t size) if(dt->shared->u.atomic.u.f.sign >= prec+offset || dt->shared->u.atomic.u.f.epos + dt->shared->u.atomic.u.f.esize > prec+offset || dt->shared->u.atomic.u.f.mpos + dt->shared->u.atomic.u.f.msize > prec+offset) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "adjust sign, mantissa, and exponent fields first") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "adjust sign, mantissa, and exponent fields first"); } break; @@ -4401,7 +4401,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) /* Build an index for each type so the names are sorted */ if(NULL == (idx1 = (unsigned *)H5MM_malloc(dt1->shared->u.compnd.nmembs * sizeof(unsigned))) || NULL == (idx2 = (unsigned *)H5MM_malloc(dt2->shared->u.compnd.nmembs * sizeof(unsigned)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed"); for(u = 0; u < dt1->shared->u.compnd.nmembs; u++) idx1[u] = idx2[u] = u; if(dt1->shared->u.enumer.nmembs > 1) { @@ -4487,7 +4487,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) /* Build an index for each type so the names are sorted */ if(NULL == (idx1 = (unsigned *)H5MM_malloc(dt1->shared->u.enumer.nmembs * sizeof(unsigned))) || NULL == (idx2 = (unsigned *)H5MM_malloc(dt2->shared->u.enumer.nmembs * sizeof(unsigned)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed"); for(u=0; ushared->u.enumer.nmembs; u++) idx1[u] = u; if(dt1->shared->u.enumer.nmembs > 1) { @@ -5661,7 +5661,7 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Range check against compound member's offset */ if ((accum_change < 0) && ((ssize_t) dt->shared->u.compnd.memb[i].offset < accum_change)) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype"); /* Apply the accumulated size change to the offset of the field */ dt->shared->u.compnd.memb[i].offset += (size_t) accum_change; @@ -5677,7 +5677,7 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Mark the VL, compound, enum or array type */ if((changed = H5T_set_loc(memb_type, file, loc)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location"); if(changed > 0) ret_value = changed; @@ -5686,7 +5686,7 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Fail if the old_size is zero */ if (0 == old_size) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "old_size of zero would cause division by zero") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "old_size of zero would cause division by zero"); /* Adjust the size of the member */ dt->shared->u.compnd.memb[i].size = (dt->shared->u.compnd.memb[i].size*memb_type->shared->size)/old_size; @@ -5699,7 +5699,7 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Range check against datatype size */ if ((accum_change < 0) && ((ssize_t) dt->shared->size < accum_change)) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype"); /* Apply the accumulated size change to the datatype */ dt->shared->size += (size_t) accum_change; @@ -5711,14 +5711,14 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* (If the force_conv flag is _not_ set, the type cannot change in size, so don't recurse) */ if(dt->shared->parent->shared->force_conv && H5T_IS_COMPLEX(dt->shared->parent->shared->type)) { if((changed = H5T_set_loc(dt->shared->parent, file, loc)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location"); if(changed > 0) ret_value = changed; } /* end if */ /* Mark this VL sequence */ if((changed = H5T__vlen_set_loc(dt, file, loc)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location"); if(changed > 0) ret_value = changed; break; -- cgit v0.12 From de54cff50c419751e0080b6a732facac43f87ba6 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 5 Jun 2020 12:36:20 -0500 Subject: Detect when there's the same-shaped selection of a single block of elements on both selections, but with different selection types (i.e. one selection defined as an 'all' type and the other as a hyperslab or point type), without falling into the generic selection iteration case. --- src/H5Sselect.c | 9 +++++++++ test/tselect.c | 14 +++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 56f14ba..1072d7d 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -1885,6 +1885,15 @@ H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2) space_a_dim--; } /* end while */ + + /* Check for a single block in each selection */ + if(H5S_SELECT_IS_SINGLE(space_a) && H5S_SELECT_IS_SINGLE(space_b)) { + /* If both selections are a single block and their bounds are + * the same, then the selections are the same, even if the + * selection types are different. + */ + HGOTO_DONE(TRUE) + } /* end if */ } /* end if */ /* If the dataspaces have the same selection type, use the selection's diff --git a/test/tselect.c b/test/tselect.c index 45806ae..aa0ab11 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -9388,15 +9388,15 @@ test_shape_same_dr__smoke_check_1(void) ** a "checker board" hyperslab as follows: ** ** * * - - * * - - * * -** * * - - * * - - * * -** - - * * - - * * - - -** - - * * - - * * - - ** * * - - * * - - * * -** * * - - * * - - * * -** - - * * - - * * - - -** - - * * - - * * - - +** - - * * - - * * - - +** - - * * - - * * - - +** * * - - * * - - * * +** * * - - * * - - * * +** - - * * - - * * - - +** - - * * - - * * - - +** * * - - * * - - * * ** * * - - * * - - * * -** * * - - * * - - * * ** ** where asterisks indicate selected elements, and dashes ** indicate unselected elements. -- cgit v0.12 From de9491e3651350969b2a75c602984a3786656dcb Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Sat, 6 Jun 2020 14:36:44 -0500 Subject: Add flags from config/clang-warnings/*general files to H5 C and CXX flags for all versions of Clang and Clang++ compilers. Switched from cut to awk in testcheck_version.sh.in to avoid dependence on tab vs. " " in version definitions in H5public.h. --- config/clang-cxxflags | 8 ++------ config/clang-flags | 8 ++------ config/clang-warnings/cxx-error-general | 32 -------------------------------- config/clang-warnings/cxx-general | 31 ------------------------------- config/linux-gnulibc1 | 1 + configure.ac | 26 ++++++++++++++------------ test/testcheck_version.sh.in | 6 +++--- 7 files changed, 22 insertions(+), 90 deletions(-) delete mode 100644 config/clang-warnings/cxx-error-general delete mode 100644 config/clang-warnings/cxx-general diff --git a/config/clang-cxxflags b/config/clang-cxxflags index c6b84c4..9c283cd 100644 --- a/config/clang-cxxflags +++ b/config/clang-cxxflags @@ -183,12 +183,8 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then # General # ########### - if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2 -o $cxx_vers_major -gt 4; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_clang_arguments general)" - fi -# if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8 -o $cxx_vers_major -gt 4; then -# H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_clang_arguments error-general)" -# fi + H5_CXXFLAGS="$H5_CXXFLAGS $(load_clang_arguments general)" + H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_clang_arguments error-general)" echo "H5_CXXFLAGS: $H5_CXXFLAGS" diff --git a/config/clang-flags b/config/clang-flags index 32c29d4..e7ade49 100644 --- a/config/clang-flags +++ b/config/clang-flags @@ -183,12 +183,8 @@ if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then # General # ########### - if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -gt 4; then - H5_CFLAGS="$H5_CFLAGS $(load_clang_arguments general)" - fi -# if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8 -o $cc_vers_major -gt 4; then -# H5_ECFLAGS="$H5_ECFLAGS $(load_clang_arguments error-general)" -# fi + H5_CFLAGS="$H5_CFLAGS $(load_clang_arguments general)" + H5_ECFLAGS="$H5_ECFLAGS $(load_clang_arguments error-general)" echo "H5_CFLAGS: $H5_CFLAGS" diff --git a/config/clang-warnings/cxx-error-general b/config/clang-warnings/cxx-error-general deleted file mode 100644 index 85cd9a3..0000000 --- a/config/clang-warnings/cxx-error-general +++ /dev/null @@ -1,32 +0,0 @@ -# -# HDF5 code should not trigger the following warnings under any -# circumstances, so ask the compiler to treat them as errors: -# -# NOTE: c++/test files are not compatible with these warnings as errors -# c++/test/tcompound.cpp -# -Werror=cast-align --Wcast-align -# NOTE: c++/src files are not compatible with these warnings as errors -# c++/src/H5Object.cpp -# -Werror=missing-declarations --Wmissing-declarations --Werror=packed --Werror=redundant-decls --Werror=switch -# NOTE: c++/test files are not compatible with these warnings as errors -# c++/test/tattr.cpp -# -Werror=unused-but-set-variable --Wunused-but-set-variable --Werror=unused-function --Werror=unused-variable -# NOTE: c++/src files are not compatible with these warnings as errors -# c++/src/H5Object.cpp,c++/src/H5StrType.cpp,c++/src/H5PredType.cpp -# -Werror=unused-parameter --Wunused-parameter -# -# Other files not compatible -# NOTE: c++/test files are not compatible with these warnings as errors -# c++/test/titerate.cpp,c++/test/tarray.cpp -# -Werror=missing-declarations -# c++/test/titerate.cpp,c++/test/tarray.cpp,c++/test/tlinks.cpp,c++/test/ttypes.cpp,c++/test/dsets.cpp -# -Werror=unused-parameter diff --git a/config/clang-warnings/cxx-general b/config/clang-warnings/cxx-general deleted file mode 100644 index 9548cc0..0000000 --- a/config/clang-warnings/cxx-general +++ /dev/null @@ -1,31 +0,0 @@ -# Note that some of the flags listed here really should be developer -# flags (listed in separate files, gnu-warnings-developer*) but we put -# them here because they are not raised by the current code and we'd like to -# know if they do start showing up. -# -# NOTE: Don't add -Wpadded here since we can't/won't fix the (many) -# warnings that are emitted. If you need it, add it from the -# environment variable at configure time. --Wall --Wcast-qual --Wconversion --Wctor-dtor-privacy --Weffc++ --Wextra --Wfloat-equal --Wformat=2 --Winit-self --Winvalid-pch --Wmissing-include-dirs --Wno-format-nonliteral --Wnon-virtual-dtor --Wold-style-cast --Woverloaded-virtual --Wreorder --Wshadow --Wsign-promo -##-Wunreachable-code --Wundef -##-Wvariadic-macros --Wwrite-strings --pedantic diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1 index 1a12006..055b075 100644 --- a/config/linux-gnulibc1 +++ b/config/linux-gnulibc1 @@ -65,6 +65,7 @@ if test "X-" = "X-$FC"; then FC_BASENAME=mpif90 ;; clang*) + # clang has no fortran compiler. Use gfortran. FC=gfortran FC_BASENAME=gfortran ;; diff --git a/configure.ac b/configure.ac index 50f823e..cf1e463 100644 --- a/configure.ac +++ b/configure.ac @@ -311,16 +311,8 @@ fi if test "X$CC_BASENAME" = "Xclang"; then AC_SUBST([CLANG_SANITIZE_CHECKS]) - ## These are all the packages that use H5*_DEBUG. - ## There is no harm in specifying a package not in this list; - ## you'll just get an unused H5_DEBUG symbol. - ## - ## Some packages that define debug checks or output are - ## too specialized or have huge performance hits. These - ## are not listed in the "all" packages list. - ## - ##all_packages="Address" - + # There are several sanitizer tools. At present we are testing + # and describing only -fsanitizer=address with autotools. case "X-$CLANG_SANITIZE_CHECKS" in X-no|X-none) CLANG_SANITIZE_CHECKS=none @@ -332,8 +324,18 @@ if test "X$CC_BASENAME" = "Xclang"; then esac AC_MSG_RESULT([$CLANG_SANITIZE_CHECKS]) - ## Define H5*_DEBUG symbols that control package output - ## NOTE: No sanity checking done here! + # Other tools can be added to the list of checks + # The clang compiler doesn't support some of them; they should be + # checked before adding them to the list in the help message. + # The sanitizers/sanitizers.cmake file lists these options: + # address, memory, memoryWithOrigins, undefined, thread, leak, + # 'address;undefined'. Which and which combinations of these are + # supported varies by compiler version, but unsupported options + # or combinations will result in configure errors reported in config.log. + # Comma separated lists of sanitize options wil be entered intact in + # one -fsanitize= flag. Space separated lists will be entered in + # separate -fsanitize= flags. + # NOTE: No sanity checking done here! if test -n "$CLANG_SANITIZE_LIST"; then H5_CFLAGS="$H5_CFLAGS -fno-omit-frame-pointer" for sanitizer in `echo $CLANG_SANITIZE_LIST`; do diff --git a/test/testcheck_version.sh.in b/test/testcheck_version.sh.in index 836170d..0c2c4cd 100644 --- a/test/testcheck_version.sh.in +++ b/test/testcheck_version.sh.in @@ -216,9 +216,9 @@ h5libsettings=../src/libhdf5.settings PURPOSE # Figure out library version numbers from the header file. -h5versmajor=`grep '#define H5_VERS_MAJOR' $srcdir/../src/H5public.h | cut -f2` -h5versminor=`grep '#define H5_VERS_MINOR' $srcdir/../src/H5public.h | cut -f2` -h5versrelease=`grep '#define H5_VERS_RELEASE' $srcdir/../src/H5public.h | cut -f2` +h5versmajor=`grep '#define H5_VERS_MAJOR' $srcdir/../src/H5public.h | awk '{print $3}'` +h5versminor=`grep '#define H5_VERS_MINOR' $srcdir/../src/H5public.h | awk '{print $3}'` +h5versrelease=`grep '#define H5_VERS_RELEASE' $srcdir/../src/H5public.h | awk '{print $3}'` DEBUGPRINT $h5versmajor.$h5versminor.$h5versrelease case "$h5versmajor$h5versminor$h5versrelease" in [0-9]*) # good. noop. -- cgit v0.12 From 87695c999ad7ea348ee6dc03b46b0bd345f7d7df Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sun, 7 Jun 2020 03:12:36 -0700 Subject: Minor normalizations with HDF5 1.10. --- src/H5F.c | 63 ++++++++++++++++++++++++-------------------------------- src/H5Fint.c | 4 ++-- src/H5Fprivate.h | 11 +++++----- src/H5Fquery.c | 1 + src/H5MF.c | 3 ++- src/H5PB.c | 2 +- 6 files changed, 38 insertions(+), 46 deletions(-) diff --git a/src/H5F.c b/src/H5F.c index 1a9bab5..3dbd292 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -280,7 +280,7 @@ H5Fget_create_plist(hid_t file_id) /* Retrieve the file creation property list */ if(H5VL_file_get(vol_obj, H5VL_FILE_GET_FCPL, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "unable to retrieve file creation properties") + HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, H5I_INVALID_HID, "unable to retrieve file creation properties") done: FUNC_LEAVE_API(ret_value) @@ -320,7 +320,7 @@ H5Fget_access_plist(hid_t file_id) /* Retrieve the file's access property list */ if(H5VL_file_get(vol_obj, H5VL_FILE_GET_FAPL, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get file access property list") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get file access property list") done: FUNC_LEAVE_API(ret_value) @@ -584,8 +584,8 @@ done: * * Purpose: Check if the file can be opened with the given fapl. * - * Return: Succeed: TRUE/FALSE - * Failure: FAIL (includes file does not exist) + * Return: Success: TRUE/FALSE + * Failure: -1 (includes file does not exist) * *------------------------------------------------------------------------- */ @@ -820,8 +820,7 @@ done: * not remove them from the cache. The OBJECT_ID can be a file, * dataset, group, attribute, or named data type. * - * Return: SUCCEED/FAIL - * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -863,8 +862,8 @@ done: * closed until those objects are closed; however, all data for * the file and the open objects is flushed. * - * Return: SUCCEED/FAIL - * + * Return: Success: Non-negative + * Failure: Negative *------------------------------------------------------------------------- */ herr_t @@ -879,11 +878,9 @@ H5Fclose(hid_t file_id) if(H5I_FILE != H5I_get_type(file_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID") - /* Decrement reference count on atom. When it reaches zero the file will - * be closed. - */ + /* Close the file */ if(H5I_dec_app_ref(file_id) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_CANTCLOSEFILE, FAIL, "decrementing file ID failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "closing file ID failed") done: FUNC_LEAVE_API(ret_value) @@ -1011,8 +1008,7 @@ done: * Purpose: Public API to retrieve the file's 'intent' flags passed * during H5Fopen() * - * Return: SUCCEED/FAIL - * + * Return: Non-negative on success/negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1117,8 +1113,8 @@ done: * is called after an existing file is opened in order * to learn the true size of the underlying file. * - * Return: SUCCEED/FAIL - * + * Return: Success: Non-negative + * Failure: Negative *------------------------------------------------------------------------- */ herr_t @@ -1622,14 +1618,14 @@ done: * set up flush dependency/proxy even for file opened without * SWMR to resolve issues with opened objects. * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/negative on failure * *------------------------------------------------------------------------- */ herr_t H5Fstart_swmr_write(hid_t file_id) { - H5VL_object_t *vol_obj = NULL; /* File info */ + H5VL_object_t *vol_obj = NULL; /* File info */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -1658,8 +1654,7 @@ done: * Purpose: Start metadata cache logging operations for a file. * - Logging must have been set up via the fapl. * - * Return: SUCCEED/FAIL - * + * Return: Non-negative on success/Negative on errors *------------------------------------------------------------------------- */ herr_t @@ -1691,8 +1686,7 @@ done: * - Does not close the log file. * - Logging must have been set up via the fapl. * - * Return: SUCCEED/FAIL - * + * Return: Non-negative on success/Negative on errors *------------------------------------------------------------------------- */ herr_t @@ -1724,8 +1718,7 @@ done: * set up via the fapl. is_currently_logging determines if * log messages are being recorded at this time. * - * Return: SUCCEED/FAIL - * + * Return: Non-negative on success/Negative on errors *------------------------------------------------------------------------- */ herr_t @@ -1759,8 +1752,7 @@ done: * H5Fset_latest_format() starting release 1.10.2. * See explanation for H5Fset_latest_format() in H5Fdeprec.c. * - * Return: SUCCEED/FAIL - * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1796,8 +1788,7 @@ done: * downgrade persistent file space to non-persistent * for 1.8 library. * - * Return: SUCCEED/FAIL - * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1831,8 +1822,7 @@ done: * * Purpose: Resets statistics for the page buffer layer. * - * Return: SUCCEED/FAIL - * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1862,8 +1852,7 @@ done: * * Purpose: Retrieves statistics for the page buffer layer. * - * Return: SUCCEED/FAIL - * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1901,8 +1890,7 @@ done: * image_len: --size of the on disk metadata cache image * --zero if no cache image * - * Return: SUCCEED/FAIL - * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1934,7 +1922,10 @@ done: * allocated memory in the file. * (See H5FDget_eoa() in H5FD.c) * - * Return: SUCCEED/FAIL + * Return: Success: First byte after allocated memory. + * Failure: HADDR_UNDEF + * + * Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1967,7 +1958,7 @@ done: * * Purpose: Set the EOA for the file to the maximum of (EOA, EOF) + increment * - * Return: SUCCEED/FAIL + * Return: Non-negative on success/Negative on errors *------------------------------------------------------------------------- */ herr_t diff --git a/src/H5Fint.c b/src/H5Fint.c index d50baad..0bda894 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1138,7 +1138,7 @@ done: HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "can't close property list") f->shared = H5FL_FREE(H5F_shared_t, f->shared); - } /* end if */ + } /* Free VOL object */ if(f->vol_obj) @@ -1146,7 +1146,7 @@ done: HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "unable to free VOL object") f = H5FL_FREE(H5F_t, f); - } /* end if */ + } FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__new() */ diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index fbb164d..c5d4c89 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -25,15 +25,15 @@ typedef struct H5F_t H5F_t; #include "H5Fpublic.h" /* Public headers needed by this file */ -#include "H5FDpublic.h" /* File drivers */ +#include "H5FDpublic.h" /* File drivers */ /* Private headers needed by this file */ -#include "H5MMprivate.h" /* Memory management */ +#include "H5MMprivate.h" /* Memory management */ #ifdef H5_HAVE_PARALLEL -#include "H5Pprivate.h" /* Property lists */ +#include "H5Pprivate.h" /* Property lists */ #endif /* H5_HAVE_PARALLEL */ -#include "H5VMprivate.h" /* Vectors and arrays */ -#include "H5VLprivate.h" /* Virtual Object Layer */ +#include "H5VMprivate.h" /* Vectors and arrays */ +#include "H5VLprivate.h" /* Virtual Object Layer */ /**************************/ @@ -795,7 +795,6 @@ H5_DLL hsize_t H5F_get_alignment(const H5F_t *f); H5_DLL hsize_t H5F_get_threshold(const H5F_t *f); #ifdef H5_HAVE_PARALLEL H5_DLL H5P_coll_md_read_flag_t H5F_coll_md_read(const H5F_t *f); -H5_DLL void H5F_set_coll_md_read(H5F_t *f, H5P_coll_md_read_flag_t flag); #endif /* H5_HAVE_PARALLEL */ H5_DLL hbool_t H5F_use_mdc_logging(const H5F_t *f); H5_DLL hbool_t H5F_start_mdc_log_on_access(const H5F_t *f); diff --git a/src/H5Fquery.c b/src/H5Fquery.c index db01dac..e1b11c8 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -229,6 +229,7 @@ H5F_get_extpath(const H5F_t *f) FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(f); + HDassert(f->shared); HDassert(f->shared->extpath); FUNC_LEAVE_NOAPI(f->shared->extpath) diff --git a/src/H5MF.c b/src/H5MF.c index 5c31f19..fac6620 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -1137,10 +1137,11 @@ HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUN /* If it's metadata, check if the space to free intersects with the file's * metadata accumulator */ - if(H5FD_MEM_DRAW != alloc_type) + if(H5FD_MEM_DRAW != alloc_type) { /* Check if the space to free intersects with the file's metadata accumulator */ if(H5F__accum_free(f->shared, alloc_type, addr, size) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't check free space intersection w/metadata accumulator") + } /* end if */ /* Check if the free space manager for the file has been initialized */ if(!f->shared->fs_man[fs_type]) { diff --git a/src/H5PB.c b/src/H5PB.c index 8ac863e..907fe82 100644 --- a/src/H5PB.c +++ b/src/H5PB.c @@ -314,7 +314,7 @@ H5PB_create(H5F_shared_t *f_sh, size_t size, unsigned page_buf_min_meta_perc, un /* Allocate the new page buffering structure */ if(NULL == (page_buf = H5FL_CALLOC(H5PB_t))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed") page_buf->max_size = size; H5_CHECKED_ASSIGN(page_buf->page_size, size_t, f_sh->fs_page_size, hsize_t); -- cgit v0.12 From b942a4d8a3e27317cac50ce37ff5302d477664d8 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 8 Jun 2020 15:52:13 -0500 Subject: Clean up code to get clang version in config/linux-gnulibc1 --- config/linux-gnulibc1 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1 index 055b075..a6f81ff 100644 --- a/config/linux-gnulibc1 +++ b/config/linux-gnulibc1 @@ -235,14 +235,8 @@ case $CC in ;; *clang*) - # clang -v will return version number following "clang" on Linux machines, - # but on Macs the version number will follow "Apple LLVM version" - cc_version_info="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\ + cc_version_info="`$CC $CFLAGS $H5_CFLAGS --version 2>&1 |\ grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`" - else - cc_version_info="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\ - grep 'Apple LLVM version' | sed 's/.*Apple LLVM version \([-a-z0-9\.]*\).*/\1/'`" - fi ;; *) @@ -339,6 +333,11 @@ case $CXX in cxx_version_info=`echo $cxx_version_info` ;; + *clang++*) + cxx_version_info="`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ + grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`" + ;; + *) echo "No match to get cxx_version_info for $CXX" ;; -- cgit v0.12 From 9e8899c3b47a2041242dc4539ca8b1c5e151a371 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 9 Jun 2020 15:48:14 -0500 Subject: Remove redundant metadata cache tagging from some low-level internal chunk functions. The metadata cache tagging has already been done by routines further up the call stack. --- src/H5Dchunk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 90516c6..5fda3c0 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -3351,7 +3351,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset) H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk); herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_TAG(dset->oloc.addr) + FUNC_ENTER_STATIC HDassert(dset); HDassert(dset->shared); @@ -3515,7 +3515,7 @@ done: ((ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS) ? NULL : &(dset->shared->dcpl_cache.pline))); - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__chunk_flush_entry() */ @@ -4350,7 +4350,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_ const H5O_storage_chunk_t *sc = &(layout->storage.u.chunk); herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr) + FUNC_ENTER_PACKAGE /* Check args */ HDassert(dset && H5D_CHUNKED == layout->type); @@ -4754,7 +4754,7 @@ done: H5MM_free(chunk_info.addr); #endif - FUNC_LEAVE_NOAPI_TAG(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__chunk_allocate() */ -- cgit v0.12 From 32c353ed4360630646e0bfd40387aa7b4fd403ea Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 9 Jun 2020 16:12:31 -0500 Subject: Update new clang files to not pick up clang as vendor for pgCC. Add new files to MANIFEST Temporary demotion of 2 -Werror warning flags that fail on macos 10.12 Remove Production flag unknown to Apple clang. --- MANIFEST | 2 ++ config/clang-cxxflags | 13 +++++-------- config/clang-flags | 13 +++++-------- config/clang-warnings/error-general | 9 +++++++-- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/MANIFEST b/MANIFEST index d9d8ab8..11f2926 100644 --- a/MANIFEST +++ b/MANIFEST @@ -119,6 +119,8 @@ ./config/apple ./config/cce-fflags ./config/cce-flags +./config/clang-cxxflags +./config/clang-flags ./config/commence.am ./config/conclude.am ./config/conclude_fc.am diff --git a/config/clang-cxxflags b/config/clang-cxxflags index 9c283cd..188570e 100644 --- a/config/clang-cxxflags +++ b/config/clang-cxxflags @@ -64,10 +64,11 @@ if test "X-" = "X-$cxx_flags_set"; then else cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 |\ grep 'Apple LLVM version' | sed 's/.*Apple LLVM version \([-a-z0-9\.]*\).*/\1/'`" - cxx_vendor="Apple LLVM" + if test -n "$cxx_version"; then + cxx_vendor="Apple LLVM" + fi fi if test "X-" != "X-$cxx_version"; then - echo "compiler '$CXX' is $cxx_vendor-$cxx_version" # Get the compiler version numbers cxx_vers_major=`echo $cxx_version | cut -f1 -d.` @@ -131,11 +132,7 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then ############## # NDEBUG is handled explicitly by the configure script - if test $cxx_vers_major -le 4; then - PROD_CXXFLAGS= - else - PROD_CXXFLAGS="-fstdarg-opt" - fi + PROD_CXXFLAGS= ######### # Debug # @@ -153,7 +150,7 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then # Symbols # ########### - NO_SYMBOLS_CXXFLAGS="-s" + NO_SYMBOLS_CXXFLAGS= SYMBOLS_CXXFLAGS="-g -fno-omit-frame-pointer" ############# diff --git a/config/clang-flags b/config/clang-flags index e7ade49..18ec5f6 100644 --- a/config/clang-flags +++ b/config/clang-flags @@ -64,10 +64,11 @@ if test "X-" = "X-$cc_flags_set"; then else cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\ grep 'Apple LLVM version' | sed 's/.*Apple LLVM version \([-a-z0-9\.]*\).*/\1/'`" - cc_vendor="Apple LLVM" + if test -n "$cc_version"; then + cc_vendor="Apple LLVM" + fi fi if test "X-" != "X-$cc_version"; then - echo "compiler '$CC' is $cc_vendor-$cc_version" # Get the compiler version numbers cc_vers_major=`echo $cc_version | cut -f1 -d.` @@ -131,11 +132,7 @@ if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then ############## # NDEBUG is handled explicitly by the configure script - if test $cc_vers_major -le 4; then - PROD_CFLAGS= - else - PROD_CFLAGS="-fstdarg-opt" - fi + PROD_CFLAGS= ######### # Debug # @@ -153,7 +150,7 @@ if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then # Symbols # ########### - NO_SYMBOLS_CFLAGS="-s" + NO_SYMBOLS_CFLAGS= SYMBOLS_CFLAGS="-g" ############# diff --git a/config/clang-warnings/error-general b/config/clang-warnings/error-general index a9aa516..558d740 100644 --- a/config/clang-warnings/error-general +++ b/config/clang-warnings/error-general @@ -4,15 +4,20 @@ # -Werror=bad-function-cast -Werror=implicit-function-declaration --Werror=incompatible-pointer-types +#-Werror=incompatible-pointer-types -Werror=missing-declarations -Werror=packed -Werror=shadow --Werror=sometimes-uninitialized +#-Werror=sometimes-uninitialized -Werror=switch # #-Werror=discarded-qualifiers # +# Note: For macos 10.12, etc +# H5Dint.c,H5Dchunk.c,H5Gint.c +# -Wincompatible-pointer-types-discards-qualifiers +# # H5Dvirtual.c,H5SL.c +# -Wsometimes-uninitialized # # NOTE: File Driver files are not compatible with these warnings as errors # H5FDdirect.c,H5FDmpio.c,H5FDros3.c, -- cgit v0.12 From a8a4e9f27b67ae2e22970e42859225adcc2e5cbb Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 9 Jun 2020 16:24:48 -0500 Subject: Eliminate allocating file & memory offset & length arrays when performing I/O on a single element. --- src/H5Dselect.c | 59 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/src/H5Dselect.c b/src/H5Dselect.c index a843d93..c5469c2 100644 --- a/src/H5Dselect.c +++ b/src/H5Dselect.c @@ -113,51 +113,38 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, HDassert(io_info->store); HDassert(io_info->u.rbuf); - /* Get info from API context */ - if(H5CX_get_vec_size(&dxpl_vec_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve I/O vector size") - - /* Allocate the vector I/O arrays */ - if(dxpl_vec_size > H5D_IO_VECTOR_SIZE) - vec_size = dxpl_vec_size; - else - vec_size = H5D_IO_VECTOR_SIZE; - if(NULL == (mem_len = H5FL_SEQ_MALLOC(size_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array") - if(NULL == (mem_off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array") - if(NULL == (file_len = H5FL_SEQ_MALLOC(size_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array") - if(NULL == (file_off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array") - /* Check for only one element in selection */ if(nelmts == 1) { + hsize_t single_mem_off; /* Offset in memory */ + hsize_t single_file_off; /* Offset in the file */ + size_t single_mem_len; /* Length in memory */ + size_t single_file_len; /* Length in the file */ + /* Get offset of first element in selections */ - if(H5S_SELECT_OFFSET(file_space, file_off) < 0) + if(H5S_SELECT_OFFSET(file_space, &single_file_off) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "can't retrieve file selection offset") - if(H5S_SELECT_OFFSET(mem_space, mem_off) < 0) + if(H5S_SELECT_OFFSET(mem_space, &single_mem_off) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "can't retrieve memory selection offset") /* Set up necessary information for I/O operation */ file_nseq = mem_nseq = 1; curr_mem_seq = curr_file_seq = 0; - *file_off *= elmt_size; - *mem_off *= elmt_size; - *file_len = *mem_len = elmt_size; + single_file_off *= elmt_size; + single_mem_off *= elmt_size; + single_file_len = single_mem_len = elmt_size; /* Perform I/O on memory and file sequences */ if(io_info->op_type == H5D_IO_OP_READ) { if((tmp_file_len = (*io_info->layout_ops.readvv)(io_info, - file_nseq, &curr_file_seq, file_len, file_off, - mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0) + file_nseq, &curr_file_seq, &single_file_len, &single_file_off, + mem_nseq, &curr_mem_seq, &single_mem_len, &single_mem_off)) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error") } /* end if */ else { HDassert(io_info->op_type == H5D_IO_OP_WRITE); if((tmp_file_len = (*io_info->layout_ops.writevv)(io_info, - file_nseq, &curr_file_seq, file_len, file_off, - mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0) + file_nseq, &curr_file_seq, &single_file_len, &single_file_off, + mem_nseq, &curr_mem_seq, &single_mem_len, &single_mem_off)) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error") } /* end else */ @@ -168,6 +155,24 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, size_t mem_nelem; /* Number of elements used in memory sequences */ size_t file_nelem; /* Number of elements used in file sequences */ + /* Get info from API context */ + if(H5CX_get_vec_size(&dxpl_vec_size) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve I/O vector size") + + /* Allocate the vector I/O arrays */ + if(dxpl_vec_size > H5D_IO_VECTOR_SIZE) + vec_size = dxpl_vec_size; + else + vec_size = H5D_IO_VECTOR_SIZE; + if(NULL == (mem_len = H5FL_SEQ_MALLOC(size_t, vec_size))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array") + if(NULL == (mem_off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array") + if(NULL == (file_len = H5FL_SEQ_MALLOC(size_t, vec_size))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array") + if(NULL == (file_off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array") + /* Allocate the iterators */ if(NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator") -- cgit v0.12 From 0ef32f07fb9e8fb6063f3318425506047454d6f4 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 9 Jun 2020 18:38:04 -0500 Subject: Remember the info for the last ID looked up for a given ID type. --- src/H5I.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/H5I.c b/src/H5I.c index 2ef3601..1752e5e 100644 --- a/src/H5I.c +++ b/src/H5I.c @@ -67,6 +67,7 @@ typedef struct { unsigned init_count; /* # of times this type has been initialized*/ uint64_t id_count; /* Current number of IDs held */ uint64_t nextid; /* ID to use for the next atom */ + H5I_id_info_t *last_info; /* Info for most recent ID looked up */ H5SL_t *ids; /* Pointer to skip list that stores IDs */ } H5I_id_type_t; @@ -318,6 +319,7 @@ H5I_register_type(const H5I_class_t *cls) type_ptr->cls = cls; type_ptr->id_count = 0; type_ptr->nextid = cls->reserved; + type_ptr->last_info = NULL; if(NULL == (type_ptr->ids = H5SL_create(H5SL_TYPE_HID, NULL))) HGOTO_ERROR(H5E_ATOM, H5E_CANTCREATE, FAIL, "skip list creation failed") } /* end if */ @@ -807,6 +809,9 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref) /* Sanity check for the 'nextid' getting too large and wrapping around */ HDassert(type_ptr->nextid <= ID_MASK); + /* Set the most recent ID to this object */ + type_ptr->last_info = id_ptr; + /* Set return value */ ret_value = new_id; @@ -878,6 +883,9 @@ H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref, h HGOTO_ERROR(H5E_ATOM, H5E_CANTINSERT, FAIL, "can't insert ID node into skip list") type_ptr->id_count++; + /* Set the most recent ID to this object */ + type_ptr->last_info = id_ptr; + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5I_register_using_existing_id() */ @@ -1236,6 +1244,10 @@ H5I__remove_common(H5I_id_type_t *type_ptr, hid_t id) if(NULL == (curr_id = (H5I_id_info_t *)H5SL_remove(type_ptr->ids, &id))) HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, NULL, "can't remove ID node from skip list") + /* Check if this ID was the last one accessed */ + if(type_ptr->last_info == curr_id) + type_ptr->last_info = NULL; + ret_value = (void *)curr_id->obj_ptr; /* (Casting away const OK -QAK) */ curr_id = H5FL_FREE(H5I_id_info_t, curr_id); @@ -2185,8 +2197,16 @@ H5I__find_id(hid_t id) if(!type_ptr || type_ptr->init_count <= 0) HGOTO_DONE(NULL) - /* Locate the ID node for the ID */ - ret_value = (H5I_id_info_t *)H5SL_search(type_ptr->ids, &id); + /* Check for same ID as we have looked up last time */ + if(type_ptr->last_info && type_ptr->last_info->id == id) + ret_value = type_ptr->last_info; + else { + /* Locate the ID node for the ID */ + ret_value = (H5I_id_info_t *)H5SL_search(type_ptr->ids, &id); + + /* Remember this ID */ + type_ptr->last_info = ret_value; + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) -- cgit v0.12 From e66cec622200dbb9c785ef4dae30c780a70a2b1a Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 9 Jun 2020 22:11:25 -0500 Subject: HDFFV-11000: update-testh5cc.sh.in to test sample versioned functions in HDF5 1.10, 1.12 and develop. --- examples/testh5cc.sh.in | 117 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 114 insertions(+), 3 deletions(-) diff --git a/examples/testh5cc.sh.in b/examples/testh5cc.sh.in index 9f766dd..432a2cb 100644 --- a/examples/testh5cc.sh.in +++ b/examples/testh5cc.sh.in @@ -48,6 +48,10 @@ verbose=${HDF5_VERBOSE:-1} # 0: none; 1: default; 2: chatty; 3: everything test $verbose -gt 2 && set -x H5_NO_DEPRECATED_SYMBOLS=`grep '#define H5_NO_DEPRECATED_SYMBOLS ' ../src/H5pubconf.h` H5_USE_16_API_DEFAULT=`grep '#define H5_USE_16_API_DEFAULT ' ../src/H5pubconf.h` +H5_USE_18_API_DEFAULT=`grep '#define H5_USE_18_API_DEFAULT ' ../src/H5pubconf.h` +H5_USE_110_API_DEFAULT=`grep '#define H5_USE_110_API_DEFAULT ' ../src/H5pubconf.h` +H5_USE_112_API_DEFAULT=`grep '#define H5_USE_112_API_DEFAULT ' ../src/H5pubconf.h` +H5_USE_114_API_DEFAULT=`grep '#define H5_USE_114_API_DEFAULT ' ../src/H5pubconf.h` # setup my machine information. myos=`uname -s` @@ -61,6 +65,10 @@ v16main=${H5TOOL}_v16main.$suffix v16main_o=${H5TOOL}_v16main.o v18main=${H5TOOL}_v18main.$suffix v18main_o=${H5TOOL}_v18main.o +v110main=${H5TOOL}_v110main.$suffix +v110main_o=${H5TOOL}_v110main.o +v112main=${H5TOOL}_v112main.$suffix +v112main_o=${H5TOOL}_v112main.o appmain=${H5TOOL}_appmain.$suffix appmain_o=${H5TOOL}_appmain.o prog1=${H5TOOL}_prog1.$suffix @@ -74,7 +82,7 @@ applib=libapp${H5TOOL}.a # Don't use the wildcard form of *.h5 as it will wipe out even *.h5 generated # by otehr test programs. This will cause a racing condition error when # parallel make (e.g., gmake -j 4) is used. -temp_SRC="$hdf5main $v16main $v18main $appmain $prog1 $prog2" +temp_SRC="$hdf5main $v16main $v18main $v110main $v112main $appmain $prog1 $prog2" temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"` temp_FILES="a.out $applib" @@ -196,6 +204,82 @@ main (void) } EOF +# Generate HDF5 v1.10 Main Program: +# This makes unique V1.10 API calls. +cat > $v110main < $v112main < Date: Wed, 10 Jun 2020 09:41:07 -0500 Subject: Add tests for all version to H5_NO_DEPRECATED_SYMBOLS section and to section for current version, with and without default API version flags. --- examples/testh5cc.sh.in | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/examples/testh5cc.sh.in b/examples/testh5cc.sh.in index 432a2cb..71e84ed 100644 --- a/examples/testh5cc.sh.in +++ b/examples/testh5cc.sh.in @@ -388,12 +388,17 @@ TOOLTEST -E $appmain $prog1 $prog2 # Group5: Version compatibility tests. echo "***"Version compatibility tests. -# Test these two cases now. More later. +# 20200610 Updated for versions 1.10 - 1.14. # If H5_NO_DEPRECATED_SYMBOLS; -# then only v18main works. +# then versions v18main, v110main, and v112main work. +# -DH5_USE__API_DEFAULT flags cannot be used with H5_NO_DEPRECATED_SYMBOLS; # else if H5_USE_16_API_DEFAULT; # then v16main works. # else v18main works and -DH5_USE_16_API_DEFAULT v16main also works. +# as new versions with versioned functions are added, they will work with and +# should be added to H5_NO_DEPRECATED_SYMBOLS and to the else section, with and +# without the -DH5_USE__API_DEFAULT flag. A new H5_USE__API_DEFAULT section +# should also be added. # if [ -n "$H5_USE_16_API_DEFAULT" ]; then echo "H5_USE_16_API_DEFAULT is defined." @@ -416,6 +421,9 @@ fi if [ -n "$H5_NO_DEPRECATED_SYMBOLS" ]; then echo "Skipping $v16main test" TOOLTEST $v18main + TOOLTEST $v18main + TOOLTEST $v110main + TOOLTEST $v112main elif [ -n "$H5_USE_16_API_DEFAULT" ]; then echo "Testing HDF5 with 16_API_DEFAULT" TOOLTEST $v16main @@ -440,6 +448,9 @@ else TOOLTEST -DH5_USE_18_API_DEFAULT $v18main TOOLTEST -DH5_USE_110_API_DEFAULT $v110main TOOLTEST -DH5_USE_112_API_DEFAULT $v112main + TOOLTEST $v18main + TOOLTEST $v110main + TOOLTEST $v112main fi ############################################################################## -- cgit v0.12 From 1e038bf49588d163762965c7a15fb76e3a689ef2 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 10 Jun 2020 11:40:59 -0700 Subject: Fix MANIFEST --- MANIFEST | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MANIFEST b/MANIFEST index d9d8ab8..e3c3c50 100644 --- a/MANIFEST +++ b/MANIFEST @@ -145,6 +145,8 @@ ./config/solaris #warnings files for both autotools and CMake +./config/clang-cxxflags +./config/clang-flags ./config/clang-warnings/developer-general ./config/clang-warnings/error-general ./config/clang-warnings/general -- cgit v0.12 From 77efb340a1b06465587ca9dd4599271409a86a44 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 10 Jun 2020 14:25:10 -0500 Subject: Make changes to CMake CompilerFlags.cmake files so extra flags are loaded for non-GNU compilers. --- config/clang-warnings/developer-general | 1 + config/clang-warnings/error-general | 12 +++---- config/cmake/HDFCXXCompilerFlags.cmake | 56 ++++++++++++++------------------- config/cmake/HDFCompilerFlags.cmake | 26 +++++---------- 4 files changed, 35 insertions(+), 60 deletions(-) diff --git a/config/clang-warnings/developer-general b/config/clang-warnings/developer-general index aa8c32e..74d8404 100644 --- a/config/clang-warnings/developer-general +++ b/config/clang-warnings/developer-general @@ -1,3 +1,4 @@ -Wformat-nonliteral -Wmissing-noreturn +-Wsometimes-uninitialized -Wswitch-enum diff --git a/config/clang-warnings/error-general b/config/clang-warnings/error-general index 558d740..883dff7 100644 --- a/config/clang-warnings/error-general +++ b/config/clang-warnings/error-general @@ -4,20 +4,16 @@ # -Werror=bad-function-cast -Werror=implicit-function-declaration -#-Werror=incompatible-pointer-types +-Werror=incompatible-pointer-types -Werror=missing-declarations -Werror=packed -Werror=shadow -#-Werror=sometimes-uninitialized -Werror=switch # -#-Werror=discarded-qualifiers +# NOTE: Following files are not compatible with incompatible-pointer-types as errors +# src/H5Dchunk.c,src/H5Dint.c,src/H5Gint.c,src/H5HFcache.c,src/H5I.c,src/H5T.c +-Wno-error=incompatible-pointer-types-discards-qualifiers # -# Note: For macos 10.12, etc -# H5Dint.c,H5Dchunk.c,H5Gint.c -# -Wincompatible-pointer-types-discards-qualifiers -# # H5Dvirtual.c,H5SL.c -# -Wsometimes-uninitialized # # NOTE: File Driver files are not compatible with these warnings as errors # H5FDdirect.c,H5FDmpio.c,H5FDros3.c, diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 8527327..7bbebbc 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -40,7 +40,7 @@ if (HDF5_DISABLE_COMPILER_WARNINGS) # warning level is given, so remove it. if (MSVC) set (HDF5_WARNINGS_BLOCKED 1) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + if (CMAKE_CXX_COMPILER_LOADED) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0") endif () @@ -51,7 +51,7 @@ if (HDF5_DISABLE_COMPILER_WARNINGS) # Most compilers use -w to suppress warnings. if (NOT HDF5_WARNINGS_BLOCKED) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + if (CMAKE_CXX_COMPILER_LOADED) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w") endif () endif () @@ -65,7 +65,7 @@ endif () # CDash is configured to only allow 3000 warnings, so # break into groups (from the config/gnu-flags file) #----------------------------------------------------------------------------- -if (NOT MSVC) +if (NOT MSVC AND NOT MINGW) if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") list (APPEND HDF5_CMAKE_CXX_FLAGS "-erroff=%none -DBSD_COMP") else () @@ -194,7 +194,9 @@ if (NOT MSVC) endif () endif () else () + if (NOT MINGW) list (APPEND HDF5_CMAKE_CXX_FLAGS "/EHsc") + endif () endif () #----------------------------------------------------------------------------- @@ -204,21 +206,19 @@ if (HDF5_ENABLE_ALL_WARNINGS) message (STATUS "....All Warnings are enabled") if (MSVC) if (HDF5_ENABLE_DEV_WARNINGS) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + if (CMAKE_CXX_COMPILER_LOADED) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") list (APPEND HDF5_CMAKE_CXX_FLAGS "/Wall /wd4668") endif () else () - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + if (CMAKE_CXX_COMPILER_LOADED) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") list (APPEND HDF5_CMAKE_CXX_FLAGS "/W3") endif () endif () else () - if (CMAKE_COMPILER_IS_GNUCC) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS0} ${H5_CXXFLAGS1} ${H5_CXXFLAGS2} ${H5_CXXFLAGS3} ${H5_CXXFLAGS4}) - endif () + if (CMAKE_CXX_COMPILER_LOADED) + list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS0} ${H5_CXXFLAGS1} ${H5_CXXFLAGS2} ${H5_CXXFLAGS3} ${H5_CXXFLAGS4}) endif () endif () endif () @@ -229,15 +229,13 @@ endif () if (HDF5_ENABLE_GROUPZERO_WARNINGS) message (STATUS "....Group Zero warnings are enabled") if (MSVC) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + if (CMAKE_CXX_COMPILER_LOADED) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}") list (APPEND HDF5_CMAKE_CXX_FLAGS "/W1") endif () else () - if (CMAKE_COMPILER_IS_GNUCC) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS0}) - endif () + if (CMAKE_CXX_COMPILER_LOADED) + list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS0}) endif () endif () endif () @@ -248,15 +246,13 @@ endif () if (HDF5_ENABLE_GROUPONE_WARNINGS) message (STATUS "....Group One warnings are enabled") if (MSVC) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + if (CMAKE_CXX_COMPILER_LOADED) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}") list (APPEND HDF5_CMAKE_CXX_FLAGS "/W2") endif () else () - if (CMAKE_COMPILER_IS_GNUCC) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS1}) - endif () + if (CMAKE_CXX_COMPILER_LOADED) + list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS1}) endif () endif () endif () @@ -267,15 +263,13 @@ endif () if (HDF5_ENABLE_GROUPTWO_WARNINGS) message (STATUS "....Group Two warnings are enabled") if (MSVC) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + if (CMAKE_CXX_COMPILER_LOADED) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}") list (APPEND HDF5_CMAKE_CXX_FLAGS "/W3") endif () else () - if (CMAKE_COMPILER_IS_GNUCC) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS2}) - endif () + if (CMAKE_CXX_COMPILER_LOADED) + list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS2}) endif () endif () endif () @@ -286,15 +280,13 @@ endif () if (HDF5_ENABLE_GROUPTHREE_WARNINGS) message (STATUS "....Group Three warnings are enabled") if (MSVC) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + if (CMAKE_CXX_COMPILER_LOADED) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}") list (APPEND HDF5_CMAKE_CXX_FLAGS "/W4") endif () else () - if (CMAKE_COMPILER_IS_GNUCC) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS3}) - endif () + if (CMAKE_CXX_COMPILER_LOADED) + list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS3}) endif () endif () endif () @@ -305,10 +297,8 @@ endif () if (HDF5_ENABLE_GROUPFOUR_WARNINGS) message (STATUS "....Group Four warnings are enabled") if (NOT MSVC) - if (CMAKE_COMPILER_IS_GNUCC) - if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS4}) - endif () + if (CMAKE_CXX_COMPILER_LOADED) + list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS4}) endif () endif () endif () diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index cd4ab48..31af2f8 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -68,7 +68,7 @@ endif () # CDash is configured to only allow 3000 warnings, so # break into groups (from the config/gnu-flags file) #----------------------------------------------------------------------------- -if (NOT MSVC) +if (NOT MSVC AND NOT MINGW) if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") list (APPEND HDF5_CMAKE_C_FLAGS "-erroff=%none -DBSD_COMP") else () @@ -209,9 +209,7 @@ if (HDF5_ENABLE_ALL_WARNINGS) list (APPEND HDF5_CMAKE_C_FLAGS "/W3") endif () else () - if (CMAKE_COMPILER_IS_GNUCC) - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS0} ${H5_CFLAGS1} ${H5_CFLAGS2} ${H5_CFLAGS3} ${H5_CFLAGS4}) - endif () + list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS0} ${H5_CFLAGS1} ${H5_CFLAGS2} ${H5_CFLAGS3} ${H5_CFLAGS4}) endif () endif () @@ -225,9 +223,7 @@ if (HDF5_ENABLE_GROUPZERO_WARNINGS) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}") list (APPEND HDF5_CMAKE_C_FLAGS "/W1") else () - if (CMAKE_COMPILER_IS_GNUCC) - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS0}) - endif () + list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS0}) endif () endif () @@ -241,9 +237,7 @@ if (HDF5_ENABLE_GROUPONE_WARNINGS) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}") list (APPEND HDF5_CMAKE_C_FLAGS "/W2") else () - if (CMAKE_COMPILER_IS_GNUCC) - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS1}) - endif () + list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS1}) endif () endif () @@ -257,9 +251,7 @@ if (HDF5_ENABLE_GROUPTWO_WARNINGS) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}") list (APPEND HDF5_CMAKE_C_FLAGS "/W3") else () - if (CMAKE_COMPILER_IS_GNUCC) - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS2}) - endif () + list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS2}) endif () endif () @@ -273,9 +265,7 @@ if (HDF5_ENABLE_GROUPTHREE_WARNINGS) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}") list (APPEND HDF5_CMAKE_C_FLAGS "/W4") else () - if (CMAKE_COMPILER_IS_GNUCC) - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS3}) - endif () + list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS3}) endif () endif () @@ -286,9 +276,7 @@ option (HDF5_ENABLE_GROUPFOUR_WARNINGS "Enable group four warnings" OFF) if (HDF5_ENABLE_GROUPFOUR_WARNINGS) message (STATUS "....Group Four warnings are enabled") if (NOT MSVC) - if (CMAKE_COMPILER_IS_GNUCC) - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS4}) - endif () + list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS4}) endif () endif () -- cgit v0.12 From 20eab963899841c9a003baebead8e3bc07d9e127 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 10 Jun 2020 15:17:32 -0500 Subject: Remove duplicate entries in MANIFEST. --- MANIFEST | 2 -- 1 file changed, 2 deletions(-) diff --git a/MANIFEST b/MANIFEST index 998009a..e3c3c50 100644 --- a/MANIFEST +++ b/MANIFEST @@ -119,8 +119,6 @@ ./config/apple ./config/cce-fflags ./config/cce-flags -./config/clang-cxxflags -./config/clang-flags ./config/commence.am ./config/conclude.am ./config/conclude_fc.am -- cgit v0.12 From 715055bfdd8c5295d098a45c11b3782c012c6b51 Mon Sep 17 00:00:00 2001 From: buildbot Date: Wed, 10 Jun 2020 16:52:46 -0500 Subject: Add c++ to --enable-sanitize-checks option. --- config/clang-cxxflags | 2 +- configure.ac | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/clang-cxxflags b/config/clang-cxxflags index 188570e..a37509f 100644 --- a/config/clang-cxxflags +++ b/config/clang-cxxflags @@ -143,7 +143,7 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then if test $cxx_vers_major -le 4; then DEBUG_CXXFLAGS= else - DEBUG_CXXFLAGS="-ftrapv -fno-common -fsanitize=address" + DEBUG_CXXFLAGS="-ftrapv -fno-common" fi ########### diff --git a/configure.ac b/configure.ac index cf1e463..9480033 100644 --- a/configure.ac +++ b/configure.ac @@ -338,8 +338,10 @@ if test "X$CC_BASENAME" = "Xclang"; then # NOTE: No sanity checking done here! if test -n "$CLANG_SANITIZE_LIST"; then H5_CFLAGS="$H5_CFLAGS -fno-omit-frame-pointer" + H5_CXXFLAGS="$H5_CXXFLAGS -fno-omit-frame-pointer" for sanitizer in `echo $CLANG_SANITIZE_LIST`; do H5_CFLAGS="$H5_CFLAGS -fsanitize=${sanitizer}" + H5_CXXFLAGS="$H5_CXXFLAGS -fsanitize=${sanitizer}" done fi fi -- cgit v0.12 From c597bd50d22a8631c237237fefdac276229ca91d Mon Sep 17 00:00:00 2001 From: vchoi Date: Thu, 11 Jun 2020 13:17:35 -0500 Subject: Fix for HDFFV-10961: add description to usage for --increment option. --- tools/src/misc/h5clear.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c index 2c85e75..f95d1bc 100644 --- a/tools/src/misc/h5clear.c +++ b/tools/src/misc/h5clear.c @@ -101,8 +101,13 @@ static void usage(const char *prog) HDfprintf(stdout, " -s, --status Clear the status_flags field in the file's superblock\n"); HDfprintf(stdout, " -m, --image Remove the metadata cache image from the file\n"); HDfprintf(stdout, " --filesize Print the file's EOA and EOF\n"); - HDfprintf(stdout, " --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for the file \n"); - HDfprintf(stdout, " C is >= 0; C is optional and will default to 1M when not set"); + HDfprintf(stdout, " --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for\n"); + HDfprintf(stdout, " the file .\n"); + HDfprintf(stdout, " C is >= 0; C is optional and will default to 1M when not set.\n"); + HDfprintf(stdout, " This option helps to repair a crashed file where the stored EOA\n"); + HDfprintf(stdout, " in the superblock is different from the actual EOF.\n"); + HDfprintf(stdout, " The file’s EOA and EOF will be the same after applying\n"); + HDfprintf(stdout, " this option to the file.\n"); HDfprintf(stdout, "\n"); HDfprintf(stdout, "Examples of use:\n"); HDfprintf(stdout, "\n"); -- cgit v0.12 From 01b632c69ca1c97c2b0e1aaeeab1dd2362b580a6 Mon Sep 17 00:00:00 2001 From: vchoi Date: Thu, 11 Jun 2020 14:12:38 -0500 Subject: Fix for HDFFV-10961: Couple changes to the tests' usage output files for h5clear. --- tools/test/misc/testfiles/h5clear_missing_file.ddl | 10 ++++++++-- tools/test/misc/testfiles/h5clear_usage.ddl | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tools/test/misc/testfiles/h5clear_missing_file.ddl b/tools/test/misc/testfiles/h5clear_missing_file.ddl index 32dd549..c4d21c9 100644 --- a/tools/test/misc/testfiles/h5clear_missing_file.ddl +++ b/tools/test/misc/testfiles/h5clear_missing_file.ddl @@ -5,8 +5,14 @@ usage: h5clear [OPTIONS] file_name -s, --status Clear the status_flags field in the file's superblock -m, --image Remove the metadata cache image from the file --filesize Print the file's EOA and EOF - --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for the file - C is >= 0; C is optional and will default to 1M when not set + --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for + the file . + C is >= 0; C is optional and will default to 1M when not set. + This option helps to repair a crashed file where the stored EOA + in the superblock is different from the actual EOF. + The file’s EOA and EOF will be the same after applying + this option to the file. + Examples of use: h5clear -s file_name diff --git a/tools/test/misc/testfiles/h5clear_usage.ddl b/tools/test/misc/testfiles/h5clear_usage.ddl index 32dd549..c4d21c9 100644 --- a/tools/test/misc/testfiles/h5clear_usage.ddl +++ b/tools/test/misc/testfiles/h5clear_usage.ddl @@ -5,8 +5,14 @@ usage: h5clear [OPTIONS] file_name -s, --status Clear the status_flags field in the file's superblock -m, --image Remove the metadata cache image from the file --filesize Print the file's EOA and EOF - --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for the file - C is >= 0; C is optional and will default to 1M when not set + --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for + the file . + C is >= 0; C is optional and will default to 1M when not set. + This option helps to repair a crashed file where the stored EOA + in the superblock is different from the actual EOF. + The file’s EOA and EOF will be the same after applying + this option to the file. + Examples of use: h5clear -s file_name -- cgit v0.12 From 998c6470d78e14228695419c3b514c35ecf3d69e Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Fri, 12 Jun 2020 11:54:58 -0500 Subject: Remove unnecessary version conditions for Clang compilers. --- config/clang-cxxflags | 17 +++-------------- config/clang-flags | 17 +++-------------- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/config/clang-cxxflags b/config/clang-cxxflags index a37509f..edd62e7 100644 --- a/config/clang-cxxflags +++ b/config/clang-cxxflags @@ -140,11 +140,7 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then # NDEBUG is handled explicitly by the configure script # -g is handled by the symbols flags - if test $cxx_vers_major -le 4; then - DEBUG_CXXFLAGS= - else - DEBUG_CXXFLAGS="-ftrapv -fno-common" - fi + DEBUG_CXXFLAGS="-ftrapv -fno-common" ########### # Symbols # @@ -163,13 +159,8 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then # Optimization # ################ - if test $cxx_vers_major -le 4; then - HIGH_OPT_CXXFLAGS="-O3" - DEBUG_OPT_CXXFLAGS= - else - HIGH_OPT_CXXFLAGS="-O3" - DEBUG_OPT_CXXFLAGS="-g" - fi + HIGH_OPT_CXXFLAGS="-O3" + DEBUG_OPT_CXXFLAGS="-g" NO_OPT_CXXFLAGS="-O0" ############ @@ -183,8 +174,6 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then H5_CXXFLAGS="$H5_CXXFLAGS $(load_clang_arguments general)" H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_clang_arguments error-general)" -echo "H5_CXXFLAGS: $H5_CXXFLAGS" - ###################### # Developer warnings # ###################### diff --git a/config/clang-flags b/config/clang-flags index 18ec5f6..b4f5e2e 100644 --- a/config/clang-flags +++ b/config/clang-flags @@ -140,11 +140,7 @@ if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then # NDEBUG is handled explicitly by the configure script # -g is handled by the symbols flags - if test $cc_vers_major -le 4; then - DEBUG_CFLAGS= - else - DEBUG_CFLAGS="-ftrapv -fno-common" - fi + DEBUG_CFLAGS="-ftrapv -fno-common" ########### # Symbols # @@ -163,13 +159,8 @@ if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then # Optimization # ################ - if test $cc_vers_major -le 4; then - HIGH_OPT_CFLAGS="-O3" - DEBUG_OPT_CFLAGS= - else - HIGH_OPT_CFLAGS="-O3" - DEBUG_OPT_CFLAGS="-g" - fi + HIGH_OPT_CFLAGS="-O3" + DEBUG_OPT_CFLAGS="-g" NO_OPT_CFLAGS="-O0" ############ @@ -183,8 +174,6 @@ if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then H5_CFLAGS="$H5_CFLAGS $(load_clang_arguments general)" H5_ECFLAGS="$H5_ECFLAGS $(load_clang_arguments error-general)" -echo "H5_CFLAGS: $H5_CFLAGS" - ###################### # Developer warnings # ###################### -- cgit v0.12 From 49fad72f3e003e1e2d7d72edd9b7ec47c802d9f1 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 16 Jun 2020 12:30:08 -0500 Subject: Reduce overhead for H5open, which is involved in the public symbols like H5T_NATIVE_INT, etc. --- src/H5.c | 8 +++++--- src/H5private.h | 29 +++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/src/H5.c b/src/H5.c index bd78ca2..31b8546 100644 --- a/src/H5.c +++ b/src/H5.c @@ -938,11 +938,13 @@ H5open(void) { herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_API_NOCLEAR(FAIL) - H5TRACE0("e",""); + FUNC_ENTER_API_NOPUSH(FAIL) + /*NO TRACE*/ + /* all work is done by FUNC_ENTER() */ + done: - FUNC_LEAVE_API(ret_value) + FUNC_LEAVE_API_NOPUSH(ret_value) } /* end H5open() */ diff --git a/src/H5private.h b/src/H5private.h index 2236ee6..aca4851 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -2145,8 +2145,9 @@ H5_DLL herr_t H5CX_pop(void); } /* end if */ \ \ /* Initialize the package, if appropriate */ \ - H5_PACKAGE_INIT(H5_MY_PKG_INIT, err) \ - \ + H5_PACKAGE_INIT(H5_MY_PKG_INIT, err) + +#define FUNC_ENTER_API_PUSH(err) \ /* Push the name of this function on the function stack */ \ H5_PUSH_FUNC \ \ @@ -2160,6 +2161,7 @@ H5_DLL herr_t H5CX_pop(void); #define FUNC_ENTER_API(err) {{ \ FUNC_ENTER_API_COMMON \ FUNC_ENTER_API_INIT(err); \ + FUNC_ENTER_API_PUSH(err); \ /* Clear thread error stack entering public functions */ \ H5E_clear_stack(NULL); \ { @@ -2171,6 +2173,7 @@ H5_DLL herr_t H5CX_pop(void); #define FUNC_ENTER_API_NOCLEAR(err) {{ \ FUNC_ENTER_API_COMMON \ FUNC_ENTER_API_INIT(err); \ + FUNC_ENTER_API_PUSH(err); \ { /* @@ -2200,6 +2203,18 @@ H5_DLL herr_t H5CX_pop(void); BEGIN_MPE_LOG \ { +/* + * Use this macro for API functions that should only perform initialization + * of the library or an interface, but not push any state (API context, + * function name, start MPE logging, etc) examples are: H5open. + * + */ +#define FUNC_ENTER_API_NOPUSH(err) {{{{{ \ + FUNC_ENTER_COMMON(H5_IS_API(FUNC)); \ + FUNC_ENTER_API_THREADSAFE; \ + FUNC_ENTER_API_INIT(err); \ + { + /* Note: this macro only works when there's _no_ interface initialization routine for the module */ #define FUNC_ENTER_NOAPI_INIT(err) \ /* Initialize the package, if appropriate */ \ @@ -2389,6 +2404,16 @@ H5_DLL herr_t H5CX_pop(void); return(ret_value); \ }}}} /*end scope from beginning of FUNC_ENTER*/ +/* Use this macro to match the FUNC_ENTER_API_NOPUSH macro */ +#define FUNC_LEAVE_API_NOPUSH(ret_value) \ + ; \ + } /*end scope from end of FUNC_ENTER*/ \ + if(err_occurred) \ + (void)H5E_dump_api_stack(TRUE); \ + FUNC_LEAVE_API_THREADSAFE \ + return(ret_value); \ +}}}}} /*end scope from beginning of FUNC_ENTER*/ + #define FUNC_LEAVE_NOAPI(ret_value) \ ; \ } /*end scope from end of FUNC_ENTER*/ \ -- cgit v0.12 From c12da4884f18dda4c9dbc23efd10eb053ec7cf0d Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Fri, 19 Jun 2020 10:53:32 -0500 Subject: Fix HDFFV-10591 Description: h52gif produced a segfault when a buffer overflow occurred because the data size was corrupted and became very large. This commit added a check on the data size against the buffer size to prevent the segfault. It also added error reporting to h52gif to display an error message instead of silently exiting when the failure occurred. Platforms tested: Linux/64 (jelly) SunOS 5.11 (emu) --- hl/src/H5IM.c | 3 ++- hl/tools/gif2h5/hdf2gif.c | 33 ++++++++++++++++++++++----------- src/H5Oattr.c | 5 +++++ 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index 2a7ed9b..6f7414b 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -274,7 +274,8 @@ herr_t H5IMget_image_info( hid_t loc_id, return -1; /* Try to find the attribute "INTERLACE_MODE" on the >>image<< dataset */ - has_attr = H5LT_find_attribute(did, "INTERLACE_MODE"); + if ((has_attr = H5LT_find_attribute(did, "INTERLACE_MODE")) < 0) + goto out; /* It exists, get it */ if(has_attr == 1) diff --git a/hl/tools/gif2h5/hdf2gif.c b/hl/tools/gif2h5/hdf2gif.c index e32facb..0e2a898 100644 --- a/hl/tools/gif2h5/hdf2gif.c +++ b/hl/tools/gif2h5/hdf2gif.c @@ -149,30 +149,41 @@ int main(int argc , char **argv) goto out; } - /* read image */ + /* get image's information */ if ( H5IMget_image_info( fid, image_name, &width, &height, &planes, interlace, &npals ) < 0 ) + { + fprintf(stderr , "Unable to get information of the image. Aborting.\n"); goto out; + } - if (width > IMAGE_WIDTH_MAX || height > IMAGE_HEIGHT_MAX){ - fprintf(stderr, "HDF5 image is too large. Limit is %d by %d.\n", IMAGE_WIDTH_MAX, IMAGE_HEIGHT_MAX); - goto out; - } + if (width > IMAGE_WIDTH_MAX || height > IMAGE_HEIGHT_MAX) + { + fprintf(stderr, "HDF5 image is too large. Limit is %d by %d.\n", IMAGE_WIDTH_MAX, IMAGE_HEIGHT_MAX); + goto out; + } - /* tool can handle single plane images only. */ - if (planes > 1){ - fprintf(stderr, "Cannot handle multiple planes image\n"); - goto out; - } + /* tool can handle single plane images only. */ + if (planes > 1) + { + fprintf(stderr, "Cannot handle multiple planes image\n"); + goto out; + } Image = (GIFBYTE*) malloc( (size_t) width * (size_t) height ); if ( H5IMread_image( fid, image_name, Image ) < 0 ) + { + fprintf(stderr , "Unable to read the image. Aborting.\n"); goto out; + } if (npals) { if ( H5IMget_palette_info( fid, image_name, 0, pal_dims ) < 0 ) + { + fprintf(stderr , "Unable to get information of the palette. Aborting.\n"); goto out; + } pal = (GIFBYTE*) malloc( (size_t) pal_dims[0] * (size_t) pal_dims[1] ); @@ -246,7 +257,7 @@ int main(int argc , char **argv) if (j==i) { /* wasn't found */ - pc2nc[i] = (GIFBYTE)nc; + pc2nc[i] = (GIFBYTE)nc; r1[nc] = Red[i]; g1[nc] = Green[i]; b1[nc] = Blue[i]; diff --git a/src/H5Oattr.c b/src/H5Oattr.c index aeaebea..e38ef5c 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -238,6 +238,11 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, /* Go get the data */ if(attr->shared->data_size) { + /* Ensure that data size doesn't exceed buffer size, in case of + it's being corrupted in the file */ + if(attr->shared->data_size > p_size) + HGOTO_ERROR(H5E_RESOURCE, H5E_OVERFLOW, NULL, "data size exceeds buffer size") + if(NULL == (attr->shared->data = H5FL_BLK_MALLOC(attr_buf, attr->shared->data_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") H5MM_memcpy(attr->shared->data, p, attr->shared->data_size); -- cgit v0.12 From 7d58d115079d286a566207c529e59bbccc952b03 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Fri, 19 Jun 2020 16:08:37 -0500 Subject: Added note for HDFFV-10591. --- release_docs/RELEASE.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 102402e..72cab28 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -631,6 +631,18 @@ Bug Fixes since HDF5-1.10.3 release Library ------- + - Fixed the decoding of an attribute message to prevent a segfault by h52gif + + The tool h52gif produced a segfault when the size of an attribute + message was corrupted and caused a buffer overflow. + + The problem was fixed by verifying the attribute message's size + against the buffer size before accessing the buffer. h52gif was + also fixed to display the failure instead of silently exiting + after the segfault was eliminated. + + (BMR - 2020/6/19, HDFFV-10591) + - Improved peformance when creating a large number of small datasets by retrieving default property values from the API context instead of doing skip list searches. -- cgit v0.12 From e1215177b6b87887233a90992a0264f11d78b88c Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Thu, 25 Jun 2020 12:24:05 -0500 Subject: * Fix intermittent error with Splitter VFD. Mismatch in time of test file creation was creating false negatives. Add file-duplication routine: `h5_duplicate_file_by_bytes()`. * Change library calls in `h5test.c:h5_compare_file_bytes()` to their HD-prefixed equivalents. --- test/h5test.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++----------- test/h5test.h | 1 + test/vfd.c | 80 ++++++++++++++++++++++++------------------- 3 files changed, 134 insertions(+), 54 deletions(-) diff --git a/test/h5test.c b/test/h5test.c index 9cca100..1b445dd 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -2057,23 +2057,23 @@ h5_get_version_string(H5F_libver_t libver) int h5_compare_file_bytes(char *f1name, char *f2name) { - FILE *f1ptr = NULL; /* two file pointers */ - FILE *f2ptr = NULL; - hsize_t f1size = 0; /* size of the files */ - hsize_t f2size = 0; - char f1char = 0; /* one char from each file */ - char f2char = 0; - hsize_t ii = 0; - int ret_value = 0; /* for error handling */ + FILE *f1ptr = NULL; /* two file pointers */ + FILE *f2ptr = NULL; + off_t f1size = 0; /* size of the files */ + off_t f2size = 0; + char f1char = 0; /* one char from each file */ + char f2char = 0; + off_t ii = 0; + int ret_value = 0; /* for error handling */ /* Open files for reading */ - f1ptr = fopen(f1name, "r"); + f1ptr = HDfopen(f1name, "r"); if (f1ptr == NULL) { HDfprintf(stderr, "Unable to fopen() %s\n", f1name); ret_value = -1; goto done; } - f2ptr = fopen(f2name, "r"); + f2ptr = HDfopen(f2name, "r"); if (f2ptr == NULL) { HDfprintf(stderr, "Unable to fopen() %s\n", f2name); ret_value = -1; @@ -2081,11 +2081,11 @@ h5_compare_file_bytes(char *f1name, char *f2name) } /* Get the file sizes and verify that they equal */ - fseek(f1ptr , 0 , SEEK_END); - f1size = ftell(f1ptr); + HDfseek(f1ptr , 0 , SEEK_END); + f1size = HDftell(f1ptr); - fseek(f2ptr , 0 , SEEK_END); - f2size = ftell(f2ptr); + HDfseek(f2ptr , 0 , SEEK_END); + f2size = HDftell(f2ptr); if (f1size != f2size) { HDfprintf(stderr, "Files differ in size, %llu vs. %llu\n", f1size, f2size); @@ -2094,11 +2094,11 @@ h5_compare_file_bytes(char *f1name, char *f2name) } /* Compare each byte and fail if a difference is found */ - rewind(f1ptr); - rewind(f2ptr); + HDrewind(f1ptr); + HDrewind(f2ptr); for (ii = 0; ii < f1size; ii++) { - fread(&f1char, 1, 1, f1ptr); - fread(&f2char, 1, 1, f2ptr); + HDfread(&f1char, 1, 1, f1ptr); + HDfread(&f2char, 1, 1, f2ptr); if (f1char != f2char) { HDfprintf(stderr, "Mismatch @ 0x%llX: 0x%X != 0x%X\n", ii, f1char, f2char); ret_value = -1; @@ -2108,10 +2108,10 @@ h5_compare_file_bytes(char *f1name, char *f2name) done: if (f1ptr) { - fclose(f1ptr); + HDfclose(f1ptr); } if (f2ptr) { - fclose(f2ptr); + HDfclose(f2ptr); } return(ret_value); } /* end h5_compare_file_bytes() */ @@ -2169,3 +2169,70 @@ const char *H5_get_srcdir(void) return(NULL); } /* end H5_get_srcdir() */ +/*------------------------------------------------------------------------- + * Function: h5_duplicate_file_by_bytes + * + * Purpose: Duplicate a file byte-for-byte at filename/path 'orig' + * to a new (or replaced) file at 'dest'. + * + * Return: Success: 0, completed successfully + * Failure: -1 + * + * Programmer: Jake Smith + * 24 June 2020 + * + *------------------------------------------------------------------------- + */ +int +h5_duplicate_file_by_bytes(const char *orig, const char *dest) +{ + FILE *orig_ptr = NULL; + FILE *dest_ptr = NULL; + hsize_t fsize = 0; + hsize_t read_size = 0; + hsize_t max_buf = 0; + void *dup_buf = NULL; + int ret_value = 0; + + max_buf = 4096 * sizeof(char); + + orig_ptr = HDfopen(orig, "r"); + if (NULL == orig_ptr) { + ret_value = -1; + goto done; + } + + HDfseek(orig_ptr , 0 , SEEK_END); + fsize = (hsize_t)HDftell(orig_ptr); + HDrewind(orig_ptr); + + dest_ptr = HDfopen(dest, "w"); + if (NULL == dest_ptr) { + ret_value = -1; + goto done; + } + + read_size = MIN(fsize, max_buf); + dup_buf = HDmalloc(read_size); + if (NULL == dup_buf) { + ret_value = -1; + goto done; + } + + while (read_size > 0) { + HDfread(dup_buf, read_size, 1, orig_ptr); /* warning: no error-check */ + HDfwrite(dup_buf, read_size, 1, dest_ptr); + fsize -= read_size; + read_size = MIN(fsize, max_buf); + } + +done: + if (orig_ptr != NULL) + HDfclose(orig_ptr); + if (dest_ptr != NULL) + HDfclose(dest_ptr); + if (dup_buf != NULL) + HDfree(dup_buf); + return ret_value; +} /* end h5_duplicate_file_by_bytes() */ + diff --git a/test/h5test.h b/test/h5test.h index b1ddc58..3eeb1f8 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -210,6 +210,7 @@ H5TEST_DLL H5FD_class_t *h5_get_dummy_vfd_class(void); H5TEST_DLL H5VL_class_t *h5_get_dummy_vol_class(void); H5TEST_DLL const char *h5_get_version_string(H5F_libver_t libver); H5TEST_DLL int h5_compare_file_bytes(char *fname1, char *fname2); +H5TEST_DLL int h5_duplicate_file_by_bytes(const char *orig, const char *dest); /* Functions that will replace components of a FAPL */ H5TEST_DLL herr_t h5_get_vfd_fapl(hid_t fapl_id); diff --git a/test/vfd.c b/test/vfd.c index d94aec6..038c967 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -2880,6 +2880,7 @@ done: static int splitter_tentative_open_test(hid_t child_fapl_id) { + const char filename_tmp[H5FD_SPLITTER_PATH_MAX + 1] = "splitter_tmp.h5"; char filename_rw[H5FD_SPLITTER_PATH_MAX + 1]; H5FD_splitter_vfd_config_t vfd_config; hid_t fapl_id = H5I_INVALID_HID; @@ -2926,7 +2927,16 @@ splitter_tentative_open_test(hid_t child_fapl_id) SPLITTER_TEST_FAULT("set FAPL not SPLITTER\n"); } - /* H5Fopen() with RDWR access. + /* Create instance of file on disk. + * Will be copied verbatim as needed, to avoid issues where differences in + * the creation time would befoul comparisons. + */ + if (splitter_create_single_file_at(filename_tmp, child_fapl_id, &data) < 0) { + SPLITTER_TEST_FAULT("can't write W/O file\n"); + } + + /* + * H5Fopen() with RDWR access. * Neither file exist already * Should fail. */ @@ -2944,13 +2954,14 @@ splitter_tentative_open_test(hid_t child_fapl_id) SPLITTER_TEST_FAULT("W/O file unexpectedly created\n"); } - /* H5Fopen() with RDWR access. - * W/O file exists already. + /* + * H5Fopen() with RDWR access. + * Only W/O file present. * Should fail. */ - if (splitter_create_single_file_at(vfd_config.wo_path, child_fapl_id, &data) < 0) { - SPLITTER_TEST_FAULT("can't write W/O file\n"); + if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config.wo_path) < 0) { + SPLITTER_TEST_FAULT("Can't create W/O file copy.\n"); } H5E_BEGIN_TRY { file_id = H5Fopen(filename_rw, H5F_ACC_RDWR, fapl_id); @@ -2969,13 +2980,14 @@ splitter_tentative_open_test(hid_t child_fapl_id) SPLITTER_TEST_FAULT("failed to remove W/O file\n"); } - /* H5Fopen() with RDWR access. - * R/W file exists already. + /* + * H5Fopen() with RDWR access. + * Only R/W file present. * Should fail. */ - if (splitter_create_single_file_at(filename_rw, child_fapl_id, &data) < 0) { - SPLITTER_TEST_FAULT("can't write R/W file\n"); + if (h5_duplicate_file_by_bytes(filename_tmp, filename_rw) < 0) { + SPLITTER_TEST_FAULT("Can't create R/W file copy.\n"); } H5E_BEGIN_TRY { file_id = H5Fopen(filename_rw, H5F_ACC_RDWR, fapl_id); @@ -2990,12 +3002,13 @@ splitter_tentative_open_test(hid_t child_fapl_id) SPLITTER_TEST_FAULT("W/O file unexpectedly created\n"); } - /* H5Fopen() with RDWR access. - * Both files already exist. + /* + * H5Fopen() with RDWR access. + * Both files present. */ - if (splitter_create_single_file_at(vfd_config.wo_path, child_fapl_id, &data) < 0) { - SPLITTER_TEST_FAULT("can't write W/O file\n"); + if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config.wo_path) < 0) { + SPLITTER_TEST_FAULT("Can't create W/O file copy.\n"); } file_id = H5Fopen(filename_rw, H5F_ACC_RDWR, fapl_id); if (file_id == H5I_INVALID_HID) { @@ -3011,12 +3024,10 @@ splitter_tentative_open_test(hid_t child_fapl_id) if (!file_exists(vfd_config.wo_path, child_fapl_id)) { SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n"); } - if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) { - SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n"); - } - /* H5Fcreate() with TRUNC access. - * Both files already exist. + /* + * H5Fcreate() with TRUNC access. + * Both files present. */ file_id = H5Fcreate(filename_rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); @@ -3036,17 +3047,17 @@ splitter_tentative_open_test(hid_t child_fapl_id) if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) { SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n"); } + HDremove(filename_rw); + HDremove(vfd_config.wo_path); - /* H5Fcreate() with TRUNC access. + /* + * H5Fcreate() with TRUNC access. * R/W already exists. */ - HDremove(filename_rw); - HDremove(vfd_config.wo_path); - if (splitter_create_single_file_at(filename_rw, child_fapl_id, &data) < 0) { - SPLITTER_TEST_FAULT("can't write R/W file\n"); + if (h5_duplicate_file_by_bytes(filename_tmp, filename_rw) < 0) { + SPLITTER_TEST_FAULT("Can't create R/W file copy.\n"); } - if (file_exists(vfd_config.wo_path, child_fapl_id)) { SPLITTER_TEST_FAULT("failed to remove W/O file\n"); } @@ -3067,17 +3078,17 @@ splitter_tentative_open_test(hid_t child_fapl_id) if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) { SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n"); } + HDremove(filename_rw); + HDremove(vfd_config.wo_path); - /* H5Fcreate() with TRUNC access. - * W/O already exists. + /* + * H5Fcreate() with TRUNC access. + * Only W/O present. */ - HDremove(filename_rw); - HDremove(vfd_config.wo_path); - if (splitter_create_single_file_at(vfd_config.wo_path, child_fapl_id, &data) < 0) { - SPLITTER_TEST_FAULT("can't write R/W file\n"); + if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config.wo_path) < 0) { + SPLITTER_TEST_FAULT("Can't create W/O file copy.\n"); } - if (file_exists(filename_rw, child_fapl_id)) { SPLITTER_TEST_FAULT("failed to remove R/W file\n"); } @@ -3098,10 +3109,13 @@ splitter_tentative_open_test(hid_t child_fapl_id) if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) { SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n"); } + HDremove(filename_rw); + HDremove(vfd_config.wo_path); /* H5Fcreate with both files absent is tested elsewhere */ - /* Cleanup + /* + * Cleanup */ if (H5Pclose(fapl_id) < 0) { @@ -3225,7 +3239,6 @@ test_splitter(void) TEST_ERROR; } - /* Test file creation, utilizing different child FAPLs (default vs. * specified), logfile, and Write Channel error ignoring behavior. */ @@ -3251,7 +3264,6 @@ test_splitter(void) /* TODO: SWMR open? */ /* Concurrent opens with both drivers using the Splitter */ - if (H5Pclose(child_fapl_id) == FAIL) { TEST_ERROR; } -- cgit v0.12