Skip to content

Commit

Permalink
Merge branch 'HDFGroup:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee authored Mar 11, 2024
2 parents 2b07eef + ac95411 commit fb9372c
Show file tree
Hide file tree
Showing 96 changed files with 2,919 additions and 2,360 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,13 @@ jobs:
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
if [[ '${{ inputs.use_environ }}' == 'snapshots' ]]
then
SOURCE_NAME_BASE=$(echo "hdfsrc")
else
SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
# Get files created by release script
- name: Get tgz-tarball (Linux S3)
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/FORTRAN/H5D/h5ex_d_extern.F90
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ PROGRAM main
INTEGER :: i, j
! This change was introduced in the 1.8.12 release
#if H5_VERSION_GE(1,8,12)
INTEGER(OFF_T) :: offset = 0 ! Offset, in bytes, from thebeginning of the file to the
INTEGER(OFF_T) :: offset = 0 ! Offset, in bytes, from the beginning of the file to the
! location in the file where the data starts.
#else
INTEGER :: offset = 0
Expand Down
9 changes: 8 additions & 1 deletion HDF5Examples/config/cmake/runTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ if (TEST_FIND_RESULT GREATER -1)
endif ()

# if the output file needs Storage text removed
if (TEST_MASK)
if (TEST_MASK_STORE)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
string (REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
Expand Down Expand Up @@ -205,6 +205,13 @@ if (TEST_MASK_ERROR)
endif ()

# remove text from the output file
if (TEST_MASK)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
string (REGEX REPLACE "${TEST_MASK}" "" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
endif ()

# replace text from the output file
if (TEST_FILTER)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
string (REGEX REPLACE "${TEST_FILTER}" "${TEST_FILTER_REPLACE}" TEST_STREAM "${TEST_STREAM}")
Expand Down
4 changes: 4 additions & 0 deletions c++/src/H5DcreatProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,8 @@ DSetCreatPropList::setFletcher32() const
/// the total size is larger than the size of a dataset then the
/// dataset can be extended (provided the data space also allows
/// the extending).
///\note On Windows, off_t is typically a 32-bit signed long value, which
/// limits the valid offset that can be set to 2 GiB.
//--------------------------------------------------------------------------
void
DSetCreatPropList::setExternal(const char *name, off_t offset, hsize_t size) const
Expand Down Expand Up @@ -693,6 +695,8 @@ DSetCreatPropList::getExternalCount() const
/// external file name will not be returned. If \a offset or
/// \a size are null pointers then the corresponding information
/// will not be returned.
///\note On Windows, off_t is typically a 32-bit signed long value, which
/// limits the valid offset that can be returned to 2 GiB.
//--------------------------------------------------------------------------
void
DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, off_t &offset, hsize_t &size) const
Expand Down
5 changes: 4 additions & 1 deletion c++/test/tfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ static void
test_szip_filter(H5File &file1)
{
#ifdef H5_HAVE_FILTER_SZIP
int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2];
unsigned szip_options_mask = H5_SZIP_NN_OPTION_MASK;
unsigned szip_pixels_per_block = 4;

Expand All @@ -149,6 +148,8 @@ test_szip_filter(H5File &file1)

if (h5_szip_can_encode() == 1) {
char *tconv_buf = new char[1000];
auto points = new int[DSET_DIM1][DSET_DIM2];
auto check = new int[DSET_DIM1][DSET_DIM2];

try {
const hsize_t size[2] = {DSET_DIM1, DSET_DIM2};
Expand Down Expand Up @@ -201,6 +202,8 @@ test_szip_filter(H5File &file1)
}

delete[] tconv_buf;
delete[] points;
delete[] check;
} // if szip presents
else {
SKIPPED();
Expand Down
4 changes: 3 additions & 1 deletion config/cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ if (WINDOWS)
endif ()
if (NOT UNIX AND NOT CYGWIN)
set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1)
set (${HDF_PREFIX}_HAVE_TIMEZONE 1)
if (MSVC_VERSION GREATER_EQUAL 1900)
set (${HDF_PREFIX}_HAVE_TIMEZONE 1)
endif ()
set (${HDF_PREFIX}_HAVE_GETTIMEOFDAY 1)
set (${HDF_PREFIX}_HAVE_LIBWS2_32 1)
set (${HDF_PREFIX}_HAVE_LIBWSOCK32 1)
Expand Down
1 change: 0 additions & 1 deletion config/cmake/HDFCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ if (HDF5_ENABLE_DEBUG_APIS)
H5F_DEBUG
H5MM_DEBUG
H5O_DEBUG
H5S_DEBUG
H5T_DEBUG
H5Z_DEBUG
)
Expand Down
10 changes: 9 additions & 1 deletion config/cmake/runTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ if (TEST_FIND_RESULT GREATER -1)
endif ()

