Sync 1.14 branch with develop (#3887)

* Preserve MPI-I/O file hints when fapl is closed (#3755)

* Fix for issue #3025: Save the MPI info in the file struct so H5Fget_access_plist() can retrieve it from there.

* Add compression tests for subfiling (#3769)

* Fix typo in comment (#3775)

* Fixed a file handle leak in the core VFD (#3779)

When opening a file with the core VFD and a file image, if the file
already exists, the file check would leak the POSIX file handle.

Fixes GitHub issue #635

* Fix a format string warning in the C++ examples (#3776)

* Cancel running GitHub workflows on push to same PR (#3772)

* Cancel running GitHub workflows on push to same PR

* Remove github.sha from workflow concurrency groups

* Print some messages in parallel tests on MPI rank 0 only (#3785)

Avoids overly verbose output from all processes emitting progress, etc. info.

* Avoid attempted use of NULL pointer in parallel compression code (#3786)

The parallel compression test code tests for the case where all MPI ranks have no selection in a dataset when writing to it. Add an early exit to the code to avoid attempting to use a NULL pointer due to there being no work to do.

* Don't install h5tools_test_utils test program on system (#3793)

* Add Doxygen to H5FDsplitter.h (#3794)

* H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION
* H5FD_SPLITTER_PATH_MAX
* H5FD_SPLITTER_MAGIC
* H5FD_splitter_vfd_config_t
* H5Pset_fapl_splitter()
* H5Pget_fapl_splitter()

* Update Doxygen initializers & identifiers in VFDs (#3795)

* Add Doxygen for all H5FD_<VFD> initializers
* Add Doxygen for all H5FD_<VFD>_VALUE values
* Mark H5FD_<vfd>_init() calls private in Doxygen

* Fix memory corruption in 'MPI I/O FAPL preserve' test (#3806)

* Fix usage of h5_clean_files in t_pflush2.c (#3807)

* Fix parallel driver check in h5_fixname_real (#3808)

* Fix a couple usages of MPI_Info_get (#3809)

* Remove H5system.c warning on Windows oneAPI. (#3812)

* Add processing of NVHPC flags in linux-gnulibc1 file (#3804)

* Disable testing as tests are failing the same as in CMake

* Use the current toolchain for examples as default (#3810)

* Fix misc. warnings from GCC when compiling with -fsanitize=undefined (#3787)

* Set NVHPC maximum optimization level to -O1 for now (#3800)

* Set NVHPC maximum optimization level to -O1 for now

Compiling HDF5 with NVHPC 23.5 - 23.9 results in test failures in
4 different test files that need to be resolved. Since those tests
pass with an optimization level of -O1 (and -O0) and it is currently
unclear whether the test failures are due to issues in HDF5 or issues
in the 'nvc' compiler, set the maximum optimization level for NVHPC
to -O1 until the test failures are resolved.

* Disable nvhpc Java testing in CMake and amend known issues

* Re-enable testing of Autotools nvhpc

* Update some doxygen links to local refs (#3814)

* Rework MPI Info FAPL preserve PR to use VFD 'ctl' operations (#3782)

* Removed the use of C wrappers from H5P APIs. (#3824)

* fix seg fault on frontier/cray

* fix seg fault on frontier/cray

* fix seg fault on frontier/cray

* removed the use of h5pclose_c

* removed the use of h5pclose_c

* Fortran Wrappers H5VLnative_addr_to_token_f and H5VLnative_token_to_address_f (#3801)

* Added H5VLnative_addr_to_token_f and H5VLnative_token_to_address_f

* Added H5VLnative_addr_to_token_f and H5VLnative_token_to_address_f tests

* Create test for H5Pget_dxpl_mpio (#3825)

* Create test and add to testphdf5

* Renamed h5fuse.sh to h5fuse (#3834)

* provide an alternative to mapfile for older bash

* Disable FP exceptions in H5T init code (#3837)

The H5T floating-point datatype initialization code can raise exceptions when handling signaling NaNs. This change disables FE_INVALID exceptions during initialization.

Also removes the -ieee=full change for NAG Fortran as that shouldn't be necessary anymore.

Fixes #3831

* Add intel oneapi windows build to CI CMake (#3836)

* Remove printf format warning on Windows oneAPI. (#3838)

* Correct ENV variables (#3841)

* Remove Autotools sed hack (#3848)

configure.ac contains a sed line that cleans up incorrect library
flags which was added to paper over some bugs in earlier versions
of the Autotools. These issues are not a problem with the current
versions of the Autootols.

The sed line causes problems on MacOS, so it has been removed.

Fixes #3843

* Make filter unregister callbacks safe for VOL connectors (#3629)

* Make filter callbacks use top-level API functions

When using VOL connectors, H5I_iterate may not provide
valid object pointers to its callback. This change keeps
existing functionality in H5Zunregister() without using
potentially unsafe pointers.

* Filter callbacks use internal API

* Skip MPI work on non-native VOL

* Add extra space in comments for consistency (#3852)

* Add extra space in comments for consistency

* uncomment tfloatsattrs test

* Update Actions badges to link to relevant workflow (#3850)

* Add CMake long double cross-compile defaults (#3683)

HDF5 performs a couple of checks at build time to see if long double
values can be converted correctly (IBM's Power architecture uses a
special format for long doubles). These checks were performed using
TRY_RUN, which is a problem when cross-compiling.

These checks now use default values appropriate for most non-Power
systems when cross-compiling. The cache values can be pre-set if
necessary, which will preempt both the TRY_RUN and the default.

Affected values:
    H5_LDOUBLE_TO_LONG_SPECIAL      (default no)
    H5_LONG_TO_LDOUBLE_SPECIAL      (default no)
    H5_LDOUBLE_TO_LLONG_ACCURATE    (default yes)
    H5_LLONG_TO_LDOUBLE_CORRECT     (default yes)
    H5_DISABLE_SOME_LDOUBLE_CONV    (default no)

Fixes GitHub #3585

* Updates for building and testing VOL connectors

* Fix issue with HDF5_VOL_ALLOW_EXTERNAL CMake variable

* Initialize parallel testing with MPI_THREAD_MULTIPLE when testing API

* Add CMake variable to allow specifying a VOL connector's package name

* Remove call to MPI_Init in serial API tests

While previously necessary, it now interferes with VOL connectors that
may need to be initialized with MPI_THREAD_MULTIPLE

* Fixes for CI and presets (#3853)

* Change dest for doxygen (#3856)

* Implement selection vector I/O with collective chunk filling (#3826)

* Changes for ECP-344: Implement selection vector I/O with collective chunk filling.
Also fix a bug in H5FD__mpio_write_vector() to account for fixed size optimization
when computing max address.

* Fixes based on PR review comments:
For H5Dchunk.c: fix H5MM_xfree()
For H5FDmpio.c:
1) Revert the fix to H5FD__mpio_write_vector()
2) Apply the patch from Neil on the proper length of s_sizes reported by H5FD__mpio_vector_build_types()

* Put back the logic of dividing up the work among all the mpi ranks similar to the
original H5D__chunk_collective_fill() routine.

* Add a test to verify the fix for the illegal reference problem in H5FD__mpio_write_vector().

* Do not publish compression headers or docs (#3865)

* Fix typo: look -> loop (#3866)

* Moved the README to markdown and expanded its overview of the files, file generation, and other Fortran wrapper development practices as mentioned in the HDF5 architectural document. I added a new figure and included the SVG file and the original xfig file it was generated from. (#3862)

* Add HDF5_DISABLE_TESTS_REGEX option to skip tests (#3859)

* Fix typo in error message for `MPI_Type_dup`. (#3867)

* Complete the `if command line option` sentence. (#3868)

* Fix h5dump segmentation fault when --vfd-value option is used (#3873)

* Updated URL in funding.yml (#3882)

Using new shortened URL, might look better.

* Remove unused variable from unmerged changes

* Update src/H5Tinit_float.c
This commit is contained in:
jhendersonHDF
2023-12-07 12:13:21 -06:00
committed by GitHub
parent dc8b455ac0
commit fb84c696a4
130 changed files with 3243 additions and 1191 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
# These are supported funding model platforms
custom: "https://hdfgroup.org/about-us/donate-to-the-hdf-group/"
custom: "https://www.hdfgroup.org/donate"
+1 -1
View File
@@ -16,7 +16,7 @@ on:
# Using concurrency to cancel any in-progress job or run
concurrency:
group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }}
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
permissions:
+60
View File
@@ -249,3 +249,63 @@ jobs:
#
# INSTALL (note that this runs even when we don't run the tests)
#
#
# The GitHub runners are inadequate for running parallel HDF5 tests,
# so we catch most issues in daily testing. What we have here is just
# a compile check to make sure nothing obvious is broken.
# A workflow that builds the library
# Parallel Linux (Ubuntu) w/ gcc + Autotools
#
CMake_build_parallel:
name: "Parallel GCC-${{ inputs.build_mode }}-TS=${{ inputs.thread_safety }}"
# Don't run the action if the commit message says to skip CI
if: "!contains(github.event.head_commit.message, 'skip-ci')"
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# SETUP
- name: Install Linux Dependencies
run: |
sudo apt update
sudo apt-get install ninja-build doxygen graphviz
sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
sudo apt install gcc-12 g++-12 gfortran-12
sudo apt install libaec0 libaec-dev
sudo apt install openmpi-bin openmpi-common mpi-default-dev
echo "CC=mpicc" >> $GITHUB_ENV
echo "FC=mpif90" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@v4
# CMAKE CONFIGURE
- name: CMake Configure
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
CC=mpicc cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
-DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
-DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \
-DBUILD_SHARED_LIBS=ON \
-DHDF5_ENABLE_ALL_WARNINGS=ON \
-DHDF5_ENABLE_PARALLEL:BOOL=ON \
-DHDF5_BUILD_CPP_LIB:BOOL=OFF \
-DHDF5_BUILD_FORTRAN=ON \
-DHDF5_BUILD_JAVA=OFF \
-DLIBAEC_USE_LOCALCONTENT=OFF \
-DZLIB_USE_LOCALCONTENT=OFF \
-DHDF5_ENABLE_MIRROR_VFD:BOOL=OFF \
-DHDF5_ENABLE_DIRECT_VFD:BOOL=OFF \
-DHDF5_ENABLE_ROS3_VFD:BOOL=OFF \
$GITHUB_WORKSPACE
shell: bash
# BUILD
- name: CMake Build
run: cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
working-directory: ${{ runner.workspace }}/build
+1 -1
View File
@@ -17,7 +17,7 @@ on:
# Using concurrency to cancel any in-progress job or run
concurrency:
group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }}
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
permissions:
-2
View File
@@ -508,7 +508,6 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;ALL;/")
else ()
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;libraries;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;headers;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;configinstall;/")
endif ()
endif ()
@@ -517,7 +516,6 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/")
else ()
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
endif ()
endif ()
+3
View File
@@ -23,6 +23,9 @@
math (EXPR CTEST_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 2")
math (EXPR CTEST_VERY_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 3")
option (HDF5_DISABLE_TESTS_REGEX "Regex pattern to set execution of specific tests to DISABLED" "")
mark_as_advanced (HDF5_DISABLE_TESTS_REGEX)
option (HDF5_TEST_API "Execute HDF5 API tests" OFF)
mark_as_advanced (HDF5_TEST_API)
if (HDF5_TEST_API)
+113 -26
View File
@@ -26,14 +26,51 @@ function (get_generated_cmake_targets out_var dir)
set (${out_var} "${dir_targets}" PARENT_SCOPE)
endfunction ()
# For now, only support building of external VOL connectors with FetchContent
option (HDF5_VOL_ALLOW_EXTERNAL "Allow building of external HDF5 VOL connectors with FetchContent" "NO")
mark_as_advanced (HDF5_VOL_ALLOW_EXTERNAL)
if (HDF5_VOL_ALLOW_EXTERNAL)
if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "NO" OR (NOT HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT" AND NOT HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR"))
message (FATAL_ERROR "HDF5_VOL_ALLOW_EXTERNAL must be set to 'GIT' or 'LOCAL_DIR' to allow building of external HDF5 VOL connectors")
endif()
# Function to apply connector-specify workarounds to build
# code once a connector has been populated through FetchContent
function (apply_connector_workarounds connector_name source_dir)
# For the cache VOL, remove the call to find_package(ASYNC).
# Eventually, the FetchContent OVERRIDE_FIND_PACKAGE should be
# able to fulfill this dependency when building the cache VOL,
# but for now we have to hack around this until the async and
# cache VOLs create CMake .config files
if ("${connector_name}" MATCHES "vol-cache")
# Remove find_package(ASYNC) call from connector's CMake code
file (READ "${source_dir}/CMakeLists.txt" vol_cmake_contents)
string (REGEX REPLACE "[ \t]*find_package[ \t]*\\([ \t]*ASYNC[^\r\n\\)]*\\)[ \t]*[\r\n]+" "" vol_cmake_contents "${vol_cmake_contents}")
file (WRITE "${source_dir}/CMakeLists.txt" "${vol_cmake_contents}")
# Remove setting of HDF5_VOL_CONNECTOR and HDF5_PLUGIN_PATH
# in connector's external tests CMake code
file (STRINGS "${source_dir}/tests/CMakeLists.txt" file_lines)
file (WRITE "${source_dir}/tests/CMakeLists.txt" "")
foreach (line IN LISTS file_lines)
set (stripped_line "${line}")
string (REGEX MATCH "^[ \t]*set_tests_properties\\([ \t]*[\r\n]?" match_string "${line}")
if (NOT "${match_string}" STREQUAL "")
string (REGEX REPLACE "^[ \t]*set_tests_properties\\([ \t]*[\r\n]?" "" stripped_line "${line}")
endif ()
string (REGEX MATCH "^[ \t]*.\\{test\\}[ \t]*[\r\n]?" match_string "${line}")
if (NOT "${match_string}" STREQUAL "")
string (REGEX REPLACE "^[ \t]*.\\{[A-Za-z]*\\}[ \t]*[\r\n]?" "" stripped_line "${line}")
endif ()
string (REGEX MATCH "^[ \t]*PROPERTIES[ \t]*[\r\n]?" match_string "${line}")
if (NOT "${match_string}" STREQUAL "")
string (REGEX REPLACE "^[ \t]*PROPERTIES[ \t]*[\r\n]?" "" stripped_line "${line}")
endif ()
string (REGEX MATCH "^[ \t]*ENVIRONMENT[ \t]*.*[\r\n]?" match_string "${line}")
if (NOT "${match_string}" STREQUAL "")
string (REGEX REPLACE "^[ \t]*ENVIRONMENT[ \t]*.*[\r\n]?" "" stripped_line "${line}")
endif ()
file (APPEND "${source_dir}/tests/CMakeLists.txt" "${stripped_line}\n")
endforeach ()
endif ()
endfunction ()
set (HDF5_VOL_ALLOW_EXTERNAL "NO" CACHE STRING "Allow building of external HDF5 VOL connectors with FetchContent")
set_property (CACHE HDF5_VOL_ALLOW_EXTERNAL PROPERTY STRINGS NO GIT LOCAL_DIR)
mark_as_advanced (HDF5_VOL_ALLOW_EXTERNAL)
if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT" OR HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
# For compatibility, set some variables that projects would
# typically look for after calling find_package(HDF5)
set (HDF5_FOUND 1)
@@ -103,6 +140,13 @@ if (HDF5_VOL_ALLOW_EXTERNAL)
mark_as_advanced ("HDF5_VOL_${hdf5_vol_name_upper}_BRANCH")
endif()
set ("HDF5_VOL_${hdf5_vol_name_upper}_CMAKE_PACKAGE_NAME"
"${hdf5_vol_name_lower}"
CACHE
STRING
"CMake package name used by find_package(...) calls for VOL connector '${hdf5_vol_name}'"
)
set ("HDF5_VOL_${hdf5_vol_name_upper}_NAME" "" CACHE STRING "Name of VOL connector to set for the HDF5_VOL_CONNECTOR environment variable")
option ("HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL" "Whether to test VOL connector '${hdf5_vol_name}' against the parallel API tests" OFF)
@@ -124,22 +168,40 @@ if (HDF5_VOL_ALLOW_EXTERNAL)
message (FATAL_ERROR "HDF5_VOL_PATH${vol_idx_fixed} must be an absolute path to a valid directory")
endif ()
# Set internal convenience variables for FetchContent dependency name
set (hdf5_vol_depname "${HDF5_VOL_${hdf5_vol_name_upper}_CMAKE_PACKAGE_NAME}")
string (TOLOWER "${hdf5_vol_depname}" hdf5_vol_depname_lower)
if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT")
FetchContent_Declare (HDF5_VOL_${hdf5_vol_name_lower}
GIT_REPOSITORY "${HDF5_VOL_SOURCE}"
GIT_TAG "${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}"
)
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24")
FetchContent_Declare (${hdf5_vol_depname}
GIT_REPOSITORY "${HDF5_VOL_SOURCE}"
GIT_TAG "${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}"
OVERRIDE_FIND_PACKAGE
)
else ()
FetchContent_Declare (${hdf5_vol_depname}
GIT_REPOSITORY "${HDF5_VOL_SOURCE}"
GIT_TAG "${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}"
FIND_PACKAGE_ARGS NAMES ${hdf5_vol_name_lower}
)
endif ()
elseif(HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
FetchContent_Declare (HDF5_VOL_${hdf5_vol_name_lower}
SOURCE_DIR "${HDF5_VOL_SOURCE}"
FetchContent_Declare (${hdf5_vol_depname}
SOURCE_DIR "${HDF5_VOL_SOURCE}"
)
endif()
FetchContent_GetProperties(HDF5_VOL_${hdf5_vol_name_lower})
if (NOT hdf5_vol_${hdf5_vol_name_lower}_POPULATED)
FetchContent_Populate(HDF5_VOL_${hdf5_vol_name_lower})
FetchContent_GetProperties(${hdf5_vol_depname})
if (NOT ${hdf5_vol_depname}_POPULATED)
FetchContent_Populate(${hdf5_vol_depname})
if (NOT EXISTS "${hdf5_vol_${hdf5_vol_name_lower}_SOURCE_DIR}/CMakeLists.txt")
# Now that content has been populated, set other internal
# convenience variables for FetchContent dependency
set (hdf5_vol_depname_source_dir "${${hdf5_vol_depname_lower}_SOURCE_DIR}")
set (hdf5_vol_depname_binary_dir "${${hdf5_vol_depname_lower}_BINARY_DIR}")
if (NOT EXISTS "${hdf5_vol_depname_source_dir}/CMakeLists.txt")
if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT")
message (SEND_ERROR "The git repository branch '${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}' for VOL connector '${hdf5_vol_name}' does not appear to contain a CMakeLists.txt file")
elseif (HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
@@ -150,21 +212,24 @@ if (HDF5_VOL_ALLOW_EXTERNAL)
# If there are any calls to find_package(HDF5) in the connector's
# CMakeLists.txt files, remove those since any found HDF5 targets
# will conflict with targets being generated by this build of HDF5
if (EXISTS "${hdf5_vol_${hdf5_vol_name_lower}_SOURCE_DIR}/CMakeLists.txt")
file (READ "${hdf5_vol_${hdf5_vol_name_lower}_SOURCE_DIR}/CMakeLists.txt" vol_cmake_contents)
if (EXISTS "${hdf5_vol_depname_source_dir}/CMakeLists.txt")
file (READ "${hdf5_vol_depname_source_dir}/CMakeLists.txt" vol_cmake_contents)
string (REGEX REPLACE "[ \t]*find_package[ \t]*\\([ \t]*HDF5[^\r\n\\)]*\\)[ \t]*[\r\n]+" "" vol_cmake_contents "${vol_cmake_contents}")
file (WRITE "${hdf5_vol_${hdf5_vol_name_lower}_SOURCE_DIR}/CMakeLists.txt" "${vol_cmake_contents}")
file (WRITE "${hdf5_vol_depname_source_dir}/CMakeLists.txt" "${vol_cmake_contents}")
endif ()
if (EXISTS "${hdf5_vol_${hdf5_vol_name_lower}_SOURCE_DIR}/src/CMakeLists.txt")
file (READ "${hdf5_vol_${hdf5_vol_name_lower}_SOURCE_DIR}/src/CMakeLists.txt" vol_cmake_contents)
if (EXISTS "${hdf5_vol_depname_source_dir}/src/CMakeLists.txt")
file (READ "${hdf5_vol_depname_source_dir}/src/CMakeLists.txt" vol_cmake_contents)
string (REGEX REPLACE "[ \t]*find_package[ \t]*\\([ \t]*HDF5[^\r\n\\)]*\\)[ \t]*[\r\n]+" "" vol_cmake_contents "${vol_cmake_contents}")
file (WRITE "${hdf5_vol_${hdf5_vol_name_lower}_SOURCE_DIR}/src/CMakeLists.txt" "${vol_cmake_contents}")
file (WRITE "${hdf5_vol_depname_source_dir}/src/CMakeLists.txt" "${vol_cmake_contents}")
endif ()
add_subdirectory (${hdf5_vol_${hdf5_vol_name_lower}_SOURCE_DIR} ${hdf5_vol_${hdf5_vol_name_lower}_BINARY_DIR})
# Apply any connector-specific workarounds
apply_connector_workarounds ("${hdf5_vol_name_lower}" "${hdf5_vol_depname_source_dir}")
add_subdirectory (${hdf5_vol_depname_source_dir} ${hdf5_vol_depname_binary_dir})
# Get list of targets generated by build of connector
get_generated_cmake_targets (connector_targets ${hdf5_vol_${hdf5_vol_name_lower}_SOURCE_DIR})
get_generated_cmake_targets (connector_targets ${hdf5_vol_depname_source_dir})
# Create a custom target for the connector to encompass all its
# targets and other custom properties set by us for later use
@@ -217,8 +282,30 @@ if (HDF5_VOL_ALLOW_EXTERNAL)
HDF5_VOL_TEST_PARALLEL ${HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL}
)
# Add this connector's target to the list of external connector targets
# Add this VOL connector's target to the list of external connector targets
list (APPEND HDF5_EXTERNAL_VOL_TARGETS "HDF5_VOL_${hdf5_vol_name_lower}")
# Get the list of library targets from this VOL connector
unset (connector_lib_targets)
foreach (connector_target ${connector_targets})
get_target_property (target_type ${connector_target} TYPE)
if (target_type STREQUAL "SHARED_LIBRARY" OR target_type STREQUAL "STATIC_LIBRARY")
list (APPEND connector_lib_targets "${connector_target}")
endif ()
endforeach ()
# Add all of the previous VOL connector's library targets as
# dependencies for the current VOL connector to ensure that
# VOL connectors get built serially in case there are dependencies
if (DEFINED last_vol_lib_targets)
foreach (connector_target ${connector_targets})
add_dependencies (${connector_target} ${last_vol_lib_targets})
endforeach ()
endif ()
# Use this connector's library targets as dependencies
# for the next connector that is built
set (last_vol_lib_targets "${connector_lib_targets}")
endif ()
endif ()
endforeach ()
+1 -1
View File
@@ -2,7 +2,7 @@ HDF5 version 1.14.4-1 currently under development
![HDF5 Logo](doxygen/img/HDF5.png)
[![1.14 build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/main.yml?branch=hdf5_1_14&label=1.14)](https://github.com/HDFGroup/hdf5/actions?query=branch%3Ahdf5_1_14)
[![1.14 build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/main.yml?branch=hdf5_1_14&label=1.14)](https://github.com/HDFGroup/hdf5/actions/workflows/main.yml?query=branch%3Ahdf5_1_14)
[![BSD](https://img.shields.io/badge/License-BSD-blue.svg)](https://github.com/HDFGroup/hdf5/blob/develop/COPYING)
*Please refer to the release_docs/INSTALL file for installation instructions.*
+3
View File
@@ -35,6 +35,9 @@ endif ()
set_tests_properties (CPP_testhdf5 PROPERTIES
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
if ("CPP_testhdf5" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (CPP_testhdf5 PROPERTIES DISABLED true)
endif ()
##############################################################################
##############################################################################
+3
View File
@@ -37,6 +37,9 @@ macro (ADD_VFD_TEST vfdname resultcode)
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT ${CTEST_SHORT_TIMEOUT})
if ("CPP_VFD-${vfdname}-cpp_testhdf5" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DISABLED true)
endif ()
endif ()
endmacro ()
+35 -24
View File
@@ -872,35 +872,46 @@ if (HDF5_BUILD_FORTRAN)
endif()
#-----------------------------------------------------------------------------
# Macro to determine the various conversion capabilities
# Macro to determine long double conversion properties
#-----------------------------------------------------------------------------
macro (H5ConversionTests TEST msg)
macro (H5ConversionTests TEST def msg)
if (NOT DEFINED ${TEST})
TRY_RUN (${TEST}_RUN ${TEST}_COMPILE
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_DIR}/ConversionTests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-D${TEST}_TEST
OUTPUT_VARIABLE OUTPUT
)
if (${TEST}_COMPILE)
if (${TEST}_RUN EQUAL "0")
set (${TEST} 1 CACHE INTERNAL ${msg})
message (VERBOSE "${msg}... yes")
if (NOT CMAKE_CROSSCOMPILING)
# Build and run the test code if not cross-compiling
TRY_RUN (${TEST}_RUN ${TEST}_COMPILE
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_DIR}/ConversionTests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-D${TEST}_TEST
OUTPUT_VARIABLE OUTPUT
)
if (${TEST}_COMPILE)
if (${TEST}_RUN EQUAL "0")
set (${TEST} 1 CACHE INTERNAL ${msg})
message (VERBOSE "${msg}... yes")
else ()
set (${TEST} "" CACHE INTERNAL ${msg})
message (VERBOSE "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n"
)
endif ()
else ()
set (${TEST} "" CACHE INTERNAL ${msg})
message (VERBOSE "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n"
"Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n"
)
endif ()
else ()
set (${TEST} "" CACHE INTERNAL ${msg})
message (VERBOSE "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n"
)
# Use the default if there's no cache variable and cross-compiling
if (${def})
message (VERBOSE "${msg}... yes (cross-compile default)")
set (${TEST} 1 CACHE INTERNAL ${msg})
else ()
message (VERBOSE "${msg}... no (cross-compile default)")
set (${TEST} "" CACHE INTERNAL ${msg})
endif ()
endif ()
endif ()
endmacro ()
@@ -917,7 +928,7 @@ endmacro ()
# The machine's conversion gets the correct value. We define the macro and disable
# this kind of test until we figure out what algorithm they use.
#-----------------------------------------------------------------------------
H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts long double to (unsigned) long values with special algorithm")
H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LONG_SPECIAL FALSE "Checking IF your system converts long double to (unsigned) long values with special algorithm")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm
# to convert some values of '(unsigned) long' to 'long double' values.
@@ -926,7 +937,7 @@ H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LONG_SPECIAL "Checking IF your syst
# ..., 7fffff..., the compiler uses a unknown algorithm. We define a
# macro and skip the test for now until we know about the algorithm.
#-----------------------------------------------------------------------------
H5ConversionTests (${HDF_PREFIX}_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm")
H5ConversionTests (${HDF_PREFIX}_LONG_TO_LDOUBLE_SPECIAL FALSE "Checking IF your system can convert (unsigned) long to long double values with special algorithm")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
# 'long double' to '(unsigned) long long' values. (This flag should be set for
@@ -936,7 +947,7 @@ H5ConversionTests (${HDF_PREFIX}_LONG_TO_LDOUBLE_SPECIAL "Checking IF your syste
# 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted
# values wildly wrong. This test detects this wrong behavior and disable the test.
#-----------------------------------------------------------------------------
H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly converting long double to (unsigned) long long values")
H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LLONG_ACCURATE TRUE "Checking IF correctly converting long double to (unsigned) long long values")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
# '(unsigned) long long' to 'long double' values. (This flag should be set for
@@ -944,9 +955,9 @@ H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctl
# 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice
# as big as they should be.
#-----------------------------------------------------------------------------
H5ConversionTests (${HDF_PREFIX}_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values")
H5ConversionTests (${HDF_PREFIX}_LLONG_TO_LDOUBLE_CORRECT TRUE "Checking IF correctly converting (unsigned) long long to long double values")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
# some long double values
#-----------------------------------------------------------------------------
H5ConversionTests (${HDF_PREFIX}_DISABLE_SOME_LDOUBLE_CONV "Checking IF the cpu is power9 and cannot correctly converting long double values")
H5ConversionTests (${HDF_PREFIX}_DISABLE_SOME_LDOUBLE_CONV FALSE "Checking IF the cpu is power9 and cannot correctly converting long double values")
+2 -49
View File
@@ -172,7 +172,7 @@ target_link_libraries (${LIBAEC_LIB_TARGET} PRIVATE ${LINK_LIBS})
H5_SET_LIB_OPTIONS (${LIBAEC_LIB_TARGET} ${LIBAEC_LIB_NAME} STATIC 0)
set_target_properties (${LIBAEC_LIB_TARGET} PROPERTIES
VERSION 0.0.12 SOVERSION 0
PUBLIC_HEADER "${LIBAEC_PUBLIC_HEADERS}"
PUBLIC_HEADER ""
LINKER_LANGUAGE C
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
@@ -194,7 +194,7 @@ target_link_libraries (${SZIP_LIB_TARGET} PRIVATE ${LIBAEC_LIB_TARGET})
H5_SET_LIB_OPTIONS (${SZIP_LIB_TARGET} ${SZIP_LIB_NAME} STATIC 0)
set_target_properties (${SZIP_LIB_TARGET} PROPERTIES
VERSION 2.0.1 SOVERSION 2
PUBLIC_HEADER "${SZIP_PUBLIC_HEADERS}"
PUBLIC_HEADER ""
LINKER_LANGUAGE C
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
@@ -234,17 +234,6 @@ if (WIN32)
find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
endif ()
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
#if (NOT LIBAEC_INSTALL_NO_DEVELOPMENT)
# install (
# FILES ${PROJECT_BINARY_DIR}/aec_config.h
# DESTINATION ${LIBAEC_INSTALL_INCLUDE_DIR}
# COMPONENT headers
# )
#endif ()
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
@@ -333,20 +322,6 @@ if (NOT LIBAEC_EXTERNALLY_CONFIGURED)
)
endif ()
#-----------------------------------------------------------------------------
# Add Document File(s) to CMake Install
#-----------------------------------------------------------------------------
if (NOT LIBAEC_EXTERNALLY_CONFIGURED)
install (
FILES
${LIBAEC_SOURCE_DIR}/README.md
${LIBAEC_SOURCE_DIR}/INSTALL.md
${LIBAEC_SOURCE_DIR}/CHANGELOG.md
DESTINATION ${LIBAEC_INSTALL_DATA_DIR}
COMPONENT documents
)
endif ()
#-----------------------------------------------------------------------------
# Check for Installation Utilities
#-----------------------------------------------------------------------------
@@ -464,7 +439,6 @@ if (NOT LIBAEC_EXTERNALLY_CONFIGURED)
include (InstallRequiredSystemLibraries)
set (CPACK_INSTALL_CMAKE_PROJECTS "${LIBAEC_BINARY_DIR};LIBAEC;libraries;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${LIBAEC_BINARY_DIR};LIBAEC;headers;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${LIBAEC_BINARY_DIR};LIBAEC;configinstall;/")
set (CPACK_ALL_INSTALL_TYPES Full Developer User)
@@ -476,33 +450,12 @@ if (NOT LIBAEC_EXTERNALLY_CONFIGURED)
cpack_add_component_group(Runtime)
cpack_add_component_group(Documents
EXPANDED
DESCRIPTION "Release notes for libaec"
)
cpack_add_component_group(Development
EXPANDED
DESCRIPTION "All of the tools you'll need to develop applications"
)
cpack_add_component (libraries
DISPLAY_NAME "LIBAEC Libraries"
REQUIRED
GROUP Runtime
INSTALL_TYPES Full Developer User
)
cpack_add_component (headers
DISPLAY_NAME "LIBAEC Headers"
DEPENDS libraries
GROUP Development
INSTALL_TYPES Full Developer
)
cpack_add_component (documents
DISPLAY_NAME "LIBAEC Documents"
GROUP Documents
INSTALL_TYPES Full Developer
)
cpack_add_component (configinstall
DISPLAY_NAME "LIBAEC CMake files"
DEPENDS libraries
+1 -48
View File
@@ -247,7 +247,7 @@ TARGET_C_PROPERTIES (${ZLIB_LIB_TARGET} STATIC)
target_link_libraries (${ZLIB_LIB_TARGET} PRIVATE ${LINK_LIBS})
H5_SET_LIB_OPTIONS (${ZLIB_LIB_TARGET} ${ZLIB_LIB_NAME} STATIC 0)
set_target_properties(${ZLIB_LIB_TARGET} PROPERTIES
PUBLIC_HEADER "${ZLIB_PUBLIC_HEADERS}"
PUBLIC_HEADER ""
LINKER_LANGUAGE C
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
@@ -287,17 +287,6 @@ if (WIN32)
find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
endif ()
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
if (NOT ZLIB_INSTALL_NO_DEVELOPMENT)
install (
FILES ${PROJECT_BINARY_DIR}/zconf.h
DESTINATION ${ZLIB_INSTALL_INCLUDE_DIR}
COMPONENT headers
)
endif ()
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
@@ -386,20 +375,6 @@ if (NOT ZLIB_EXTERNALLY_CONFIGURED)
)
endif ()
#-----------------------------------------------------------------------------
# Add Document File(s) to CMake Install
#-----------------------------------------------------------------------------
if (NOT ZLIB_EXTERNALLY_CONFIGURED)
install (
FILES
${ZLIB_SOURCE_DIR}/FAQ
${ZLIB_SOURCE_DIR}/README
${ZLIB_SOURCE_DIR}/INDEX
DESTINATION ${ZLIB_INSTALL_DATA_DIR}
COMPONENT documents
)
endif ()
#-----------------------------------------------------------------------------
# Check for Installation Utilities
#-----------------------------------------------------------------------------
@@ -523,7 +498,6 @@ if (NOT ZLIB_EXTERNALLY_CONFIGURED)
include (InstallRequiredSystemLibraries)
set (CPACK_INSTALL_CMAKE_PROJECTS "${ZLIB_BINARY_DIR};ZLIB;libraries;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${ZLIB_BINARY_DIR};ZLIB;headers;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${ZLIB_BINARY_DIR};ZLIB;configinstall;/")
set (CPACK_ALL_INSTALL_TYPES Full Developer User)
@@ -535,33 +509,12 @@ if (NOT ZLIB_EXTERNALLY_CONFIGURED)
cpack_add_component_group(Runtime)
cpack_add_component_group(Documents
EXPANDED
DESCRIPTION "Release notes for zlib"
)
cpack_add_component_group(Development
EXPANDED
DESCRIPTION "All of the tools you'll need to develop applications"
)
cpack_add_component (libraries
DISPLAY_NAME "ZLIB Libraries"
REQUIRED
GROUP Runtime
INSTALL_TYPES Full Developer User
)
cpack_add_component (headers
DISPLAY_NAME "ZLIB Headers"
DEPENDS libraries
GROUP Development
INSTALL_TYPES Full Developer
)
cpack_add_component (documents
DISPLAY_NAME "ZLIB Documents"
GROUP Documents
INSTALL_TYPES Full Developer
)
cpack_add_component (configinstall
DISPLAY_NAME "ZLIB CMake files"
DEPENDS libraries
@@ -78,6 +78,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN
###############################################################################################################
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ROOT:PATH=${INSTALLDIR}")
set (ENV{HDF5_ROOT} "${INSTALLDIR}")
if(WIN32)
set(SITE_OS_NAME "Windows")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
+5
View File
@@ -184,6 +184,11 @@ list (APPEND CTEST_NOTES_FILES
"${CMAKE_CURRENT_LIST_FILE}"
"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
)
if (EXISTS "${CTEST_SCRIPT_DIRECTORY}/SkipTests.log")
list(APPEND CTEST_NOTES_FILES
"${CTEST_SCRIPT_DIRECTORY}/SkipTests.log"
)
endif ()
#-----------------------------------------------------------------------------
# Check for required variables.
+2 -8
View File
@@ -4231,10 +4231,10 @@ AC_CONFIG_FILES([Makefile
hl/fortran/examples/Makefile
hl/fortran/examples/run-hlfortran-ex.sh])
AC_CONFIG_FILES([utils/subfiling_vfd/h5fuse.sh], [chmod +x utils/subfiling_vfd/h5fuse.sh])
AC_CONFIG_FILES([utils/subfiling_vfd/h5fuse], [chmod +x utils/subfiling_vfd/h5fuse])
if test -n "$TESTPARALLEL"; then
if test "X$SUBFILING_VFD" = "Xyes"; then
AC_CONFIG_LINKS([testpar/h5fuse.sh:utils/subfiling_vfd/h5fuse.sh])
AC_CONFIG_LINKS([testpar/h5fuse:utils/subfiling_vfd/h5fuse])
fi
fi
@@ -4280,11 +4280,5 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
esac
fi
## HDF5 configure code created by autotools with gcc 4.9.2 is adding problematic
## linker flags: -l with no library name; -l <libname>, specifically gfortran or m.
## This sed script corrects "-l <libname>" first and then "-l " with no library name.
## If the order is not preserved, all instances of "-l " will be removed.
sed -e '/^postdeps/ s/-l \([a-zA-Z]\)/-l\1/g' -e '/^postdeps/ s/-l //g' -i libtool
## show the configure settings
cat src/libhdf5.settings
+1 -1
View File
@@ -2,7 +2,7 @@
This document describes current HDF5 branches.
Branches are tested nightly and testing results are available at https://cdash-internal.hdfgroup.org/ and https://cdash.hdfgroup.org/.
Branches are tested nightly and testing results are available at https://cdash.hdfgroup.org/.
Commits that break daily testing should be fixed by 3:00 pm Central time or reverted.
We encourage code contributors to check the status of their commits. If you have any questions, please contact help@hdfgroup.org.
+19 -7
View File
@@ -97,12 +97,21 @@ After the VOL's internal name is generated, the following new variables get crea
variable must be set in order for the VOL connector to be testable with
HDF5's tests.
HDF5_VOL_<VOL name>_CMAKE_PACKAGE_NAME (Default: "<lowercased <VOL name>>")
This variable specifies the exact name that would be passed to CMake
find_package(...) calls for the VOL connector in question. It is used as
the dependency name when making CMake FetchContent calls to try to ensure
that any other VOL connectors to be built which depend on this VOL connector
can make find_package(...) calls for this VOL connector at configure time.
By default, this variable is set to a lowercased version of the internal
name generated for the VOL connector (described above).
HDF5_VOL_<VOL name>_TEST_PARALLEL (Default: OFF)
This variable determines whether the VOL connector with the CMake-internal
name '<VOL name>' should be tested against HDF5's parallel tests.
If the source was retrieved from a Git URL, then the following variable will additionally be created:
HDF5_VOL_<VOL name>_BRANCH (Default: "main")
This variable specifies the git branch name or tag to use when fetching
the source code for the VOL connector with the CMake-internal name
@@ -111,9 +120,10 @@ If the source was retrieved from a Git URL, then the following variable will add
As an example, this would create the following variables for the
previously-mentioned VOL connector if it is retrieved from a URL:
HDF5_VOL_VOL-ASYNC_BRANCH
HDF5_VOL_VOL-ASYNC_NAME
HDF5_VOL_VOL-ASYNC_TEST_PARALLEL
HDF5_VOL_VOL-ASYNC_NAME ""
HDF5_VOL_VOL-ASYNC_CMAKE_PACKAGE_NAME "vol-async"
HDF5_VOL_VOL-ASYNC_BRANCH "main"
HDF5_VOL_VOL-ASYNC_TEST_PARALLEL OFF
**NOTE**
If a VOL connector requires extra information to be passed in its
@@ -139,9 +149,10 @@ would typically be passed when building HDF5, such as `CMAKE_INSTALL_PREFIX`,
-DHDF5_TEST_API=ON
-DHDF5_VOL_ALLOW_EXTERNAL="GIT"
-DHDF5_VOL_URL01=https://github.com/hpc-io/vol-async.git
-DHDF5_VOL_VOL-ASYNC_BRANCH=develop
-DHDF5_VOL_VOL-ASYNC_BRANCH=develop
-DHDF5_VOL_VOL-ASYNC_NAME="async under_vol=0\;under_info={}"
-DHDF5_VOL_VOL-ASYNC_TEST_PARALLEL=ON ..
-DHDF5_VOL_VOL-ASYNC_TEST_PARALLEL=ON
..
Here, we are specifying that:
@@ -156,7 +167,8 @@ Here, we are specifying that:
variable should be set to "async under_vol=0\;under_info={}", which
specifies that the VOL connector with the canonical name "async" should
be loaded and it should be passed the string "under_vol=0;under_info={}"
for its configuration
for its configuration (note the backslash-escaping of semicolons in the string
provided)
* The Asynchronous I/O VOL connector should be tested against HDF5's parallel API tests
Note that this also assumes that the Asynchronous I/O VOL connector's
+78
View File
@@ -0,0 +1,78 @@
#FIG 3.2 Produced by xfig version 3.2.9
#encoding: UTF-8
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
6 4650 3675 7725 4350
2 4 0 1 0 7 52 -1 18 0.000 0 0 7 0 0 5
7725 4350 4650 4350 4650 3735 7725 3735 7725 4350
4 0 0 37 -1 2 16 0.0000 4 240 2528 4800 4125 H5fort_type_defines.h\001
-6
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
2 1 1.00 60.00 120.00
4125 675 4650 675
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
2 1 1.00 60.00 120.00
4125 2775 4575 2775
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
8175 525 9525 525
2 4 0 1 0 7 50 -1 18 0.000 0 0 7 0 0 5
10800 3375 8325 3375 8325 2760 10800 2760 10800 3375
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
2 1 1.00 60.00 120.00
10760 1200 11400 1200
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
2 1 1.00 60.00 120.00
10820 2100 11460 2100
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
2 1 1.00 60.00 120.00
10790 3075 11430 3075
2 4 0 1 0 7 50 -1 18 0.000 0 0 7 0 0 5
4125 3375 1500 3375 1500 60 4125 60 4125 3375
2 1 0 4 0 7 48 -1 -1 0.000 0 0 -1 0 0 2
1500 1800 4050 1800
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
2 1 1.00 60.00 120.00
5775 960 5775 1410
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
2 1 1.00 60.00 120.00
5670 3255 5670 3705
2 4 0 1 0 7 50 -1 18 0.000 0 0 7 0 0 5
14220 1500 11460 1500 11460 870 14220 870 14220 1500
2 4 0 1 0 7 50 -1 18 0.000 0 0 7 0 0 5
14250 2430 11445 2430 11445 1800 14250 1800 14250 2430
2 4 0 1 0 7 50 -1 18 0.000 0 0 7 0 0 5
6975 960 4725 960 4725 360 6975 360 6975 960
2 4 0 1 0 7 50 -1 18 0.000 0 0 7 0 0 5
6960 2025 4710 2025 4710 1425 6960 1425 6960 2025
2 4 0 1 0 7 52 -1 19 0.000 0 0 7 0 0 5
16875 5250 8100 5250 8100 45 16875 45 16875 5250
2 4 0 1 0 7 50 -1 18 0.000 0 0 7 0 0 5
7725 3225 4650 3225 4650 2610 7725 2610 7725 3225
2 4 0 1 0 7 63 -1 19 0.000 0 0 7 0 0 5
8025 5250 1425 5250 1425 45 8025 45 8025 5250
2 4 0 1 0 7 50 -1 18 0.000 0 0 7 0 0 5
10800 2400 8310 2400 8310 840 10800 840 10800 2400
2 4 0 1 0 7 50 -1 18 0.000 0 0 7 0 0 5
14265 3375 11475 3375 11475 2775 14265 2775 14265 3375
2 4 0 1 0 7 50 -1 18 0.000 0 0 7 0 0 5
16725 4125 11475 4125 11475 3525 16725 3525 16725 4125
2 4 0 1 0 7 50 -1 18 0.000 0 0 7 0 0 5
16725 4950 11475 4950 11475 4275 16725 4275 16725 4950
4 0 0 50 -1 2 24 0.0000 4 284 1249 8250 450 BUILD\001
4 0 0 50 -1 2 24 0.0000 4 284 2421 1575 1725 CONFIGURE\001
4 0 0 50 -1 2 16 0.0000 4 221 2083 8550 3150 H5_buildiface.F90\001
4 0 0 50 -1 2 16 0.0000 4 235 1952 8640 1680 H5match_types.c\001
4 0 0 50 -1 2 16 0.0000 4 239 2379 11550 2175 H5fortran_types.F90\001
4 0 0 50 -1 2 16 0.0000 4 240 1507 11550 1275 H5f90i_gen.h\001
4 0 0 50 -1 2 16 0.0000 4 238 1358 11550 3150 H5_gen.F90\001
4 0 0 50 -1 2 16 0.0000 4 233 5100 11550 3900 H5[A,D,S,T,E,ES,F,Z,G,I,L,O,P,R,VL]ff.F90\001
4 0 0 50 -1 2 16 0.0000 4 233 4702 11550 4725 H5[A,D,S,T,E,ES,F,Z,G,I,L,O,P,R,VL]f.c\001
4 0 0 50 -1 2 16 0.0000 4 240 1944 4815 750 H5config_f.inc.in\001
4 0 0 50 -1 2 16 0.0000 4 240 1656 4815 1815 H5config_f.inc\001
4 0 0 50 -1 2 16 0.0000 4 240 2817 4740 3000 H5fort_type_defines.h.in\001
+169
View File
@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Creator: fig2dev Version 3.2.9 -->
<!-- CreationDate: 2023-11-17 17:06:33 -->
<!-- Magnification: 1 -->
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="929pt" height="314pt"
viewBox="1413 33 15474 5229">
<g fill="none">
<!-- Line -->
<rect x="1425" y="45" width="6600" height="5205" rx="105" fill="#f2f2f2"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<rect x="8100" y="45" width="8775" height="5205" rx="105" fill="#f2f2f2"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<rect x="4650" y="3735" width="3075" height="615" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<polyline points=" 8175,525 9525,525"
stroke="#000000" stroke-width="45px"/>
<!-- Line -->
<rect x="8325" y="2760" width="2475" height="615" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<defs>
<clipPath id="cp0">
<path clip-rule="evenodd" d="M 1413,33 H 16887 V 5262 H 1413 z
M 11230,1170 11260,1200 11230,1230 11407,1207 11407,1193z"/>
</clipPath>
</defs>
<polyline points=" 10760,1200 11400,1200" clip-path="url(#cp0)"
stroke="#000000" stroke-width="8px"/>
<!-- Forward arrow to point 11400,1200 -->
<polygon points=" 11230,1230 11380,1200 11230,1170 11260,1200 11230,1230"
stroke="#000000" stroke-width="8px" stroke-miterlimit="8" fill="#000000"/>
<!-- Line -->
<defs>
<clipPath id="cp1">
<path clip-rule="evenodd" d="M 1413,33 H 16887 V 5262 H 1413 z
M 11290,2070 11320,2100 11290,2130 11467,2107 11467,2093z"/>
</clipPath>
</defs>
<polyline points=" 10820,2100 11460,2100" clip-path="url(#cp1)"
stroke="#000000" stroke-width="8px"/>
<!-- Forward arrow to point 11460,2100 -->
<polygon points=" 11290,2130 11440,2100 11290,2070 11320,2100 11290,2130"
stroke="#000000" stroke-width="8px" stroke-miterlimit="8" fill="#000000"/>
<!-- Line -->
<defs>
<clipPath id="cp2">
<path clip-rule="evenodd" d="M 1413,33 H 16887 V 5262 H 1413 z
M 11260,3045 11290,3075 11260,3105 11437,3082 11437,3068z"/>
</clipPath>
</defs>
<polyline points=" 10790,3075 11430,3075" clip-path="url(#cp2)"
stroke="#000000" stroke-width="8px"/>
<!-- Forward arrow to point 11430,3075 -->
<polygon points=" 11260,3105 11410,3075 11260,3045 11290,3075 11260,3105"
stroke="#000000" stroke-width="8px" stroke-miterlimit="8" fill="#000000"/>
<!-- Line -->
<rect x="1500" y="60" width="2625" height="3315" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<defs>
<clipPath id="cp3">
<path clip-rule="evenodd" d="M 1413,33 H 16887 V 5262 H 1413 z
M 5805,1240 5775,1270 5745,1240 5768,1417 5782,1417z"/>
</clipPath>
</defs>
<polyline points=" 5775,960 5775,1410" clip-path="url(#cp3)"
stroke="#000000" stroke-width="8px"/>
<!-- Forward arrow to point 5775,1410 -->
<polygon points=" 5745,1240 5775,1390 5805,1240 5775,1270 5745,1240"
stroke="#000000" stroke-width="8px" stroke-miterlimit="8" fill="#000000"/>
<!-- Line -->
<defs>
<clipPath id="cp4">
<path clip-rule="evenodd" d="M 1413,33 H 16887 V 5262 H 1413 z
M 5700,3535 5670,3565 5640,3535 5663,3712 5677,3712z"/>
</clipPath>
</defs>
<polyline points=" 5670,3255 5670,3705" clip-path="url(#cp4)"
stroke="#000000" stroke-width="8px"/>
<!-- Forward arrow to point 5670,3705 -->
<polygon points=" 5640,3535 5670,3685 5700,3535 5670,3565 5640,3535"
stroke="#000000" stroke-width="8px" stroke-miterlimit="8" fill="#000000"/>
<!-- Line -->
<rect x="11460" y="870" width="2760" height="630" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<rect x="11445" y="1800" width="2805" height="630" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<rect x="4725" y="360" width="2250" height="600" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<rect x="4710" y="1425" width="2250" height="600" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<rect x="4650" y="2610" width="3075" height="615" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Text -->
<text xml:space="preserve" x="4740" y="3000" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="192" text-anchor="start">H5fort_type_defines.h.in</text>
<!-- Line -->
<defs>
<clipPath id="cp5">
<path clip-rule="evenodd" d="M 1413,33 H 16887 V 5262 H 1413 z
M 4480,645 4510,675 4480,705 4657,682 4657,668z"/>
</clipPath>
</defs>
<polyline points=" 4125,675 4650,675" clip-path="url(#cp5)"
stroke="#000000" stroke-width="8px"/>
<!-- Forward arrow to point 4650,675 -->
<polygon points=" 4480,705 4630,675 4480,645 4510,675 4480,705"
stroke="#000000" stroke-width="8px" stroke-miterlimit="8" fill="#000000"/>
<!-- Line -->
<defs>
<clipPath id="cp6">
<path clip-rule="evenodd" d="M 1413,33 H 16887 V 5262 H 1413 z
M 4405,2745 4435,2775 4405,2805 4582,2782 4582,2768z"/>
</clipPath>
</defs>
<polyline points=" 4125,2775 4575,2775" clip-path="url(#cp6)"
stroke="#000000" stroke-width="8px"/>
<!-- Forward arrow to point 4575,2775 -->
<polygon points=" 4405,2805 4555,2775 4405,2745 4435,2775 4405,2805"
stroke="#000000" stroke-width="8px" stroke-miterlimit="8" fill="#000000"/>
<!-- Text -->
<text xml:space="preserve" x="4815" y="750" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="192" text-anchor="start">H5config_f.inc.in</text>
<!-- Text -->
<text xml:space="preserve" x="4815" y="1815" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="192" text-anchor="start">H5config_f.inc</text>
<!-- Line -->
<rect x="8310" y="840" width="2490" height="1560" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<rect x="11475" y="2775" width="2790" height="600" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<rect x="11475" y="3525" width="5250" height="600" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Line -->
<rect x="11475" y="4275" width="5250" height="675" rx="105" fill="#e5e5e5"
stroke="#000000" stroke-width="8px"/>
<!-- Text -->
<text xml:space="preserve" x="8250" y="450" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="288" text-anchor="start">BUILD</text>
<!-- Text -->
<text xml:space="preserve" x="1575" y="1725" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="288" text-anchor="start">CONFIGURE</text>
<!-- Text -->
<text xml:space="preserve" x="8550" y="3150" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="192" text-anchor="start">H5_buildiface.F90</text>
<!-- Text -->
<text xml:space="preserve" x="8640" y="1680" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="192" text-anchor="start">H5match_types.c</text>
<!-- Text -->
<text xml:space="preserve" x="11550" y="2175" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="192" text-anchor="start">H5fortran_types.F90</text>
<!-- Text -->
<text xml:space="preserve" x="11550" y="1275" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="192" text-anchor="start">H5f90i_gen.h</text>
<!-- Text -->
<text xml:space="preserve" x="11550" y="3150" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="192" text-anchor="start">H5_gen.F90</text>
<!-- Text -->
<text xml:space="preserve" x="11550" y="3900" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="192" text-anchor="start">H5[A,D,S,T,E,ES,F,Z,G,I,L,O,P,R,VL]ff.F90</text>
<!-- Text -->
<text xml:space="preserve" x="11550" y="4725" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="192" text-anchor="start">H5[A,D,S,T,E,ES,F,Z,G,I,L,O,P,R,VL]f.c</text>
<!-- Line -->
<polyline points=" 1500,1800 4050,1800"
stroke="#000000" stroke-width="45px"/>
<!-- Text -->
<text xml:space="preserve" x="4800" y="4125" fill="#000000" font-family="Times" font-style="normal" font-weight="bold" font-size="192" text-anchor="start">H5fort_type_defines.h</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.0 KiB

+1 -1
View File
@@ -1263,7 +1263,7 @@ CONTAINS
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')
IMPORT :: c_char, c_ptr, c_funptr
IMPORT :: c_char, c_ptr
IMPORT :: HID_T, SIZE_T, HSIZE_T
INTEGER(HID_T) , INTENT(IN) :: loc_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name
-70
View File
@@ -69,30 +69,6 @@ done:
return ret_value;
}
/****if* H5Pf/h5pclose_c
* NAME
* h5pclose_c
* PURPOSE
* Call H5Pclose to close property lis
* INPUTS
* prp_id - identifier of the property list to be closed
* RETURNS
* 0 on success, -1 on failure
* SOURCE
*/
int_f
h5pclose_c(hid_t_f *prp_id)
/******/
{
int_f ret_value = 0;
if (H5Pclose((hid_t)*prp_id) < 0)
ret_value = -1;
return ret_value;
}
/****if* H5Pf/h5pcopy_c
* NAME
* h5pcopy_c
@@ -2252,52 +2228,6 @@ h5pget_hyper_vector_size_c(hid_t_f *prp_id, size_t_f *size)
return ret_value;
}
/****if* H5Pf/h5pcreate_class_c
* NAME
* h5pcreate_class_c
* PURPOSE
* Call H5Pcreate_class ito create a new property class
* INPUTS
* parent - property list class identifier
* name - name of the new class
* name_len - length of the "name" buffer
* OUTPUTS
* class - new class identifier
* RETURNS
* 0 on success, -1 on failure
* SOURCE
*/
int_f
h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls, H5P_cls_create_func_t create,
void *create_data, H5P_cls_copy_func_t copy, void *copy_data, H5P_cls_close_func_t close,
void *close_data)
/******/
{
int ret_value = -1;
hid_t c_class;
char *c_name;
c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
if (c_name == NULL)
goto DONE;
/*
* Call H5Pcreate_class function.
*/
c_class =
H5Pcreate_class((hid_t)*parent, c_name, create, create_data, copy, copy_data, close, close_data);
if (c_class < 0)
goto DONE;
*cls = (hid_t_f)c_class;
ret_value = 0;
DONE:
if (c_name != NULL)
free(c_name);
return ret_value;
}
/****if* H5Pf/h5pregister_c
* NAME
* h5pregister_c
+35 -30
View File
@@ -400,15 +400,16 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5pclose_c(prp_id) &
BIND(C,NAME='h5pclose_c')
INTEGER(C_INT) FUNCTION H5Pclose(prp_id) &
BIND(C,NAME='H5Pclose')
IMPORT :: C_INT
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
END FUNCTION h5pclose_c
INTEGER(HID_T), VALUE :: prp_id
END FUNCTION H5Pclose
END INTERFACE
hdferr = h5pclose_c(prp_id)
hdferr = INT(H5Pclose(prp_id))
END SUBROUTINE h5pclose_f
!>
@@ -5005,31 +5006,32 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
INTEGER , INTENT(OUT) :: hdferr
TYPE(C_PTR) , OPTIONAL, INTENT(IN) :: create_data, copy_data, close_data
TYPE(C_FUNPTR) , OPTIONAL, INTENT(IN) :: create, copy, close
INTEGER :: name_len
TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default
TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default
TYPE(C_FUNPTR) :: create_default, copy_default, close_default
INTERFACE
INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, &
create, create_data, copy, copy_data, close, close_data) &
BIND(C, NAME='h5pcreate_class_c')
IMPORT :: c_char, c_ptr, c_funptr
IMPORT :: HID_T
INTEGER(HID_T), INTENT(IN) :: parent
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
INTEGER, INTENT(IN) :: name_len
INTEGER(HID_T), INTENT(OUT) :: class
TYPE(C_PTR), VALUE :: create_data, copy_data, close_data
TYPE(C_FUNPTR), VALUE :: create, copy, close
END FUNCTION h5pcreate_class_c
END INTERFACE
name_len = LEN(name)
create_default = c_null_funptr !fix:scot
create_data_default = c_null_ptr
copy_default = c_null_funptr !fix:scot
copy_data_default = c_null_ptr
close_default = c_null_funptr !fix:scot
close_data_default = c_null_ptr
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
INTERFACE
INTEGER(HID_T) FUNCTION H5Pcreate_class(parent, name, &
create, create_data, copy, copy_data, close, close_data) &
BIND(C, NAME='H5Pcreate_class')
IMPORT :: C_CHAR, C_PTR, C_FUNPTR
IMPORT :: HID_T
INTEGER(HID_T), VALUE :: parent
CHARACTER(KIND=C_CHAR), DIMENSION(*) :: name
TYPE(C_PTR), VALUE :: create_data, copy_data, close_data
TYPE(C_FUNPTR), VALUE :: create, copy, close
END FUNCTION H5Pcreate_class
END INTERFACE
c_name = TRIM(name)//C_NULL_CHAR
create_default = C_NULL_FUNPTR
create_data_default = C_NULL_PTR
copy_default = C_NULL_FUNPTR
copy_data_default = C_NULL_PTR
close_default = C_NULL_FUNPTR
close_data_default = C_NULL_PTR
IF(PRESENT(create)) create_default = create
IF(PRESENT(create_data)) create_data_default = create_data
@@ -5038,11 +5040,14 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
IF(PRESENT(close)) close_default = close
IF(PRESENT(close_data)) close_data_default = close_data
hdferr = h5pcreate_class_c(parent, name , name_len, class, &
class = H5Pcreate_class(parent, c_name, &
create_default, create_data_default, &
copy_default, copy_data_default, &
close_default, close_data_default)
hdferr = 0
IF(class.LT.0) hdferr = -1
END SUBROUTINE h5pcreate_class_f
!>
@@ -5337,7 +5342,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
!! \brief Retrieves local and global causes that broke collective I/O on the last parallel I/O call.
!!
!! \param plist_id Dataset transfer property list identifier
!! \param local_no_collective_cause An enumerated set value indicating the causes that prevented collective I/O in the local process
!! \param local_no_collective_cause An enumerated set value indicating the causes that prevented collective I/O in the local process
!! \param global_no_collective_cause An enumerated set value indicating the causes across all processes that prevented collective I/O
!! \param hdferr \fortran_error
!!
+64
View File
@@ -401,4 +401,68 @@ CONTAINS
END SUBROUTINE H5VLunregister_connector_f
!>
!! \ingroup FH5VL
!!
!! \brief Retrieves the token representation from an address for a location identifier.
!!
!! \param loc_id Specifies a location identifier
!! \param addr Address for object in the file
!! \param token Token representing the object in the file
!! \param hdferr \fortran_error
!!
!! See C API: @ref H5VLnative_addr_to_token()
!!
SUBROUTINE h5vlnative_addr_to_token_f(loc_id, addr, token, hdferr)
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: loc_id
INTEGER(HADDR_T) , INTENT(IN) :: addr
TYPE(H5O_TOKEN_T_F), INTENT(OUT) :: token
INTEGER , INTENT(OUT) :: hdferr
INTERFACE
INTEGER(C_INT) FUNCTION H5VLnative_addr_to_token(loc_id, addr, token) BIND(C, NAME='H5VLnative_addr_to_token')
IMPORT :: HID_T, C_INT, HADDR_T, H5O_TOKEN_T_F
INTEGER(HID_T) , VALUE :: loc_id
INTEGER(HADDR_T), VALUE :: addr
TYPE(H5O_TOKEN_T_F) :: token
END FUNCTION H5VLnative_addr_to_token
END INTERFACE
hdferr = INT(H5VLnative_addr_to_token(loc_id, addr, token))
END SUBROUTINE h5vlnative_addr_to_token_f
!>
!! \ingroup FH5VL
!!
!! \brief Retrieves the object address from a token representation for a location identifier.
!!
!! \param loc_id Specifies a location identifier
!! \param token Token representing the object in the file
!! \param addr Address for object in the file
!! \param hdferr \fortran_error
!!
!! See C API: @ref H5VLnative_token_to_addr()
!!
SUBROUTINE h5vlnative_token_to_addr_f(loc_id, token, addr, hdferr)
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: loc_id
TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token
INTEGER(HADDR_T) , INTENT(OUT) :: addr
INTEGER , INTENT(OUT) :: hdferr
INTERFACE
INTEGER(C_INT) FUNCTION H5VLnative_token_to_addr(loc_id, token, addr) BIND(C, NAME='H5VLnative_token_to_addr')
IMPORT :: HID_T, C_INT, HADDR_T, H5O_TOKEN_T_F
INTEGER(HID_T) , VALUE :: loc_id
TYPE(H5O_TOKEN_T_F), VALUE :: token
INTEGER(HADDR_T) :: addr
END FUNCTION H5VLnative_token_to_addr
END INTERFACE
hdferr = INT(H5VLnative_token_to_addr(loc_id, token, addr))
END SUBROUTINE h5vlnative_token_to_addr_f
END MODULE H5VL
-4
View File
@@ -368,7 +368,6 @@ H5_FCDLL int_f h5otoken_cmp_c(hid_t_f *loc_id, H5O_token_t *token1, H5O_token_t
* Functions from H5Pf.c
*/
H5_FCDLL int_f h5pcreate_c(hid_t_f *cls, hid_t_f *prp_id);
H5_FCDLL int_f h5pclose_c(hid_t_f *prp_id);
H5_FCDLL int_f h5pcopy_c(hid_t_f *prp_id, hid_t_f *new_prp_id);
H5_FCDLL int_f h5pequal_c(hid_t_f *plist1_id, hid_t_f *plist2_id, int_f *c_flag);
H5_FCDLL int_f h5pget_class_c(hid_t_f *prp_id, hid_t_f *classtype);
@@ -451,9 +450,6 @@ H5_FCDLL int_f h5pset_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size);
H5_FCDLL int_f h5pget_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size);
H5_FCDLL int_f h5pset_hyper_vector_size_c(hid_t_f *plist, size_t_f *size);
H5_FCDLL int_f h5pget_hyper_vector_size_c(hid_t_f *plist, size_t_f *size);
H5_FCDLL int_f h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls,
H5P_cls_create_func_t create, void *create_data, H5P_cls_copy_func_t copy,
void *copy_data, H5P_cls_close_func_t close, void *close_data);
H5_FCDLL int_f h5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value);
H5_FCDLL int_f h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
H5_FCDLL int_f h5pset_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value);
-133
View File
@@ -1,133 +0,0 @@
===================================
README for the Fortran APIs to HDF5
===================================
This directory contains Fortran APIs for HDF5 Library functionality.
A complete list of implemented Fortran subroutines can be found in the HDF5
Reference Manual.
About the source code organization
==================================
The Fortran APIs are organized in modules parallel to the HDF5 Interfaces.
Each module is in a separate file with the name H5*ff.F90. Corresponding C
stubs are in the H5*f.c files. For example, the Fortran File APIs are in
the file H5Fff.F90 and the corresponding C stubs are in the file H5Ff.c.
Each module contains Fortran definitions of the constants, interfaces to
the subroutines if needed, and the subroutines themselves.
Users must use constant names in their programs instead of the numerical
values, as the numerical values are subject to change without notice.
Quick overview of the Fortran APIs
==============================================
* An in-depth description of each Fortran API and its parameters can
be found in the HDF5 Reference Manual.
* The Fortran APIs come in the form of Fortran subroutines.
* Each Fortran subroutine name is derived from the corresponding C function
name by adding "_f" to the name. For example, the name of the C function
to create an HDF5 file is H5Fcreate; the corresponding Fortran subroutine
is h5fcreate_f.
* The parameter list for each Fortran subroutine usually has two more parameters
than the corresponding C function. These additional parameters typically hold
the return value and an error code. The order of the Fortran subroutine
parameters may differ from the order of the C function parameters.
The Fortran subroutine parameters are usually listed in the following order:
-- required input parameters,
-- output parameters, including return value and error code, and
optional input parameters.
For example, the C function to create a dataset has the following
prototype:
hid_t H5Dcreate2(hid_it loc_id, char *name, hid_t type_id,
hid_t space_id, hid_t link_creation_prp, hid_t dset_creation_prp,
hid_t dset_access_prop);
The corresponding Fortran subroutine has the following form:
SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, &
hdferr, dset_creation_prp, link_creation_prp, dset_access_prop)
The first four parameters of the Fortran subroutine correspond to the
C function parameters. The fifth parameter dset_id is an output
parameter and contains a valid dataset identifier if the value of the
sixth output parameter, hdferr, indicates successful completion.
(Error code descriptions are provided with the subroutine descriptions
in the Reference Manual.) The last three input parameters are optional
and may be omitted, resulting in default values being used.
* Parameters to the Fortran subroutines typically include
predefined datatypes (see the build-time generated file
H5fortran_types.F90 for a complete listing):
INTEGER(HID_T) compares with hid_t type in HDF5 C APIs
INTEGER(HSIZE_T) compares with hsize_t in HDF5 C APIs
INTEGER(HSSIZE_T) compares with hssize_t in HDF5 C APIs
INTEGER(SIZE_T) compares with the C size_t type
These integer types usually correspond to 4 or 8 byte integers,
depending on the Fortran compiler and corresponding HDF5
C library definitions.
* Each Fortran application must call the h5open_f subroutine to
initialize the Fortran predefined datatypes before calling the HDF5 Fortran
subroutines. The application should call the h5close_f subroutine
after all calls to the HDF5 Fortran Library.
* When a C application reads data stored from a Fortran program, the data
will appear to be transposed due to the difference in the C - Fortran
storage order. For example, if Fortran writes a 4x6 two-dimensional dataset
to the file, a C program will read it as a 6x4 two-dimensional dataset into
memory. The HDF5 C utilities h5dump and h5ls display transposed data, if
data is written from a Fortran program.
* Fortran indices are 1 based.
============================
FOR DEVELOPERS
============================
Procedure to add a new function
----------------------------------
(1) Edit the fortran/src/H5*ff.F90 file
(2) Edit the fortran/src/H5*f.c file
(3) Edit the fortran/src/H5f90proto.h file
(4) Add the new function to fortran/src/hdf5_fortrandll.def.in
Procedure for passing C variables to Fortran
---------------------------------------------
(1) Find the C struct name you are interested in:
(a) src/H5public.h if it is a generic type, i.e. H5_*
or
(b) src/H5*public.h if is a specific type, i.e. H5*_
(2) Put that structure into an array that will be passed to fortran in:
(a) fortran/src/H5_f.c (add to nh5init_flags_c subroutine)
(b) edit fortran/src/H5f90proto.h and edit nh5init_flags_c interface call
(3) Edit the function call in fortran/src/H5_ff.F90
(a) edit the call: FUNCTION h5init_flags_c
(b) edit h5init_flags_c call in h5open_f to match the number of arguments passing
(4) add the size of the array and array to fortran/src/H5f90global.F90
- must match the size found it H5_f.c
NOTE: To just add a default C value argument, do steps (2a) and (4)
Procedure for adding a new file to the repository
--------------------------------------------------
Add the name of the file to the:
(1) Makefile.am located in the same directory as the newfile
(2) CMakeLists.txt located in the same directory as the newfile
+159
View File
@@ -0,0 +1,159 @@
Information about the Fortran APIs
===================================
This directory contains Fortran APIs for HDF5 Library functionality.
A complete list of implemented Fortran subroutines can be found in the HDF5
Reference Manual.
About the source code organization
----------------------------------
The Fortran APIs are organized in modules parallel to the HDF5 Interfaces.
Each module is in a separate file with the name H5\*ff.F90. Corresponding C
stubs are in the H5\*f.c files. For example, the Fortran File APIs are in
the file H5Fff.F90, and the corresponding C stubs are in the file H5Ff.c.
Each module contains Fortran definitions of the constants, interfaces to
the subroutines if needed, and the subroutines themselves.
It is crucial for users to use constant names in their programs instead
of the numerical values, as the constant names have values which are
subject to change without notice.
Quick overview of the Fortran APIs
----------------------------------
* An in-depth description of each Fortran API and its parameters can
be found in the HDF5 Reference Manual. They tend to be summarized
from the C descriptions.
* The Fortran APIs come in the form of Fortran subroutines.
* Each Fortran subroutine name is derived from the corresponding C function
name by adding "_f" to the name. For example, the name of the C function
to create an HDF5 file is H5Fcreate; the corresponding Fortran subroutine
is h5fcreate_f.
* The parameter list for each Fortran subroutine usually has two more parameters
than the corresponding C function. These additional parameters typically hold
the return value and an error code. The order of the Fortran subroutine
parameters may differ from the order of the C function parameters.
The Fortran subroutine parameters are usually listed in the following order:
* required input parameters,
* output parameters, including return value and error code, and
optional input parameters.
For example, the C function to create a dataset has the following
prototype:
hid_t H5Dcreate2(hid_it loc_id, char *name, hid_t type_id,
hid_t space_id, hid_t link_creation_prp, hid_t dset_creation_prp,
hid_t dset_access_prop);
The corresponding Fortran subroutine has the following form:
SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, &
hdferr, dset_creation_prp, link_creation_prp, dset_access_prop)
The first four parameters of the Fortran subroutine correspond to the
parameters of the C function. The fifth parameter, dset_id, is an output
parameter containing a valid dataset identifier, and the sixth
output parameter, hdferr, indicates successful completion.
The error code descriptions can be found in the subroutine descriptions
of the Reference Manual. The last three input parameters are optional
and can be omitted, in which case default values will be used.
* Parameters to the Fortran subroutines typically include
predefined datatypes (see the build-time generated file
H5fortran_types.F90 for a complete listing):
INTEGER(HID_T) compares with hid_t type in HDF5 C APIs
INTEGER(HSIZE_T) compares with hsize_t in HDF5 C APIs
INTEGER(HSSIZE_T) compares with hssize_t in HDF5 C APIs
INTEGER(SIZE_T) compares with the C size_t type
These integer types usually correspond to 4- or 8-byte integers,
depending on the Fortran compiler and corresponding HDF5
C library definitions.
* Before calling HDF5 Fortran subroutines, each Fortran application must initialize Fortran datatypes
by calling the h5open_f subroutine. After all calls to the HDF5 Fortran Library, the application
should call the h5close_f subroutine.
* All public APIs for the Reference Manual have Doxygen descriptions and should use parameter aliases when possible.
* When a C application reads data stored by a Fortran program, the data appears
to be transposed. This is because C and Fortran have different storage orders
(row-major and column-major, respectively). For instance, if a Fortran program
writes a 4x6 two-dimensional dataset to a file, a C program will read it into
memory as a 6x4 two-dimensional dataset. The HDF5 C utilities h5dump and h5ls
display transposed data if it was written from a Fortran program.
* It is important to note that in Fortran, the indexing of arrays starts at 1.
FOR DEVELOPERS
==============
* The build system generates APIs compatible with Fortran 90 to handle the backward compatibility
of the older F90 APIs. During the configuration process, the build system determines all
valid integer and real KINDs, as well as the maximum decimal precision for reals and floats
in both Fortran and C. To determine all the available kinds, the Fortran program
*PROGRAM FC_AVAIL_KINDS* is used, which is located in aclocal_fc.f90. The available KINDs
are stored in H5config_f.inc, a file processed during configuration time from
H5config_f.inc.in. Each program in m4/aclocal_fc.f90 is enclosed with a
"!---START-----+" line and a "!---END-------+" line, which are used as markers to
isolate each test program for the build systems.
The valid KINDs for integers and reals that are stored in H5config_f.inc are used in the H5_buildiface.F90 file located in the fortran/src directory. During the build process, H5_buildiface.F90 generates all the valid F90 KIND interfaces for the following APIs: h5awrite_f, h5aread_f, h5dwrite_f, h5dread_f, h5pset_fill_value_f, h5pget_fill_value_f, h5pset_f, h5pget_f, h5pregister_f, and h5pinsert_f. These APIs can handle up to and including rank seven arrays for all the found KINDs. Again, it's important to note that no new Fortran APIs should be added to H5_buildiface.F90 since new Fortran APIs should not use F90 specification but should instead use F2003. The source file generated by H5_buildiface.F90 is H5_gen.F90, which is the Fortran module H5_GEN, Figure 1. This module is included in the HDF5 module HDF5.F90.
<figure>
<!-- Xfig graphic -->
<img src="./FortBuildFlow.svg">
<figcaption>Figure 1: During the configure and build phases, Fortran files are generated and compiled. This overview explains the flow steps of the build process.</figcaption>
</figure>
Procedure to add a new function
--------------------------------
> [!IMPORTANT]
> The use of C stubs (H5\*f.c) is no longer recommended. The C APIs should now be called from Fortran wrappers. C wrappers description exists for maintenance purposes and to create and understand alternative development options.
1. Edit the fortran/src/H5\*ff.F90 file
2. Edit the fortran/src/H5\*f.c file
3. Edit the fortran/src/H5f90proto.h file
4. Add the new function to fortran/src/hdf5_fortrandll.def.in
Procedure for passing C variables to Fortran
---------------------------------------------
(1) Find the C struct name you are interested in:
(a) src/H5public.h if it is a generic type, i.e. H5_*
or
(b) src/H5*public.h if is a specific type, i.e. H5*_
(2) Put that structure into an array that will be passed to Fortran in:
(a) fortran/src/H5_f.c (add to the h5init_flags_c subroutine)
(b) edit fortran/src/H5f90proto.h and edit h5init_flags_c interface call
(3) Edit the function call in fortran/src/H5_ff.F90
(a) edit the call: FUNCTION h5init_flags_c
(b) edit h5init_flags_c call in h5open_f to match the number of arguments being passed
(4) Add the size of the array and array to fortran/src/H5f90global.F90, it must match the size found in H5_f.c
> [!NOTE]
> To add a default C value argument, do steps (2a) and (4).
Procedure for adding a new file to the repository
--------------------------------------------------
Add the name of the file to the:
(1) Makefile.am located in the same directory as the new file.
(2) CMakeLists.txt located in the same directory as the new file.
+4 -2
View File
@@ -253,12 +253,13 @@ H5O_mp_H5OVISIT_BY_NAME_F
H5O_mp_H5OVISIT_F
H5O_mp_H5OTOKEN_CMP_F
; H5P
H5P_mp_H5PCLOSE_F
H5P_mp_H5PCREATE_F
H5P_mp_H5PCREATE_CLASS_F
H5P_mp_H5PSET_PRESERVE_F
H5P_mp_H5PGET_PRESERVE_F
H5P_mp_H5PGET_CLASS_F
H5P_mp_H5PCOPY_F
H5P_mp_H5PCLOSE_F
H5P_mp_H5PSET_CHUNK_F
H5P_mp_H5PGET_CHUNK_F
H5P_mp_H5PSET_DEFLATE_F
@@ -331,7 +332,6 @@ H5P_mp_H5PCOPY_PROP_F
H5P_mp_H5PREMOVE_F
H5P_mp_H5PUNREGISTER_F
H5P_mp_H5PCLOSE_CLASS_F
H5P_mp_H5PCREATE_CLASS_F
H5P_mp_H5PREGISTER_INTEGER
H5P_mp_H5PREGISTER_CHAR
H5P_mp_H5PINSERT_CHAR
@@ -555,6 +555,8 @@ H5VL_mp_H5VLGET_CONNECTOR_ID_BY_VALUE_F
H5VL_mp_H5VLGET_CONNECTOR_NAME_F
H5VL_mp_H5VLCLOSE_F
H5VL_mp_H5VLUNREGISTER_CONNECTOR_F
H5VL_mp_H5VLNATIVE_ADDR_TO_TOKEN_F
H5VL_mp_H5VLNATIVE_TOKEN_TO_ADDR_F
; H5Z
H5Z_mp_H5ZUNREGISTER_F
H5Z_mp_H5ZFILTER_AVAIL_F
+18
View File
@@ -94,6 +94,9 @@ endif ()
set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES
FIXTURES_REQUIRED clear_testhdf5_fortran
)
if ("FORTRAN_testhdf5_fortran" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES DISABLED true)
endif ()
#-- Adding test for testhdf5_fortran_1_8
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -118,6 +121,9 @@ set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES
DEPENDS FORTRAN_testhdf5_fortran
FIXTURES_REQUIRED clear_testhdf5_fortran
)
if ("FORTRAN_testhdf5_fortran_1_8" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES DISABLED true)
endif ()
#-- Adding test for fortranlib_test_F03
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -142,6 +148,9 @@ set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES
DEPENDS FORTRAN_testhdf5_fortran_1_8
FIXTURES_REQUIRED clear_testhdf5_fortran
)
if ("FORTRAN_fortranlib_test_F03" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES DISABLED true)
endif ()
#-- Adding test for vol_connector
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -164,6 +173,9 @@ endif ()
set_tests_properties (FORTRAN_vol_connector PROPERTIES
FIXTURES_REQUIRED clear_testhdf5_fortran
)
if ("FORTRAN_vol_connector" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_vol_connector PROPERTIES DISABLED true)
endif ()
#-- Adding test for fflush1
add_test (
@@ -177,6 +189,9 @@ add_test (
set_tests_properties (FORTRAN_fflush1 PROPERTIES
DEPENDS FORTRAN_flush1-clear-objects
)
if ("FORTRAN_fflush1" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_fflush1 PROPERTIES DISABLED true)
endif ()
#-- Adding test for fflush2
add_test (
@@ -186,6 +201,9 @@ add_test (
set_tests_properties (FORTRAN_fflush2 PROPERTIES
DEPENDS FORTRAN_fflush1
)
if ("FORTRAN_fflush2" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (FORTRAN_fflush2 PROPERTIES DISABLED true)
endif ()
add_test (
NAME FORTRAN_flush1-clean-objects
COMMAND ${CMAKE_COMMAND} -E remove flush.h5
+25 -9
View File
@@ -73,6 +73,8 @@ CONTAINS
INTEGER :: cmp_value
INTEGER :: i
INTEGER :: ierr
INTEGER(HADDR_T) :: addr
TYPE(H5O_TOKEN_T_F) :: token
status = 0
@@ -82,7 +84,7 @@ CONTAINS
RETURN
ENDIF
token_c%token = oinfo_c%token%token
CALL H5Otoken_cmp_f(loc_id, oinfo_f%token, token_c, cmp_value, ierr);
CALL H5Otoken_cmp_f(loc_id, oinfo_f%token, token_c, cmp_value, ierr)
IF( (ierr .EQ. -1) .OR. (cmp_value .NE. 0) ) THEN
status = -1
RETURN
@@ -96,6 +98,22 @@ CONTAINS
RETURN
ENDIF
CALL h5vlnative_token_to_addr_f(loc_id, oinfo_f%token, addr, ierr)
IF( ierr .EQ. -1) THEN
status = -1
RETURN
ENDIF
CALL h5vlnative_addr_to_token_f(loc_id, addr, token, ierr)
IF( ierr .EQ. -1) THEN
status = -1
RETURN
ENDIF
CALL H5Otoken_cmp_f(loc_id, oinfo_f%token, token, cmp_value, ierr)
IF( (ierr .EQ. -1) .OR. (cmp_value .NE. 0) ) THEN
status = -1
RETURN
ENDIF
ENDIF
IF((field .EQ. H5O_INFO_TIME_F).OR.(field .EQ. H5O_INFO_ALL_F))THEN
@@ -132,7 +150,7 @@ CONTAINS
status = 0
IF( oinfo_c%fileno .NE. oinfo_f%fileno) status = status + 1
token_c%token = oinfo_c%token%token
CALL H5Otoken_cmp_f(loc_id, oinfo_f%token, token_c, cmp_value, ierr);
CALL H5Otoken_cmp_f(loc_id, oinfo_f%token, token_c, cmp_value, ierr)
IF( (ierr .EQ. -1) .OR. (cmp_value .NE. 0) ) THEN
status = -1
RETURN
@@ -156,7 +174,7 @@ CONTAINS
status = 0
IF( oinfo_c%fileno .NE. oinfo_f%fileno) status = status + 1
token_c%token = oinfo_c%token%token
CALL H5Otoken_cmp_f(loc_id, oinfo_f%token, token_c, cmp_value, ierr);
CALL H5Otoken_cmp_f(loc_id, oinfo_f%token, token_c, cmp_value, ierr)
IF( (ierr .EQ. -1) .OR. (cmp_value .NE. 0) ) THEN
status = -1
RETURN
@@ -234,25 +252,24 @@ CONTAINS
ENDIF
! Check H5Oget_info_by_name_f; if partial field values were filled correctly
CALL H5Oget_info_by_name_f(group_id, name2, oinfo_f, ierr);
CALL H5Oget_info_by_name_f(group_id, name2, oinfo_f, ierr)
visit_obj_cb = compare_h5o_info_t( group_id, oinfo_f, oinfo_c, op_data%field, .TRUE. )
IF(visit_obj_cb.EQ.-1) RETURN
! Check H5Oget_info_by_name_f, only check field values
CALL H5Oget_info_by_name_f(group_id, name2, oinfo_f, ierr, fields = op_data%field);
CALL H5Oget_info_by_name_f(group_id, name2, oinfo_f, ierr, fields = op_data%field)
visit_obj_cb = compare_h5o_info_t(group_id, oinfo_f, oinfo_c, op_data%field, .FALSE. )
IF(visit_obj_cb.EQ.-1) RETURN
IF(op_data%idx.EQ.1)THEN
! Check H5Oget_info_f, only check field values
CALL H5Oget_info_f(group_id, oinfo_f, ierr, fields = op_data%field);
CALL H5Oget_info_f(group_id, oinfo_f, ierr, fields = op_data%field)
visit_obj_cb = compare_h5o_info_t(group_id, oinfo_f, oinfo_c, op_data%field, .FALSE. )
IF(visit_obj_cb.EQ.-1) RETURN
! Check H5Oget_info_f; if partial field values where filled correctly
CALL H5Oget_info_f(group_id, oinfo_f, ierr);
CALL H5Oget_info_f(group_id, oinfo_f, ierr)
visit_obj_cb = compare_h5o_info_t(group_id, oinfo_f, oinfo_c, op_data%field, .TRUE. )
IF(visit_obj_cb.EQ.-1) RETURN
@@ -677,7 +694,6 @@ SUBROUTINE test_obj_info(total_error)
CALL check("h5oget_info_by_idx_f", -1, total_error)
ENDIF
! Close objects
CALL h5dclose_f(did, error)
CALL check("h5dclose_f", error, total_error)
+11
View File
@@ -16,5 +16,16 @@
##############################################################################
##############################################################################
add_test (NAME MPI_TEST_FORT_parallel_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:parallel_test> ${MPIEXEC_POSTFLAGS})
if ("MPI_TEST_FORT_parallel_test" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_FORT_parallel_test PROPERTIES DISABLED true)
endif ()
add_test (NAME MPI_TEST_FORT_subfiling_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:subfiling_test> ${MPIEXEC_POSTFLAGS})
if ("MPI_TEST_FORT_subfiling_test" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_FORT_subfiling_test PROPERTIES DISABLED true)
endif ()
add_test (NAME MPI_TEST_FORT_async_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:async_test> ${MPIEXEC_POSTFLAGS})
if ("MPI_TEST_FORT_async_test" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_FORT_async_test PROPERTIES DISABLED true)
endif ()
+1 -1
View File
@@ -36,7 +36,7 @@ TEST_PROG_PARA=parallel_test subfiling_test async_test
check_PROGRAMS=$(TEST_PROG_PARA)
# Temporary files
CHECK_CLEANFILES+=parf[12].h5 h5*_tests.h5 subf.h5* test_async_apis.mod
CHECK_CLEANFILES+=parf[12].h5 h5*_tests.h5 subf.h5* *.mod
# Test source files
parallel_test_SOURCES=ptest.F90 hyper.F90 mdset.F90 multidsetrw.F90
+1 -1
View File
@@ -72,7 +72,7 @@ main(void)
if (err < 0)
fprintf(stderr, "Error getting packet count.");
printf("Number of packets in packet table after five appends: %llu\n", count);
printf("Number of packets in packet table after five appends: %" PRIuHSIZE "\n", count);
/* Initialize packet table's "current record" */
ptable.ResetIndex();
+4
View File
@@ -44,6 +44,9 @@ else ()
)
endif ()
set_tests_properties (HL_CPP_ptableTest PROPERTIES DEPENDS HL_CPP_ptableTest-clear-objects)
if ("HL_CPP_ptableTest" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (HL_CPP_ptableTest PROPERTIES DISABLED true)
endif ()
add_test (
NAME HL_CPP_ptableTest-clean-objects
COMMAND ${CMAKE_COMMAND}
@@ -53,3 +56,4 @@ set_tests_properties (HL_CPP_ptableTest-clean-objects PROPERTIES
DEPENDS HL_CPP_ptableTest
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
+3
View File
@@ -68,6 +68,9 @@ macro (ADD_H5_FORTRAN_TEST file)
FIXTURES_REQUIRED clear_HL_FORTRAN_test
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
if ("HL_FORTRAN_f90_${file}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (HL_FORTRAN_f90_${file} PROPERTIES DISABLED true)
endif ()
endmacro ()
foreach (h5_test ${H5_TESTS})
+3
View File
@@ -118,6 +118,9 @@ macro (HL_ADD_TEST hl_name)
ENVIRONMENT "srcdir=${HDF5_HL_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR}
)
if ("HL_${hl_name}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (HL_${hl_name} PROPERTIES DISABLED true)
endif ()
endmacro ()
HL_add_test (test_lite )
+9
View File
@@ -86,6 +86,9 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
DEPENDS ${last_test}
FIXTURES_REQUIRED gen_test_watch
)
if ("H5WATCH_ARGS-h5watch-${resultfile}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5WATCH_ARGS-h5watch-${resultfile} PROPERTIES DISABLED true)
endif ()
set (last_test "H5WATCH_ARGS-h5watch-${resultfile}")
endif ()
endmacro ()
@@ -109,6 +112,9 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
DEPENDS ${last_test}
FIXTURES_REQUIRED gen_test_watch
)
if ("H5WATCH_ARGS-h5watch-${resultfile}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5WATCH_ARGS-h5watch-${resultfile} PROPERTIES DISABLED true)
endif ()
set (last_test "H5WATCH_ARGS-h5watch-${resultfile}")
endif ()
endmacro ()
@@ -131,6 +137,9 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
DEPENDS ${last_test}
FIXTURES_REQUIRED gen_test_watch
)
if ("H5WATCH-${resultfile}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5WATCH-${resultfile} PROPERTIES DISABLED true)
endif ()
set (last_test "H5WATCH-${resultfile}")
endif ()
endmacro ()
+6
View File
@@ -175,6 +175,9 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
FIXTURES_REQUIRED clear_JUnit
WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test
)
if ("JUnit-${test_file}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (JUnit-${test_file} PROPERTIES DISABLED true)
endif ()
endforeach ()
@@ -208,6 +211,9 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2"
WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test/${volname}
)
if ("JUnit-VOL-${volname}-${voltest}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (JUnit-VOL-${volname}-${voltest} PROPERTIES DISABLED true)
endif ()
add_test (
NAME JUnit-VOL-${volname}-${voltest}-clean-objects
COMMAND ${CMAKE_COMMAND} -E remove
+1
View File
@@ -879,6 +879,7 @@ if (BUILD_TESTING)
if (HDF5_TEST_VFD)
HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON
TEST_SHELL_SCRIPTS "Enable shell script tests" ON
HDF5_DISABLE_TESTS_REGEX "Regex pattern to set execution of specific tests to DISABLED" ""
---------------- External Library Options ---------------------
HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO"
+95 -9
View File
@@ -47,7 +47,33 @@ New Features
Configuration:
-------------
-
- Added new option for CMake to mark tests as SKIPPED.
HDF5_DISABLE_TESTS_REGEX is a REGEX string that will be checked with
test names and if there is a match then that test's property will be
set to DISABLED. HDF5_DISABLE_TESTS_REGEX can be initialized on the
command line: "-DHDF5_DISABLE_TESTS_REGEX:STRING=<regex>"
See CMake documentation for regex-specification.
- Added defaults to CMake for long double conversion checks
HDF5 performs a couple of checks at build time to see if long double
values can be converted correctly (IBM's Power architecture uses a
special format for long doubles). These checks were performed using
TRY_RUN, which is a problem when cross-compiling.
These checks now use default values appropriate for most non-Power
systems when cross-compiling. The cache values can be pre-set if
necessary, which will preempt both the TRY_RUN and the default.
Affected values:
H5_LDOUBLE_TO_LONG_SPECIAL (default no)
H5_LONG_TO_LDOUBLE_SPECIAL (default no)
H5_LDOUBLE_TO_LLONG_ACCURATE (default yes)
H5_LLONG_TO_LDOUBLE_CORRECT (default yes)
H5_DISABLE_SOME_LDOUBLE_CONV (default no)
Fixes GitHub #3585
Library:
@@ -62,7 +88,8 @@ New Features
Fortran Library:
----------------
-
- Added Fortran APIs:
h5vlnative_addr_to_token_f and h5vlnative_token_to_address_f
C++ Library:
@@ -109,6 +136,29 @@ Bug Fixes since HDF5-1.14.3 release
===================================
Library
-------
- Suppressed floating-point exceptions in H5T init code
The floating-point datatype initialization code in H5Tinit_float.c
could raise FE_INVALID exceptions while munging bits and performing
comparisons that might involve NaN. This was not a problem when the
initialization code was executed in H5detect at compile time (prior
to 1.14.3), but now that the code is executed at library startup
(1.14.3+), these exceptions can be caught by user code, as is the
default in the NAG Fortran compiler.
Starting in 1.14.4, we now suppress floating-point exceptions while
initializing the floating-point types and clear FE_INVALID before
restoring the original environment.
Fixes GitHub #3831
- Fixed a file handle leak in the core VFD
When opening a file with the core VFD and a file image, if the file
already exists, the file check would leak the POSIX file handle.
Fixes GitHub issue #635
- Dropped support for MPI-2
The MPI-2 supporting artifacts have been removed due to the cessation
@@ -122,12 +172,32 @@ Bug Fixes since HDF5-1.14.3 release
Configuration
-------------
-
- Removed an Autotools configure hack that causes problems on MacOS
A sed line in configure.ac was added in the past to paper over some
problems with older versions of the Autotools that would add incorrect
linker flags. This hack is not needed with recent versions of the
Autotools and the sed line errors on MacOS (though this was a silent
error that didn't break the build) so the hack has been removed.
Fixes GitHub issue #3843
- Fixed an issue where the h5tools_test_utils test program was being
installed on the system for Autotools builds of HDF5
The h5tools_test_utils test program was mistakenly added to bin_PROGRAMS
in its Makefile.am configuration file, causing the executable to be
installed on the system. The executable is now added to noinst_PROGRAMS
instead and will no longer be installed on the system for Autotools builds
of HDF5. The CMake configuration code already avoids installing the
executable on the system.
Tools
-----
-
- Renamed h5fuse.sh to h5fuse
Addresses Discussion #3791
Performance
@@ -299,11 +369,27 @@ Platforms Tested
Known Problems
==============
IEEE standard arithmetic enables software to raise exceptions such as overflow,
division by zero, and other illegal operations without interrupting or halting
the program flow. The HDF5 C library intentionally performs these exceptions.
Therefore, the "-ieee=full" nagfor switch is necessary when compiling a program
to avoid stopping on an exception.
When HDF5 is compiled with NVHPC versions 23.5 - 23.9 (additional versions may
also be applicable) and with -O2 (or higher) and -DNDEBUG, test failures occur
in the following tests:
H5PLUGIN-filter_plugin
H5TEST-flush2
H5TEST-testhdf5-base
MPI_TEST_t_filters_parallel
Since these tests pass with an optimization level of -O1 (and -O0) and it is
currently unclear whether the test failures are due to issues in HDF5 or issues
in the 'nvc' compiler, the maximum optimization level for NVHPC has been set
to -O1 until the test failures can be resolved. Note that even at -O1 optimization
level, there still appears to be a sporadic test failure in the Java JUnit tests
that has occasionally been seen in JUnit-TestH5Pfapl and JUnit-TestH5D. It is also
unclear whether this is an issue in HDF5 or with the 'nvc' compiler. Finally, note
that NVHPC 23.9 will fail to compile the test/tselect.c test file with a compiler
error of 'use of undefined value' when the optimization level is -O2 or higher.
Nvidia is aware of this issue and has suggested lowering the optimization level to
-O1 for the time being:
https://forums.developer.nvidia.com/t/hdf5-no-longer-compiles-with-nv-23-9/269045.
CMake files do not behave correctly with paths containing spaces.
Do not use spaces in paths because the required escaping for handling spaces
+101 -163
View File
@@ -5536,11 +5536,9 @@ done:
/*-------------------------------------------------------------------------
* Function: H5D__chunk_collective_fill
*
* Purpose: Use MPIO collective write to fill the chunks (if number of
* chunks to fill is greater than the number of MPI procs;
* otherwise use independent I/O).
* Purpose: Use MPIO selection vector I/O for writing fill chunks
*
* Return: Non-negative on success/Negative on failure
* Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
@@ -5554,19 +5552,24 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
int mpi_code; /* MPI return code */
size_t num_blocks; /* Number of blocks between processes. */
size_t leftover_blocks; /* Number of leftover blocks to handle */
int blocks, leftover; /* converted to int for MPI */
MPI_Aint *chunk_disp_array = NULL;
MPI_Aint *block_disps = NULL;
int *block_lens = NULL;
MPI_Datatype mem_type = MPI_BYTE, file_type = MPI_BYTE;
H5FD_mpio_xfer_t prev_xfer_mode; /* Previous data xfer mode */
bool have_xfer_mode = false; /* Whether the previous xffer mode has been retrieved */
bool need_sort = false;
size_t i; /* Local index variable */
int blocks; /* converted to int for MPI */
int leftover; /* converted to int for MPI */
H5FD_mpio_xfer_t prev_xfer_mode; /* Previous data xfer mode */
bool have_xfer_mode = false; /* Whether the previous xffer mode has been retrieved */
size_t i; /* Local index variable */
haddr_t *io_addrs = NULL;
size_t *io_sizes = NULL;
const void **io_wbufs = NULL;
H5FD_mem_t io_types[2];
bool all_same_block_len = true;
bool need_sort = false;
size_t io_2sizes[2];
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
assert(chunk_fill_info->num_chunks != 0);
/*
* If a separate fill buffer is provided for partial chunks, ensure
* that the "don't filter partial edge chunks" flag is set.
@@ -5589,6 +5592,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
/* Distribute evenly the number of blocks between processes. */
if (mpi_size == 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Resulted in division by zero");
num_blocks =
(size_t)(chunk_fill_info->num_chunks / (size_t)mpi_size); /* value should be the same on all procs */
@@ -5602,157 +5606,97 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
H5_CHECKED_ASSIGN(leftover, int, leftover_blocks, size_t);
/* Check if we have any chunks to write on this rank */
if (num_blocks > 0 || (leftover && leftover > mpi_rank)) {
MPI_Aint partial_fill_buf_disp = 0;
bool all_same_block_len = true;
if (num_blocks > 0 || leftover > mpi_rank) {
/* Allocate buffers */
if (NULL == (chunk_disp_array = (MPI_Aint *)H5MM_malloc((size_t)(blocks + 1) * sizeof(MPI_Aint))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file displacement buffer");
if (NULL == (io_addrs = H5MM_malloc((size_t)(blocks + 1) * sizeof(*io_addrs))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for I/O addresses vector");
if (partial_chunk_fill_buf) {
MPI_Aint fill_buf_addr;
MPI_Aint partial_fill_buf_addr;
if (NULL == (io_wbufs = H5MM_malloc((size_t)(blocks + 1) * sizeof(*io_wbufs))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't allocate space for I/O buffers vector");
}
/* Calculate the displacement between the fill buffer and partial chunk fill buffer */
if (MPI_SUCCESS != (mpi_code = MPI_Get_address(fill_buf, &fill_buf_addr)))
HMPI_GOTO_ERROR(FAIL, "MPI_Get_address failed", mpi_code)
if (MPI_SUCCESS != (mpi_code = MPI_Get_address(partial_chunk_fill_buf, &partial_fill_buf_addr)))
HMPI_GOTO_ERROR(FAIL, "MPI_Get_address failed", mpi_code)
/*
* Perform initial scan of chunk info list to:
* - make sure that chunk addresses are monotonically non-decreasing
* - check if all blocks have the same length
*/
for (i = 1; i < chunk_fill_info->num_chunks; i++) {
if (chunk_fill_info->chunk_info[i].addr < chunk_fill_info->chunk_info[i - 1].addr)
need_sort = true;
#if H5_CHECK_MPI_VERSION(3, 1)
partial_fill_buf_disp = MPI_Aint_diff(partial_fill_buf_addr, fill_buf_addr);
#else
partial_fill_buf_disp = partial_fill_buf_addr - fill_buf_addr;
#endif
if (chunk_fill_info->chunk_info[i].chunk_size != chunk_fill_info->chunk_info[i - 1].chunk_size)
all_same_block_len = false;
}
/*
* Allocate all-zero block displacements array. If a block's displacement
* is left as zero, that block will be written to from the regular fill
* buffer. If a block represents an unfiltered partial edge chunk, its
* displacement will be set so that the block is written to from the
* unfiltered fill buffer.
*/
if (NULL == (block_disps = (MPI_Aint *)H5MM_calloc((size_t)(blocks + 1) * sizeof(MPI_Aint))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate block displacements buffer");
}
/*
* Note that we sort all of the chunks here, and not just a subset
* corresponding to this rank. We do this since we have found MPI I/O to work
* better when each rank writes blocks that are contiguous in the file,
* and by sorting the full list we maximize the chance of that happening.
*/
if (need_sort)
qsort(chunk_fill_info->chunk_info, chunk_fill_info->num_chunks, sizeof(struct chunk_coll_fill_info),
H5D__chunk_cmp_coll_fill_info);
/*
* Perform initial scan of chunk info list to:
* - make sure that chunk addresses are monotonically non-decreasing
* - check if all blocks have the same length
*/
for (i = 1; i < chunk_fill_info->num_chunks; i++) {
if (chunk_fill_info->chunk_info[i].addr < chunk_fill_info->chunk_info[i - 1].addr)
need_sort = true;
/*
* If all the chunks have the same length, use the compressed feature
* to store the size.
* Otherwise, allocate the array of sizes for storing chunk sizes.
*/
if (all_same_block_len) {
io_2sizes[0] = chunk_fill_info->chunk_info[0].chunk_size;
io_2sizes[1] = 0;
}
else {
if (NULL == (io_sizes = H5MM_malloc((size_t)(blocks + 1) * sizeof(*io_sizes))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't allocate space for I/O sizes vector");
}
if (chunk_fill_info->chunk_info[i].chunk_size != chunk_fill_info->chunk_info[i - 1].chunk_size)
all_same_block_len = false;
}
/*
* Since the type of all chunks is raw data, use the compressed feature
* to store the chunk type.
*/
io_types[0] = H5FD_MEM_DRAW;
io_types[1] = H5FD_MEM_NOLIST;
if (need_sort)
qsort(chunk_fill_info->chunk_info, chunk_fill_info->num_chunks,
sizeof(struct chunk_coll_fill_info), H5D__chunk_cmp_coll_fill_info);
/*
* For the chunks corresponding to this rank, fill in the
* address, size and buf pointer for each chunk.
*/
for (i = 0; i < (size_t)blocks; i++) {
size_t idx = i + (size_t)(mpi_rank * blocks);
io_addrs[i] = chunk_fill_info->chunk_info[idx].addr;
/* Allocate buffer for block lengths if necessary */
if (!all_same_block_len)
if (NULL == (block_lens = (int *)H5MM_malloc((size_t)(blocks + 1) * sizeof(int))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk lengths buffer");
io_sizes[i] = chunk_fill_info->chunk_info[idx].chunk_size;
for (i = 0; i < (size_t)blocks; i++) {
size_t idx = i + (size_t)(mpi_rank * blocks);
if (chunk_fill_info->chunk_info[idx].unfiltered_partial_chunk)
io_wbufs[i] = partial_chunk_fill_buf;
else
io_wbufs[i] = fill_buf;
}
/* store the chunk address as an MPI_Aint */
chunk_disp_array[i] = (MPI_Aint)(chunk_fill_info->chunk_info[idx].addr);
/*
* For the leftover chunk corresponding to this rank, fill in the
* address, size and buf pointer for the chunk.
*/
if (leftover > mpi_rank) {
io_addrs[blocks] = chunk_fill_info->chunk_info[(blocks * mpi_size) + mpi_rank].addr;
if (!all_same_block_len)
H5_CHECKED_ASSIGN(block_lens[i], int, chunk_fill_info->chunk_info[idx].chunk_size, size_t);
if (!all_same_block_len)
io_sizes[blocks] = chunk_fill_info->chunk_info[(blocks * mpi_size) + mpi_rank].chunk_size;
if (chunk_fill_info->chunk_info[idx].unfiltered_partial_chunk) {
assert(partial_chunk_fill_buf);
block_disps[i] = partial_fill_buf_disp;
}
} /* end for */
/* Calculate if there are any leftover blocks after evenly
* distributing. If there are, then round-robin the distribution
* to processes 0 -> leftover.
*/
if (leftover && leftover > mpi_rank) {
chunk_disp_array[blocks] =
(MPI_Aint)chunk_fill_info->chunk_info[(blocks * mpi_size) + mpi_rank].addr;
if (!all_same_block_len)
H5_CHECKED_ASSIGN(block_lens[blocks], int,
chunk_fill_info->chunk_info[(blocks * mpi_size) + mpi_rank].chunk_size,
size_t);
if (chunk_fill_info->chunk_info[(blocks * mpi_size) + mpi_rank].unfiltered_partial_chunk) {
assert(partial_chunk_fill_buf);
block_disps[blocks] = partial_fill_buf_disp;
}
blocks++;
}
/* Create file and memory types for the write operation */
if (all_same_block_len) {
int block_len;
H5_CHECKED_ASSIGN(block_len, int, chunk_fill_info->chunk_info[0].chunk_size, size_t);
mpi_code =
MPI_Type_create_hindexed_block(blocks, block_len, chunk_disp_array, MPI_BYTE, &file_type);
if (mpi_code != MPI_SUCCESS)
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed_block failed", mpi_code)
if (partial_chunk_fill_buf) {
/*
* If filters are disabled for partial edge chunks, those chunks could
* potentially have the same block length as the other chunks, but still
* need to be written to using the unfiltered fill buffer. Use an hindexed
* block type rather than an hvector.
*/
mpi_code =
MPI_Type_create_hindexed_block(blocks, block_len, block_disps, MPI_BYTE, &mem_type);
if (mpi_code != MPI_SUCCESS)
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed_block failed", mpi_code)
}
else {
mpi_code = MPI_Type_create_hvector(blocks, block_len, 0, MPI_BYTE, &mem_type);
if (mpi_code != MPI_SUCCESS)
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hvector failed", mpi_code)
}
}
else {
/*
* Currently, different block lengths implies that there are partial
* edge chunks and the "don't filter partial edge chunks" flag is set.
*/
if (chunk_fill_info->chunk_info[(blocks * mpi_size) + mpi_rank].unfiltered_partial_chunk) {
assert(partial_chunk_fill_buf);
assert(block_lens);
assert(block_disps);
mpi_code = MPI_Type_create_hindexed(blocks, block_lens, chunk_disp_array, MPI_BYTE, &file_type);
if (mpi_code != MPI_SUCCESS)
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code)
mpi_code = MPI_Type_create_hindexed(blocks, block_lens, block_disps, MPI_BYTE, &mem_type);
if (mpi_code != MPI_SUCCESS)
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code)
io_wbufs[blocks] = partial_chunk_fill_buf;
}
else
io_wbufs[blocks] = fill_buf;
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(&file_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(&mem_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
} /* end if */
/* Set MPI-IO VFD properties */
/* Set MPI datatypes for operation */
if (H5CX_set_mpi_coll_datatypes(mem_type, file_type) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set MPI-I/O properties");
blocks++;
}
/* Get current transfer mode */
if (H5CX_get_io_xfer_mode(&prev_xfer_mode) < 0)
@@ -5763,31 +5707,24 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
if (H5CX_set_io_xfer_mode(H5FD_MPIO_COLLECTIVE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set transfer mode");
/* Low-level write (collective) */
if (H5F_shared_block_write(H5F_SHARED(dset->oloc.file), H5FD_MEM_DRAW, (haddr_t)0,
(blocks) ? (size_t)1 : (size_t)0, fill_buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file");
/* Barrier so processes don't race ahead */
if (MPI_SUCCESS != (mpi_code = MPI_Barrier(mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_code)
/* Perform the selection vector I/O for the chunks */
if (H5F_shared_vector_write(H5F_SHARED(dset->oloc.file), (uint32_t)blocks, io_types, io_addrs,
all_same_block_len ? io_2sizes : io_sizes, io_wbufs) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "vector write call failed");
done:
if (have_xfer_mode)
/* Set transfer mode */
/* Restore transfer mode */
if (H5CX_set_io_xfer_mode(prev_xfer_mode) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set transfer mode");
/* free things */
if (MPI_BYTE != file_type)
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(&file_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
if (MPI_BYTE != mem_type)
if (MPI_SUCCESS != (mpi_code = MPI_Type_free(&mem_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
H5MM_xfree(chunk_disp_array);
H5MM_xfree(block_disps);
H5MM_xfree(block_lens);
H5MM_xfree(io_addrs);
H5MM_xfree(io_wbufs);
H5MM_xfree(io_sizes);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_collective_fill() */
@@ -5805,6 +5742,7 @@ H5D__chunk_cmp_coll_fill_info(const void *_entry1, const void *_entry2)
FUNC_LEAVE_NOAPI(H5_addr_cmp(entry1->addr, entry2->addr))
} /* end H5D__chunk_cmp_coll_fill_info() */
#endif /* H5_HAVE_PARALLEL */
/*-------------------------------------------------------------------------
+6 -1
View File
@@ -911,7 +911,8 @@ H5D__mpio_get_no_coll_cause_strings(char *local_cause, size_t local_cause_len, c
case H5D_MPIO_COLLECTIVE:
case H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE:
default:
assert(0 && "invalid no collective cause reason");
cause_str = "invalid or unknown no collective cause reason";
assert(0 && "invalid or unknown no collective cause reason");
break;
}
@@ -3782,6 +3783,10 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
counts_disps_array = H5MM_xfree(counts_disps_array);
}
/* No useful work to do - exit */
if (coll_chunk_list_num_entries == 0)
HGOTO_DONE(SUCCEED);
/*
* Phase 2 - Involved ranks now redistribute any shared chunks to new
* owners as necessary.
+3 -1
View File
@@ -754,8 +754,10 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
memset(&sb, 0, sizeof(sb));
if ((file_image_info.buffer != NULL) && !(H5F_ACC_CREAT & flags)) {
if (HDopen(name, o_flags, H5_POSIX_CREATE_MODE_RW) >= 0)
if ((fd = HDopen(name, o_flags, H5_POSIX_CREATE_MODE_RW)) >= 0) {
HDclose(fd);
HGOTO_ERROR(H5E_FILE, H5E_FILEEXISTS, NULL, "file already exists");
}
/* If backing store is requested, create and stat the file
* Note: We are forcing the O_CREAT flag here, even though this is
+10 -2
View File
@@ -11,17 +11,25 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: The public header file for the core driver.
* Purpose: The public header file for the core virtual file driver (VFD)
*/
#ifndef H5FDcore_H
#define H5FDcore_H
#define H5FD_CORE (H5FDperform_init(H5FD_core_init))
/** Initializer for the core VFD */
#define H5FD_CORE (H5FDperform_init(H5FD_core_init))
/** Identifier for the core VFD */
#define H5FD_CORE_VALUE H5_VFD_CORE
#ifdef __cplusplus
extern "C" {
#endif
/** @private
*
* \brief Private initializer for the core VFD
*/
H5_DLL hid_t H5FD_core_init(void);
/**
+25 -8
View File
@@ -11,30 +11,47 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: The public header file for the direct driver.
* Purpose: The public header file for the direct virtual file driver (VFD)
*/
#ifndef H5FDdirect_H
#define H5FDdirect_H
#ifdef H5_HAVE_DIRECT
#define H5FD_DIRECT (H5FDperform_init(H5FD_direct_init))
/** Initializer for the direct VFD */
#define H5FD_DIRECT (H5FDperform_init(H5FD_direct_init))
/** Identifier for the direct VFD */
#define H5FD_DIRECT_VALUE H5_VFD_DIRECT
#else
/** Initializer for the direct VFD (disabled) */
#define H5FD_DIRECT (H5I_INVALID_HID)
/** Identifier for the direct VFD (disabled) */
#define H5FD_DIRECT_VALUE H5_VFD_INVALID
#endif /* H5_HAVE_DIRECT */
/** Default value for memory boundary */
#define MBOUNDARY_DEF 4096
/** Default value for file block size */
#define FBSIZE_DEF 4096
/** Default value for maximum copy buffer size */
#define CBSIZE_DEF (16 * 1024 * 1024)
#ifdef H5_HAVE_DIRECT
#ifdef __cplusplus
extern "C" {
#endif
/* Default values for memory boundary, file block size, and maximal copy buffer size.
* Application can set these values through the function H5Pset_fapl_direct. */
#define MBOUNDARY_DEF 4096
#define FBSIZE_DEF 4096
#define CBSIZE_DEF 16 * 1024 * 1024
/** @private
*
* \brief Private initializer for the direct VFD
*/
H5_DLL hid_t H5FD_direct_init(void);
/**
+2 -1
View File
@@ -1427,7 +1427,8 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
FUNC_ENTER_PACKAGE
assert(filename);
if (!filename)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid filename pointer");
/* Get the driver info (for the member fapl)
* The family_open call accepts H5P_DEFAULT, so we'll accept that here, too.
+9 -2
View File
@@ -11,18 +11,25 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: The public header file for the family driver.
* Purpose: The public header file for the family virtual file driver (VFD)
*/
#ifndef H5FDfamily_H
#define H5FDfamily_H
#define H5FD_FAMILY (H5FDperform_init(H5FD_family_init))
/** Initializer for the family VFD */
#define H5FD_FAMILY (H5FDperform_init(H5FD_family_init))
/** Identifier for the family VFD */
#define H5FD_FAMILY_VALUE H5_VFD_FAMILY
#ifdef __cplusplus
extern "C" {
#endif
/** @private
*
* \brief Private initializer for the family VFD
*/
H5_DLL hid_t H5FD_family_init(void);
/**
+18 -3
View File
@@ -11,18 +11,29 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: The public header file for the hdfs driver.
* Purpose: The public header file for the Hadoop Distributed File System
* (hdfs) virtual file driver (VFD)
*/
#ifndef H5FDhdfs_H
#define H5FDhdfs_H
#ifdef H5_HAVE_LIBHDFS
#define H5FD_HDFS (H5FDperform_init(H5FD_hdfs_init))
/** Initializer for the hdfs VFD */
#define H5FD_HDFS (H5FDperform_init(H5FD_hdfs_init))
/** Identifier for the hdfs VFD */
#define H5FD_HDFS_VALUE H5_VFD_HDFS
#else /* H5_HAVE_LIBHDFS */
#else
/** Initializer for the hdfs VFD (disabled) */
#define H5FD_HDFS (H5I_INVALID_HID)
/** Identifier for the hdfs VFD (disabled) */
#define H5FD_HDFS_VALUE H5_VFD_INVALID
#endif /* H5_HAVE_LIBHDFS */
#ifdef H5_HAVE_LIBHDFS
@@ -104,6 +115,10 @@ typedef struct H5FD_hdfs_fapl_t {
int32_t stream_buffer_size;
} H5FD_hdfs_fapl_t;
/** @private
*
* \brief Private initializer for the hdfs VFD
*/
H5_DLL hid_t H5FD_hdfs_init(void);
/**
+1 -1
View File
@@ -545,7 +545,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
#endif /* H5_HAVE_WIN32_API */
/* Retain a copy of the name used to open the file, for possible error reporting */
strncpy(file->filename, name, sizeof(file->filename));
strncpy(file->filename, name, sizeof(file->filename) - 1);
file->filename[sizeof(file->filename) - 1] = '\0';
/* Get the flags for logging */
+9 -2
View File
@@ -11,12 +11,15 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: The public header file for the log driver.
* Purpose: The public header file for the log virtual file driver (VFD)
*/
#ifndef H5FDlog_H
#define H5FDlog_H
#define H5FD_LOG (H5FDperform_init(H5FD_log_init))
/** Initializer for the log VFD */
#define H5FD_LOG (H5FDperform_init(H5FD_log_init))
/** Identifier for the log VFD */
#define H5FD_LOG_VALUE H5_VFD_LOG
/* Flags for H5Pset_fapl_log() */
@@ -62,6 +65,10 @@
extern "C" {
#endif
/** @private
*
* \brief Private initializer for the log VFD
*/
H5_DLL hid_t H5FD_log_init(void);
/**
+9 -2
View File
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: Public, shared definitions for Mirror VFD & remote Writer.
* Purpose: The public header file for the mirror virtual file driver (VFD)
*/
#ifndef H5FDmirror_H
@@ -19,7 +19,10 @@
#ifdef H5_HAVE_MIRROR_VFD
#define H5FD_MIRROR (H5FDperform_init(H5FD_mirror_init))
/** Initializer for the mirror VFD */
#define H5FD_MIRROR (H5FDperform_init(H5FD_mirror_init))
/** Identifier for the mirror VFD */
#define H5FD_MIRROR_VALUE H5_VFD_MIRROR
#ifdef __cplusplus
@@ -62,6 +65,10 @@ typedef struct H5FD_mirror_fapl_t {
char remote_ip[H5FD_MIRROR_MAX_IP_LEN + 1];
} H5FD_mirror_fapl_t;
/** @private
*
* \brief Private initializer for the mirror VFD
*/
H5_DLL hid_t H5FD_mirror_init(void);
/**
+43 -5
View File
@@ -104,13 +104,12 @@ done:
} /* end H5FD_mpi_get_size() */
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_get_comm
* Function: H5FD_mpi_get_comm
*
* Purpose: Retrieves the file's communicator
* Purpose: Retrieves the file's MPI_Comm communicator object
*
* Return: Success: The communicator (non-negative)
*
* Failure: Negative
* Return: Success: The communicator object
* Failure: MPI_COMM_NULL
*
*-------------------------------------------------------------------------
*/
@@ -143,6 +142,45 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpi_get_comm() */
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_get_info
*
* Purpose: Retrieves the file's MPI_Info info object
*
* Return: Success: The info object
* Failure: MPI_INFO_NULL
*
*-------------------------------------------------------------------------
*/
MPI_Info
H5FD_mpi_get_info(H5FD_t *file)
{
const H5FD_class_t *cls;
uint64_t flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG | H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
MPI_Info info = MPI_INFO_NULL;
void *info_ptr = (void *)(&info);
MPI_Info ret_value;
FUNC_ENTER_NOAPI(MPI_INFO_NULL)
assert(file);
cls = (const H5FD_class_t *)(file->cls);
assert(cls);
assert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
if ((cls->ctl)(file, H5FD_CTL_GET_MPI_INFO_OPCODE, flags, NULL, &info_ptr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, MPI_INFO_NULL, "driver get_info request failed");
if (info == MPI_INFO_NULL)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, MPI_INFO_NULL, "driver get_info request failed -- bad info object");
ret_value = info;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpi_get_info() */
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_MPIOff_to_haddr
*
+30 -9
View File
@@ -106,7 +106,7 @@ static herr_t H5FD__mpio_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, co
/* Other functions */
static herr_t H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[],
size_t sizes[], H5_flexible_const_ptr_t bufs[],
haddr_t *s_addrs[], size_t *s_sizes[],
haddr_t *s_addrs[], size_t *s_sizes[], uint32_t *s_sizes_len,
H5_flexible_const_ptr_t *s_bufs[], bool *vector_was_sorted,
MPI_Offset *mpi_off, H5_flexible_const_ptr_t *mpi_bufs_base,
int *size_i, MPI_Datatype *buf_type, bool *buf_type_created,
@@ -906,7 +906,7 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR
/* copy over each hint */
for (i = 0; i < nkeys; i++) {
char key[MPI_MAX_INFO_KEY], value[MPI_MAX_INFO_VAL];
char key[MPI_MAX_INFO_KEY], value[MPI_MAX_INFO_VAL + 1];
int valuelen, flag;
/* retrieve the nth hint */
@@ -916,7 +916,7 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR
if (MPI_SUCCESS != (mpi_code = MPI_Info_get_valuelen(info_used, key, &valuelen, &flag)))
HMPI_GOTO_ERROR(NULL, "MPI_Info_get_valuelen failed", mpi_code)
/* retrieve the value of nth hint */
if (MPI_SUCCESS != (mpi_code = MPI_Info_get(info_used, key, valuelen + 1, value, &flag)))
if (MPI_SUCCESS != (mpi_code = MPI_Info_get(info_used, key, valuelen, value, &flag)))
HMPI_GOTO_ERROR(NULL, "MPI_Info_get failed", mpi_code)
/* copy the hint into info */
@@ -1675,7 +1675,8 @@ done:
static herr_t
H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[], size_t sizes[],
H5_flexible_const_ptr_t bufs[], haddr_t *s_addrs[], size_t *s_sizes[],
H5_flexible_const_ptr_t *s_bufs[], bool *vector_was_sorted, MPI_Offset *mpi_off,
uint32_t *s_sizes_len, H5_flexible_const_ptr_t *s_bufs[],
bool *vector_was_sorted, MPI_Offset *mpi_off,
H5_flexible_const_ptr_t *mpi_bufs_base, int *size_i, MPI_Datatype *buf_type,
bool *buf_type_created, MPI_Datatype *file_type, bool *file_type_created,
char *unused)
@@ -1716,6 +1717,10 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
/* Get bio I/O transition point (may be lower than 2G for testing) */
bigio_count = H5_mpi_get_bigio_count();
/* Start with s_sizes_len at count */
if (s_sizes_len)
*s_sizes_len = count;
if (count == 1) {
/* Single block. Just use a series of MPI_BYTEs for the file view.
*/
@@ -1808,8 +1813,13 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
if (!fixed_size) {
if ((*s_sizes)[i] == 0) {
assert(vector_was_sorted);
assert(i > 0);
fixed_size = true;
size = sizes[i - 1];
/* Return the used length of the s_sizes buffer */
if (s_sizes_len)
*s_sizes_len = (uint32_t)i;
}
else {
size = (*s_sizes)[i];
@@ -2098,7 +2108,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
if (xfer_mode == H5FD_MPIO_COLLECTIVE) {
/* Build MPI types, etc. */
if (H5FD__mpio_vector_build_types(count, types, addrs, sizes, (H5_flexible_const_ptr_t *)bufs,
&s_addrs, &s_sizes, (H5_flexible_const_ptr_t **)&s_bufs,
&s_addrs, &s_sizes, NULL, (H5_flexible_const_ptr_t **)&s_bufs,
&vector_was_sorted, &mpi_off,
(H5_flexible_const_ptr_t *)&mpi_bufs_base, &size_i, &buf_type,
&buf_type_created, &file_type, &file_type_created, &unused) < 0)
@@ -2464,17 +2474,21 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode");
if (xfer_mode == H5FD_MPIO_COLLECTIVE) {
uint32_t s_sizes_len;
/* Build MPI types, etc. */
if (H5FD__mpio_vector_build_types(count, types, addrs, sizes, (H5_flexible_const_ptr_t *)bufs,
&s_addrs, &s_sizes, (H5_flexible_const_ptr_t **)&s_bufs,
&vector_was_sorted, &mpi_off,
&s_addrs, &s_sizes, &s_sizes_len,
(H5_flexible_const_ptr_t **)&s_bufs, &vector_was_sorted, &mpi_off,
(H5_flexible_const_ptr_t *)&mpi_bufs_base, &size_i, &buf_type,
&buf_type_created, &file_type, &file_type_created, &unused) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't build MPI datatypes for I/O");
/* Compute max address written to */
/* Compute max address written to. Note s_sizes is indexed according to the length of that array as
* reported by H5FD__mpio_vector_build_types(), which may be shorter if using the compressed arrays
* feature. */
if (count > 0)
max_addr = s_addrs[count - 1] + (haddr_t)(s_sizes[count - 1]);
max_addr = s_addrs[count - 1] + (haddr_t)(s_sizes[s_sizes_len - 1]);
/* free sorted vectors if they exist */
if (!vector_was_sorted) {
@@ -3795,6 +3809,7 @@ done:
* At present, the supported op codes are:
*
* H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE
* H5FD_CTL_GET_MPI_INFO_OPCODE
* H5FD_CTL_GET_MPI_RANK_OPCODE
* H5FD_CTL_GET_MPI_SIZE_OPCODE
* H5FD_CTL_GET_MPI_FILE_SYNC_OPCODE
@@ -3827,6 +3842,12 @@ H5FD__mpio_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_AT
**((MPI_Comm **)output) = file->comm;
break;
case H5FD_CTL_GET_MPI_INFO_OPCODE:
assert(output);
assert(*output);
**((MPI_Info **)output) = file->info;
break;
case H5FD_CTL_GET_MPI_RANK_OPCODE:
assert(output);
assert(*output);
+16 -9
View File
@@ -11,35 +11,42 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: The public header file for the mpio driver.
* Purpose: The public header file for the MPI-I/O (mpio) virtual file driver (VFD)
*/
#ifndef H5FDmpio_H
#define H5FDmpio_H
/* Macros */
#ifdef H5_HAVE_PARALLEL
/** Initializer for the mpio VFD */
#define H5FD_MPIO (H5FDperform_init(H5FD_mpio_init))
#else
/** Initializer for the mpio VFD (disabled) */
#define H5FD_MPIO (H5I_INVALID_HID)
#endif /* H5_HAVE_PARALLEL */
#endif
#ifdef H5_HAVE_PARALLEL
/*Turn on H5FDmpio_debug if H5F_DEBUG is on */
#ifdef H5F_DEBUG
#ifndef H5FDmpio_DEBUG
#if defined(H5F_DEBUG) && !defined(H5FDmpio_DEBUG)
/** Turn mpio VFD debugging on (requires H5F_DEBUG) */
#define H5FDmpio_DEBUG
#endif
#endif
/* Global var whose value comes from environment variable */
/* (Defined in H5FDmpio.c) */
H5_DLLVAR hbool_t H5FD_mpi_opt_types_g;
/* Function prototypes */
#ifdef __cplusplus
extern "C" {
#endif
/** @private
*
* \brief Private initializer for the mpio VFD
*/
H5_DLL hid_t H5FD_mpio_init(void);
/**
+7 -1
View File
@@ -11,16 +11,22 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: The public header file for the "multi" driver.
* Purpose: The public header file for the multi virtual file driver (VFD)
*/
#ifndef H5FDmulti_H
#define H5FDmulti_H
/** Initializer for the multi VFD */
#define H5FD_MULTI (H5FDperform_init(H5FD_multi_init))
#ifdef __cplusplus
extern "C" {
#endif
/** @private
*
* \brief Private initializer for the multi VFD
*/
H5_DLL hid_t H5FD_multi_init(void);
/**
+10 -7
View File
@@ -11,19 +11,18 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Onion Virtual File Driver (VFD)
*
* Purpose: The public header file for the Onion VFD.
* Purpose: The public header file for the onion virtual file driver (VFD)
*/
#ifndef H5FDonion_H
#define H5FDonion_H
#define H5FD_ONION (H5FDperform_init(H5FD_onion_init))
/** Initializer for the onion VFD */
#define H5FD_ONION (H5FDperform_init(H5FD_onion_init))
/** Identifier for the onion VFD */
#define H5FD_ONION_VALUE H5_VFD_ONION
/**
* Current version of the onion VFD fapl info struct.
*/
/** Current version of the onion VFD fapl info struct */
#define H5FD_ONION_FAPL_INFO_VERSION_CURR 1
#define H5FD_ONION_FAPL_INFO_CREATE_FLAG_ENABLE_PAGE_ALIGNMENT \
@@ -114,6 +113,10 @@ typedef struct H5FD_onion_fapl_info_t {
extern "C" {
#endif
/** @private
*
* \brief Private initializer for the onion VFD
*/
H5_DLL hid_t H5FD_onion_init(void);
/**
+1
View File
@@ -214,6 +214,7 @@ H5_DLL herr_t H5FD_get_mpio_atomicity(H5FD_t *file, bool *flag);
H5_DLL int H5FD_mpi_get_rank(H5FD_t *file);
H5_DLL int H5FD_mpi_get_size(H5FD_t *file);
H5_DLL MPI_Comm H5FD_mpi_get_comm(H5FD_t *file);
H5_DLL MPI_Info H5FD_mpi_get_info(H5FD_t *file);
H5_DLL herr_t H5FD_mpi_get_file_sync_required(H5FD_t *file, bool *file_sync_required);
#endif /* H5_HAVE_PARALLEL */
+1
View File
@@ -179,6 +179,7 @@
#define H5FD_CTL_INVALID_OPCODE 0
#define H5FD_CTL_TEST_OPCODE 1
#define H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE 2
#define H5FD_CTL_GET_MPI_INFO_OPCODE 9
#define H5FD_CTL_GET_MPI_RANK_OPCODE 3
#define H5FD_CTL_GET_MPI_SIZE_OPCODE 4
#define H5FD_CTL_MEM_ALLOC 5
+12 -8
View File
@@ -11,20 +11,24 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Read-Only S3 Virtual File Driver (VFD)
*
* Purpose: The public header file for the ros3 driver.
* Purpose: The public header file for the read-only S3 (ros3) virtual file driver (VFD)
*/
#ifndef H5FDros3_H
#define H5FDros3_H
#ifdef H5_HAVE_ROS3_VFD
#define H5FD_ROS3 (H5FDperform_init(H5FD_ros3_init))
/** Initializer for the ros3 VFD */
#define H5FD_ROS3 (H5FDperform_init(H5FD_ros3_init))
/** Identifier for the ros3 VFD */
#define H5FD_ROS3_VALUE H5_VFD_ROS3
#else
/** Initializer for the ros3 VFD (disabled) */
#define H5FD_ROS3 (H5I_INVALID_HID)
/** Identifier for the ros3 VFD (disabled) */
#define H5FD_ROS3_VALUE H5_VFD_INVALID
#endif /* H5_HAVE_ROS3_VFD */
#endif
#ifdef H5_HAVE_ROS3_VFD
@@ -139,9 +143,9 @@ typedef struct H5FD_ros3_fapl_t {
extern "C" {
#endif
/**
* \brief Internal routine to initialize #H5FD_ROS3 driver. Not meant to be
* called directly by an HDF5 application.
/** @private
*
* \brief Private initializer for the ros3 VFD
*/
H5_DLL hid_t H5FD_ros3_init(void);
+1 -1
View File
@@ -368,7 +368,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
}
/* Retain a copy of the name used to open the file, for possible error reporting */
strncpy(file->filename, name, sizeof(file->filename));
strncpy(file->filename, name, sizeof(file->filename) - 1);
file->filename[sizeof(file->filename) - 1] = '\0';
/* Check for non-default FAPL */
+10 -3
View File
@@ -11,18 +11,26 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: The public header file for the sec2 driver
* Purpose: The public header file for the POSOX I/O (sec2 - "POSIX section 2")
* virtual file driver (VFD)
*/
#ifndef H5FDsec2_H
#define H5FDsec2_H
#define H5FD_SEC2 (H5FDperform_init(H5FD_sec2_init))
/** Initializer for the sec2 VFD */
#define H5FD_SEC2 (H5FDperform_init(H5FD_sec2_init))
/** Identifier for the sec2 VFD */
#define H5FD_SEC2_VALUE H5_VFD_SEC2
#ifdef __cplusplus
extern "C" {
#endif
/** @private
*
* \brief Private initializer for the sec2 VFD
*/
H5_DLL hid_t H5FD_sec2_init(void);
/**
@@ -38,7 +46,6 @@ H5_DLL hid_t H5FD_sec2_init(void);
* #H5FD_SEC2 driver.
*
* \since 1.4.0
*
*/
H5_DLL herr_t H5Pset_fapl_sec2(hid_t fapl_id);
+64 -57
View File
@@ -11,96 +11,103 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: The public header file for the "splitter" driver.
* Purpose: The public header file for the splitter virtual file driver (VFD)
*/
#ifndef H5FDsplitter_H
#define H5FDsplitter_H
#define H5FD_SPLITTER (H5FDperform_init(H5FD_splitter_init))
/** Initializer for the splitter VFD */
#define H5FD_SPLITTER (H5FDperform_init(H5FD_splitter_init))
/** Identifier for the splitter VFD */
#define H5FD_SPLITTER_VALUE H5_VFD_SPLITTER
/* The version of the H5FD_splitter_vfd_config_t structure used */
/** The version of the H5FD_splitter_vfd_config_t structure used */
#define H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION 1
/* Maximum length of a filename/path string in the Write-Only channel,
/**
* Maximum length of a filename/path string in the Write-Only channel,
* including the NULL-terminator.
*/
#define H5FD_SPLITTER_PATH_MAX 4096
/* Semi-unique constant used to help identify structure pointers */
/** Semi-unique constant used to help identify structure pointers */
#define H5FD_SPLITTER_MAGIC 0x2B916880
/* ----------------------------------------------------------------------------
* Structure: H5FD_spliiter_vfd_config_t
*
* One-stop shopping for configuring a Splitter VFD (rather than many
* parameters passed into H5Pset/get functions).
*
* magic (int32_t)
* Semi-unique number, used to sanity-check that a given pointer is
* likely (or not) to be this structure type. MUST be first.
* If magic is not H5FD_SPLITTER_MAGIC, the structure (and/or pointer to)
* must be considered invalid.
*
* version (unsigned int)
* Version number of this structure -- informs component membership.
* If not H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION, the structure (and/or
* pointer to) must be considered invalid.
*
* rw_fapl_id (hid_t)
* Library-given identification number of the Read/Write channel driver
* File Access Property List.
* The driver must support read/write access.
* Must be set to H5P_DEFAULT or a valid FAPL ID.
*
* wo_fapl_id (hid_t)
* Library-given identification number of the Read/Write channel driver
* File Access Property List.
* The driver feature flags must include H5FD_FEAT_DEFAULT_VFD_COMPAITBLE.
* Must be set to H5P_DEFAULT or a valid FAPL ID.
*
* wo_file_path (char[H5FD_SPLITTER_PATH_MAX + 1])
* String buffer for the Write-Only channel target file.
* Must be null-terminated, cannot be empty.
*
* log_file_path (char[H5FD_SPLITTER_PATH_MAX + 1])
* String buffer for the Splitter VFD logging output.
* Must be null-terminated.
* If null, no logfile is created.
*
* ignore_wo_errors (hbool_t)
* Toggle flag for how judiciously to respond to errors on the Write-Only
* channel.
*
* ----------------------------------------------------------------------------
//! <!-- [H5FD_splitter_vfd_config_t_snip] -->
/**
* Configuration options for setting up the Splitter VFD
*/
typedef struct H5FD_splitter_vfd_config_t {
int32_t magic;
unsigned int version;
hid_t rw_fapl_id;
hid_t wo_fapl_id;
char wo_path[H5FD_SPLITTER_PATH_MAX + 1];
char log_file_path[H5FD_SPLITTER_PATH_MAX + 1];
hbool_t ignore_wo_errs;
int32_t magic; /**< Magic number to identify this struct. Must be \p H5FD_SPLITTER_MAGIC. */
unsigned int version; /**< Version number of this struct. Currently must be \p
H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION. */
hid_t rw_fapl_id; /**< File-access property list for setting up the read/write channel. Can be \p
H5P_DEFAULT. */
hid_t wo_fapl_id; /**< File-access property list for setting up the read-only channel. The selected VFD
must support the \p H5FD_FEAT_DEFAULT_VFD_COMPATIBLE flag. Can be \p H5P_DEFAULT. */
char wo_path[H5FD_SPLITTER_PATH_MAX + 1]; /**< Path to the write-only file */
char log_file_path[H5FD_SPLITTER_PATH_MAX + 1]; /**< Path to the log file, which will be created on HDF5
file open (existing files will be clobbered). Can be
NULL, in which case no logging output is generated. */
hbool_t ignore_wo_errs; /**< Whether to ignore errors on the write-only channel */
} H5FD_splitter_vfd_config_t;
//! <!-- [H5FD_splitter_vfd_config_t_snip] -->
#ifdef __cplusplus
extern "C" {
#endif
/** @private
*
* \brief Private initializer for the splitter VFD
*/
H5_DLL hid_t H5FD_splitter_init(void);
/**
* \ingroup FAPL
*
* \todo Add missing documentation
* \brief Sets the file access property list to use the splitter driver
*
* \fapl_id
* \param[in] config_ptr Configuration options for the VFD
* \returns \herr_t
*
* \details H5Pset_fapl_splitter() sets the file access property list identifier,
* \p fapl_id, to use the splitter driver.
*
* The splitter VFD echoes file manipulation (e.g. create, truncate)
* and write calls to a second, write-only file.
*
* \note The splitter VFD should not be confused with the split VFD,
* which is a simplification of the multi VFD and creates separate
* files for metadata and data.
*
* \since 1.10.7, 1.12.1
*/
H5_DLL herr_t H5Pset_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config_ptr);
/**
* \ingroup FAPL
*
* \todo Add missing documentation
* \brief Gets splitter driver properties from the the file access property list
*
* \fapl_id
* \param[out] config_ptr Configuration options for the VFD
* \returns \herr_t
*
* \details H5Pset_fapl_splitter() sets the file access property list identifier,
* \p fapl_id, to use the splitter driver.
*
* The splitter VFD echoes file manipulation (e.g. create, truncate)
* and write calls to a second file.
*
* \note The splitter VFD should not be confused with the split VFD,
* which is a simplification of the multi VFD and creates separate
* files for metadata and data.
*
* \since 1.10.7, 1.12.1
*/
H5_DLL herr_t H5Pget_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config_ptr);
+12 -2
View File
@@ -11,20 +11,26 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: The public header file for the C stdio driver
* Purpose: The public header file for the C stdio virtual file driver (VFD)
*/
#ifndef H5FDstdio_H
#define H5FDstdio_H
#include "H5Ipublic.h"
/** Initializer for the stdio VFD */
#define H5FD_STDIO (H5FDperform_init(H5FD_stdio_init))
#ifdef __cplusplus
extern "C" {
#endif
/** @private
*
* \brief Private initializer for the stdio VFD
*/
H5_DLL hid_t H5FD_stdio_init(void);
/**
* \ingroup FAPL
*
@@ -34,7 +40,11 @@ H5_DLL hid_t H5FD_stdio_init(void);
* \returns \herr_t
*
* \details H5Pset_fapl_stdio() modifies the file access property list to use
* the standard I/O driver, H5FDstdio().
* the stdio VFD, which uses I/O calls from stdio.h.
*
* \note This VFD was designed to be a "demo" VFD that shows how to write
* your own VFD. Most applications should not use this VFD and should instead
* use the POSIX I/O VFD (sec2).
*
* \since 1.4.0
*
+6
View File
@@ -2551,6 +2551,12 @@ H5FD__subfiling_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void
**((MPI_Comm **)output) = file->ext_comm;
break;
case H5FD_CTL_GET_MPI_INFO_OPCODE:
assert(output);
assert(*output);
**((MPI_Info **)output) = file->info;
break;
case H5FD_CTL_GET_MPI_RANK_OPCODE:
assert(output);
assert(*output);
+6 -1
View File
@@ -11,11 +11,16 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: The public header file for the Windows driver
* Purpose: The public header file for the Windows virtual file driver (VFD)
*
* This VFD uses no Win32 API calls directly (though it may be
* rewritten to do so in the future). It is currently defined to
* be the sec2 VFD.
*/
#ifndef H5FDwindows_H
#define H5FDwindows_H
/** Initializer for the Windows VFD */
#define H5FD_WINDOWS (H5FD_sec2_init())
#ifdef __cplusplus
+4 -4
View File
@@ -410,11 +410,11 @@ H5F_get_access_plist(H5F_t *f, bool app_ref)
if (H5P_set(new_plist, H5F_ACS_MPI_PARAMS_COMM_NAME, &mpi_comm) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set MPI communicator");
/* Retrieve and set MPI info object */
if (H5P_get(old_plist, H5F_ACS_MPI_PARAMS_INFO_NAME, &mpi_info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get MPI info object");
/* Retrieve and set MPI info */
if (MPI_INFO_NULL == (mpi_info = H5F_mpi_get_info(f)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get MPI info");
if (H5P_set(new_plist, H5F_ACS_MPI_PARAMS_INFO_NAME, &mpi_info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set MPI info object");
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set MPI info");
}
#endif /* H5_HAVE_PARALLEL */
if (H5P_set(new_plist, H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_NAME, &(f->shared->mdc_initCacheImageCfg)) <
+30 -4
View File
@@ -97,11 +97,10 @@ done:
/*-------------------------------------------------------------------------
* Function: H5F_mpi_get_comm
*
* Purpose: Retrieves the file's communicator
* Purpose: Retrieves the file's MPI_Comm communicator object
*
* Return: Success: The communicator (non-negative)
*
* Failure: Negative
* Return: Success: The communicator object
* Failure: MPI_COMM_NULL
*
*-------------------------------------------------------------------------
*/
@@ -122,6 +121,33 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_mpi_get_comm() */
/*-------------------------------------------------------------------------
* Function: H5F_mpi_get_info
*
* Purpose: Retrieves the file's MPI_Info info object
*
* Return: Success: The info object
* Failure: MPI_INFO_NULL
*
*-------------------------------------------------------------------------
*/
MPI_Info
H5F_mpi_get_info(const H5F_t *f)
{
MPI_Info ret_value = MPI_INFO_NULL;
FUNC_ENTER_NOAPI(MPI_INFO_NULL)
assert(f && f->shared);
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_info(f->shared->lf)) == MPI_INFO_NULL)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, MPI_INFO_NULL, "driver get_info request failed");
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_mpi_get_info() */
/*-------------------------------------------------------------------------
* Function: H5F_shared_mpi_get_size
*
+1
View File
@@ -640,6 +640,7 @@ H5_DLL herr_t H5F_eoa_dirty(H5F_t *f);
#ifdef H5_HAVE_PARALLEL
H5_DLL int H5F_mpi_get_rank(const H5F_t *f);
H5_DLL MPI_Comm H5F_mpi_get_comm(const H5F_t *f);
H5_DLL MPI_Info H5F_mpi_get_info(const H5F_t *f);
H5_DLL int H5F_shared_mpi_get_size(const H5F_shared_t *f_sh);
H5_DLL int H5F_mpi_get_size(const H5F_t *f);
H5_DLL herr_t H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm);
+1 -1
View File
@@ -989,7 +989,7 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *ne
&type_list, 0, op_gen) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't obtain MPI derived data type");
if (MPI_SUCCESS != (mpi_code = MPI_Type_dup(span_type, new_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
HMPI_GOTO_ERROR(FAIL, "MPI_Type_dup failed", mpi_code)
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(new_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
+3 -3
View File
@@ -2500,7 +2500,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
H5T_g.asoft = na;
H5T_g.soft = x;
} /* end if */
strncpy(H5T_g.soft[H5T_g.nsoft].name, name, (size_t)H5T_NAMELEN);
strncpy(H5T_g.soft[H5T_g.nsoft].name, name, (size_t)H5T_NAMELEN - 1);
H5T_g.soft[H5T_g.nsoft].name[H5T_NAMELEN - 1] = '\0';
H5T_g.soft[H5T_g.nsoft].src = src->shared->type;
H5T_g.soft[H5T_g.nsoft].dst = dst->shared->type;
@@ -2549,7 +2549,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
/* Create a new conversion path */
if (NULL == (new_path = H5FL_CALLOC(H5T_path_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
strncpy(new_path->name, name, (size_t)H5T_NAMELEN);
strncpy(new_path->name, name, (size_t)H5T_NAMELEN - 1);
new_path->name[H5T_NAMELEN - 1] = '\0';
if (NULL == (new_path->src = H5T_copy(old_path->src, H5T_COPY_ALL)) ||
NULL == (new_path->dst = H5T_copy(old_path->dst, H5T_COPY_ALL)))
@@ -4952,7 +4952,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
if (NULL == (path = H5FL_CALLOC(H5T_path_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for type conversion path");
if (name && *name) {
strncpy(path->name, name, (size_t)H5T_NAMELEN);
strncpy(path->name, name, (size_t)H5T_NAMELEN - 1);
path->name[H5T_NAMELEN - 1] = '\0';
} /* end if */
else
+36 -18
View File
@@ -51,19 +51,23 @@
* Function: DETECT_F
*
* Purpose: This macro takes a floating point type like `double' and
* a base name like `natd' and detects byte order, mantissa
* location, exponent location, sign bit location, presence or
* absence of implicit mantissa bit, and exponent bias and
* initializes a detected_t structure with those properties.
* detects byte order, mantissa location, exponent location,
* sign bit location, presence or absence of implicit mantissa
* bit, and exponent bias and initializes a detected_t structure
* with those properties.
*
* Note that these operations can raise floating-point
* exceptions and building with some compiler options
* (especially Fortran) can cause problems.
*-------------------------------------------------------------------------
*/
#define DETECT_F(TYPE, VAR, INFO) \
#define DETECT_F(TYPE, INFO) \
do { \
TYPE _v1, _v2, _v3; \
unsigned char _buf1[sizeof(TYPE)], _buf3[sizeof(TYPE)]; \
unsigned char _pad_mask[sizeof(TYPE)]; \
unsigned char _byte_mask; \
int _i, _j, _last = (-1); \
TYPE _v1, _v2, _v3; \
uint8_t _buf1[sizeof(TYPE)], _buf3[sizeof(TYPE)]; \
uint8_t _pad_mask[sizeof(TYPE)]; \
uint8_t _byte_mask; \
int _i, _j, _last = -1; \
\
memset(&INFO, 0, sizeof(INFO)); \
INFO.size = sizeof(TYPE); \
@@ -81,7 +85,7 @@
_v1 = (TYPE)4.0L; \
H5MM_memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
for (_i = 0; _i < (int)sizeof(TYPE); _i++) \
for (_byte_mask = (unsigned char)1; _byte_mask; _byte_mask = (unsigned char)(_byte_mask << 1)) { \
for (_byte_mask = (uint8_t)1; _byte_mask; _byte_mask = (uint8_t)(_byte_mask << 1)) { \
_buf1[_i] ^= _byte_mask; \
H5MM_memcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \
H5_GCC_CLANG_DIAG_OFF("float-equal") \
@@ -118,7 +122,7 @@
_v1 = (TYPE)1.0L; \
_v2 = (TYPE)-1.0L; \
if (H5T__bit_cmp(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask, &(INFO.sign)) < 0) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order"); \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to determine sign bit"); \
\
/* Mantissa */ \
INFO.mpos = 0; \
@@ -126,12 +130,11 @@
_v1 = (TYPE)1.0L; \
_v2 = (TYPE)1.5L; \
if (H5T__bit_cmp(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask, &(INFO.msize)) < 0) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order"); \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to determine mantissa"); \
INFO.msize += 1 + (unsigned)(INFO.imp ? 0 : 1) - INFO.mpos; \
\
/* Exponent */ \
INFO.epos = INFO.mpos + INFO.msize; \
\
INFO.epos = INFO.mpos + INFO.msize; \
INFO.esize = INFO.sign - INFO.epos; \
\
_v1 = (TYPE)1.0L; \
@@ -456,17 +459,24 @@ H5T__set_precision(H5T_fpoint_det_t *d)
herr_t H5_NO_UBSAN
H5T__init_native_float_types(void)
{
fenv_t saved_fenv;
H5T_fpoint_det_t det;
H5T_t *dt = NULL;
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
/* Turn off floating-point exceptions while initializing to avoid
* tripping over signaling NaNs while looking at "don't care" bits.
*/
if (feholdexcept(&saved_fenv) != 0)
HSYS_GOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't save floating-point environment");
/* H5T_NATIVE_FLOAT */
/* Get the type's characteristics */
memset(&det, 0, sizeof(H5T_fpoint_det_t));
DETECT_F(float, FLOAT, det);
DETECT_F(float, det);
/* Allocate and fill type structure */
if (NULL == (dt = H5T__alloc()))
@@ -497,7 +507,7 @@ H5T__init_native_float_types(void)
/* Get the type's characteristics */
memset(&det, 0, sizeof(H5T_fpoint_det_t));
DETECT_F(double, DOUBLE, det);
DETECT_F(double, det);
/* Allocate and fill type structure */
if (NULL == (dt = H5T__alloc()))
@@ -528,7 +538,7 @@ H5T__init_native_float_types(void)
/* Get the type's characteristics */
memset(&det, 0, sizeof(H5T_fpoint_det_t));
DETECT_F(long double, LDOUBLE, det);
DETECT_F(long double, det);
/* Allocate and fill type structure */
if (NULL == (dt = H5T__alloc()))
@@ -561,6 +571,14 @@ H5T__init_native_float_types(void)
H5T_native_order_g = det.order;
done:
/* Clear any FE_INVALID exceptions from NaN handling */
if (feclearexcept(FE_INVALID) != 0)
HSYS_GOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't clear floating-point exceptions");
/* Restore the original environment */
if (feupdateenv(&saved_fenv) != 0)
HSYS_GOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't restore floating-point environment");
if (ret_value < 0) {
if (dt != NULL) {
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
+1 -1
View File
@@ -503,7 +503,7 @@ H5T__vlen_mem_seq_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc
if (seq_len) {
size_t len = seq_len * base_size; /* Sequence size */
/* Use the user's memory allocation routine is one is defined */
/* Use the user's memory allocation routine if one is defined */
if (vl_alloc_info->alloc_func != NULL) {
if (NULL == (vl.p = (vl_alloc_info->alloc_func)(len, vl_alloc_info->alloc_info)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL,
+98 -44
View File
@@ -485,19 +485,30 @@ done:
*-------------------------------------------------------------------------
*/
static int
H5Z__check_unregister_group_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *key)
H5Z__check_unregister_group_cb(void H5_ATTR_UNUSED *obj_ptr, hid_t obj_id, void *key)
{
hid_t ocpl_id = -1;
H5Z_object_t *object = (H5Z_object_t *)key;
htri_t filter_in_pline = false;
int ret_value = false; /* Return value */
hid_t ocpl_id = -1;
H5Z_object_t *object = (H5Z_object_t *)key;
H5VL_object_t *vol_obj; /* Object for loc_id */
H5VL_group_get_args_t vol_cb_args; /* Arguments to VOL callback */
htri_t filter_in_pline = false;
int ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
assert(obj_ptr);
/* Get the group creation property */
if ((ocpl_id = H5G_get_create_plist((H5G_t *)obj_ptr)) < 0)
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(obj_id, H5I_GROUP)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid group identifier");
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_GROUP_GET_GCPL;
vol_cb_args.args.get_gcpl.gcpl_id = H5I_INVALID_HID;
/* Get the group creation property list */
if (H5VL_group_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, H5I_INVALID_HID, "unable to get group creation properties");
if ((ocpl_id = vol_cb_args.args.get_gcpl.gcpl_id) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get group creation property list");
/* Check if the filter is in the group creation property list */
@@ -535,19 +546,30 @@ done:
*-------------------------------------------------------------------------
*/
static int
H5Z__check_unregister_dset_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *key)
H5Z__check_unregister_dset_cb(void H5_ATTR_UNUSED *obj_ptr, hid_t obj_id, void *key)
{
hid_t ocpl_id = -1;
H5Z_object_t *object = (H5Z_object_t *)key;
htri_t filter_in_pline = false;
int ret_value = false; /* Return value */
hid_t ocpl_id = -1;
H5Z_object_t *object = (H5Z_object_t *)key;
H5VL_object_t *vol_obj; /* Object for loc_id */
H5VL_dataset_get_args_t vol_cb_args; /* Arguments to VOL callback */
htri_t filter_in_pline = false;
int ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE
assert(obj_ptr);
/* Get the dataset creation property */
if ((ocpl_id = H5D_get_create_plist((H5D_t *)obj_ptr)) < 0)
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(obj_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier");
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_DATASET_GET_DCPL;
vol_cb_args.args.get_dcpl.dcpl_id = H5I_INVALID_HID;
/* Get the dataset creation property list */
if (H5VL_dataset_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataset creation properties");
if ((ocpl_id = vol_cb_args.args.get_dcpl.dcpl_id) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get dataset creation property list");
/* Check if the filter is in the dataset creation property list */
@@ -581,51 +603,83 @@ done:
*-------------------------------------------------------------------------
*/
static int
H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARALLEL_USED *key)
H5Z__flush_file_cb(void H5_ATTR_UNUSED *obj_ptr, hid_t obj_id, void H5_ATTR_PARALLEL_USED *key)
{
H5F_t *f = (H5F_t *)obj_ptr; /* File object for operations */
#ifdef H5_HAVE_PARALLEL
H5Z_object_t *object = (H5Z_object_t *)key;
#endif /* H5_HAVE_PARALLEL */
int ret_value = false; /* Return value */
#endif /* H5_HAVE_PARALLEL */
int ret_value = false; /* Return value */
H5VL_file_specific_args_t vol_cb_args_specific; /* Arguments to VOL callback */
H5VL_object_t *vol_obj; /* File for file_id */
H5VL_file_get_args_t vol_cb_args; /* Arguments to VOL callback */
bool is_native_vol_obj = true;
unsigned int intent = 0;
FUNC_ENTER_PACKAGE
/* Sanity checks */
assert(obj_ptr);
assert(key);
/* Get the internal file structure */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(obj_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier");
/* Get intent */
vol_cb_args.op_type = H5VL_FILE_GET_INTENT;
vol_cb_args.args.get_intent.flags = &intent;
/* Get the flags */
if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file's intent flags");
if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5I_INVALID_HID,
"can't determine if VOL object is native connector object");
/* Do a global flush if the file is opened for write */
if (H5F_ACC_RDWR & H5F_INTENT(f)) {
if (H5F_ACC_RDWR & intent) {
#ifdef H5_HAVE_PARALLEL
/* Check if MPIO driver is used */
if (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
/* Sanity check for collectively calling H5Zunregister, if requested */
/* (Sanity check assumes that a barrier on one file's comm
* is sufficient (i.e. that there aren't different comms for
* different files). -QAK, 2018/02/14)
*/
if (H5_coll_api_sanity_check_g && !object->sanity_checked) {
MPI_Comm mpi_comm; /* File's communicator */
/* Checking MPI flag requires native VOL */
if (is_native_vol_obj) {
H5F_t *f = (H5F_t *)obj_ptr; /* File object for native VOL operation */
/* Retrieve the file communicator */
if (MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(f)))
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get MPI communicator");
/* Check if MPIO driver is used */
if (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
/* Issue the barrier */
if (mpi_comm != MPI_COMM_NULL)
MPI_Barrier(mpi_comm);
/* Sanity check for collectively calling H5Zunregister, if requested */
/* (Sanity check assumes that a barrier on one file's comm
* is sufficient (i.e. that there aren't different comms for
* different files). -QAK, 2018/02/14)
*/
if (H5_coll_api_sanity_check_g && !object->sanity_checked) {
MPI_Comm mpi_comm; /* File's communicator */
/* Set the "sanity checked" flag */
object->sanity_checked = true;
} /* end if */
} /* end if */
#endif /* H5_HAVE_PARALLEL */
/* Retrieve the file communicator */
if (H5F_mpi_retrieve_comm(obj_id, H5P_DEFAULT, &mpi_comm) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get MPI communicator");
/* Issue the barrier */
if (mpi_comm != MPI_COMM_NULL)
MPI_Barrier(mpi_comm);
/* Set the "sanity checked" flag */
object->sanity_checked = true;
} /* end if */
} /* end if */
}
#endif /* H5_HAVE_PARALLEL */
/* Call the flush routine for mounted file hierarchies */
if (H5F_flush_mounts((H5F_t *)obj_ptr) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTFLUSH, FAIL, "unable to flush file hierarchy");
vol_cb_args_specific.op_type = H5VL_FILE_FLUSH;
vol_cb_args_specific.args.flush.obj_type = H5I_FILE;
vol_cb_args_specific.args.flush.scope = H5F_SCOPE_GLOBAL;
/* Flush the object */
if (H5VL_file_specific(vol_obj, &vol_cb_args_specific, H5P_DATASET_XFER_DEFAULT, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file hierarchy");
} /* end if */
done:
+2 -2
View File
@@ -380,9 +380,9 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
/* Allocate buffers for iteration */
if (NULL == (key = (char *)H5MM_malloc(MPI_MAX_INFO_KEY * sizeof(char))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
if (NULL == (value1 = (char *)H5MM_malloc(MPI_MAX_INFO_VAL * sizeof(char))))
if (NULL == (value1 = (char *)H5MM_malloc((MPI_MAX_INFO_VAL + 1) * sizeof(char))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
if (NULL == (value2 = (char *)H5MM_malloc(MPI_MAX_INFO_VAL * sizeof(char))))
if (NULL == (value2 = (char *)H5MM_malloc((MPI_MAX_INFO_VAL + 1) * sizeof(char))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
/* Iterate over the keys, comparing them */
+1
View File
@@ -26,6 +26,7 @@
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <fenv.h>
#include <float.h>
#include <math.h>
#include <setjmp.h>
+1 -2
View File
@@ -807,13 +807,12 @@ H5_nanosleep(uint64_t nanosec)
#ifdef H5_HAVE_WIN32_API
DWORD dwMilliseconds = (DWORD)ceil(nanosec / 1.0e6);
DWORD ignore;
/* Windows can't sleep at a ns resolution. Best we can do is ~1 ms. We
* don't care about the return value since the second parameter
* (bAlertable) is false, so it will always be zero.
*/
ignore = SleepEx(dwMilliseconds, false);
SleepEx(dwMilliseconds, false);
#else
+57 -60
View File
@@ -21,8 +21,8 @@ if (HDF5_TEST_API_ENABLE_ASYNC)
endif ()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/H5_api_test_config.h.in
${HDF5_TEST_BINARY_DIR}/H5_api_test_config.h
${CMAKE_CURRENT_SOURCE_DIR}/H5_api_test_config.h.in
${HDF5_TEST_BINARY_DIR}/H5_api_test_config.h
)
#------------------------------------------------------------------------------
@@ -37,20 +37,20 @@ endif ()
#------------------------------------------------------------------------------
set (HDF5_API_TESTS
attribute
dataset
datatype
file
group
link
misc
object
attribute
dataset
datatype
file
group
link
misc
object
)
if (HDF5_TEST_API_ENABLE_ASYNC)
set (HDF5_API_TESTS
${HDF5_API_TESTS}
async
${HDF5_API_TESTS}
async
)
endif ()
@@ -105,26 +105,25 @@ set (HDF5_API_TESTS_FILES
#-----------------------------------------------------------------------------
foreach (api_test ${HDF5_API_TESTS})
set (HDF5_API_TEST_SRCS
${HDF5_API_TEST_SRCS}
${CMAKE_CURRENT_SOURCE_DIR}/H5_api_${api_test}_test.c
${HDF5_API_TEST_SRCS}
${CMAKE_CURRENT_SOURCE_DIR}/H5_api_${api_test}_test.c
)
endforeach ()
set (HDF5_API_TEST_SRCS
${HDF5_API_TEST_SRCS}
${CMAKE_CURRENT_SOURCE_DIR}/H5_api_test.c
${HDF5_TEST_API_SRC_DIR}/H5_api_test_util.c
${HDF5_API_TEST_SRCS}
${CMAKE_CURRENT_SOURCE_DIR}/H5_api_test.c
${HDF5_TEST_API_SRC_DIR}/H5_api_test_util.c
)
add_executable (h5_api_test ${HDF5_API_TEST_SRCS})
target_include_directories (
h5_api_test
PRIVATE
"${HDF5_SRC_INCLUDE_DIRS}"
"${HDF5_TEST_SRC_DIR}"
"${HDF5_TEST_API_SRC_DIR}"
"${HDF5_SRC_BINARY_DIR}"
"${HDF5_TEST_BINARY_DIR}"
target_include_directories (h5_api_test
PRIVATE
"${HDF5_SRC_INCLUDE_DIRS}"
"${HDF5_TEST_SRC_DIR}"
"${HDF5_TEST_API_SRC_DIR}"
"${HDF5_SRC_BINARY_DIR}"
"${HDF5_TEST_BINARY_DIR}"
)
target_compile_options (
h5_api_test
@@ -138,24 +137,12 @@ target_compile_definitions (
)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5_api_test STATIC)
target_link_libraries (
h5_api_test
PRIVATE
${HDF5_TEST_LIB_TARGET}
)
target_link_libraries (h5_api_test PRIVATE ${HDF5_TEST_LIB_TARGET})
else ()
TARGET_C_PROPERTIES (h5_api_test SHARED)
target_link_libraries (
h5_api_test
PRIVATE
${HDF5_TEST_LIBSH_TARGET}
)
target_link_libraries (h5_api_test PRIVATE ${HDF5_TEST_LIBSH_TARGET})
endif ()
set_target_properties (
h5_api_test
PROPERTIES
FOLDER test/API
)
set_target_properties (h5_api_test PROPERTIES FOLDER test/API)
# Add Target to clang-format
if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_TEST_h5_api_test_FORMAT h5_api_test)
@@ -284,27 +271,29 @@ if (HDF5_TEST_SERIAL)
endif ()
if (HDF5_TEST_API_CLIENT_HELPER)
set (HDF5_TEST_API_DRIVER_EXTRA_FLAGS ${HDF5_TEST_API_DRIVER_EXTRA_FLAGS}
--client-helper ${HDF5_TEST_API_CLIENT_HELPER}
--client-helper ${HDF5_TEST_API_CLIENT_HELPER}
)
endif ()
if (HDF5_TEST_API_CLIENT_INIT)
set (HDF5_TEST_API_DRIVER_EXTRA_FLAGS ${HDF5_TEST_API_DRIVER_EXTRA_FLAGS}
--client-init ${HDF5_TEST_API_CLIENT_INIT}
--client-init ${HDF5_TEST_API_CLIENT_INIT}
)
endif ()
set (last_api_test "")
foreach (api_test ${HDF5_API_TESTS})
add_test (
NAME "h5_api_test_${api_test}"
COMMAND $<TARGET_FILE:h5_api_test_driver>
--server ${HDF5_TEST_API_SERVER}
--client $<TARGET_FILE:h5_api_test> "${api_test}"
--serial
${HDF5_TEST_API_DRIVER_EXTRA_FLAGS}
NAME h5_api_test_${api_test}
COMMAND $<TARGET_FILE:h5_api_test_driver>
--server ${HDF5_TEST_API_SERVER}
--client $<TARGET_FILE:h5_api_test> ${api_test}
--serial
${HDF5_TEST_API_DRIVER_EXTRA_FLAGS}
)
set_tests_properties ("h5_api_test_${api_test}" PROPERTIES DEPENDS "${last_api_test}")
if ("h5_api_test_${api_test}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (h5_api_test_${api_test} PROPERTIES DISABLED true)
endif ()
set_tests_properties (h5_api_test_${api_test} PROPERTIES DEPENDS ${last_api_test})
set (last_api_test "h5_api_test_${api_test}")
endforeach ()
@@ -323,13 +312,16 @@ if (HDF5_TEST_SERIAL)
# Hook external tests to same test suite
foreach (ext_api_test ${HDF5_API_EXT_SERIAL_TESTS})
add_test (
NAME "h5_api_ext_test_${ext_api_test}"
COMMAND $<TARGET_FILE:h5_api_test_driver>
--server ${HDF5_TEST_API_SERVER}
--client $<TARGET_FILE:${ext_api_test}>
--serial
${HDF5_TEST_API_DRIVER_EXTRA_FLAGS}
NAME h5_api_ext_test_${ext_api_test}
COMMAND $<TARGET_FILE:h5_api_test_driver>
--server ${HDF5_TEST_API_SERVER}
--client $<TARGET_FILE:${ext_api_test}>
--serial
${HDF5_TEST_API_DRIVER_EXTRA_FLAGS}
)
if ("h5_api_ext_test_${ext_api_test}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (h5_api_ext_test_${ext_api_test} PROPERTIES DISABLED true)
endif ()
endforeach ()
# Add tests for each external VOL connector that was built
@@ -422,11 +414,13 @@ if (HDF5_TEST_SERIAL)
set (last_api_test "")
foreach (api_test ${HDF5_API_TESTS})
add_test (
NAME "h5_api_test_${api_test}"
COMMAND $<TARGET_FILE:h5_api_test> "${api_test}"
NAME h5_api_test_${api_test}
COMMAND $<TARGET_FILE:h5_api_test> ${api_test}
)
set_tests_properties ("h5_api_test_${api_test}" PROPERTIES DEPENDS "${last_api_test}")
if ("h5_api_test_${api_test}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (h5_api_test_${api_test} PROPERTIES DISABLED true)
endif ()
set_tests_properties (h5_api_test_${api_test} PROPERTIES DEPENDS ${last_api_test})
set (last_api_test "h5_api_test_${api_test}")
endforeach ()
@@ -436,6 +430,9 @@ if (HDF5_TEST_SERIAL)
NAME "h5_api_test_${hdf5_test}"
COMMAND $<TARGET_FILE:h5_api_test_${hdf5_test}>
)
if ("h5_api_ext_test_${ext_api_test}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (h5_api_ext_test_${ext_api_test} PROPERTIES DISABLED true)
endif ()
endforeach ()
# Add tests for each external VOL connector that was built
-13
View File
@@ -136,15 +136,6 @@ main(int argc, char **argv)
}
}
#ifdef H5_HAVE_PARALLEL
/* If HDF5 was built with parallel enabled, go ahead and call MPI_Init before
* running these tests. Even though these are meant to be serial tests, they will
* likely be run using mpirun (or similar) and we cannot necessarily expect HDF5 or
* an HDF5 VOL connector to call MPI_Init.
*/
MPI_Init(&argc, &argv);
#endif
H5open();
n_tests_run_g = 0;
@@ -304,9 +295,5 @@ done:
H5close();
#ifdef H5_HAVE_PARALLEL
MPI_Finalize();
#endif
exit(((err_occurred || n_tests_failed_g > 0) ? EXIT_FAILURE : EXIT_SUCCESS));
}
+44 -84
View File
@@ -27,6 +27,15 @@ set (TEST_LIB_HEADERS
${HDF5_TEST_SOURCE_DIR}/swmr_common.h
)
#################################################################################
# Set private compile-time definitions added when
# compiling test source files
#################################################################################
set (HDF5_TEST_COMPILE_DEFS_PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
"$<$<BOOL:HDF5_TEST_API>:H5_HAVE_TEST_API>"
)
if (BUILD_STATIC_LIBS)
add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
target_include_directories (${HDF5_TEST_LIB_TARGET}
@@ -37,7 +46,7 @@ if (BUILD_STATIC_LIBS)
target_compile_definitions(${HDF5_TEST_LIB_TARGET}
PRIVATE
"H5_TEST_EXPRESS_LEVEL_DEFAULT=${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
"${HDF5_TEST_COMPILE_DEFS_PRIVATE}"
)
TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_TEST_LIB_TARGET}
@@ -54,10 +63,8 @@ if (BUILD_STATIC_LIBS)
INSTALL_TARGET_PDB (${HDF5_TEST_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} libraries)
install (
TARGETS
${HDF5_TEST_LIB_TARGET}
EXPORT
${HDF5_EXPORTED_TARGETS}
TARGETS ${HDF5_TEST_LIB_TARGET}
EXPORT ${HDF5_EXPORTED_TARGETS}
LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT libraries
@@ -75,11 +82,10 @@ if (BUILD_SHARED_LIBS)
)
target_compile_options(${HDF5_TEST_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${HDF5_TEST_LIBSH_TARGET}
PUBLIC
"H5_BUILT_AS_DYNAMIC_LIB"
PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
PRIVATE
"H5_TEST_EXPRESS_LEVEL_DEFAULT=${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
"${HDF5_TEST_COMPILE_DEFS_PRIVATE}"
)
TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET}
@@ -96,10 +102,8 @@ if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_TEST_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
install (
TARGETS
${HDF5_TEST_LIBSH_TARGET}
EXPORT
${HDF5_EXPORTED_TARGETS}
TARGETS ${HDF5_TEST_LIBSH_TARGET}
EXPORT ${HDF5_EXPORTED_TARGETS}
LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT libraries
@@ -141,9 +145,9 @@ if (BUILD_SHARED_LIBS)
)
foreach (plugin_name ${FILTER_PLUGINS_FOR_DIR1})
set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}")
set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}")
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}")
set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}")
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -173,9 +177,9 @@ if (BUILD_SHARED_LIBS)
endforeach ()
foreach (plugin_name ${FILTER_PLUGINS_FOR_DIR2})
set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}")
set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}")
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}")
set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}")
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -217,9 +221,9 @@ if (BUILD_SHARED_LIBS)
)
foreach (vfd_lib ${VFD_PLUGIN_LIBS})
set (HDF5_VFD_PLUGIN_LIB_CORENAME "${vfd_lib}")
set (HDF5_VFD_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_VFD_PLUGIN_LIB_CORENAME}")
set (HDF5_VFD_PLUGIN_LIB_TARGET ${HDF5_VFD_PLUGIN_LIB_CORENAME})
set (HDF5_VFD_PLUGIN_LIB_CORENAME "${vfd_lib}")
set (HDF5_VFD_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_VFD_PLUGIN_LIB_CORENAME}")
set (HDF5_VFD_PLUGIN_LIB_TARGET ${HDF5_VFD_PLUGIN_LIB_CORENAME})
add_library (${HDF5_VFD_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${vfd_lib}.c)
target_include_directories (${HDF5_VFD_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -261,9 +265,9 @@ if (BUILD_SHARED_LIBS)
)
foreach (vol_lib ${VOL_PLUGIN_LIBS})
set (HDF5_VOL_PLUGIN_LIB_CORENAME "${vol_lib}")
set (HDF5_VOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_VOL_PLUGIN_LIB_CORENAME}")
set (HDF5_VOL_PLUGIN_LIB_TARGET ${HDF5_VOL_PLUGIN_LIB_CORENAME})
set (HDF5_VOL_PLUGIN_LIB_CORENAME "${vol_lib}")
set (HDF5_VOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_VOL_PLUGIN_LIB_CORENAME}")
set (HDF5_VOL_PLUGIN_LIB_TARGET ${HDF5_VOL_PLUGIN_LIB_CORENAME})
add_library (${HDF5_VOL_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${vol_lib}.c)
target_include_directories (${HDF5_VOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -431,10 +435,7 @@ macro (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
target_include_directories (${file} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${file}
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(${file} PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${file} STATIC)
target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -475,10 +476,7 @@ endforeach ()
#-- Adding test for chunk_info
add_executable (chunk_info ${HDF5_TEST_SOURCE_DIR}/chunk_info.c)
target_compile_options(chunk_info PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(chunk_info
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(chunk_info PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
target_include_directories (chunk_info PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (chunk_info STATIC)
@@ -499,10 +497,7 @@ endif ()
#-- Adding test for direct_chunk
add_executable (direct_chunk ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c)
target_compile_options(direct_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(direct_chunk
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(direct_chunk PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
target_include_directories (direct_chunk PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (direct_chunk STATIC)
@@ -524,10 +519,7 @@ endif ()
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SOURCES})
target_compile_options(testhdf5 PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(testhdf5
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(testhdf5 PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
target_include_directories (testhdf5 PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (testhdf5 STATIC)
@@ -548,10 +540,7 @@ endif ()
#-- Adding test for cache_image
add_executable (cache_image ${cache_image_SOURCES})
target_compile_options(cache_image PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(cache_image
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(cache_image PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
target_include_directories (cache_image PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (cache_image STATIC)
@@ -572,18 +561,13 @@ endif ()
#-- Adding test for ttsafe
add_executable (ttsafe ${ttsafe_SOURCES})
target_compile_options(ttsafe PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(ttsafe
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(ttsafe PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
target_include_directories (ttsafe PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (ttsafe STATIC)
target_link_libraries (ttsafe PRIVATE ${HDF5_TEST_LIB_TARGET})
if (NOT WIN32)
target_link_libraries (ttsafe
PRIVATE "$<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>"
)
target_link_libraries (ttsafe PRIVATE "$<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>")
endif ()
else ()
TARGET_C_PROPERTIES (ttsafe SHARED)
@@ -602,18 +586,13 @@ endif ()
#-- Adding test for thread_id
add_executable (thread_id ${HDF5_TEST_SOURCE_DIR}/thread_id.c)
target_compile_options(thread_id PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(thread_id
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(thread_id PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
target_include_directories (thread_id PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (thread_id STATIC)
target_link_libraries (thread_id PRIVATE ${HDF5_TEST_LIB_TARGET})
if (NOT WIN32)
target_link_libraries (thread_id
PRIVATE "$<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>"
)
target_link_libraries (thread_id PRIVATE "$<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>")
endif ()
else ()
TARGET_C_PROPERTIES (thread_id SHARED)
@@ -672,8 +651,7 @@ endforeach ()
#-- Adding test for libinfo
set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
file (WRITE ${GREP_RUNNER}
"file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
file (WRITE ${GREP_RUNNER} "file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
if (NOT TEST_RESULT)
message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
else ()
@@ -712,10 +690,7 @@ macro (ADD_H5_VDS_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c ${HDF5_TEST_SOURCE_DIR}/vds_swmr.h)
target_include_directories (${file} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${file}
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(${file} PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${file} STATIC)
target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -742,10 +717,7 @@ endforeach ()
# and it can't be renamed (i.e., no <foo>-shared).
add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c)
target_compile_options(accum_swmr_reader PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(accum_swmr_reader
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(accum_swmr_reader PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
target_include_directories (accum_swmr_reader PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (accum_swmr_reader STATIC)
@@ -816,10 +788,7 @@ endif ()
set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_chunk ${use_append_chunk_SOURCES})
target_compile_options(use_append_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(use_append_chunk
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(use_append_chunk PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
target_include_directories (use_append_chunk PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_append_chunk STATIC)
@@ -841,10 +810,7 @@ if (HDF5_BUILD_UTILS) # requires mirror server
set (use_append_chunk_mirror_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk_mirror.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_chunk_mirror ${use_append_chunk_mirror_SOURCES})
target_compile_options(use_append_chunk_mirror PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(use_append_chunk_mirror
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(use_append_chunk_mirror PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
target_include_directories (use_append_chunk_mirror PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_append_chunk_mirror STATIC)
@@ -866,10 +832,7 @@ endif ()
set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_mchunks ${use_append_mchunks_SOURCES})
target_compile_options(use_append_mchunks PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(use_append_mchunks
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(use_append_mchunks PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
target_include_directories (use_append_mchunks PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_append_mchunks STATIC)
@@ -890,10 +853,7 @@ endif ()
set (use_disable_mdc_flushes_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_disable_mdc_flushes.c)
add_executable (use_disable_mdc_flushes ${use_disable_mdc_flushes_SOURCES})
target_compile_options(use_disable_mdc_flushes PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(use_disable_mdc_flushes
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(use_disable_mdc_flushes PRIVATE "${HDF5_TEST_COMPILE_DEFS_PRIVATE}")
target_include_directories (use_disable_mdc_flushes PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC)
+16
View File
@@ -107,10 +107,14 @@ add_custom_target(HDF5_VOLTEST_LIB_files ALL COMMENT "Copying files needed by HD
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
)
if ("VOL-${volname}-${voltest}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES DISABLED true)
endif ()
else ()
add_test (NAME VOL-${volname}-${voltest}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP VOL-${volname}-${voltest}"
)
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES DISABLED true)
endif ()
else ()
add_test (NAME VOL-${volname}-${voltest}
@@ -128,6 +132,9 @@ add_custom_target(HDF5_VOLTEST_LIB_files ALL COMMENT "Copying files needed by HD
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
)
if ("VOL-${volname}-${voltest}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES DISABLED true)
endif ()
endif ()
else ()
add_test (NAME VOL-${volname}-${voltest}
@@ -145,6 +152,9 @@ add_custom_target(HDF5_VOLTEST_LIB_files ALL COMMENT "Copying files needed by HD
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
)
if ("VOL-${volname}-${voltest}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES DISABLED true)
endif ()
endif ()
endmacro ()
@@ -165,6 +175,9 @@ add_custom_target(HDF5_VOLTEST_LIB_files ALL COMMENT "Copying files needed by HD
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
)
if ("VOL-${volname}-${voltest}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES DISABLED true)
endif ()
endmacro ()
macro (ADD_VOL_TEST volname volinfo resultcode)
@@ -202,6 +215,9 @@ add_custom_target(HDF5_VOLTEST_LIB_files ALL COMMENT "Copying files needed by HD
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
)
if ("VOL-${volname}-fheap" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (VOL-${volname}-fheap PROPERTIES DISABLED true)
endif ()
endif ()
endmacro ()
+67 -1
View File
@@ -215,18 +215,27 @@ set_tests_properties (H5TEST-testhdf5-base PROPERTIES
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5TEST-testhdf5-base" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-testhdf5-base PROPERTIES DISABLED true)
endif ()
add_test (NAME H5TEST-testhdf5-file COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5> -o file)
set_tests_properties (H5TEST-testhdf5-file PROPERTIES
FIXTURES_REQUIRED clear_testhdf5
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5TEST-testhdf5-file" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-testhdf5-file PROPERTIES DISABLED true)
endif ()
add_test (NAME H5TEST-testhdf5-select COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5> -o select)
set_tests_properties (H5TEST-testhdf5-select PROPERTIES
FIXTURES_REQUIRED clear_testhdf5
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5TEST-testhdf5-select" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-testhdf5-select PROPERTIES DISABLED true)
endif ()
##############################################################################
##############################################################################
@@ -367,6 +376,9 @@ foreach (h5_test ${H5_TESTS})
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
endif ()
if ("H5TEST-${h5_test}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-${h5_test} PROPERTIES DISABLED true)
endif ()
endif ()
endforeach ()
@@ -412,6 +424,9 @@ if (NOT CYGWIN)
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
if ("H5TEST-cache" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-cache PROPERTIES DISABLED true)
endif ()
endif ()
if (TEST_CACHE_IMAGE)
@@ -428,12 +443,15 @@ if (TEST_CACHE_IMAGE)
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-cache_image-clean-objects PROPERTIES FIXTURES_CLEANUP clear_cache_image)
add_test (NAME H5TEST_cache_image COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cache_image>)
add_test (NAME H5TEST-cache_image COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cache_image>)
set_tests_properties (H5TEST-cache_image PROPERTIES
FIXTURES_REQUIRED clear_cache_image
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5TEST-cache_image" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-cache_image PROPERTIES DISABLED true)
endif ()
endif ()
#-- Adding test for external_env
@@ -481,6 +499,9 @@ set_tests_properties (H5TEST-external_env PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5TEST-external_env" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-external_env PROPERTIES DISABLED true)
endif ()
#-- Adding test for vds_env
add_test (
@@ -513,6 +534,9 @@ set_tests_properties (H5TEST-vds_env PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5TEST-vds_env" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-vds_env PROPERTIES DISABLED true)
endif ()
#-- Adding test for flush1/2
set (FLUSH_CLEANFILES
@@ -554,6 +578,9 @@ set_tests_properties (H5TEST-flush1 PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5TEST-flush1" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-flush1 PROPERTIES DISABLED true)
endif ()
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-flush2 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:flush2>)
else ()
@@ -572,6 +599,9 @@ set_tests_properties (H5TEST-flush2 PROPERTIES
FIXTURES_REQUIRED clear_flush
DEPENDS H5TEST-flush1
)
if ("H5TEST-flush2" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-flush2 PROPERTIES DISABLED true)
endif ()
#-- Adding test for tcheck_version
add_test (NAME H5TEST-tcheck_version-major COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:tcheck_version> "-tM")
@@ -579,16 +609,25 @@ set_tests_properties (H5TEST-tcheck_version-major PROPERTIES
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
WILL_FAIL "true"
)
if ("H5TEST-tcheck_version-major" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-tcheck_version-major PROPERTIES DISABLED true)
endif ()
add_test (NAME H5TEST-tcheck_version-minor COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:tcheck_version> "-tm")
set_tests_properties (H5TEST-tcheck_version-minor PROPERTIES
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
WILL_FAIL "true"
)
if ("H5TEST-tcheck_version-minor" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-tcheck_version-minor PROPERTIES DISABLED true)
endif ()
# release + 1 should pass on non-develop branches
add_test (NAME H5TEST-tcheck_version-release COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:tcheck_version> "-tr")
set_tests_properties (H5TEST-tcheck_version-release PROPERTIES
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5TEST-tcheck_version-release" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-tcheck_version-release PROPERTIES DISABLED true)
endif ()
##############################################################################
##############################################################################
@@ -641,6 +680,9 @@ set_tests_properties (H5TEST-filenotclosed PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5TEST-filenotclosed" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-filenotclosed PROPERTIES DISABLED true)
endif ()
#-- Adding test for del_many_dense_attrs
add_test (
@@ -661,6 +703,9 @@ set_tests_properties (H5TEST-del_many_dense_attrs PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5TEST-del_many_dense_attrs" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-del_many_dense_attrs PROPERTIES DISABLED true)
endif ()
#-- Adding test for err_compat
if (HDF5_ENABLE_DEPRECATED_SYMBOLS AND NOT MINGW)
@@ -698,6 +743,9 @@ else ()
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
endif ()
if ("H5TEST-err_compat" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-err_compat PROPERTIES DISABLED true)
endif ()
#-- Adding test for error_test
if (DEFAULT_API_VERSION MATCHES "v16" OR MINGW)
@@ -743,6 +791,9 @@ else ()
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
endif ()
if ("H5TEST-error_test" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-error_test PROPERTIES DISABLED true)
endif ()
#-- Adding test for links_env
add_test (NAME H5TEST-links_env-clear-objects
@@ -784,6 +835,9 @@ set_tests_properties (H5TEST-links_env PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_EXT_PREFIX=.:tmp_links_env"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5TEST-links_env" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-links_env PROPERTIES DISABLED true)
endif ()
if (NOT BUILD_SHARED_LIBS)
#-- Adding test for libinfo
@@ -798,6 +852,9 @@ else ()
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
endif ()
if ("H5TEST-testlibinfo" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-testlibinfo PROPERTIES DISABLED true)
endif ()
##############################################################################
### F I L T E R P L U G I N T E S T S
@@ -816,6 +873,9 @@ if (BUILD_SHARED_LIBS)
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/filter_plugin_dir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/filter_plugin_dir2;srcdir=${HDF5_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
)
if ("H5PLUGIN-filter_plugin" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5PLUGIN-filter_plugin PROPERTIES DISABLED true)
endif ()
endif ()
option (TEST_SHELL_SCRIPTS "Enable shell script tests" ON)
@@ -871,6 +931,9 @@ if (ENABLE_EXTENDED_TESTS)
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test
)
if ("H5TEST-testflushrefresh" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-testflushrefresh PROPERTIES DISABLED true)
endif ()
else ()
message (STATUS "Cannot execute TEST flushrefresh - perl not found")
endif ()
@@ -909,6 +972,9 @@ if (BUILD_SHARED_LIBS)
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/null_vol_plugin_dir;srcdir=${HDF5_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
)
if ("H5PLUGIN-vol_plugin" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5PLUGIN-vol_plugin PROPERTIES DISABLED true)
endif ()
endif ()
if (HDF5_TEST_PASSTHROUGH_VOL)
+19
View File
@@ -125,10 +125,14 @@ add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HD
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if ("VFD-${vfdname}-${vfdtest}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES DISABLED true)
endif ()
else ()
add_test (NAME VFD-${vfdname}-${vfdtest}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES DISABLED true)
endif ()
else ()
add_test (NAME VFD-${vfdname}-${vfdtest}
@@ -146,6 +150,9 @@ add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HD
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if ("VFD-${vfdname}-${vfdtest}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES DISABLED true)
endif ()
endif ()
else ()
add_test (NAME VFD-${vfdname}-${vfdtest}
@@ -163,6 +170,9 @@ add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HD
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if ("VFD-${vfdname}-${vfdtest}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES DISABLED true)
endif ()
endif ()
endmacro ()
@@ -183,6 +193,9 @@ add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HD
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if ("VFD-${vfdname}-${vfdtest}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES DISABLED true)
endif ()
endif ()
endmacro ()
@@ -228,6 +241,9 @@ add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HD
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if ("VFD-${vfdname}-fheap" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (VFD-${vfdname}-fheap PROPERTIES DISABLED true)
endif ()
endif ()
endmacro ()
@@ -253,4 +269,7 @@ add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HD
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/null_vfd_plugin_dir;srcdir=${HDF5_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
)
if ("H5PLUGIN-vfd_plugin" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5PLUGIN-vfd_plugin PROPERTIES DISABLED true)
endif ()
endif ()
+12
View File
@@ -104,20 +104,32 @@ elseif (UNIX)
ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5SHELL-test_flush_refresh" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5SHELL-test_flush_refresh PROPERTIES DISABLED true)
endif ()
add_test (H5SHELL-test_use_cases ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_use_cases.sh)
set_tests_properties (H5SHELL-test_use_cases PROPERTIES
ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5SHELL-test_use_cases" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5SHELL-test_use_cases PROPERTIES DISABLED true)
endif ()
add_test (H5SHELL-test_swmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_swmr.sh)
set_tests_properties (H5SHELL-test_swmr PROPERTIES
ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5SHELL-test_swmr" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5SHELL-test_swmr PROPERTIES DISABLED true)
endif ()
add_test (H5SHELL-test_vds_swmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_vds_swmr.sh)
set_tests_properties (H5SHELL-test_vds_swmr PROPERTIES
ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
if ("H5SHELL-test_vds_swmr" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5SHELL-test_vds_swmr PROPERTIES DISABLED true)
endif ()
endif ()
endif ()
+1 -1
View File
@@ -2194,7 +2194,7 @@ test_swmr_write_big(bool newest_format)
ZeroMemory(&pi, sizeof(pi));
if (0 == CreateProcess(NULL, SWMR_READER, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) {
printf("CreateProcess failed (%d).\n", GetLastError());
printf("CreateProcess failed (%lu).\n", GetLastError());
FAIL_STACK_ERROR;
}
+20 -16
View File
@@ -456,7 +456,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
const char *suffix = _suffix;
size_t i, j;
hid_t driver = H5I_INVALID_HID;
int isppdriver = 0; /* if the driver is MPI parallel */
bool isppdriver = false; /* if the driver is MPI parallel */
if (!base_name || !fullname || size < 1)
return NULL;
@@ -515,10 +515,8 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
}
}
/* Must first check fapl is not H5P_DEFAULT (-1) because H5FD_XXX
* could be of value -1 if it is not defined.
*/
isppdriver = ((H5P_DEFAULT != fapl) || driver_env_var) && (H5FD_MPIO == driver);
if (h5_using_parallel_driver(fapl, &isppdriver) < 0)
return NULL;
/* Check HDF5_NOCLEANUP environment setting.
* (The #ifdef is needed to prevent compile failure in case MPI is not
@@ -863,22 +861,23 @@ h5_show_hostname(void)
WSADATA wsaData;
int err;
#endif
#ifdef H5_HAVE_PARALLEL
int mpi_rank, mpi_initialized, mpi_finalized;
#endif
/* try show the process or thread id in multiple processes cases*/
#ifdef H5_HAVE_PARALLEL
{
int mpi_rank, mpi_initialized, mpi_finalized;
MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
if (mpi_initialized && !mpi_finalized) {
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
printf("MPI-process %d.", mpi_rank);
}
else
printf("thread 0.");
if (mpi_initialized && !mpi_finalized) {
/* Prevent output here from getting mixed with later output */
MPI_Barrier(MPI_COMM_WORLD);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
printf("MPI-process %d.", mpi_rank);
}
else
printf("thread 0.");
#else
printf("thread %" PRIu64 ".", H5TS_thread_id());
#endif
@@ -914,6 +913,11 @@ h5_show_hostname(void)
#ifdef H5_HAVE_WIN32_API
WSACleanup();
#endif
#ifdef H5_HAVE_PARALLEL
/* Prevent output here from getting mixed with later output */
if (mpi_initialized && !mpi_finalized)
MPI_Barrier(MPI_COMM_WORLD);
#endif
}
#ifdef H5_HAVE_PARALLEL
+48 -38
View File
@@ -155,35 +155,37 @@ TestUsage(void)
{
unsigned i;
print_func("Usage: %s [-v[erbose] (l[ow]|m[edium]|h[igh]|0-9)] %s\n", TestProgName,
(TestPrivateUsage ? "<extra options>" : ""));
print_func(" [-[e]x[clude] name]+ \n");
print_func(" [-o[nly] name]+ \n");
print_func(" [-b[egin] name] \n");
print_func(" [-s[ummary]] \n");
print_func(" [-c[leanoff]] \n");
print_func(" [-h[elp]] \n");
print_func("\n\n");
print_func("verbose controls the amount of information displayed\n");
print_func("exclude to exclude tests by name\n");
print_func("only to name tests which should be run\n");
print_func("begin start at the name of the test given\n");
print_func("summary prints a summary of test results at the end\n");
print_func("cleanoff does not delete *.hdf files after execution of tests\n");
print_func("help print out this information\n");
if (TestPrivateUsage) {
print_func("\nExtra options\n");
TestPrivateUsage();
if (mpi_rank_framework_g == 0) {
print_func("Usage: %s [-v[erbose] (l[ow]|m[edium]|h[igh]|0-9)] %s\n", TestProgName,
(TestPrivateUsage ? "<extra options>" : ""));
print_func(" [-[e]x[clude] name]+ \n");
print_func(" [-o[nly] name]+ \n");
print_func(" [-b[egin] name] \n");
print_func(" [-s[ummary]] \n");
print_func(" [-c[leanoff]] \n");
print_func(" [-h[elp]] \n");
print_func("\n\n");
print_func("verbose controls the amount of information displayed\n");
print_func("exclude to exclude tests by name\n");
print_func("only to name tests which should be run\n");
print_func("begin start at the name of the test given\n");
print_func("summary prints a summary of test results at the end\n");
print_func("cleanoff does not delete *.hdf files after execution of tests\n");
print_func("help print out this information\n");
if (TestPrivateUsage) {
print_func("\nExtra options\n");
TestPrivateUsage();
}
print_func("\n\n");
print_func("This program currently tests the following: \n\n");
print_func("%16s %s\n", "Name", "Description");
print_func("%16s %s\n", "----", "-----------");
for (i = 0; i < Index; i++)
print_func("%16s %s\n", Test[i].Name, Test[i].Description);
print_func("\n\n");
}
print_func("\n\n");
print_func("This program currently tests the following: \n\n");
print_func("%16s %s\n", "Name", "Description");
print_func("%16s %s\n", "----", "-----------");
for (i = 0; i < Index; i++)
print_func("%16s %s\n", Test[i].Name, Test[i].Description);
print_func("\n\n");
}
/*
@@ -192,12 +194,14 @@ TestUsage(void)
void
TestInfo(const char *ProgName)
{
unsigned major, minor, release;
if (mpi_rank_framework_g == 0) {
unsigned major, minor, release;
H5get_libversion(&major, &minor, &release);
H5get_libversion(&major, &minor, &release);
print_func("\nFor help use: %s -help\n", ProgName);
print_func("Linked with hdf5 version %u.%u release %u\n", major, minor, release);
print_func("\nFor help use: %s -help\n", ProgName);
print_func("Linked with hdf5 version %u.%u release %u\n", major, minor, release);
}
}
/*
@@ -301,20 +305,24 @@ PerformTests(void)
for (Loop = 0; Loop < Index; Loop++)
if (Test[Loop].SkipFlag) {
MESSAGE(2, ("Skipping -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
if (mpi_rank_framework_g == 0)
MESSAGE(2, ("Skipping -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
}
else {
if (mpi_rank_framework_g == 0)
MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
MESSAGE(5, ("===============================================\n"));
if (mpi_rank_framework_g == 0)
MESSAGE(5, ("===============================================\n"));
Test[Loop].NumErrors = num_errs;
Test_parameters = Test[Loop].Parameters;
TestAlarmOn();
Test[Loop].Call();
TestAlarmOff();
Test[Loop].NumErrors = num_errs - Test[Loop].NumErrors;
MESSAGE(5, ("===============================================\n"));
MESSAGE(5, ("There were %d errors detected.\n\n", (int)Test[Loop].NumErrors));
if (mpi_rank_framework_g == 0) {
MESSAGE(5, ("===============================================\n"));
MESSAGE(5, ("There were %d errors detected.\n\n", (int)Test[Loop].NumErrors));
}
}
Test_parameters = NULL; /* clear it. */
@@ -358,7 +366,8 @@ TestCleanup(void)
{
unsigned Loop;
MESSAGE(2, ("\nCleaning Up temp files...\n\n"));
if (mpi_rank_framework_g == 0)
MESSAGE(2, ("\nCleaning Up temp files...\n\n"));
/* call individual cleanup routines in each source module */
for (Loop = 0; Loop < Index; Loop++)
@@ -619,7 +628,8 @@ SetTest(const char *testname, int action)
break;
default:
/* error */
printf("*** ERROR: Unknown action (%d) for SetTest\n", action);
if (mpi_rank_framework_g == 0)
printf("*** ERROR: Unknown action (%d) for SetTest\n", action);
break;
}
}
+1 -1
View File
@@ -94,7 +94,7 @@ target_compile_options (
target_compile_definitions (
h5_api_test_parallel
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
"${HDF5_TESTPAR_COMPILE_DEFS_PRIVATE}"
)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5_api_test_parallel STATIC)
+11 -8
View File
@@ -21,13 +21,19 @@ set (testphdf5_SOURCES
${HDF5_TEST_PAR_SOURCE_DIR}/t_oflush.c
)
#################################################################################
# Set private compile-time definitions added when
# compiling test source files
#################################################################################
set (HDF5_TESTPAR_COMPILE_DEFS_PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
"$<$<BOOL:HDF5_TEST_API>:H5_HAVE_TEST_API>"
)
#-- Adding test for testhdf5
add_executable (testphdf5 ${testphdf5_SOURCES})
target_compile_options(testphdf5 PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(testphdf5
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(testphdf5 PRIVATE "${HDF5_TESTPAR_COMPILE_DEFS_PRIVATE}")
target_include_directories (testphdf5
PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
)
@@ -54,10 +60,7 @@ endif ()
macro (ADD_H5P_EXE file)
add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_compile_definitions(${file}
PRIVATE
"$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
)
target_compile_definitions(${file} PRIVATE "${HDF5_TESTPAR_COMPILE_DEFS_PRIVATE}")
target_include_directories (${file}
PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
)
+9
View File
@@ -55,6 +55,9 @@ set_tests_properties (MPI_TEST_testphdf5 PROPERTIES
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_PAR_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
)
if ("MPI_TEST_testphdf5" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_testphdf5 PROPERTIES DISABLED true)
endif ()
if (last_test)
set_tests_properties (MPI_TEST_testphdf5 PROPERTIES DEPENDS ${last_test})
endif ()
@@ -68,6 +71,9 @@ foreach (skiptest ${SKIP_tests})
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_PAR_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
)
if ("MPI_TEST_testphdf5_${skiptest}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_testphdf5_${skiptest} PROPERTIES DISABLED true)
endif ()
if (last_test)
set_tests_properties (MPI_TEST_testphdf5_${skiptest} PROPERTIES DEPENDS ${last_test})
endif ()
@@ -131,6 +137,9 @@ foreach (h5_testp ${H5P_TESTS})
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_PAR_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
)
if ("MPI_TEST_${h5_testp}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_${h5_testp} PROPERTIES DISABLED true)
endif ()
if (last_test)
set_tests_properties (MPI_TEST_${h5_testp} PROPERTIES DEPENDS ${last_test})
endif ()
+3
View File
@@ -47,6 +47,9 @@ macro (ADD_VFD_TEST vfdname resultcode)
ENVIRONMENT "srcdir=${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}
)
if ("MPI_TEST_VFD-${vfdname}-${h5_test}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (MPI_TEST_VFD-${vfdname}-${h5_test} PROPERTIES DISABLED true)
endif ()
endif ()
endforeach ()
if (NOT "t_pflush1" IN_LIST H5P_VFD_${vfdname}_TESTS_SKIP)
+3 -3
View File
@@ -4291,9 +4291,10 @@ main(int argc, char **argv)
printf("2 GByte IO TESTS START\n");
printf("2 MPI ranks will run the tests...\n");
printf("===================================\n");
h5_show_hostname();
}
h5_show_hostname();
if (H5dont_atexit() < 0) {
printf("Failed to turn off atexit processing. Continue.\n");
};
@@ -4345,8 +4346,7 @@ main(int argc, char **argv)
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Display testing information */
if (MAINPROCESS)
TestInfo(argv[0]);
TestInfo(argv[0]);
/* setup file access property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
+36 -3
View File
@@ -1855,6 +1855,11 @@ main(int argc, char **argv)
hsize_t newsize = 1048576;
/* Set the bigio processing limit to be 'newsize' bytes */
hsize_t oldsize = H5_mpi_set_bigio_count(newsize);
#ifdef H5_HAVE_TEST_API
int required = MPI_THREAD_MULTIPLE;
int provided;
#endif
int mpi_code;
/* Having set the bigio handling to a size that is manageable,
* we'll set our 'bigcount' variable to be 2X that limit so
@@ -1864,9 +1869,37 @@ main(int argc, char **argv)
if (newsize != oldsize)
bigcount = newsize * 2;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size_g);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank_g);
#ifdef H5_HAVE_TEST_API
/* Attempt to initialize with MPI_THREAD_MULTIPLE if possible */
if (MPI_SUCCESS != (mpi_code = MPI_Init_thread(&argc, &argv, required, &provided))) {
printf("MPI_Init_thread failed with error code %d\n", mpi_code);
return -1;
}
#else
if (MPI_SUCCESS != (mpi_code = MPI_Init(&argc, &argv))) {
printf("MPI_Init failed with error code %d\n", mpi_code);
return -1;
}
#endif
if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank_g))) {
printf("MPI_Comm_rank failed with error code %d\n", mpi_code);
MPI_Finalize();
return -1;
}
#ifdef H5_HAVE_TEST_API
/* Warn about missing MPI_THREAD_MULTIPLE support */
if ((provided < required) && MAIN_PROCESS)
printf("** MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE **\n");
#endif
if (MPI_SUCCESS != (mpi_code = MPI_Comm_size(MPI_COMM_WORLD, &mpi_size_g))) {
if (MAIN_PROCESS)
printf("MPI_Comm_size failed with error code %d\n", mpi_code);
MPI_Finalize();
return -1;
}
/* Attempt to turn off atexit post processing so that in case errors
* happen during the test and the process is aborted, it will not get
+102
View File
@@ -1119,3 +1119,105 @@ test_evict_on_close_parallel_unsupp(void)
ret = H5Pclose(fapl_id);
VRFY((SUCCEED == ret), "H5Pclose");
}
/*
* Verify that MPI I/O hints are preserved after closing the file access property list
* as described in issue #3025
* This is a test program from the user.
*/
void
test_fapl_preserve_hints(void)
{
const char *filename;
const char *key = "hdf_info_fapl";
const char *value = "xyz";
MPI_Info info_used = MPI_INFO_NULL;
MPI_Info info = MPI_INFO_NULL;
hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
hid_t fapl_id = H5I_INVALID_HID; /* File access plist */
char key_used[MPI_MAX_INFO_KEY + 1];
char *value_used = NULL;
bool same = false;
int flag = -1;
int nkeys_used;
int i;
int mpi_ret; /* MPI return value */
herr_t ret; /* Generic return value */
filename = (const char *)GetTestParameters();
value_used = malloc(MPI_MAX_INFO_VAL + 1);
VRFY(value_used, "malloc succeeded");
/* set up MPI parameters */
mpi_ret = MPI_Info_create(&info);
VRFY((mpi_ret >= 0), "MPI_Info_create succeeded");
mpi_ret = MPI_Info_set(info, key, value);
VRFY((mpi_ret == MPI_SUCCESS), "MPI_Info_set succeeded");
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((fapl_id != H5I_INVALID_HID), "H5Pcreate");
ret = H5Pset_fapl_mpio(fapl_id, MPI_COMM_WORLD, info);
VRFY((ret >= 0), "H5Pset_fapl_mpio");
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
VRFY((fid != H5I_INVALID_HID), "H5Fcreate succeeded");
ret = H5Pclose(fapl_id);
VRFY((ret >= 0), "H5Pclose succeeded");
fapl_id = H5Fget_access_plist(fid);
VRFY((fapl_id != H5I_INVALID_HID), "H5Fget_access_plist succeeded");
ret = H5Pget_fapl_mpio(fapl_id, NULL, &info_used);
VRFY((ret >= 0), "H5Pget_fapl_mpio succeeded");
VRFY((info_used != MPI_INFO_NULL), "H5Pget_fapl_mpio");
mpi_ret = MPI_Info_get_nkeys(info_used, &nkeys_used);
VRFY((mpi_ret == MPI_SUCCESS), "MPI_Info_get_nkeys succeeded");
/* Loop over the # of keys */
for (i = 0; i < nkeys_used; i++) {
/* Memset the buffers to zero */
memset(key_used, 0, MPI_MAX_INFO_KEY + 1);
memset(value_used, 0, MPI_MAX_INFO_VAL + 1);
/* Get the nth key */
mpi_ret = MPI_Info_get_nthkey(info_used, i, key_used);
VRFY((mpi_ret == MPI_SUCCESS), "MPI_Info_get_nthkey succeeded");
if (!strcmp(key_used, key)) {
mpi_ret = MPI_Info_get(info_used, key_used, MPI_MAX_INFO_VAL, value_used, &flag);
VRFY((mpi_ret == MPI_SUCCESS), "MPI_Info_get succeeded");
if (!strcmp(value_used, value)) {
/* Both key_used and value_used are the same */
same = true;
break;
}
}
} /* end for */
VRFY((same == true), "key_used and value_used are the same");
ret = H5Pclose(fapl_id);
VRFY((ret >= 0), "H5Pclose succeeded");
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
/* Free the MPI info object */
mpi_ret = MPI_Info_free(&info);
VRFY((mpi_ret >= 0), "MPI_Info_free succeeded");
mpi_ret = MPI_Info_free(&info_used);
VRFY((mpi_ret >= 0), "MPI_Info_free succeeded");
free(value_used);
} /* end test_fapl_preserve_hints() */
+21 -12
View File
@@ -547,8 +547,9 @@ verify_chunk_opt_status(size_t num_dsets, test_mode_t test_mode, bool any_io, bo
/* Verify selection I/O mode on rank 0 */
if (mpi_rank == 0) {
/* No actual I/O performed, only reported I/O will be from allocation, even if "no" datasets were
* involved (num_dsets == 0 implies the call was expected to fail, but it fails after allocation).
/* No actual I/O performed, the only reported I/O will be from allocation which is vector I/O,
* even if "no" datasets were involved (num_dsets == 0 implies the call was expected to fail,
* but it fails after allocation).
* Also if the test mode is mixed filtered and unfiltered and the call did not fail, then there
* will always be an I/O callback made with raw data. This is because unfiltered datasets fall
* back to scalar I/O when mixed with filtered, and scalar I/O reports an I/O call was made even
@@ -557,9 +558,18 @@ verify_chunk_opt_status(size_t num_dsets, test_mode_t test_mode, bool any_io, bo
* filtered dataset with no selection. Vector I/O does report an I/O call was made if passed a raw
* data element of size 0, so this is consistent. */
if (!any_io) {
if (did_alloc || (num_dsets > 0 && test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED))
if (did_alloc && (num_dsets > 0 && test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED)) {
VRFY((H5D_VECTOR_IO | H5D_SCALAR_IO) == actual_sel_io_mode_reduced,
"verified actual selection I/O mode was vector and scalar I/O");
}
else if (did_alloc) {
VRFY(H5D_VECTOR_IO == actual_sel_io_mode_reduced,
"verified actual selection I/O mode was vector I/O");
}
else if (num_dsets > 0 && test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED) {
VRFY(H5D_SCALAR_IO == actual_sel_io_mode_reduced,
"verified actual selection I/O mode was scalar I/O");
}
else
VRFY(0 == actual_sel_io_mode_reduced,
"verified actual selection I/O mode was 0 (no I/O)");
@@ -588,19 +598,18 @@ verify_chunk_opt_status(size_t num_dsets, test_mode_t test_mode, bool any_io, bo
switch (test_mode) {
case USE_SINGLE_DATASET:
case USE_MULTIPLE_DATASETS:
/* Collective case with only filtered datasets. If we performed allocation then there
* should be scalar I/O for allocation in addition to vector I/O for the actual data.
* If we're reading from an unallocated dataset then there should be no actual I/O.
* Otherwise there should only be vector I/O. */
if (did_alloc)
VRFY((H5D_SCALAR_IO | H5D_VECTOR_IO) == actual_sel_io_mode_reduced,
"verified actual selection I/O mode was scalar and vector I/O");
else if (unalloc_read)
/* Collective case with only filtered datasets.
* If we're reading from an unallocated dataset then there
* should be no actual I/O.
* Otherwise, only vector I/O is reported whether or not
* allocation happened. */
if (unalloc_read)
VRFY(0 == actual_sel_io_mode_reduced,
"verified actual selection I/O mode was 0 (no I/O)");
else
else { /* did_alloc || !unalloc_read */
VRFY(H5D_VECTOR_IO == actual_sel_io_mode_reduced,
"verified actual selection I/O mode was vector I/O");
}
break;
case USE_MULTIPLE_DATASETS_MIXED_FILTERED:
+21 -25
View File
@@ -53,14 +53,14 @@ test_mpio_overlap_writes(char *filename)
MPI_Offset mpi_off;
MPI_Status mpi_stat;
if (VERBOSE_MED)
printf("MPIO independent overlapping writes test on file %s\n", filename);
nerrs = 0;
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (VERBOSE_MED && MAINPROCESS)
printf("MPIO independent overlapping writes test on file %s\n", filename);
/* Need at least 2 processes */
if (mpi_size < 2) {
if (MAINPROCESS)
@@ -211,7 +211,7 @@ test_mpio_gb_file(char *filename)
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
if (VERBOSE_MED)
if (VERBOSE_MED && MAINPROCESS)
printf("MPI_Offset range test\n");
/* figure out the signness and sizeof MPI_Offset */
@@ -274,12 +274,13 @@ test_mpio_gb_file(char *filename)
/*
* Verify if we can write to a file of multiple GB sizes.
*/
if (VERBOSE_MED)
if (VERBOSE_MED && MAINPROCESS)
printf("MPIO GB file test %s\n", filename);
if (sizeof_mpi_offset <= 4) {
printf("Skipped GB file range test "
"because MPI_Offset cannot support it\n");
if (MAINPROCESS)
printf("Skipped GB file range test "
"because MPI_Offset cannot support it\n");
}
else {
buf = (char *)malloc(MB);
@@ -294,7 +295,8 @@ test_mpio_gb_file(char *filename)
mrc = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh);
VRFY((mrc == MPI_SUCCESS), "MPI_FILE_OPEN");
printf("MPIO GB file write test %s\n", filename);
if (MAINPROCESS)
printf("MPIO GB file write test %s\n", filename);
/* instead of writing every bytes of the file, we will just write
* some data around the 2 and 4 GB boundaries. That should cover
@@ -333,7 +335,8 @@ test_mpio_gb_file(char *filename)
*/
/* open it again to verify the data written */
/* but only if there was no write errors */
printf("MPIO GB file read test %s\n", filename);
if (MAINPROCESS)
printf("MPIO GB file read test %s\n", filename);
if (errors_sum(writerrs) > 0) {
printf("proc %d: Skip read test due to previous write errors\n", mpi_rank);
goto finish;
@@ -377,7 +380,8 @@ test_mpio_gb_file(char *filename)
mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc == MPI_SUCCESS), "Sync before leaving test");
printf("Test if MPI_File_get_size works correctly with %s\n", filename);
if (MAINPROCESS)
printf("Test if MPI_File_get_size works correctly with %s\n", filename);
mrc = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDONLY, info, &fh);
VRFY((mrc == MPI_SUCCESS), "");
@@ -432,7 +436,6 @@ finish:
static int
test_mpio_1wMr(char *filename, int special_request)
{
char hostname[128];
int mpi_size, mpi_rank;
MPI_File fh;
char mpi_err_str[MPI_MAX_ERROR_STRING];
@@ -456,19 +459,8 @@ test_mpio_1wMr(char *filename, int special_request)
}
/* show the hostname so that we can tell where the processes are running */
if (VERBOSE_DEF) {
#ifdef H5_HAVE_GETHOSTNAME
if (gethostname(hostname, sizeof(hostname)) < 0) {
printf("gethostname failed\n");
hostname[0] = '\0';
}
#else
printf("gethostname unavailable\n");
hostname[0] = '\0';
#endif
PRINTID;
printf("hostname=%s\n", hostname);
}
if (VERBOSE_DEF)
h5_show_hostname();
/* Delete any old file in order to start anew. */
/* Must delete because MPI_File_open does not have a Truncate mode. */
@@ -1005,6 +997,10 @@ test_mpio_special_collective(char *filename)
static int
parse_options(int argc, char **argv)
{
int mpi_rank;
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
while (--argc) {
if (**(++argv) != '-') {
break;
@@ -1053,7 +1049,7 @@ parse_options(int argc, char **argv)
return (1);
}
H5Pclose(plist);
if (VERBOSE_MED) {
if (VERBOSE_MED && MAINPROCESS) {
printf("Test filenames are:\n");
for (i = 0; i < n; i++)
printf(" %s\n", filenames[i]);
+6 -5
View File
@@ -20,7 +20,8 @@
#include "h5test.h"
static const char *FILENAME[] = {"flush", "noflush", NULL};
static const char *FLUSH_FILENAME[] = {"flush", NULL};
static const char *NOFLUSH_FILENAME[] = {"noflush", NULL};
static int *data_g = NULL;
@@ -173,7 +174,7 @@ main(int argc, char *argv[])
goto error;
/* Check the case where the file was flushed */
h5_fixname(FILENAME[0], fapl_id1, name, sizeof(name));
h5_fixname(FLUSH_FILENAME[0], fapl_id1, name, sizeof(name));
if (check_test_file(name, sizeof(name), fapl_id1)) {
H5_FAILED();
goto error;
@@ -190,7 +191,7 @@ main(int argc, char *argv[])
H5Eget_auto2(H5E_DEFAULT, &func, NULL);
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
h5_fixname(FILENAME[1], fapl_id2, name, sizeof(name));
h5_fixname(NOFLUSH_FILENAME[0], fapl_id2, name, sizeof(name));
if (check_test_file(name, sizeof(name), fapl_id2)) {
if (mpi_rank == 0)
PASSED();
@@ -202,8 +203,8 @@ main(int argc, char *argv[])
H5Eset_auto2(H5E_DEFAULT, func, NULL);
h5_clean_files(&FILENAME[0], fapl_id1);
h5_clean_files(&FILENAME[1], fapl_id2);
h5_clean_files(FLUSH_FILENAME, fapl_id1);
h5_clean_files(NOFLUSH_FILENAME, fapl_id2);
if (data_g) {
free(data_g);
+136
View File
@@ -177,3 +177,139 @@ test_fapl_mpio_dup(void)
VRFY((mrc == MPI_SUCCESS), "MPI_Info_free");
}
} /* end test_fapl_mpio_dup() */
/*-------------------------------------------------------------------------
* Function: test_get_dxpl_mpio
*
* Purpose: Test that H5Pget_dxpl_mpio will properly return the data
* transfer mode of collective and independent I/O access
* after setting it and writing some data.
*
* Return: Success: None
* Failure: Abort
*-------------------------------------------------------------------------
*/
void
test_get_dxpl_mpio(void)
{
hid_t fid = H5I_INVALID_HID;
hid_t sid = H5I_INVALID_HID;
hid_t did = H5I_INVALID_HID;
hid_t fapl = H5I_INVALID_HID;
hid_t dxpl = H5I_INVALID_HID;
H5FD_mpio_xfer_t xfer_mode;
hsize_t dims[2] = {100, 100};
hsize_t i, j;
int *data = NULL;
int mpi_rank, mpi_size;
const char *filename;
herr_t ret;
if (VERBOSE_MED)
printf("Verify get_dxpl_mpio correctly gets the data transfer mode"
"set in the data transfer property list after a write\n");
/* Set up MPI for VRFY macro */
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
/* Initialize data array */
data = malloc(100 * 100 * sizeof(*data));
VRFY((data != NULL), "Data buffer initialized properly");
/* Create parallel fapl */
fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, FACC_MPIO);
VRFY((fapl >= 0), "Fapl creation succeeded");
/* Create a file */
filename = (const char *)GetTestParameters();
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
VRFY((fid >= 0), "H5Fcreate succeeded");
/* Create a dataset */
sid = H5Screate_simple(2, dims, NULL);
VRFY((sid >= 0), "H5Screate succeeded");
did = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((did >= 0), "H5Dcreate2 succeeded");
/* Use collective I/O access */
dxpl = H5Pcreate(H5P_DATASET_XFER);
VRFY((dxpl >= 0), "H5Pcreate succeeded");
ret = H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pset_dxpl_mpio set to collective succeeded");
/* Write some data */
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
data[(i * 100) + j] = (int)(i + (i * j) + j);
ret = H5Dwrite(did, H5T_NATIVE_INT, sid, sid, dxpl, data);
VRFY((ret >= 0), "H5Dwrite succeeded");
/* Check to make sure the property is still correct */
ret = H5Pget_dxpl_mpio(dxpl, &xfer_mode);
VRFY((ret >= 0), "H5Pget_dxpl_mpio succeeded");
VRFY((xfer_mode == H5FD_MPIO_COLLECTIVE), "Xfer_mode retrieved"
" successfully");
/* Read the data */
ret = H5Dread(did, H5T_NATIVE_INT, sid, sid, dxpl, data);
VRFY((ret >= 0), "H5Dread succeeded");
/* Check to make sure the property is still correct */
ret = H5Pget_dxpl_mpio(dxpl, &xfer_mode);
VRFY((ret >= 0), "H5Pget_dxpl_mpio succeeded");
VRFY((xfer_mode == H5FD_MPIO_COLLECTIVE), "Xfer_mode retrieved"
" successfully");
/* Check it does nothing on receiving NULL */
ret = H5Pget_dxpl_mpio(dxpl, NULL);
VRFY((ret >= 0), "H5Pget_dxpl_mpio succeeded on NULL input");
/* Use independent I/O access */
ret = H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_INDEPENDENT);
VRFY((ret >= 0), "H5Pset_dxpl_mpio set to independent succeeded");
/* Write some data */
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
data[(i * 100) + j] = (int)(i + (j * j) + i);
ret = H5Dwrite(did, H5T_NATIVE_INT, sid, sid, dxpl, data);
VRFY((ret >= 0), "H5Dwrite succeeded");
/* Check to make sure the property is still correct */
ret = H5Pget_dxpl_mpio(dxpl, &xfer_mode);
VRFY((ret >= 0), "H5Pget_dxpl_mpio succeeded");
VRFY((xfer_mode == H5FD_MPIO_INDEPENDENT), "Xfer_mode retrieved"
" successfully");
/* Read the data */
ret = H5Dread(did, H5T_NATIVE_INT, sid, sid, dxpl, data);
VRFY((ret >= 0), "H5Dread succeeded");
/* Check to make sure the property is still correct */
ret = H5Pget_dxpl_mpio(dxpl, &xfer_mode);
VRFY((ret >= 0), "H5Pget_dxpl_mpio succeeded");
VRFY((xfer_mode == H5FD_MPIO_INDEPENDENT), "Xfer_mode retrieved"
" successfully");
/* Close everything */
free(data);
ret = H5Pclose(fapl);
VRFY((ret >= 0), "H5Pclose succeeded");
ret = H5Pclose(dxpl);
VRFY((ret >= 0), "H5Pclose succeeded");
ret = H5Dclose(did);
VRFY((ret >= 0), "H5Dclose succeeded");
ret = H5Sclose(sid);
VRFY((ret >= 0), "H5Sclose succeeded");
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
} /* end test_get_dxpl_mpio() */
+36 -3
View File
@@ -41,10 +41,43 @@ main(int argc, char **argv)
hsize_t stride[RANK];
hsize_t block[RANK];
DATATYPE *data_array = NULL; /* data buffer */
int mpi_code;
#ifdef H5_HAVE_TEST_API
int required = MPI_THREAD_MULTIPLE;
int provided;
#endif
MPI_Init(&argc, &argv);
MPI_Comm_size(comm, &mpi_size);
MPI_Comm_rank(comm, &mpi_rank);
#ifdef H5_HAVE_TEST_API
/* Attempt to initialize with MPI_THREAD_MULTIPLE if possible */
if (MPI_SUCCESS != (mpi_code = MPI_Init_thread(&argc, &argv, required, &provided))) {
printf("MPI_Init_thread failed with error code %d\n", mpi_code);
return -1;
}
#else
if (MPI_SUCCESS != (mpi_code = MPI_Init(&argc, &argv))) {
printf("MPI_Init failed with error code %d\n", mpi_code);
return -1;
}
#endif
if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(comm, &mpi_rank))) {
printf("MPI_Comm_rank failed with error code %d\n", mpi_code);
MPI_Finalize();
return -1;
}
#ifdef H5_HAVE_TEST_API
/* Warn about missing MPI_THREAD_MULTIPLE support */
if ((provided < required) && MAINPROCESS)
printf("** MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE **\n");
#endif
if (MPI_SUCCESS != (mpi_code = MPI_Comm_size(comm, &mpi_size))) {
if (MAINPROCESS)
printf("MPI_Comm_size failed with error code %d\n", mpi_code);
MPI_Finalize();
return -1;
}
if (MAINPROCESS)
TESTING("proper shutdown of HDF5 library");
+47 -9
View File
@@ -4089,7 +4089,8 @@ parse_options(int argc, char **argv)
case 'h': /* print help message--return with nerrors set */
return (1);
default:
printf("Illegal option(%s)\n", *argv);
if (MAINPROCESS)
printf("Illegal option(%s)\n", *argv);
nerrors++;
return (1);
}
@@ -4098,12 +4099,14 @@ parse_options(int argc, char **argv)
/* check validity of dimension and chunk sizes */
if (dim0 <= 0 || dim1 <= 0) {
printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
if (MAINPROCESS)
printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
nerrors++;
return (1);
}
if (chunkdim0 <= 0 || chunkdim1 <= 0) {
printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
if (MAINPROCESS)
printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
nerrors++;
return (1);
}
@@ -4128,9 +4131,11 @@ parse_options(int argc, char **argv)
nerrors++;
return (1);
}
printf("Test filenames are:\n");
for (i = 0; i < n; i++)
printf(" %s\n", filenames[i]);
if (MAINPROCESS) {
printf("Test filenames are:\n");
for (i = 0; i < n; i++)
printf(" %s\n", filenames[i]);
}
}
return (0);
@@ -4249,6 +4254,11 @@ int
main(int argc, char **argv)
{
int mpi_size, mpi_rank; /* mpi variables */
int mpi_code;
#ifdef H5_HAVE_TEST_API
int required = MPI_THREAD_MULTIPLE;
int provided;
#endif
#ifndef H5_HAVE_WIN32_API
/* Un-buffer the stdout and stderr */
@@ -4256,9 +4266,37 @@ main(int argc, char **argv)
HDsetbuf(stdout, NULL);
#endif
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
#ifdef H5_HAVE_TEST_API
/* Attempt to initialize with MPI_THREAD_MULTIPLE if possible */
if (MPI_SUCCESS != (mpi_code = MPI_Init_thread(&argc, &argv, required, &provided))) {
printf("MPI_Init_thread failed with error code %d\n", mpi_code);
return -1;
}
#else
if (MPI_SUCCESS != (mpi_code = MPI_Init(&argc, &argv))) {
printf("MPI_Init failed with error code %d\n", mpi_code);
return -1;
}
#endif
if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank))) {
printf("MPI_Comm_rank failed with error code %d\n", mpi_code);
MPI_Finalize();
return -1;
}
#ifdef H5_HAVE_TEST_API
/* Warn about missing MPI_THREAD_MULTIPLE support */
if ((provided < required) && MAINPROCESS)
printf("** MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE **\n");
#endif
if (MPI_SUCCESS != (mpi_code = MPI_Comm_size(MPI_COMM_WORLD, &mpi_size))) {
if (MAINPROCESS)
printf("MPI_Comm_size failed with error code %d\n", mpi_code);
MPI_Finalize();
return -1;
}
mpi_rank_framework_g = mpi_rank;
+127 -19
View File
@@ -40,6 +40,8 @@
#define PATH_MAX 4096
#endif
#define DEFAULT_DEFLATE_LEVEL 9
#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
#define CHECK_PASSED() \
@@ -82,12 +84,15 @@ static char *config_dir = NULL;
int nerrors = 0;
int curr_nerrors = 0;
bool enable_compression = false;
/* Function pointer typedef for test functions */
typedef void (*test_func)(void);
/* Utility functions */
static hid_t create_subfiling_ioc_fapl(MPI_Comm comm, MPI_Info info, bool custom_config,
H5FD_subfiling_params_t *custom_cfg, int32_t thread_pool_size);
static hid_t create_dcpl_id(int rank, const hsize_t dims[], hid_t dxpl_id);
/* Test functions */
static void test_create_and_close(void);
@@ -182,7 +187,47 @@ error:
return H5I_INVALID_HID;
}
/* ---------------------------------------------------------------------------
* Function: create_dcpl_id
*
* Purpose: Creates dataset creation property list identifier with
* chunking and compression, and enforces the
* required collective IO.
*
* Return: Success: HID Dataset creation property list identifier,
* a non-negative value.
* Failure: H5I_INVALID_HID, a negative value.
* ---------------------------------------------------------------------------
*/
static hid_t
create_dcpl_id(int rank, const hsize_t dset_dims[], hid_t dxpl_id)
{
hsize_t chunk_dims[1];
hid_t ret_value = H5I_INVALID_HID;
if ((ret_value = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
if (enable_compression) {
if (H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) < 0)
TEST_ERROR;
chunk_dims[0] = dset_dims[0] / 2;
if (H5Pset_chunk(ret_value, rank, chunk_dims) < 0)
TEST_ERROR;
if (H5Pset_deflate(ret_value, DEFAULT_DEFLATE_LEVEL) < 0)
TEST_ERROR;
}
return ret_value;
error:
if ((H5I_INVALID_HID != ret_value) && (H5Pclose(ret_value) < 0)) {
H5_FAILED();
AT();
}
return H5I_INVALID_HID;
}
/*
* A simple test that creates and closes a file with the
* subfiling VFD
@@ -1060,6 +1105,7 @@ test_read_different_stripe_size(void)
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
hid_t dxpl_id = H5I_INVALID_HID;
hid_t dcpl_id = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
char *tmp_filename = NULL;
void *buf = NULL;
@@ -1106,7 +1152,10 @@ test_read_different_stripe_size(void)
fspace_id = H5Screate_simple(1, dset_dims, NULL);
VRFY((fspace_id >= 0), "H5Screate_simple succeeded");
dset_id = H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dcpl_id = create_dcpl_id(1, dset_dims, dxpl_id);
VRFY((dcpl_id >= 0), "DCPL creation succeeded");
dset_id = H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset creation succeeded");
/* Select hyperslab */
@@ -1129,6 +1178,7 @@ test_read_different_stripe_size(void)
VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Pclose(dcpl_id) >= 0), "DCPL close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
/* Ensure all the subfiles are present */
@@ -1153,10 +1203,12 @@ test_read_different_stripe_size(void)
VRFY((fclose(subfile_ptr) >= 0), "fclose on subfile succeeded");
/* Check file size */
VRFY((HDstat(tmp_filename, &subfile_info) >= 0), "HDstat succeeded");
subfile_size = (h5_stat_size_t)subfile_info.st_size;
if (!enable_compression) {
VRFY((HDstat(tmp_filename, &subfile_info) >= 0), "HDstat succeeded");
subfile_size = (h5_stat_size_t)subfile_info.st_size;
VRFY((subfile_size >= cfg.stripe_size), "File size verification succeeded");
VRFY((subfile_size >= cfg.stripe_size), "File size verification succeeded");
}
}
}
@@ -1376,10 +1428,12 @@ test_subfiling_precreate_rank_0(void)
VRFY((fclose(subfile_ptr) >= 0), "fclose on subfile succeeded");
/* Check file size */
VRFY((HDstat(tmp_filename, &subfile_info) >= 0), "HDstat succeeded");
file_size = (h5_stat_size_t)subfile_info.st_size;
if (!enable_compression) {
VRFY((HDstat(tmp_filename, &subfile_info) >= 0), "HDstat succeeded");
file_size = (h5_stat_size_t)subfile_info.st_size;
VRFY((file_size >= cfg.stripe_size), "File size verification succeeded");
VRFY((file_size >= cfg.stripe_size), "File size verification succeeded");
}
}
/* Verify that there aren't too many subfiles */
@@ -1470,6 +1524,7 @@ test_subfiling_write_many_read_one(void)
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
hid_t dxpl_id = H5I_INVALID_HID;
hid_t dcpl_id = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
void *buf = NULL;
@@ -1517,7 +1572,10 @@ test_subfiling_write_many_read_one(void)
fspace_id = H5Screate_simple(1, dset_dims, NULL);
VRFY((fspace_id >= 0), "H5Screate_simple succeeded");
dset_id = H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dcpl_id = create_dcpl_id(1, dset_dims, dxpl_id);
VRFY((dcpl_id >= 0), "DCPL creation succeeded");
dset_id = H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset creation succeeded");
/* Select hyperslab */
@@ -1539,6 +1597,7 @@ test_subfiling_write_many_read_one(void)
buf = NULL;
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Pclose(dcpl_id) >= 0), "DCPL close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
mpi_code_g = MPI_Barrier(comm_g);
@@ -1616,6 +1675,7 @@ test_subfiling_write_many_read_few(void)
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
hid_t dxpl_id = H5I_INVALID_HID;
hid_t dcpl_id = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
void *buf = NULL;
@@ -1673,7 +1733,10 @@ test_subfiling_write_many_read_few(void)
fspace_id = H5Screate_simple(1, dset_dims, NULL);
VRFY((fspace_id >= 0), "H5Screate_simple succeeded");
dset_id = H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dcpl_id = create_dcpl_id(1, dset_dims, dxpl_id);
VRFY((dcpl_id >= 0), "DCPL creation succeeded");
dset_id = H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset creation succeeded");
/* Select hyperslab */
@@ -1695,6 +1758,7 @@ test_subfiling_write_many_read_few(void)
buf = NULL;
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Pclose(dcpl_id) >= 0), "DCPL close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
/*
@@ -1808,6 +1872,7 @@ test_subfiling_h5fuse(void)
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
hid_t dxpl_id = H5I_INVALID_HID;
hid_t dcpl_id = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
void *buf = NULL;
int skip_test = 0;
@@ -1833,7 +1898,7 @@ test_subfiling_h5fuse(void)
if (MAINPROCESS) {
FILE *h5fuse_script;
h5fuse_script = fopen("h5fuse.sh", "r");
h5fuse_script = fopen("h5fuse", "r");
if (h5fuse_script)
fclose(h5fuse_script);
else
@@ -1898,7 +1963,10 @@ test_subfiling_h5fuse(void)
fspace_id = H5Screate_simple(1, dset_dims, NULL);
VRFY((fspace_id >= 0), "H5Screate_simple succeeded");
dset_id = H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dcpl_id = create_dcpl_id(1, dset_dims, dxpl_id);
VRFY((dcpl_id >= 0), "DCPL creation succeeded");
dset_id = H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT);
VRFY((dset_id >= 0), "Dataset creation succeeded");
/* Select hyperslab */
@@ -1919,8 +1987,11 @@ test_subfiling_h5fuse(void)
free(buf);
buf = NULL;
VRFY((H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_INDEPENDENT) >= 0), "H5Pset_dxpl_mpio succeeded");
VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded");
VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded");
VRFY((H5Pclose(dcpl_id) >= 0), "DCPL close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
if (MAINPROCESS) {
@@ -1943,7 +2014,7 @@ test_subfiling_h5fuse(void)
SUBF_FILENAME, file_inode);
args[0] = strdup("env");
args[1] = strdup("./h5fuse.sh");
args[1] = strdup("./h5fuse");
args[2] = strdup("-q");
args[3] = strdup("-f");
args[4] = tmp_filename;
@@ -1973,8 +2044,10 @@ test_subfiling_h5fuse(void)
}
/* Verify the size of the fused file */
VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded");
VRFY(((size_t)file_info.st_size >= target_size), "File size verification succeeded");
if (!enable_compression) {
VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded");
VRFY(((size_t)file_info.st_size >= target_size), "File size verification succeeded");
}
/* Re-open file with sec2 driver and verify the data */
file_id = H5Fopen(SUBF_FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
@@ -2414,9 +2487,28 @@ main(int argc, char **argv)
if (num_iocs_g > mpi_size)
num_iocs_g = mpi_size;
if (MAINPROCESS) {
printf("Re-running tests with environment variables set\n");
if (MAINPROCESS)
printf(" Re-running tests with compression enabled\n");
#ifdef H5_HAVE_FILTER_DEFLATE
enable_compression = true;
for (size_t i = 0; i < ARRAY_SIZE(tests); i++) {
if (MPI_SUCCESS == (mpi_code_g = MPI_Barrier(comm_g))) {
(*tests[i])();
}
else {
if (MAINPROCESS)
MESG("MPI_Barrier failed");
nerrors++;
}
}
enable_compression = false;
#else
if (MAINPROCESS)
SKIPPED();
#endif
if (MAINPROCESS)
printf("\nRe-running tests with environment variables set\n");
for (size_t i = 0; i < ARRAY_SIZE(tests); i++) {
if (MPI_SUCCESS == (mpi_code_g = MPI_Barrier(comm_g))) {
@@ -2430,13 +2522,29 @@ main(int argc, char **argv)
}
if (MAINPROCESS)
puts("");
printf("\n Re-running tests with compression enabled\n");
#ifdef H5_HAVE_FILTER_DEFLATE
enable_compression = true;
for (size_t i = 0; i < ARRAY_SIZE(tests); i++) {
if (MPI_SUCCESS == (mpi_code_g = MPI_Barrier(comm_g))) {
(*tests[i])();
}
else {
if (MAINPROCESS)
MESG("MPI_Barrier failed");
nerrors++;
}
}
enable_compression = false;
#else
if (MAINPROCESS)
SKIPPED();
#endif
if (nerrors)
goto exit;
if (MAINPROCESS)
puts("All Subfiling VFD tests passed\n");
puts("\nAll Subfiling VFD tests passed\n");
exit:
if (must_unset_stripe_size_env)

Some files were not shown because too many files have changed in this diff Show More