# if the output file needs Storage text removed
if (TEST_MASK)
if (TEST_MASK_STORE)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
string (REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
Expand Down Expand Up @@ -205,8 +205,16 @@ if (TEST_MASK_ERROR)
endif ()

# remove text from the output file
if (TEST_MASK)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
string (REGEX REPLACE "${TEST_MASK}" "" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
endif ()

# replace text from the output file
if (TEST_FILTER)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
message (STATUS "TEST_FILTER: ${TEST_FILTER} TEST_FILTER_REPLACE: ${TEST_FILTER_REPLACE}")
string (REGEX REPLACE "${TEST_FILTER}" "${TEST_FILTER_REPLACE}" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
endif ()
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2572,8 +2572,8 @@ AC_SUBST([INTERNAL_DEBUG_OUTPUT])
## too specialized or have huge performance hits. These
## are not listed in the "all" packages list.
##
## all_packages="AC,B2,D,F,FA,FL,FS,MM,O,S,T,Z"
all_packages="AC,B2,CX,D,F,MM,O,S,T,Z"
## all_packages="AC,B2,CX,D,F,FA,FL,FS,MM,O,T,Z"
all_packages="AC,B2,CX,D,F,MM,O,T,Z"

case "X-$INTERNAL_DEBUG_OUTPUT" in
X-yes|X-all)
Expand Down
8 changes: 7 additions & 1 deletion fortran/src/H5Pff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,9 @@ END SUBROUTINE h5pget_filter_f
!! \param bytes Size of the external file data.
!! \param hdferr \fortran_error
!!
!! \note On Windows, off_t is typically a 32-bit signed long value, which
!! limits the valid offset that can be set to 2 GiB.
!!
!! See C API: @ref H5Pset_external()
!!
SUBROUTINE h5pset_external_f(prp_id, name, offset, bytes, hdferr)
Expand Down Expand Up @@ -1686,9 +1689,12 @@ END SUBROUTINE h5pget_external_count_f
!! \param bytes Size of the external file data.
!! \param hdferr \fortran_error
!!
!! \note On Windows, off_t is typically a 32-bit signed long value, which
!! limits the valid offset that can be returned to 2 GiB.
!!
!! See C API: @ref H5Pget_external()
!!
SUBROUTINE h5pget_external_f(prp_id, idx, name_size, name, offset,bytes, hdferr)
SUBROUTINE h5pget_external_f(prp_id, idx, name_size, name, offset, bytes, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER, INTENT(IN) :: idx
Expand Down
1 change: 0 additions & 1 deletion release_docs/USING_HDF5_CMake.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_${LIB_TYPE}_LIBRARY})
set (example hdf_example)

add_executable (${example} ${PROJECT_SOURCE_DIR}/${example}.c)
TARGET_C_PROPERTIES (${example} PRIVATE ${LIB_TYPE})
target_link_libraries (${example} ${LINK_LIBS})

enable_testing ()
Expand Down
32 changes: 16 additions & 16 deletions src/H5.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,10 @@ H5_term_library(void)
fprintf(stderr, "HDF5: infinite loop closing library\n");
fprintf(stderr, " %s\n", loop);
#ifndef NDEBUG
HDabort();
#endif /* NDEBUG */
} /* end if */
} /* end if */
abort();
#endif
}
}
}

/* Free open debugging streams */
Expand Down Expand Up @@ -831,18 +831,18 @@ H5get_libversion(unsigned *majnum /*out*/, unsigned *minnum /*out*/, unsigned *r
/*-------------------------------------------------------------------------
* Function: H5check_version
*
* Purpose: Verifies that the arguments match the version numbers
* compiled into the library. This function is intended to be
* called from user to verify that the versions of header files
* compiled into the application match the version of the hdf5
* library.
* Within major.minor.release version, the expectation
* is that all release versions are compatible, exceptions to
* this rule must be added to the VERS_RELEASE_EXCEPTIONS list.
* Purpose: Verifies that the arguments match the version numbers
* compiled into the library. This function is intended to be
* called from user to verify that the versions of header files
* compiled into the application match the version of the hdf5
* library.
*
* Return: Success: SUCCEED
* Within major.minor.release version, the expectation
* is that all release versions are compatible, exceptions to
* this rule must be added to the VERS_RELEASE_EXCEPTIONS list.
*
* Failure: abort()
* Return: Success: SUCCEED
* Failure: abort()
*
*-------------------------------------------------------------------------
*/
Expand Down Expand Up @@ -909,7 +909,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)

/* Bail out now. */
fputs("Bye...\n", stderr);
HDabort();
abort();
case 1:
/* continue with a warning */
/* Note that the warning message is embedded in the format string.*/
Expand Down Expand Up @@ -949,7 +949,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)

/* Bail out now. */
fputs("Bye...\n", stderr);
HDabort();
abort();
case 1:
/* continue with a warning */
/* Note that the warning message is embedded in the format string.*/
Expand Down
Loading

0 comments on commit fb9372c

Please sign in to comment.