mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
Merge branch 'develop' into vol_dev_headers
Also moved the wrapper functions from the H5VLconnector.h to H5VLconnector_passthru.h
This commit is contained in:
commit
bb9370d777
5
MANIFEST
5
MANIFEST
@ -242,6 +242,7 @@
|
||||
./fortran/src/H5Sff.F90
|
||||
./fortran/src/H5Tf.c
|
||||
./fortran/src/H5Tff.F90
|
||||
./fortran/src/H5VLff.F90
|
||||
./fortran/src/H5Zf.c
|
||||
./fortran/src/H5Zff.F90
|
||||
./fortran/src/H5config_f.inc.cmake
|
||||
@ -261,8 +262,8 @@
|
||||
./fortran/src/h5fc.in
|
||||
./fortran/src/hdf5_fortrandll.def.in
|
||||
|
||||
|
||||
./fortran/test/Makefile.am
|
||||
./fortran/test/vol_connector.F90
|
||||
./fortran/test/fflush1.F90
|
||||
./fortran/test/fflush2.F90
|
||||
./fortran/test/fortranlib_test.F90
|
||||
@ -936,6 +937,7 @@
|
||||
./src/H5Ztrans.c
|
||||
./src/Makefile.am
|
||||
./src/hdf5.h
|
||||
./src/h5cc.in
|
||||
./src/libhdf5.settings.in
|
||||
./src/H5win32defs.h
|
||||
|
||||
@ -1540,7 +1542,6 @@
|
||||
./tools/lib/io_timer.h
|
||||
|
||||
./tools/src/misc/Makefile.am
|
||||
./tools/src/misc/h5cc.in
|
||||
./tools/src/misc/h5clear.c
|
||||
./tools/src/misc/h5debug.c
|
||||
./tools/src/misc/h5mkgrp.c
|
||||
|
24
Makefile.am
24
Makefile.am
@ -49,11 +49,6 @@ include $(top_srcdir)/config/commence.am
|
||||
|
||||
# Conditionals. These conditionals are defined during configure
|
||||
# Define each variable to empty if it is not used to placate pmake
|
||||
if BUILD_PARALLEL_CONDITIONAL
|
||||
TESTPARALLEL_DIR =testpar
|
||||
else
|
||||
TESTPARALLEL_DIR=
|
||||
endif
|
||||
if BUILD_CXX_CONDITIONAL
|
||||
CXX_DIR =c++
|
||||
else
|
||||
@ -74,9 +69,24 @@ if BUILD_HDF5_HL_CONDITIONAL
|
||||
else
|
||||
HDF5_HL_DIR=
|
||||
endif
|
||||
if BUILD_TESTS_CONDITIONAL
|
||||
TESTSERIAL_DIR =test
|
||||
else
|
||||
TESTSERIAL_DIR=
|
||||
endif
|
||||
if BUILD_TESTS_PARALLEL_CONDITIONAL
|
||||
TESTPARALLEL_DIR =testpar
|
||||
else
|
||||
TESTPARALLEL_DIR=
|
||||
endif
|
||||
if BUILD_TOOLS_CONDITIONAL
|
||||
TOOLS_DIR =tools
|
||||
else
|
||||
TOOLS_DIR=
|
||||
endif
|
||||
|
||||
SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \
|
||||
$(JAVA_DIR) $(HDF5_HL_DIR)
|
||||
SUBDIRS = src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR) $(TOOLS_DIR) . $(CXX_DIR) \
|
||||
$(FORTRAN_DIR) $(JAVA_DIR) $(HDF5_HL_DIR)
|
||||
DIST_SUBDIRS = src test testpar tools . c++ fortran hl examples java
|
||||
|
||||
# Some files generated during configure that should be cleaned
|
||||
|
@ -18,9 +18,15 @@
|
||||
|
||||
include $(top_srcdir)/config/commence.am
|
||||
|
||||
if BUILD_TESTS_CONDITIONAL
|
||||
TEST_DIR = test
|
||||
else
|
||||
TEST_DIR=
|
||||
endif
|
||||
|
||||
## Only recurse into subdirectories if C++ interface is enabled.
|
||||
if BUILD_CXX_CONDITIONAL
|
||||
SUBDIRS=src test
|
||||
SUBDIRS=src $(TEST_DIR)
|
||||
|
||||
# Test with just the native connector, with a single pass-through connector
|
||||
# and with a doubly-stacked pass-through.
|
||||
|
@ -51,6 +51,8 @@ message (STATUS "COMMAND: ${TEST_TESTER} -Xmx1024M -Dorg.slf4j.simpleLogger.defa
|
||||
|
||||
if (WIN32 AND NOT MINGW)
|
||||
set (ENV{PATH} "$ENV{PATH}\\;${TEST_LIBRARY_DIRECTORY}")
|
||||
else ()
|
||||
set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
|
||||
endif ()
|
||||
|
||||
# run the test program, capture the stdout/stderr and the result var
|
||||
@ -64,6 +66,7 @@ execute_process (
|
||||
RESULT_VARIABLE TEST_RESULT
|
||||
OUTPUT_FILE ${TEST_OUTPUT}
|
||||
ERROR_FILE ${TEST_OUTPUT}.err
|
||||
OUTPUT_VARIABLE TEST_OUT
|
||||
ERROR_VARIABLE TEST_ERROR
|
||||
)
|
||||
|
||||
@ -126,11 +129,22 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
|
||||
endif ()
|
||||
|
||||
# now compare the output with the reference
|
||||
execute_process (
|
||||
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
|
||||
RESULT_VARIABLE TEST_RESULT
|
||||
)
|
||||
if (NOT TEST_SORT_COMPARE)
|
||||
# now compare the output with the reference
|
||||
execute_process (
|
||||
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
|
||||
RESULT_VARIABLE TEST_RESULT
|
||||
)
|
||||
else ()
|
||||
file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1)
|
||||
file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2)
|
||||
list (SORT v1)
|
||||
list (SORT v2)
|
||||
if (NOT v1 STREQUAL v2)
|
||||
set(TEST_RESULT 1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (TEST_RESULT)
|
||||
set (TEST_RESULT 0)
|
||||
file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
|
||||
|
@ -69,12 +69,12 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN
|
||||
|
||||
#############################################################################################
|
||||
### enable parallel builds
|
||||
|
||||
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON")
|
||||
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
|
||||
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
|
||||
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF")
|
||||
|
||||
if (DEFINED MPI)
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF")
|
||||
endif()
|
||||
#############################################################################################
|
||||
### enable thread-safety builds
|
||||
|
||||
|
@ -13,19 +13,10 @@
|
||||
#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
|
||||
#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
|
||||
#############################################################################################
|
||||
|
||||
### uncomment/comment and change the following lines for other configuration options
|
||||
|
||||
#############################################################################################
|
||||
### enable parallel builds
|
||||
if (DEFINED MPI)
|
||||
# maximum parallel processor count for build and test ####
|
||||
set (MAX_PROC_COUNT 8)
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF")
|
||||
endif ()
|
||||
# maximum parallel processor count for build and test ####
|
||||
set (MAX_PROC_COUNT 8)
|
||||
endif()
|
||||
#############################################################################################
|
||||
### options to run test scripts in batch commands
|
||||
set (LOCAL_BATCH_SCRIPT_COMMAND "bsub")
|
||||
|
@ -13,19 +13,10 @@
|
||||
#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
|
||||
#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
|
||||
#############################################################################################
|
||||
|
||||
### uncomment/comment and change the following lines for other configuration options
|
||||
|
||||
#############################################################################################
|
||||
### enable parallel builds
|
||||
if (DEFINED MPI)
|
||||
# maximum parallel processor count for build and test ####
|
||||
set (MAX_PROC_COUNT 8)
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF")
|
||||
endif ()
|
||||
# maximum parallel processor count for build and test ####
|
||||
set (MAX_PROC_COUNT 8)
|
||||
endif()
|
||||
#############################################################################################
|
||||
### options to run test scripts in batch commands
|
||||
set (LOCAL_BATCH_SCRIPT_NAME "ctest.qsub")
|
||||
|
@ -13,19 +13,10 @@
|
||||
#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
|
||||
#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
|
||||
#############################################################################################
|
||||
|
||||
### uncomment/comment and change the following lines for other configuration options
|
||||
|
||||
#############################################################################################
|
||||
### enable parallel builds
|
||||
if (DEFINED MPI)
|
||||
# maximum parallel processor count for build and test ####
|
||||
set (MAX_PROC_COUNT 8)
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF")
|
||||
endif ()
|
||||
# maximum parallel processor count for build and test ####
|
||||
set (MAX_PROC_COUNT 8)
|
||||
endif()
|
||||
#############################################################################################
|
||||
### options to run test scripts in batch commands
|
||||
set (LOCAL_BATCH_SCRIPT_COMMAND "raybsub")
|
||||
|
@ -13,19 +13,10 @@
|
||||
#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
|
||||
#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
|
||||
#############################################################################################
|
||||
|
||||
### uncomment/comment and change the following lines for other configuration options
|
||||
|
||||
#############################################################################################
|
||||
### enable parallel builds
|
||||
if (DEFINED MPI)
|
||||
# maximum parallel processor count for build and test ####
|
||||
set (MAX_PROC_COUNT 8)
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF")
|
||||
endif ()
|
||||
# maximum parallel processor count for build and test ####
|
||||
set (MAX_PROC_COUNT 8)
|
||||
endif()
|
||||
#############################################################################################
|
||||
### options to run test scripts in batch commands
|
||||
if (DEFINED KNL)
|
||||
|
@ -13,7 +13,7 @@
|
||||
# This file provides functions for Fortran support.
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
ENABLE_LANGUAGE (Fortran)
|
||||
enable_language (Fortran)
|
||||
set (HDF_PREFIX "H5")
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
58
configure.ac
58
configure.ac
@ -942,6 +942,48 @@ fi
|
||||
|
||||
AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"])
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Check if they would like to disable building tests
|
||||
##
|
||||
|
||||
## This needs to be exposed for the library info file.
|
||||
AC_SUBST([HDF5_TESTS])
|
||||
|
||||
## Default is to build tests
|
||||
HDF5_TESTS=yes
|
||||
|
||||
AC_MSG_CHECKING([if building tests is disabled])
|
||||
|
||||
AC_ARG_ENABLE([tests],
|
||||
[AS_HELP_STRING([--enable-tests],
|
||||
[Compile the HDF5 tests [default=yes]])],
|
||||
[HDF5_TESTS=$enableval])
|
||||
|
||||
if test "X$HDF5_TESTS" = "Xno"; then
|
||||
echo "Building HDF5 tests is disabled"
|
||||
fi
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Check if they would like to disable building tools
|
||||
##
|
||||
|
||||
## This needs to be exposed for the library info file.
|
||||
AC_SUBST([HDF5_TOOLS])
|
||||
|
||||
## Default is to build tests and tools
|
||||
HDF5_TOOLS=yes
|
||||
|
||||
AC_MSG_CHECKING([if building tools is disabled])
|
||||
|
||||
AC_ARG_ENABLE([tools],
|
||||
[AS_HELP_STRING([--enable-tools],
|
||||
[Compile the HDF5 tools [default=yes]])],
|
||||
[HDF5_TOOLS=$enableval])
|
||||
|
||||
if test "X$HDF5_TOOLS" = "Xno"; then
|
||||
echo "Building HDF5 tools is disabled"
|
||||
fi
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Create libtool. If shared/static libraries are going to be enabled
|
||||
## or disabled, it should happen before these macros.
|
||||
@ -2511,8 +2553,10 @@ AC_SUBST([PARALLEL_FILTERED_WRITES])
|
||||
AC_SUBST([LARGE_PARALLEL_IO])
|
||||
|
||||
if test -n "$PARALLEL"; then
|
||||
## The 'testpar' directory should participate in the build
|
||||
TESTPARALLEL=testpar
|
||||
if test "X$HDF5_TESTS" = "Xyes"; then
|
||||
## The 'testpar' directory should participate in the build
|
||||
TESTPARALLEL=testpar
|
||||
fi
|
||||
|
||||
## We are building a parallel library
|
||||
AC_DEFINE([HAVE_PARALLEL], [1], [Define if we have parallel support])
|
||||
@ -3361,11 +3405,13 @@ LDFLAGS="$saved_user_LDFLAGS"
|
||||
## need to be compiled
|
||||
|
||||
AM_CONDITIONAL([BUILD_CXX_CONDITIONAL], [test "X$HDF_CXX" = "Xyes"])
|
||||
AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"])
|
||||
AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test "X$PARALLEL" = "Xyes"])
|
||||
AM_CONDITIONAL([BUILD_FORTRAN_CONDITIONAL], [test "X$HDF_FORTRAN" = "Xyes"])
|
||||
AM_CONDITIONAL([BUILD_JAVA_CONDITIONAL], [test "X$HDF_JAVA" = "Xyes"])
|
||||
AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"])
|
||||
|
||||
AM_CONDITIONAL([BUILD_TESTS_CONDITIONAL], [test "X$HDF5_TESTS" = "Xyes"])
|
||||
AM_CONDITIONAL([BUILD_TESTS_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"])
|
||||
AM_CONDITIONAL([BUILD_TOOLS_CONDITIONAL], [test "X$HDF5_TOOLS" = "Xyes"])
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Build the Makefiles.
|
||||
@ -3472,6 +3518,7 @@ AM_CONDITIONAL([HAVE_SHARED_CONDITIONAL], [test "X$enable_shared" = "Xyes"])
|
||||
AC_CONFIG_FILES([src/libhdf5.settings
|
||||
Makefile
|
||||
src/Makefile
|
||||
src/h5cc
|
||||
test/Makefile
|
||||
test/H5srcdir_str.h
|
||||
test/testabort_fail.sh
|
||||
@ -3500,7 +3547,6 @@ AC_CONFIG_FILES([src/libhdf5.settings
|
||||
tools/src/h5ls/Makefile
|
||||
tools/src/h5copy/Makefile
|
||||
tools/src/misc/Makefile
|
||||
tools/src/misc/h5cc
|
||||
tools/src/h5stat/Makefile
|
||||
tools/test/Makefile
|
||||
tools/test/h5dump/Makefile
|
||||
@ -3602,7 +3648,7 @@ AC_CONFIG_COMMANDS([.classes], [], [$MKDIR_P java/src/.classes;
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
chmod 755 tools/src/misc/h5cc
|
||||
chmod 755 src/h5cc
|
||||
if test "X$HDF_CXX" = "Xyes"; then
|
||||
chmod 755 c++/src/h5c++
|
||||
fi
|
||||
|
@ -22,14 +22,21 @@
|
||||
|
||||
include $(top_srcdir)/config/commence.am
|
||||
|
||||
if BUILD_PARALLEL_CONDITIONAL
|
||||
if BUILD_TESTS_PARALLEL_CONDITIONAL
|
||||
TESTPARALLEL_DIR=testpar
|
||||
else
|
||||
TESTPARALLEL_DIR=
|
||||
endif
|
||||
if BUILD_TESTS_CONDITIONAL
|
||||
TESTSERIAL_DIR=test
|
||||
else
|
||||
TESTSERIAL_DIR=
|
||||
endif
|
||||
|
||||
# Subdirectories in build order, not including examples directory
|
||||
## Only recurse into subdirectories if HDF5 is configured to use Fortran.
|
||||
if BUILD_FORTRAN_CONDITIONAL
|
||||
SUBDIRS=src test $(TESTPARALLEL_DIR)
|
||||
SUBDIRS=src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR)
|
||||
|
||||
# Test with just the native connector, with a single pass-through connector
|
||||
# and with a doubly-stacked pass-through.
|
||||
|
@ -217,6 +217,7 @@ set (f90_F_BASE_SOURCES
|
||||
${HDF5_F90_SRC_SOURCE_DIR}/H5Rff.F90
|
||||
${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.F90
|
||||
${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.F90
|
||||
${HDF5_F90_SRC_SOURCE_DIR}/H5VLff.F90
|
||||
${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.F90
|
||||
)
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
! COPYRIGHT
|
||||
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
! Copyright by The HDF Group. *
|
||||
! Copyright by the Board of Trustees of the University of Illinois. *S
|
||||
! Copyright by the Board of Trustees of the University of Illinois. *
|
||||
! All rights reserved. *
|
||||
! *
|
||||
! This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
@ -7929,7 +7929,7 @@ SUBROUTINE h5pget_virtual_filename_f(dcpl_id, index, name, hdferr, name_len)
|
||||
|
||||
INTERFACE
|
||||
INTEGER(SIZE_T) FUNCTION h5pget_virtual_filename(dcpl_id, index, name, size) BIND(C, NAME='H5Pget_virtual_filename')
|
||||
IMPORT :: HID_T, SIZE_T, C_PTR, C_CHAR
|
||||
IMPORT :: HID_T, SIZE_T, C_PTR
|
||||
IMPLICIT NONE
|
||||
INTEGER(HID_T) , INTENT(IN), VALUE :: dcpl_id
|
||||
INTEGER(SIZE_T), INTENT(IN), VALUE :: index
|
||||
@ -7997,7 +7997,7 @@ SUBROUTINE h5pget_virtual_dsetname_f(dcpl_id, index, name, hdferr, name_len)
|
||||
|
||||
INTERFACE
|
||||
INTEGER(SIZE_T) FUNCTION h5pget_virtual_dsetname(dcpl_id, index, name, size) BIND(C, NAME='H5Pget_virtual_dsetname')
|
||||
IMPORT :: HID_T, SIZE_T, C_PTR, C_CHAR
|
||||
IMPORT :: HID_T, SIZE_T, C_PTR
|
||||
IMPLICIT NONE
|
||||
INTEGER(HID_T) , INTENT(IN), VALUE :: dcpl_id
|
||||
INTEGER(SIZE_T), INTENT(IN), VALUE :: index
|
||||
@ -8018,7 +8018,6 @@ SUBROUTINE h5pget_virtual_dsetname_f(dcpl_id, index, name, hdferr, name_len)
|
||||
ELSE
|
||||
CALL HD5c2fstring(name,c_name,LEN(name))
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
END SUBROUTINE h5pget_virtual_dsetname_f
|
||||
@ -8115,5 +8114,97 @@ END SUBROUTINE h5pget_virtual_dsetname_f
|
||||
|
||||
END SUBROUTINE h5pset_dset_no_attrs_hint_f
|
||||
|
||||
!****s* H5P/H5Pset_vol_f
|
||||
!
|
||||
! NAME
|
||||
! H5Pset_vol_f
|
||||
!
|
||||
! PURPOSE
|
||||
! Set the file VOL connector (VOL_ID) for a file access
|
||||
! property list (PLIST_ID)
|
||||
! INPUTS
|
||||
! plist_id - access property list identifier.
|
||||
! new_vol_id - VOL connector id.
|
||||
!
|
||||
! OUTPUTS
|
||||
! hdferr - error code:
|
||||
! 0 on success and -1 on failure
|
||||
!
|
||||
! OPTIONAL
|
||||
! new_vol_info - VOL connector info.
|
||||
!
|
||||
! AUTHOR
|
||||
! M.S. Breitenfeld
|
||||
! May 2019
|
||||
!
|
||||
! Fortran Interface:
|
||||
SUBROUTINE h5pset_vol_f(plist_id, new_vol_id, hdferr, new_vol_info)
|
||||
IMPLICIT NONE
|
||||
INTEGER(HID_T) , INTENT(IN) :: plist_id
|
||||
INTEGER(HID_T) , INTENT(IN) :: new_vol_id
|
||||
INTEGER , INTENT(OUT) :: hdferr
|
||||
TYPE(C_PTR) , OPTIONAL :: new_vol_info
|
||||
!*****
|
||||
|
||||
TYPE(C_PTR) :: new_vol_info_default
|
||||
|
||||
INTERFACE
|
||||
INTEGER FUNCTION h5pset_vol(plist_id, new_vol_id, new_vol_info) BIND(C, NAME='H5Pset_vol')
|
||||
IMPORT :: HID_T, C_PTR
|
||||
IMPLICIT NONE
|
||||
INTEGER(HID_T), INTENT(IN), VALUE :: plist_id
|
||||
INTEGER(HID_T), INTENT(IN), VALUE :: new_vol_id
|
||||
TYPE(C_PTR) , INTENT(IN), VALUE :: new_vol_info
|
||||
END FUNCTION h5pset_vol
|
||||
END INTERFACE
|
||||
|
||||
new_vol_info_default = C_NULL_PTR
|
||||
IF(PRESENT(new_vol_info)) new_vol_info_default=new_vol_info
|
||||
|
||||
hdferr = INT(h5pset_vol(plist_id, new_vol_id, new_vol_info_default))
|
||||
|
||||
END SUBROUTINE h5pset_vol_f
|
||||
|
||||
!****s* H5P/H5Pget_vol_id_f
|
||||
!
|
||||
! NAME
|
||||
! H5Pget_vol_id_f
|
||||
!
|
||||
! PURPOSE
|
||||
! Get the file VOL connector (VOL_ID) for a file access
|
||||
! property list (PLIST_ID)
|
||||
! INPUTS
|
||||
! plist_id - access property list identifier.
|
||||
!
|
||||
! OUTPUTS
|
||||
! vol_id - VOL connector id.
|
||||
! hdferr - error code:
|
||||
! 0 on success and -1 on failure
|
||||
!
|
||||
! AUTHOR
|
||||
! M.S. Breitenfeld
|
||||
! May 2019
|
||||
!
|
||||
! Fortran Interface:
|
||||
SUBROUTINE h5pget_vol_id_f(plist_id, vol_id, hdferr)
|
||||
IMPLICIT NONE
|
||||
INTEGER(HID_T) , INTENT(IN) :: plist_id
|
||||
INTEGER(HID_T) , INTENT(OUT) :: vol_id
|
||||
INTEGER , INTENT(OUT) :: hdferr
|
||||
!*****
|
||||
|
||||
INTERFACE
|
||||
INTEGER FUNCTION h5pget_vol_id(plist_id, vol_id) BIND(C, NAME='H5Pget_vol_id')
|
||||
IMPORT :: HID_T, C_PTR
|
||||
IMPLICIT NONE
|
||||
INTEGER(HID_T), INTENT(IN), VALUE :: plist_id
|
||||
INTEGER(HID_T), INTENT(OUT) :: vol_id
|
||||
END FUNCTION h5pget_vol_id
|
||||
END INTERFACE
|
||||
|
||||
hdferr = INT(h5pget_vol_id(plist_id, vol_id))
|
||||
|
||||
END SUBROUTINE h5pget_vol_id_f
|
||||
|
||||
END MODULE H5P
|
||||
|
||||
|
316
fortran/src/H5VLff.F90
Normal file
316
fortran/src/H5VLff.F90
Normal file
@ -0,0 +1,316 @@
|
||||
!****h* ROBODoc/H5VL
|
||||
!
|
||||
! NAME
|
||||
! MODULE H5VL
|
||||
!
|
||||
! PURPOSE
|
||||
! This file contains Fortran interfaces for H5VL (VOL) functions.
|
||||
!
|
||||
! COPYRIGHT
|
||||
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
! Copyright by The HDF Group. *
|
||||
! Copyright by the Board of Trustees of the University of Illinois. *
|
||||
! All rights reserved. *
|
||||
! *
|
||||
! This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
! terms governing use, modification, and redistribution, is contained in *
|
||||
! the COPYING file, which can be found at the root of the source code *
|
||||
! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
|
||||
! If you do not have access to either file, you may request a copy from *
|
||||
! help@hdfgroup.org. *
|
||||
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
!
|
||||
! NOTES
|
||||
! _____ __ __ _____ ____ _____ _______ _ _ _______
|
||||
! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __|
|
||||
! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | ****
|
||||
! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | ****
|
||||
! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | ****
|
||||
! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_|
|
||||
!
|
||||
! If you add a new H5VL function you must add the function name to the
|
||||
! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
|
||||
! This is needed for Windows based operating systems.
|
||||
!
|
||||
!*****
|
||||
|
||||
MODULE H5VL
|
||||
|
||||
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_INT
|
||||
USE H5GLOBAL
|
||||
USE H5fortkit
|
||||
|
||||
IMPLICIT NONE
|
||||
|
||||
CONTAINS
|
||||
|
||||
! H5VLregister_connector
|
||||
|
||||
!
|
||||
!****s* H5VL/H5VLregister_connector_by_name_f
|
||||
!
|
||||
! NAME
|
||||
! H5VLregister_connector_by_name_f
|
||||
!
|
||||
! PURPOSE
|
||||
! Registers a new VOL connector as a member of the virtual object
|
||||
! layer class by name.
|
||||
!
|
||||
! INPUTS
|
||||
! name - Connector name
|
||||
! OUTPUTS
|
||||
! vol_id - VOL id
|
||||
! hdferr - Returns 0 if successful and -1 if fails
|
||||
! SOURCE
|
||||
|
||||
SUBROUTINE H5VLregister_connector_by_name_f(name, vol_id, hdferr, vipl_id)
|
||||
IMPLICIT NONE
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name
|
||||
INTEGER(HID_T), INTENT(OUT) :: vol_id
|
||||
INTEGER, INTENT(OUT) :: hdferr
|
||||
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: vipl_id
|
||||
!*****
|
||||
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
|
||||
INTEGER(HID_T) :: vipl_id_default
|
||||
|
||||
INTERFACE
|
||||
INTEGER(HID_T) FUNCTION H5VLregister_connector_by_name(name, vipl_id) &
|
||||
BIND(C,NAME='H5VLregister_connector_by_name')
|
||||
IMPORT :: C_CHAR
|
||||
IMPORT :: HID_T
|
||||
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
|
||||
INTEGER(HID_T), INTENT(IN), VALUE :: vipl_id
|
||||
END FUNCTION H5VLregister_connector_by_name
|
||||
END INTERFACE
|
||||
|
||||
vipl_id_default = H5P_DEFAULT_F
|
||||
IF(PRESENT(vipl_id)) vipl_id_default = vipl_id
|
||||
|
||||
c_name = TRIM(name)//C_NULL_CHAR
|
||||
vol_id = H5VLregister_connector_by_name(c_name, vipl_id_default)
|
||||
|
||||
hdferr = 0
|
||||
IF(vol_id.LT.0) hdferr = H5I_INVALID_HID_F
|
||||
|
||||
END SUBROUTINE H5VLregister_connector_by_name_f
|
||||
|
||||
SUBROUTINE H5VLregister_connector_by_value_f(connector_value, vol_id, hdferr, vipl_id)
|
||||
IMPLICIT NONE
|
||||
INTEGER, INTENT(IN) :: connector_value
|
||||
INTEGER(HID_T), INTENT(OUT) :: vol_id
|
||||
INTEGER, INTENT(OUT) :: hdferr
|
||||
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: vipl_id
|
||||
!*****
|
||||
INTEGER(HID_T) :: vipl_id_default
|
||||
|
||||
INTERFACE
|
||||
INTEGER(HID_T) FUNCTION H5VLregister_connector_by_value(connector_value, vipl_id) &
|
||||
BIND(C,NAME='H5VLregister_connector_by_value')
|
||||
IMPORT :: HID_T
|
||||
IMPORT :: C_INT
|
||||
INTEGER(C_INT), VALUE :: connector_value
|
||||
INTEGER(HID_T), INTENT(IN), VALUE :: vipl_id
|
||||
END FUNCTION H5VLregister_connector_by_value
|
||||
END INTERFACE
|
||||
|
||||
vipl_id_default = H5P_DEFAULT_F
|
||||
IF(PRESENT(vipl_id)) vipl_id_default = vipl_id
|
||||
|
||||
vol_id = H5VLregister_connector_by_value(INT(connector_value,C_INT), vipl_id_default)
|
||||
|
||||
hdferr = 0
|
||||
IF(vol_id.LT.0) hdferr = H5I_INVALID_HID_F
|
||||
|
||||
END SUBROUTINE H5VLregister_connector_by_value_f
|
||||
|
||||
!
|
||||
!****s* H5VL/H5VLis_connector_registered_f
|
||||
!
|
||||
! NAME
|
||||
! H5VLis_connector_registered_f
|
||||
!
|
||||
! PURPOSE
|
||||
! Tests whether a VOL class has been registered or not.
|
||||
!
|
||||
! INPUTS
|
||||
! name - Connector name
|
||||
! OUTPUTS
|
||||
! registered - state of VOL class registration
|
||||
! hdferr - Returns 0 if successful and -1 if fails
|
||||
! SOURCE
|
||||
|
||||
SUBROUTINE H5VLis_connector_registered_f(name, registered, hdferr)
|
||||
IMPLICIT NONE
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name
|
||||
LOGICAL, INTENT(OUT) :: registered
|
||||
INTEGER, INTENT(OUT) :: hdferr
|
||||
!*****
|
||||
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
|
||||
INTEGER(C_INT) :: registered_c
|
||||
|
||||
INTERFACE
|
||||
INTEGER(C_INT) FUNCTION H5VLis_connector_registered(name) BIND(C,NAME='H5VLis_connector_registered')
|
||||
IMPORT :: C_CHAR
|
||||
IMPORT :: C_INT
|
||||
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
|
||||
END FUNCTION H5VLis_connector_registered
|
||||
END INTERFACE
|
||||
|
||||
c_name = TRIM(name)//C_NULL_CHAR
|
||||
registered_c = H5VLis_connector_registered(c_name)
|
||||
|
||||
hdferr = 0
|
||||
registered = .FALSE.
|
||||
IF(registered_c .GT. 0) registered = .TRUE.
|
||||
IF(registered_c .LT. 0) hdferr = INT(registered_c)
|
||||
|
||||
END SUBROUTINE H5VLis_connector_registered_f
|
||||
|
||||
!
|
||||
!****s* H5VL/H5VLis_connector_registered_f
|
||||
!
|
||||
! NAME
|
||||
! H5VLis_connector_registered_f
|
||||
!
|
||||
! PURPOSE
|
||||
! Retrieves the ID for a registered VOL connector.
|
||||
!
|
||||
! INPUTS
|
||||
! name - Connector name
|
||||
! OUTPUTS
|
||||
! vol_id - Connector id
|
||||
! hdferr - Returns 0 if successful and -1 if fails
|
||||
! SOURCE
|
||||
|
||||
SUBROUTINE H5VLget_connector_id_f(name, vol_id, hdferr)
|
||||
IMPLICIT NONE
|
||||
CHARACTER(LEN=*), INTENT(IN) :: name
|
||||
INTEGER(HID_T), INTENT(OUT) :: vol_id
|
||||
INTEGER, INTENT(OUT) :: hdferr
|
||||
!*****
|
||||
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
|
||||
|
||||
INTERFACE
|
||||
INTEGER(HID_T) FUNCTION H5VLget_connector_id(name) BIND(C,NAME='H5VLget_connector_id')
|
||||
IMPORT :: C_CHAR
|
||||
IMPORT :: HID_T
|
||||
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
|
||||
END FUNCTION H5VLget_connector_id
|
||||
END INTERFACE
|
||||
|
||||
c_name = TRIM(name)//C_NULL_CHAR
|
||||
vol_id = H5VLget_connector_id(c_name)
|
||||
|
||||
IF(vol_id.LT.0)THEN
|
||||
hdferr = -1
|
||||
vol_id = H5I_INVALID_HID_F
|
||||
ENDIF
|
||||
|
||||
END SUBROUTINE H5VLget_connector_id_f
|
||||
|
||||
SUBROUTINE H5VLget_connector_name_f(obj_id, name, hdferr, name_len)
|
||||
IMPLICIT NONE
|
||||
INTEGER(HID_T), INTENT(IN) :: obj_id
|
||||
CHARACTER(LEN=*), INTENT(OUT) :: name
|
||||
INTEGER, INTENT(OUT) :: hdferr
|
||||
INTEGER(SIZE_T), OPTIONAL :: name_len
|
||||
!*****
|
||||
CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:LEN(name)+1), TARGET :: c_name
|
||||
INTEGER(SIZE_T) :: l
|
||||
TYPE(C_PTR) :: f_ptr
|
||||
|
||||
INTERFACE
|
||||
INTEGER(SIZE_T) FUNCTION H5VLget_connector_name(obj_id, name, size) BIND(C,NAME='H5VLget_connector_name')
|
||||
IMPORT :: HID_T, SIZE_T, C_PTR, C_CHAR
|
||||
IMPLICIT NONE
|
||||
INTEGER(HID_T) , INTENT(IN), VALUE :: obj_id
|
||||
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name
|
||||
! TYPE(C_PTR), value :: name
|
||||
INTEGER(SIZE_T), INTENT(IN), VALUE :: size
|
||||
END FUNCTION H5VLget_connector_name
|
||||
END INTERFACE
|
||||
|
||||
hdferr = 0
|
||||
IF(PRESENT(name_len))THEN
|
||||
c_name(1:1)(1:1) = C_NULL_CHAR
|
||||
name_len = INT(H5VLget_connector_name(obj_id, c_name, 1_SIZE_T), SIZE_T)
|
||||
IF(name_len.LT.0) hdferr = H5I_INVALID_HID_F
|
||||
ELSE
|
||||
l = INT(LEN(name)+1,SIZE_T)
|
||||
IF(INT(H5VLget_connector_name(obj_id, c_name, l), SIZE_T).LT.0)THEN
|
||||
hdferr = H5I_INVALID_HID_F
|
||||
ELSE
|
||||
CALL HD5c2fstring(name,c_name,LEN(name))
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
END SUBROUTINE H5VLget_connector_name_f
|
||||
|
||||
!
|
||||
!
|
||||
!****s* H5VL/H5VLclose_f
|
||||
!
|
||||
! NAME
|
||||
! H5VLclose_f
|
||||
!
|
||||
! PURPOSE
|
||||
! Closes a VOL connector ID.
|
||||
!
|
||||
! INPUTS
|
||||
! vol_id - A valid identifier of the connectory to unregister.
|
||||
!
|
||||
! OUTPUTS
|
||||
! hdferr - Returns 0 if successful and -1 if fails
|
||||
! SOURCE
|
||||
|
||||
SUBROUTINE H5VLclose_f(vol_id, hdferr)
|
||||
IMPLICIT NONE
|
||||
INTEGER(HID_T), INTENT(IN) :: vol_id
|
||||
INTEGER, INTENT(OUT) :: hdferr
|
||||
!*****
|
||||
|
||||
INTERFACE
|
||||
INTEGER FUNCTION H5VLclose(vol_id) BIND(C, NAME='H5VLclose')
|
||||
IMPORT :: HID_T
|
||||
INTEGER(HID_T), INTENT(IN), VALUE :: vol_id
|
||||
END FUNCTION H5VLclose
|
||||
END INTERFACE
|
||||
|
||||
hdferr = INT(H5VLclose(vol_id))
|
||||
|
||||
END SUBROUTINE H5VLclose_f
|
||||
|
||||
!
|
||||
!****s* H5VL/H5VLunregister_connector_f
|
||||
!
|
||||
! NAME
|
||||
! H5VLunregister_connector_f
|
||||
!
|
||||
! PURPOSE
|
||||
! Removes a VOL connector ID from the library.
|
||||
!
|
||||
! INPUTS
|
||||
! plugin_id - A valid identifier of the connector to unregister.
|
||||
!
|
||||
! OUTPUTS
|
||||
! hdferr - Returns 0 if successful and -1 if fails
|
||||
! SOURCE
|
||||
|
||||
SUBROUTINE H5VLunregister_connector_f(plugin_id, hdferr)
|
||||
IMPLICIT NONE
|
||||
INTEGER(HID_T), INTENT(IN) :: plugin_id
|
||||
INTEGER, INTENT(OUT) :: hdferr
|
||||
!*****
|
||||
|
||||
INTERFACE
|
||||
INTEGER FUNCTION H5VLunregister_connector(plugin_id) BIND(C, NAME='H5VLunregister_connector')
|
||||
IMPORT :: HID_T
|
||||
INTEGER(HID_T), INTENT(IN), VALUE :: plugin_id
|
||||
END FUNCTION H5VLunregister_connector
|
||||
END INTERFACE
|
||||
|
||||
hdferr = INT(H5VLunregister_connector(plugin_id))
|
||||
|
||||
END SUBROUTINE H5VLunregister_connector_f
|
||||
|
||||
END MODULE H5VL
|
@ -498,6 +498,16 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
|
||||
h5i_flags[4] = (int_f)H5I_DATASET;
|
||||
h5i_flags[5] = (int_f)H5I_ATTR;
|
||||
h5i_flags[6] = (int_f)H5I_BADID;
|
||||
h5i_flags[7] = (int_f)H5I_UNINIT;
|
||||
h5i_flags[8] = (int_f)H5I_VFL;
|
||||
h5i_flags[9] = (int_f)H5I_VOL;
|
||||
h5i_flags[10] = (int_f)H5I_GENPROP_CLS;
|
||||
h5i_flags[11] = (int_f)H5I_GENPROP_LST;
|
||||
h5i_flags[12] = (int_f)H5I_ERROR_CLASS;
|
||||
h5i_flags[13] = (int_f)H5I_ERROR_MSG;
|
||||
h5i_flags[14] = (int_f)H5I_ERROR_STACK;
|
||||
h5i_flags[15] = (int_f)H5I_NTYPES;
|
||||
h5i_flags[16] = (int_f)H5I_INVALID_HID;
|
||||
/*
|
||||
* H5L flags
|
||||
*/
|
||||
@ -632,7 +642,6 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
|
||||
h5s_flags[15] = (int_f)H5S_SEL_POINTS;
|
||||
h5s_flags[16] = (int_f)H5S_SEL_HYPERSLABS;
|
||||
h5s_flags[17] = (int_f)H5S_SEL_ALL;
|
||||
|
||||
/*
|
||||
* H5T flags
|
||||
*/
|
||||
@ -671,7 +680,6 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
|
||||
h5t_flags[32] = (int_f)H5T_ARRAY;
|
||||
h5t_flags[33] = (int_f)H5T_DIR_ASCEND;
|
||||
h5t_flags[34] = (int_f)H5T_DIR_DESCEND;
|
||||
|
||||
/*
|
||||
* H5Z flags
|
||||
*/
|
||||
@ -695,10 +703,6 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
|
||||
h5z_flags[17] = (int_f)H5Z_SO_FLOAT_ESCALE;
|
||||
h5z_flags[18] = (int_f)H5Z_SO_INT;
|
||||
h5z_flags[19] = (int_f)H5Z_SO_INT_MINBITS_DEFAULT;
|
||||
/*
|
||||
* H5A flags
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* H5 Generic flags introduced in version 1.8
|
||||
|
@ -88,7 +88,7 @@ MODULE H5LIB
|
||||
!
|
||||
! H5I flags declaration
|
||||
!
|
||||
INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7
|
||||
INTEGER, PARAMETER :: H5I_FLAGS_LEN = 17
|
||||
INTEGER, DIMENSION(1:H5I_FLAGS_LEN) :: H5I_flags
|
||||
!
|
||||
! H5L flags declaration
|
||||
@ -129,6 +129,7 @@ MODULE H5LIB
|
||||
!
|
||||
INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35
|
||||
INTEGER, DIMENSION(1:H5T_FLAGS_LEN) :: H5T_flags
|
||||
|
||||
!
|
||||
! H5Z flags declaration
|
||||
!
|
||||
@ -443,13 +444,23 @@ CONTAINS
|
||||
!
|
||||
! H5I flags declaration
|
||||
!
|
||||
H5I_FILE_F = H5I_flags(1)
|
||||
H5I_GROUP_F = H5I_flags(2)
|
||||
H5I_DATATYPE_F = H5I_flags(3)
|
||||
H5I_DATASPACE_F = H5I_flags(4)
|
||||
H5I_DATASET_F = H5I_flags(5)
|
||||
H5I_ATTR_F = H5I_flags(6)
|
||||
H5I_BADID_F = H5I_flags(7)
|
||||
H5I_FILE_F = H5I_flags(1)
|
||||
H5I_GROUP_F = H5I_flags(2)
|
||||
H5I_DATATYPE_F = H5I_flags(3)
|
||||
H5I_DATASPACE_F = H5I_flags(4)
|
||||
H5I_DATASET_F = H5I_flags(5)
|
||||
H5I_ATTR_F = H5I_flags(6)
|
||||
H5I_BADID_F = H5I_flags(7)
|
||||
H5I_UNINIT_F = H5I_flags(8)
|
||||
H5I_VFL_F = H5I_flags(9)
|
||||
H5I_VOL_F = H5I_flags(10)
|
||||
H5I_GENPROP_CLS_F = H5I_flags(11)
|
||||
H5I_GENPROP_LST_F = H5I_flags(12)
|
||||
H5I_ERROR_CLASS_F = H5I_flags(13)
|
||||
H5I_ERROR_MSG_F = H5I_flags(14)
|
||||
H5I_ERROR_STACK_F = H5I_flags(15)
|
||||
H5I_NTYPES_F = H5I_flags(16)
|
||||
H5I_INVALID_HID_F = H5I_flags(17)
|
||||
!
|
||||
! H5L flags
|
||||
!
|
||||
|
@ -435,15 +435,36 @@ MODULE H5GLOBAL
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_DATASET_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_ATTR_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_BADID_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_UNINIT_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_VFL_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_VOL_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_GENPROP_CLS_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_GENPROP_LST_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_ERROR_CLASS_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_ERROR_MSG_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_ERROR_STACK_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_NTYPES_F
|
||||
!DEC$ATTRIBUTES DLLEXPORT :: H5I_INVALID_HID_F
|
||||
!DEC$endif
|
||||
|
||||
INTEGER :: H5I_FILE_F
|
||||
INTEGER :: H5I_GROUP_F
|
||||
INTEGER :: H5I_DATATYPE_F
|
||||
INTEGER :: H5I_DATASPACE_F
|
||||
INTEGER :: H5I_DATASET_F
|
||||
INTEGER :: H5I_ATTR_F
|
||||
INTEGER :: H5I_BADID_F
|
||||
INTEGER :: H5I_FILE_F
|
||||
INTEGER :: H5I_GROUP_F
|
||||
INTEGER :: H5I_DATATYPE_F
|
||||
INTEGER :: H5I_DATASPACE_F
|
||||
INTEGER :: H5I_DATASET_F
|
||||
INTEGER :: H5I_ATTR_F
|
||||
INTEGER :: H5I_BADID_F
|
||||
INTEGER :: H5I_UNINIT_F
|
||||
INTEGER :: H5I_VFL_F
|
||||
INTEGER :: H5I_VOL_F
|
||||
INTEGER :: H5I_GENPROP_CLS_F
|
||||
INTEGER :: H5I_GENPROP_LST_F
|
||||
INTEGER :: H5I_ERROR_CLASS_F
|
||||
INTEGER :: H5I_ERROR_MSG_F
|
||||
INTEGER :: H5I_ERROR_STACK_F
|
||||
INTEGER :: H5I_NTYPES_F
|
||||
INTEGER :: H5I_INVALID_HID_F
|
||||
|
||||
!
|
||||
! H5L flags declaration
|
||||
!
|
||||
|
@ -38,6 +38,7 @@ MODULE HDF5
|
||||
USE H5O
|
||||
USE H5P
|
||||
USE H5R
|
||||
USE H5VL
|
||||
USE H5Z
|
||||
USE H5_gen
|
||||
USE H5LIB
|
||||
|
@ -44,7 +44,7 @@ endif
|
||||
libhdf5_fortran_la_SOURCES=H5f90global.F90 \
|
||||
H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \
|
||||
H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \
|
||||
H5Tff.F90 H5Zff.F90 H5_gen.F90 H5fortkit.F90 \
|
||||
H5Tff.F90 H5VLff.F90 H5Zff.F90 H5_gen.F90 H5fortkit.F90 \
|
||||
H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \
|
||||
H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.F90
|
||||
|
||||
@ -155,6 +155,7 @@ H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo H5fortkit.lo
|
||||
H5Rff.lo: $(srcdir)/H5Rff.F90 H5f90global.lo
|
||||
H5Sff.lo: $(srcdir)/H5Sff.F90 H5f90global.lo
|
||||
H5Tff.lo: $(srcdir)/H5Tff.F90 H5f90global.lo
|
||||
H5VLff.lo: $(srcdir)/H5VLff.F90 H5f90global.lo
|
||||
H5Zff.lo: $(srcdir)/H5Zff.F90 H5f90global.lo
|
||||
H5_gen.lo: H5_gen.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo
|
||||
HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \
|
||||
|
@ -335,6 +335,8 @@ H5P_mp_H5PGET_VIRTUAL_FILENAME_F
|
||||
H5P_mp_H5PGET_VIRTUAL_DSETNAME_F
|
||||
H5P_mp_H5PGET_DSET_NO_ATTRS_HINT_F
|
||||
H5P_mp_H5PSET_DSET_NO_ATTRS_HINT_F
|
||||
H5P_mp_H5PSET_VOL_F
|
||||
H5P_mp_H5PGET_VOL_ID_F
|
||||
; Parallel
|
||||
@H5_NOPAREXP@H5P_mp_H5PSET_FAPL_MPIO_F
|
||||
@H5_NOPAREXP@H5P_mp_H5PGET_FAPL_MPIO_F
|
||||
@ -452,6 +454,14 @@ H5T_mp_H5TGET_NATIVE_TYPE_F
|
||||
H5T_mp_H5TCONVERT_F
|
||||
H5T_mp_H5TENUM_INSERT_F90
|
||||
H5T_mp_H5TENUM_INSERT_F03
|
||||
; H5VL
|
||||
H5VL_mp_H5VLREGISTER_CONNECTOR_BY_NAME_F
|
||||
H5VL_mp_H5VLREGISTER_CONNECTOR_BY_VALUE_F
|
||||
H5VL_mp_H5VLIS_CONNECTOR_REGISTERED_F
|
||||
H5VL_mp_H5VLGET_CONNECTOR_ID_F
|
||||
H5VL_mp_H5VLGET_CONNECTOR_NAME_F
|
||||
H5VL_mp_H5VLCLOSE_F
|
||||
H5VL_mp_H5VLUNREGISTER_CONNECTOR_F
|
||||
; H5Z
|
||||
H5Z_mp_H5ZUNREGISTER_F
|
||||
H5Z_mp_H5ZFILTER_AVAIL_F
|
||||
|
@ -569,4 +569,68 @@ if (BUILD_SHARED_LIBS)
|
||||
add_dependencies (fflush2-shared ${HDF5_F90_TEST_LIBSH_TARGET})
|
||||
endif ()
|
||||
|
||||
#-- Adding test for vol_connector
|
||||
add_executable (vol_connector
|
||||
vol_connector.F90)
|
||||
|
||||
target_include_directories (vol_connector
|
||||
PRIVATE
|
||||
${CMAKE_Fortran_MODULE_DIRECTORY}/static
|
||||
)
|
||||
target_compile_options(vol_connector
|
||||
PRIVATE
|
||||
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
|
||||
)
|
||||
target_link_libraries (vol_connector
|
||||
PRIVATE
|
||||
${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
|
||||
)
|
||||
#set_property(TARGET vol_connector APPEND PROPERTY
|
||||
# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
|
||||
#)
|
||||
#set_property(TARGET vol_connector APPEND PROPERTY
|
||||
# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
|
||||
#)
|
||||
if(MSVC)
|
||||
set_property(TARGET vol_connector PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
|
||||
endif()
|
||||
set_target_properties (vol_connector PROPERTIES
|
||||
LINKER_LANGUAGE Fortran
|
||||
FOLDER test/fortran
|
||||
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
|
||||
)
|
||||
add_dependencies (vol_connector ${HDF5_F90_TEST_LIB_TARGET})
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_executable (vol_connector-shared
|
||||
vol_connector.F90)
|
||||
target_include_directories (vol_connector-shared
|
||||
PRIVATE
|
||||
${CMAKE_Fortran_MODULE_DIRECTORY}/shared
|
||||
)
|
||||
target_compile_options(vol_connector-shared
|
||||
PRIVATE
|
||||
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
|
||||
)
|
||||
target_link_libraries (vol_connector-shared
|
||||
PRIVATE
|
||||
${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
|
||||
)
|
||||
# set_property(TARGET vol_connector-shared APPEND PROPERTY
|
||||
# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
|
||||
# )
|
||||
# set_property(TARGET vol_connector-shared APPEND PROPERTY
|
||||
# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
|
||||
# )
|
||||
if(MSVC)
|
||||
set_property(TARGET vol_connector-shared PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
|
||||
endif()
|
||||
set_target_properties (vol_connector-shared PROPERTIES
|
||||
LINKER_LANGUAGE Fortran
|
||||
FOLDER test/fortran
|
||||
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
|
||||
)
|
||||
add_dependencies (vol_connector-shared ${HDF5_F90_TEST_LIBSH_TARGET})
|
||||
endif ()
|
||||
|
||||
include (CMakeTests.cmake)
|
||||
|
@ -130,6 +130,26 @@ set_tests_properties (FORTRAN_fflush1 PROPERTIES DEPENDS FORTRAN_testhdf5-clear-
|
||||
add_test (NAME FORTRAN_fflush2 COMMAND $<TARGET_FILE:fflush2>)
|
||||
set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1)
|
||||
|
||||
#-- Adding test for vol_connector
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME FORTRAN_vol_connector COMMAND $<TARGET_FILE:vol_connector>)
|
||||
else ()
|
||||
add_test (NAME FORTRAN_vol_connector COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:vol_connector>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_EXPECT=0"
|
||||
-D "TEST_SKIP_COMPARE=TRUE"
|
||||
-D "TEST_REGEX= 0 error.s."
|
||||
-D "TEST_MATCH= 0 error(s)"
|
||||
-D "TEST_OUTPUT=vol_connector.txt"
|
||||
#-D "TEST_REFERENCE=vol_connector.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
|
||||
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
|
||||
)
|
||||
endif ()
|
||||
# set_tests_properties (FORTRAN_vol_connector PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
|
||||
set_tests_properties (FORTRAN_vol_connector PROPERTIES DEPENDS FORTRAN_testhdf5-clear-objects)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (
|
||||
NAME FORTRAN_testhdf5-shared-clear-objects
|
||||
@ -211,6 +231,7 @@ if (BUILD_SHARED_LIBS)
|
||||
endif ()
|
||||
# set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
|
||||
set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8)
|
||||
|
||||
|
||||
#-- Adding test for fortranlib_test_F03
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
@ -232,6 +253,26 @@ if (BUILD_SHARED_LIBS)
|
||||
# set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
|
||||
set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES DEPENDS FORTRAN_fortranlib_test_F03)
|
||||
|
||||
#-- Adding test for vol_connector
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME FORTRAN_vol_connector-shared COMMAND $<TARGET_FILE:vol_connector-shared>)
|
||||
else ()
|
||||
add_test (NAME FORTRAN_vol_connector-shared COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:vol_connector-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_EXPECT=0"
|
||||
-D "TEST_SKIP_COMPARE=TRUE"
|
||||
-D "TEST_REGEX= 0 error.s."
|
||||
-D "TEST_MATCH= 0 error(s)"
|
||||
-D "TEST_OUTPUT=vol_connector.txt"
|
||||
#-D "TEST_REFERENCE=vol_connector.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/fshared"
|
||||
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
|
||||
)
|
||||
endif ()
|
||||
# set_tests_properties (FORTRAN_vol_connector-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
|
||||
set_tests_properties (FORTRAN_vol_connector-shared PROPERTIES DEPENDS FORTRAN_vol_connector)
|
||||
|
||||
#-- Adding test for fflush1
|
||||
add_test (NAME FORTRAN_fflush1-shared COMMAND $<TARGET_FILE:fflush1-shared>)
|
||||
set_tests_properties (FORTRAN_fflush1-shared PROPERTIES DEPENDS FORTRAN_fflush2)
|
||||
@ -239,4 +280,5 @@ if (BUILD_SHARED_LIBS)
|
||||
#-- Adding test for fflush2
|
||||
add_test (NAME FORTRAN_fflush2-shared COMMAND $<TARGET_FILE:fflush2-shared>)
|
||||
set_tests_properties (FORTRAN_fflush2-shared PROPERTIES DEPENDS FORTRAN_fflush1-shared)
|
||||
|
||||
endif ()
|
||||
|
@ -35,7 +35,7 @@ else
|
||||
endif
|
||||
|
||||
# Our main targets, the tests themselves
|
||||
TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03
|
||||
TEST_PROG=fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 vol_connector
|
||||
|
||||
check_PROGRAMS=$(TEST_PROG)
|
||||
|
||||
@ -50,6 +50,7 @@ fortranlib_test_1_8_SOURCES = tH5O.F90 tH5A_1_8.F90 tH5G_1_8.F90 tH5MISC_1_8.F90
|
||||
fortranlib_test_F03_SOURCES = tH5E_F03.F90 tH5F_F03.F90 tH5L_F03.F90 \
|
||||
tH5O_F03.F90 tH5P_F03.F90 tH5T_F03.F90 tHDF5_F03.F90 fortranlib_test_F03.F90
|
||||
|
||||
vol_connector_SOURCES=tf_gen.F90 tf.F90 vol_connector.F90
|
||||
|
||||
fflush1_SOURCES=fflush1.F90
|
||||
fflush2_SOURCES=fflush2.F90
|
||||
|
282
fortran/test/vol_connector.F90
Normal file
282
fortran/test/vol_connector.F90
Normal file
@ -0,0 +1,282 @@
|
||||
!****h* root/fortran/test/vol_connector.F90
|
||||
!
|
||||
! NAME
|
||||
! vol_connector.F90
|
||||
!
|
||||
! FUNCTION
|
||||
!
|
||||
! Tests basic Fortran VOL plugin operations (registration, etc.).
|
||||
! Uses the null VOL connector (built with the testing code)
|
||||
! which is loaded as a dynamic plugin.
|
||||
!
|
||||
! COPYRIGHT
|
||||
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
! Copyright by The HDF Group. *
|
||||
! Copyright by the Board of Trustees of the University of Illinois. *
|
||||
! All rights reserved. *
|
||||
! *
|
||||
! This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
! terms governing use, modification, and redistribution, is contained in *
|
||||
! the COPYING file, which can be found at the root of the source code *
|
||||
! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
|
||||
! If you do not have access to either file, you may request a copy from *
|
||||
! help@hdfgroup.org. *
|
||||
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
!
|
||||
!*****
|
||||
|
||||
MODULE VOL_TMOD
|
||||
|
||||
USE HDF5
|
||||
USE TH5_MISC
|
||||
USE TH5_MISC_GEN
|
||||
IMPLICIT NONE
|
||||
|
||||
INTEGER, PARAMETER :: NATIVE_VOL_CONNECTOR_VALUE = 0
|
||||
CHARACTER(LEN=6), PARAMETER :: NATIVE_VOL_CONNECTOR_NAME = "native"
|
||||
|
||||
CONTAINS
|
||||
|
||||
!-------------------------------------------------------------------------
|
||||
! Function: test_registration_by_name()
|
||||
!
|
||||
! Purpose: Tests if we can load, register, and close a VOL
|
||||
! connector by name.
|
||||
!
|
||||
!-------------------------------------------------------------------------
|
||||
!
|
||||
|
||||
SUBROUTINE test_registration_by_name(total_error)
|
||||
|
||||
IMPLICIT NONE
|
||||
|
||||
INTEGER, INTENT(INOUT) :: total_error
|
||||
INTEGER :: error = 0
|
||||
|
||||
LOGICAL :: is_registered = .FALSE.
|
||||
INTEGER(hid_t) :: vol_id = 0, vol_id_out = 1
|
||||
CHARACTER(LEN=64) :: name
|
||||
CHARACTER(LEN=1) :: name_null
|
||||
CHARACTER(LEN=6) :: name_exact
|
||||
INTEGER(SIZE_T) :: name_len
|
||||
INTEGER(hid_t) :: file_id
|
||||
|
||||
! The null VOL connector should not be registered at the start of the test
|
||||
CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
|
||||
CALL check("H5VLis_connector_registered_f",error,total_error)
|
||||
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
|
||||
|
||||
! Register the connector by name
|
||||
CALL H5VLregister_connector_by_name_f(NATIVE_VOL_CONNECTOR_NAME, vol_id, error)
|
||||
CALL check("H5VLregister_connector_by_name_f",error,total_error)
|
||||
|
||||
! The connector should be registered now
|
||||
CALL H5VLis_connector_registered_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error)
|
||||
CALL check("H5VLis_connector_registered_f",error,total_error)
|
||||
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error)
|
||||
|
||||
CALL H5VLget_connector_id_f(NATIVE_VOL_CONNECTOR_NAME, vol_id_out, error)
|
||||
CALL check("H5VLget_connector_id_f",error,total_error)
|
||||
|
||||
CALL H5Fcreate_f("voltest.h5",H5F_ACC_TRUNC_F, file_id, error)
|
||||
CALL check("H5F_create_f",error,total_error)
|
||||
|
||||
CALL H5VLget_connector_name_f(file_id, name, error, name_len)
|
||||
CALL check("H5VLget_connector_name_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_name_f", INT(name_len), LEN_TRIM(NATIVE_VOL_CONNECTOR_NAME), total_error)
|
||||
|
||||
CALL H5VLget_connector_name_f(file_id, name, error)
|
||||
CALL check("H5VLget_connector_name_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_name_f", name, NATIVE_VOL_CONNECTOR_NAME, total_error)
|
||||
|
||||
CALL H5VLget_connector_name_f(file_id, name_null, error, name_len)
|
||||
CALL check("H5VLget_connector_name_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_name_f", INT(name_len), LEN_TRIM(NATIVE_VOL_CONNECTOR_NAME), total_error)
|
||||
|
||||
CALL H5VLget_connector_name_f(file_id, name_null, error)
|
||||
CALL check("H5VLget_connector_name_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_name_f", name_null, NATIVE_VOL_CONNECTOR_NAME(1:1), total_error)
|
||||
|
||||
CALL H5VLget_connector_name_f(file_id, name_exact, error, name_len)
|
||||
CALL check("H5VLget_connector_name_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_name_f", INT(name_len), LEN_TRIM(NATIVE_VOL_CONNECTOR_NAME), total_error)
|
||||
|
||||
CALL H5VLget_connector_name_f(file_id, name_exact, error)
|
||||
CALL check("H5VLget_connector_name_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_name_f", name_exact, NATIVE_VOL_CONNECTOR_NAME, total_error)
|
||||
|
||||
CALL H5Fclose_f(file_id, error)
|
||||
CALL check("H5Fclose_f",error,total_error)
|
||||
|
||||
CALL H5VLclose_f(vol_id_out, error)
|
||||
CALL check("H5VLclose_f",error, total_error)
|
||||
|
||||
END SUBROUTINE test_registration_by_name
|
||||
|
||||
!-------------------------------------------------------------------------
|
||||
! Function: test_registration_by_value()
|
||||
!
|
||||
! Purpose: Tests if we can load, register, and close a VOL
|
||||
! connector by value.
|
||||
!
|
||||
!-------------------------------------------------------------------------
|
||||
|
||||
SUBROUTINE test_registration_by_value(total_error)
|
||||
|
||||
IMPLICIT NONE
|
||||
|
||||
INTEGER, INTENT(INOUT) :: total_error
|
||||
INTEGER :: error = 0
|
||||
|
||||
LOGICAL :: is_registered = .FALSE.
|
||||
INTEGER(hid_t) :: vol_id = 0
|
||||
|
||||
|
||||
! The null VOL connector should not be registered at the start of the test
|
||||
CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
|
||||
CALL check("H5VLis_connector_registered_f",error,total_error)
|
||||
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
|
||||
|
||||
! Register the connector by value
|
||||
CALL H5VLregister_connector_by_value_f(NATIVE_VOL_CONNECTOR_VALUE, vol_id, error)
|
||||
CALL check("H5VLregister_connector_by_value_f", error, total_error)
|
||||
|
||||
! The connector should be registered now
|
||||
CALL H5VLis_connector_registered_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error)
|
||||
CALL check("H5VLis_connector_registered_f",error,total_error)
|
||||
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error)
|
||||
|
||||
END SUBROUTINE test_registration_by_value
|
||||
|
||||
|
||||
!-------------------------------------------------------------------------
|
||||
! Function: test_registration_by_name()
|
||||
!
|
||||
! Purpose: Tests if we can load, register, and close a VOL
|
||||
! connector by name.
|
||||
!
|
||||
!-------------------------------------------------------------------------
|
||||
!
|
||||
|
||||
SUBROUTINE test_registration_by_fapl(total_error)
|
||||
|
||||
IMPLICIT NONE
|
||||
|
||||
INTEGER, INTENT(INOUT) :: total_error
|
||||
INTEGER :: error = 0
|
||||
|
||||
LOGICAL :: is_registered = .FALSE.
|
||||
INTEGER(hid_t) :: vol_id = 0, vol_id_out = 1
|
||||
INTEGER(hid_t) :: file_id
|
||||
INTEGER(hid_t) :: fapl_id
|
||||
TYPE(C_PTR) :: f_ptr
|
||||
|
||||
CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
|
||||
|
||||
CALL check("H5VLis_connector_registered_f",error,total_error)
|
||||
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
|
||||
|
||||
! The null VOL connector should not be registered at the start of the test
|
||||
CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
|
||||
CALL check("H5VLis_connector_registered_f",error,total_error)
|
||||
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
|
||||
|
||||
CALL H5VLregister_connector_by_name_f(NATIVE_VOL_CONNECTOR_NAME, vol_id, error)
|
||||
CALL check("H5VLregister_connector_by_name_f",error,total_error)
|
||||
|
||||
! The connector should be registered now
|
||||
CALL H5VLis_connector_registered_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error)
|
||||
CALL check("H5VLis_connector_registered_f",error,total_error)
|
||||
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error)
|
||||
|
||||
! Register the connector
|
||||
CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl_id, error)
|
||||
CALL check("H5Pcreate_f",error,total_error)
|
||||
|
||||
f_ptr = C_NULL_PTR
|
||||
CALL H5Pset_vol_f(fapl_id, vol_id, error)
|
||||
CALL check("H5Pset_vol_f",error,total_error)
|
||||
|
||||
CALL H5Pget_vol_id_f(fapl_id, vol_id_out, error)
|
||||
CALL check("H5Pget_vol_id_f",error,total_error)
|
||||
CALL VERIFY("H5Pget_vol_id_f", vol_id_out, vol_id, total_error)
|
||||
|
||||
f_ptr = C_NULL_PTR
|
||||
CALL H5Pset_vol_f(fapl_id, vol_id, error, f_ptr)
|
||||
CALL check("H5Pset_vol_f",error,total_error)
|
||||
|
||||
CALL H5Pget_vol_id_f(fapl_id, vol_id_out, error)
|
||||
CALL check("H5Pget_vol_id_f",error,total_error)
|
||||
CALL VERIFY("H5Pget_vol_id_f", vol_id_out, vol_id, total_error)
|
||||
|
||||
CALL H5VLget_connector_id_f(NATIVE_VOL_CONNECTOR_NAME, vol_id_out, error)
|
||||
CALL check("H5VLget_connector_id_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_id_f", vol_id_out, vol_id, total_error)
|
||||
|
||||
CALL H5Fcreate_f("voltest.h5",H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl_id)
|
||||
CALL check("H5F_create_f",error,total_error)
|
||||
|
||||
CALL H5VLclose_f(vol_id_out, error)
|
||||
CALL check("H5VLclose_f",error, total_error)
|
||||
|
||||
CALL H5VLclose_f(vol_id, error)
|
||||
CALL check("H5VLclose_f",error, total_error)
|
||||
|
||||
CALL H5Fclose_f(file_id, error)
|
||||
CALL check("H5Fclose_f",error,total_error)
|
||||
|
||||
CALL H5Pclose_f(fapl_id, error)
|
||||
CALL check("H5Pclose_f",error,total_error)
|
||||
|
||||
END SUBROUTINE test_registration_by_fapl
|
||||
|
||||
|
||||
END MODULE VOL_TMOD
|
||||
|
||||
|
||||
PROGRAM vol_connector
|
||||
|
||||
USE HDF5
|
||||
USE VOL_TMOD
|
||||
|
||||
IMPLICIT NONE
|
||||
INTEGER :: total_error = 0
|
||||
INTEGER :: error
|
||||
INTEGER :: ret_total_error
|
||||
LOGICAL :: cleanup, status
|
||||
|
||||
CALL h5open_f(error)
|
||||
|
||||
cleanup = .TRUE.
|
||||
CALL h5_env_nocleanup_f(status)
|
||||
IF(status) cleanup=.FALSE.
|
||||
|
||||
WRITE(*,'(18X,A)') '=============================='
|
||||
WRITE(*,'(24X,A)') 'FORTRAN VOL tests'
|
||||
WRITE(*,'(18X,A)') '=============================='
|
||||
|
||||
WRITE(*,'(A)') "Testing VOL connector plugin functionality."
|
||||
ret_total_error = 0
|
||||
CALL test_registration_by_name(ret_total_error)
|
||||
CALL write_test_status(ret_total_error, ' Testing VOL registration by name', total_error)
|
||||
|
||||
ret_total_error = 0
|
||||
CALL test_registration_by_value(ret_total_error)
|
||||
CALL write_test_status(ret_total_error, ' Testing VOL registration by value', total_error)
|
||||
|
||||
ret_total_error = 0
|
||||
CALL test_registration_by_fapl(ret_total_error)
|
||||
CALL write_test_status(ret_total_error, ' Testing VOL registration by fapl', total_error)
|
||||
|
||||
WRITE(*, fmt = '(/18X,A)') '============================================'
|
||||
WRITE(*, fmt = '(19X, A)', advance='NO') ' FORTRAN VOL tests completed with '
|
||||
WRITE(*, fmt = '(I4)', advance='NO') total_error
|
||||
WRITE(*, fmt = '(A)' ) ' error(s) ! '
|
||||
WRITE(*,'(18X,A)') '============================================'
|
||||
|
||||
CALL h5close_f(error)
|
||||
|
||||
! if errors detected, exit with non-zero code.
|
||||
IF (total_error .NE. 0) CALL h5_exit_f(1)
|
||||
|
||||
END PROGRAM vol_connector
|
@ -31,11 +31,21 @@ endif
|
||||
if BUILD_CXX_CONDITIONAL
|
||||
CXX_DIR = c++
|
||||
endif
|
||||
if BUILD_TESTS_CONDITIONAL
|
||||
TEST_DIR = test
|
||||
else
|
||||
TEST_DIR =
|
||||
endif
|
||||
if BUILD_TOOLS_CONDITIONAL
|
||||
TOOLS_DIR = tools
|
||||
else
|
||||
TOOLS_DIR =
|
||||
endif
|
||||
|
||||
## Don't recurse into any subdirectories if HDF5 is not configured to
|
||||
## use the HL library
|
||||
if BUILD_HDF5_HL_CONDITIONAL
|
||||
SUBDIRS=src test tools $(CXX_DIR) $(FORTRAN_DIR)
|
||||
SUBDIRS=src $(TEST_DIR) $(TOOLS_DIR) $(CXX_DIR) $(FORTRAN_DIR)
|
||||
|
||||
# Test with just the native connector, with a single pass-through connector
|
||||
# and with a doubly-stacked pass-through.
|
||||
|
@ -18,7 +18,13 @@
|
||||
|
||||
include $(top_srcdir)/config/commence.am
|
||||
|
||||
SUBDIRS=src test
|
||||
if BUILD_TESTS_CONDITIONAL
|
||||
TESTSERIAL_DIR =test
|
||||
else
|
||||
TESTSERIAL_DIR=
|
||||
endif
|
||||
|
||||
SUBDIRS=src $(TESTSERIAL_DIR)
|
||||
DIST_SUBDIRS=src test examples
|
||||
|
||||
# Install examples
|
||||
|
@ -23,7 +23,13 @@
|
||||
|
||||
include $(top_srcdir)/config/commence.am
|
||||
|
||||
SUBDIRS=src test
|
||||
if BUILD_TESTS_CONDITIONAL
|
||||
TESTSERIAL_DIR =test
|
||||
else
|
||||
TESTSERIAL_DIR=
|
||||
endif
|
||||
|
||||
SUBDIRS=src $(TESTSERIAL_DIR)
|
||||
DIST_SUBDIRS=src test examples
|
||||
|
||||
# Install examples
|
||||
|
@ -23,11 +23,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/sr
|
||||
|
||||
# These are our main targets, the tools
|
||||
|
||||
TEST_SCRIPT=h52giftest.sh
|
||||
check_SCRIPTS=$(TEST_SCRIPT)
|
||||
|
||||
bin_PROGRAMS=gif2h5 h52gif
|
||||
noinst_PROGRAMS=h52gifgentst
|
||||
|
||||
# Add h52gif and gif2h5 specific linker flags here
|
||||
h52gif_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
|
||||
@ -37,12 +33,18 @@ gif2h5_SOURCES=gif2hdf.c gif2mem.c decompress.c gifread.c writehdf.c
|
||||
|
||||
h52gif_SOURCES=hdf2gif.c hdfgifwr.c
|
||||
|
||||
h52gifgentst_SOURCES=h52gifgentst.c
|
||||
|
||||
# Programs all depend on the hdf5 library, the tools library, and the HL
|
||||
# library.
|
||||
LDADD=$(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
|
||||
|
||||
if BUILD_TESTS_CONDITIONAL
|
||||
TEST_SCRIPT=h52giftest.sh
|
||||
check_SCRIPTS=$(TEST_SCRIPT)
|
||||
noinst_PROGRAMS=h52gifgentst
|
||||
h52gifgentst_SOURCES=h52gifgentst.c
|
||||
endif
|
||||
|
||||
CHECK_CLEANFILES+=*.h5
|
||||
CHECK_CLEANFILES+=*.gif
|
||||
|
||||
|
@ -19,15 +19,12 @@
|
||||
include $(top_srcdir)/config/commence.am
|
||||
|
||||
# Include src and tools/lib directories
|
||||
AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src -I$(top_srcdir)/hl/test
|
||||
AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src
|
||||
|
||||
# These are our main targets, the tools
|
||||
TEST_SCRIPT=testh5watch.sh
|
||||
check_SCRIPTS=$(TEST_SCRIPT)
|
||||
SCRIPT_DEPEND=swmr_check_compat_vfd$(EXEEXT) extend_dset$(EXEEXT) h5watch$(EXEEXT)
|
||||
|
||||
bin_PROGRAMS=h5watch
|
||||
noinst_PROGRAMS=swmr_check_compat_vfd h5watchgentest extend_dset
|
||||
noinst_PROGRAMS=swmr_check_compat_vfd
|
||||
|
||||
# Add h5watch specific linker flags here
|
||||
h5watch_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
|
||||
@ -36,13 +33,19 @@ h5watch_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
|
||||
# library.
|
||||
LDADD=$(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
|
||||
|
||||
# Add extend_dset specific preprocessor flags here
|
||||
# (add the main test subdirectory to the include file path)
|
||||
extend_dset_CPPFLAGS=$(AM_CPPFLAGS) -I$(top_srcdir)/test
|
||||
# Add extend_dset specific library flags here
|
||||
# (add the main test library to the list of libraries)
|
||||
extend_dset_LDADD=$(LDADD) $(LIBH5TEST) $(LIBHDF5)
|
||||
|
||||
if BUILD_TESTS_CONDITIONAL
|
||||
AM_CPPFLAGS+=-I$(top_srcdir)/hl/test
|
||||
TEST_SCRIPT=testh5watch.sh
|
||||
check_SCRIPTS=$(TEST_SCRIPT)
|
||||
SCRIPT_DEPEND=swmr_check_compat_vfd$(EXEEXT) extend_dset$(EXEEXT) h5watch$(EXEEXT)
|
||||
noinst_PROGRAMS+=h5watchgentest extend_dset
|
||||
# Add extend_dset specific preprocessor flags here
|
||||
# (add the main test subdirectory to the include file path)
|
||||
extend_dset_CPPFLAGS=$(AM_CPPFLAGS) -I$(top_srcdir)/test
|
||||
# Add extend_dset specific library flags here
|
||||
# (add the main test library to the list of libraries)
|
||||
extend_dset_LDADD=$(LDADD) $(LIBH5TEST) $(LIBHDF5)
|
||||
endif
|
||||
#
|
||||
CHECK_CLEANFILES+=*.h5
|
||||
DISTCLEANFILES=testh5watch.sh
|
||||
|
@ -23,13 +23,21 @@
|
||||
|
||||
include $(top_srcdir)/config/commence.am
|
||||
|
||||
if BUILD_TESTS_CONDITIONAL
|
||||
TESTSERIAL_DIR =test
|
||||
TESTEXAMPLES_DIR =examples
|
||||
else
|
||||
TESTSERIAL_DIR=
|
||||
TESTEXAMPLES_DIR=
|
||||
endif
|
||||
|
||||
## Only recurse into subdirectories if the Java (JNI) interface is enabled.
|
||||
if BUILD_JAVA_CONDITIONAL
|
||||
|
||||
# Mark this directory as part of the JNI API
|
||||
JAVA_API=yes
|
||||
|
||||
SUBDIRS=src test examples
|
||||
SUBDIRS=src $(TESTSERIAL_DIR) $(TESTEXAMPLES_DIR)
|
||||
|
||||
# Test with just the native connector, with a single pass-through connector
|
||||
# and with a doubly-stacked pass-through.
|
||||
|
@ -121,6 +121,7 @@ public class HDF5Constants {
|
||||
public static final long H5E_CANTDEC = H5E_CANTDEC();
|
||||
public static final long H5E_CANTDECODE = H5E_CANTDECODE();
|
||||
public static final long H5E_CANTDELETE = H5E_CANTDELETE();
|
||||
public static final long H5E_CANTDELETEFILE = H5E_CANTDELETEFILE();
|
||||
public static final long H5E_CANTENCODE = H5E_CANTENCODE();
|
||||
public static final long H5E_CANTFLUSH = H5E_CANTFLUSH();
|
||||
public static final long H5E_CANTFREE = H5E_CANTFREE();
|
||||
@ -374,6 +375,7 @@ public class HDF5Constants {
|
||||
public static final long H5P_OBJECT_COPY = H5P_OBJECT_COPY();
|
||||
public static final long H5P_LINK_CREATE = H5P_LINK_CREATE();
|
||||
public static final long H5P_LINK_ACCESS = H5P_LINK_ACCESS();
|
||||
public static final long H5P_VOL_INITIALIZE = H5P_VOL_INITIALIZE();
|
||||
public static final long H5P_FILE_CREATE_DEFAULT = H5P_FILE_CREATE_DEFAULT();
|
||||
public static final long H5P_FILE_ACCESS_DEFAULT = H5P_FILE_ACCESS_DEFAULT();
|
||||
public static final long H5P_DATASET_CREATE_DEFAULT = H5P_DATASET_CREATE_DEFAULT();
|
||||
@ -389,6 +391,7 @@ public class HDF5Constants {
|
||||
public static final long H5P_OBJECT_COPY_DEFAULT = H5P_OBJECT_COPY_DEFAULT();
|
||||
public static final long H5P_LINK_CREATE_DEFAULT = H5P_LINK_CREATE_DEFAULT();
|
||||
public static final long H5P_LINK_ACCESS_DEFAULT = H5P_LINK_ACCESS_DEFAULT();
|
||||
public static final long H5P_VOL_INITIALIZE_DEFAULT = H5P_VOL_INITIALIZE_DEFAULT();
|
||||
public static final int H5P_CRT_ORDER_TRACKED = H5P_CRT_ORDER_TRACKED();
|
||||
public static final int H5P_CRT_ORDER_INDEXED = H5P_CRT_ORDER_INDEXED();
|
||||
public static final long H5P_DEFAULT = H5P_DEFAULT();
|
||||
@ -861,6 +864,8 @@ public class HDF5Constants {
|
||||
|
||||
private static native final long H5E_CANTDELETE();
|
||||
|
||||
private static native final long H5E_CANTDELETEFILE();
|
||||
|
||||
private static native final long H5E_CANTENCODE();
|
||||
|
||||
private static native final long H5E_CANTFLUSH();
|
||||
@ -1352,6 +1357,8 @@ public class HDF5Constants {
|
||||
|
||||
private static native final long H5P_LINK_ACCESS();
|
||||
|
||||
private static native final long H5P_VOL_INITIALIZE();
|
||||
|
||||
private static native final long H5P_FILE_CREATE_DEFAULT();
|
||||
|
||||
private static native final long H5P_FILE_ACCESS_DEFAULT();
|
||||
@ -1382,6 +1389,8 @@ public class HDF5Constants {
|
||||
|
||||
private static native final long H5P_LINK_ACCESS_DEFAULT();
|
||||
|
||||
private static native final long H5P_VOL_INITIALIZE_DEFAULT();
|
||||
|
||||
private static native final int H5P_CRT_ORDER_TRACKED();
|
||||
|
||||
private static native final int H5P_CRT_ORDER_INDEXED();
|
||||
|
@ -171,6 +171,9 @@ public class HDF5LibraryException extends HDF5Exception {
|
||||
else if (err_code == HDF5Constants.H5E_MOUNT) {
|
||||
return "file mount error";
|
||||
}
|
||||
else if (err_code == HDF5Constants.H5E_CANTDELETEFILE) {
|
||||
return "Unable to delete file";
|
||||
}
|
||||
else if (err_code == HDF5Constants.H5E_SEEKERROR) {
|
||||
return "seek failed";
|
||||
}
|
||||
@ -262,7 +265,7 @@ public class HDF5LibraryException extends HDF5Exception {
|
||||
return "unrecognized message";
|
||||
}
|
||||
else if (err_code == HDF5Constants.H5E_CANTDELETE) {
|
||||
return " Can't delete message";
|
||||
return "Can't delete message";
|
||||
}
|
||||
else if (err_code == HDF5Constants.H5E_CANTOPENOBJ) {
|
||||
return "Can't open object";
|
||||
|
@ -204,6 +204,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDECODE(JNIEnv *env, jclass cls) { return
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDELETE(JNIEnv *env, jclass cls) { return H5E_CANTDELETE; }
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDELETEFILE(JNIEnv *env, jclass cls) { return H5E_CANTDELETEFILE; }
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTENCODE(JNIEnv *env, jclass cls) { return H5E_CANTENCODE; }
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTFLUSH(JNIEnv *env, jclass cls) { return H5E_CANTFLUSH; }
|
||||
@ -731,6 +733,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1CREATE(JNIEnv *env, jclass cls){return
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1ACCESS(JNIEnv *env, jclass cls){return H5P_LINK_ACCESS;}
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5P_1VOL_1INITIALIZE(JNIEnv *env, jclass cls){return H5P_VOL_INITIALIZE;}
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5P_1FILE_1CREATE_1DEFAULT(JNIEnv *env, jclass cls){return H5P_FILE_CREATE_DEFAULT;}
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5P_1FILE_1ACCESS_1DEFAULT(JNIEnv *env, jclass cls){return H5P_FILE_ACCESS_DEFAULT;}
|
||||
@ -760,6 +764,8 @@ JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1CREATE_1DEFAULT(JNIEnv *env, jclass cls){return H5P_LINK_CREATE_DEFAULT;}
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1ACCESS_1DEFAULT(JNIEnv *env, jclass cls){return H5P_LINK_ACCESS_DEFAULT;}
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5P_1VOL_1INITIALIZE_1DEFAULT(JNIEnv *env, jclass cls){return H5P_VOL_INITIALIZE_DEFAULT;}
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5P_1CRT_1ORDER_1TRACKED(JNIEnv *env, jclass cls){return H5P_CRT_ORDER_TRACKED;}
|
||||
JNIEXPORT jint JNICALL
|
||||
|
@ -127,7 +127,7 @@ done:
|
||||
if (libversionArray)
|
||||
UNPIN_INT_ARRAY(ENVONLY, libversion, libversionArray, (status < 0) ? JNI_ABORT : 0);
|
||||
|
||||
return (jint)status;
|
||||
return (jint)status;
|
||||
} /* end Java_hdf_hdf5lib_H5_H5get_1libversion */
|
||||
|
||||
/*
|
||||
|
@ -1838,7 +1838,7 @@ Java_hdf_hdf5lib_H5_H5Dfill
|
||||
{
|
||||
jboolean isCopy1;
|
||||
jboolean isCopy2;
|
||||
herr_t status;
|
||||
herr_t status = FAIL;
|
||||
jbyte *fillP = NULL;
|
||||
jbyte *buffP = NULL;
|
||||
|
||||
|
@ -62,11 +62,11 @@ static herr_t H5E_walk_cb(int nindx, const H5E_error2_t *info, void *cb_data);
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eauto_1is_1v2
|
||||
(JNIEnv *env, jclass cls, jlong stk_id)
|
||||
(JNIEnv *env, jclass clss, jlong stk_id)
|
||||
{
|
||||
unsigned int is_stack = 0;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (stk_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eauto_is_v2: invalid stack ID");
|
||||
@ -85,14 +85,14 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eregister_1class
|
||||
(JNIEnv *env, jclass cls, jstring cls_name, jstring lib_name, jstring version)
|
||||
(JNIEnv *env, jclass clss, jstring cls_name, jstring lib_name, jstring version)
|
||||
{
|
||||
const char* the_cls_name = NULL;
|
||||
const char* the_lib_name = NULL;
|
||||
const char* the_version = NULL;
|
||||
hid_t ret_val = H5I_INVALID_HID;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (NULL == cls_name)
|
||||
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Eregister_class: class name is NULL");
|
||||
@ -126,9 +126,9 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eunregister_1class
|
||||
(JNIEnv *env, jclass cls, jlong cls_id)
|
||||
(JNIEnv *env, jclass clss, jlong cls_id)
|
||||
{
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (cls_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eunregister_class: invalid error class ID");
|
||||
@ -147,9 +147,9 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eclose_1msg
|
||||
(JNIEnv *env, jclass cls, jlong err_id)
|
||||
(JNIEnv *env, jclass clss, jlong err_id)
|
||||
{
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (err_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eclose_msg: invalid error message ID");
|
||||
@ -168,13 +168,13 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Ecreate_1msg
|
||||
(JNIEnv *env, jclass cls, jlong err_id, jint msg_type, jstring err_msg)
|
||||
(JNIEnv *env, jclass clss, jlong err_id, jint msg_type, jstring err_msg)
|
||||
{
|
||||
H5E_type_t error_msg_type = (H5E_type_t)msg_type;
|
||||
const char *the_err_msg = NULL;
|
||||
hid_t ret_val = H5I_INVALID_HID;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (err_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Ecreate_msg: invalid error class ID");
|
||||
@ -200,11 +200,11 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Ecreate_1stack
|
||||
(JNIEnv *env, jclass cls)
|
||||
(JNIEnv *env, jclass clss)
|
||||
{
|
||||
hid_t ret_val = H5I_INVALID_HID;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if ((ret_val = H5Ecreate_stack()) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -220,11 +220,11 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eget_1current_1stack
|
||||
(JNIEnv *env, jclass cls)
|
||||
(JNIEnv *env, jclass clss)
|
||||
{
|
||||
hid_t ret_val = H5I_INVALID_HID;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if ((ret_val = H5Eget_current_stack()) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -240,9 +240,9 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eclose_1stack
|
||||
(JNIEnv *env, jclass cls, jlong stk_id)
|
||||
(JNIEnv *env, jclass clss, jlong stk_id)
|
||||
{
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (stk_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eclose_stack: invalid error stack ID");
|
||||
@ -261,11 +261,11 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eprint2
|
||||
(JNIEnv *env, jclass cls, jlong stk_id, jobject stream_obj)
|
||||
(JNIEnv *env, jclass clss, jlong stk_id, jobject stream_obj)
|
||||
{
|
||||
herr_t ret_val = FAIL;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (stk_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eprint2: invalid error stack ID");
|
||||
@ -290,13 +290,13 @@ done:
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eget_1class_1name
|
||||
(JNIEnv *env, jclass cls, jlong cls_id)
|
||||
(JNIEnv *env, jclass clss, jlong cls_id)
|
||||
{
|
||||
jstring str = NULL;
|
||||
ssize_t buf_size;
|
||||
char *namePtr = NULL;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (cls_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eget_class_name: invalid error class ID");
|
||||
@ -332,9 +332,9 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eset_1current_1stack
|
||||
(JNIEnv *env, jclass cls, jlong stk_id)
|
||||
(JNIEnv *env, jclass clss, jlong stk_id)
|
||||
{
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (stk_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eset_current_stack: invalid error stack ID");
|
||||
@ -353,9 +353,9 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Epop
|
||||
(JNIEnv *env, jclass cls, jlong stk_id, jlong count)
|
||||
(JNIEnv *env, jclass clss, jlong stk_id, jlong count)
|
||||
{
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (stk_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Epop: invalid error stack ID");
|
||||
@ -374,7 +374,7 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Epush2
|
||||
(JNIEnv *env, jclass cls, jlong stk_id, jstring filename, jstring funcname,
|
||||
(JNIEnv *env, jclass clss, jlong stk_id, jstring filename, jstring funcname,
|
||||
jint linenumber, jlong class_id, jlong major_id, jlong minor_id, jstring err_desc)
|
||||
{
|
||||
const char *fName = NULL;
|
||||
@ -382,7 +382,7 @@ Java_hdf_hdf5lib_H5_H5Epush2
|
||||
const char *errMsg = NULL;
|
||||
herr_t ret_val = FAIL;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (stk_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Epush2: invalid error stack ID");
|
||||
@ -423,9 +423,9 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eclear2
|
||||
(JNIEnv *env, jclass cls, jlong stk_id)
|
||||
(JNIEnv *env, jclass clss, jlong stk_id)
|
||||
{
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (stk_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eclear2: invalid error stack ID");
|
||||
@ -444,7 +444,7 @@ done:
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eget_1msg
|
||||
(JNIEnv *env, jclass cls, jlong msg_id, jintArray error_msg_type_list)
|
||||
(JNIEnv *env, jclass clss, jlong msg_id, jintArray error_msg_type_list)
|
||||
{
|
||||
H5E_type_t error_msg_type;
|
||||
jstring str = NULL;
|
||||
@ -452,7 +452,7 @@ Java_hdf_hdf5lib_H5_H5Eget_1msg
|
||||
jint *theArray = NULL;
|
||||
char *namePtr = NULL;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (msg_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eget_msg: invalid error message ID");
|
||||
@ -496,11 +496,11 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Eget_1num
|
||||
(JNIEnv *env, jclass cls, jlong stk_id)
|
||||
(JNIEnv *env, jclass clss, jlong stk_id)
|
||||
{
|
||||
ssize_t ret_val = -1;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (stk_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eget_num: invalid error stack ID");
|
||||
@ -587,11 +587,11 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Ewalk2
|
||||
(JNIEnv *env, jclass cls, jlong stk_id, jlong direction, jobject callback_op, jobject op_data)
|
||||
(JNIEnv *env, jclass clss, jlong stk_id, jlong direction, jobject callback_op, jobject op_data)
|
||||
{
|
||||
cb_wrapper wrapper = { callback_op, op_data };
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
ENVPTR->GetJavaVM(ENVONLY, &jvm);
|
||||
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
|
||||
|
@ -118,13 +118,13 @@ done:
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fget_1name
|
||||
(JNIEnv *env, jclass cls, jlong file_id)
|
||||
(JNIEnv *env, jclass clss, jlong file_id)
|
||||
{
|
||||
jstring str = NULL;
|
||||
ssize_t buf_size;
|
||||
char *namePtr = NULL;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
/* Get the length of the name */
|
||||
if ((buf_size = H5Fget_name((hid_t)file_id, NULL, 0)) < 0)
|
||||
@ -378,11 +378,11 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fget_1freespace
|
||||
(JNIEnv *env, jclass cls, jlong file_id)
|
||||
(JNIEnv *env, jclass clss, jlong file_id)
|
||||
{
|
||||
hssize_t ret_val = -1;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if ((ret_val = H5Fget_freespace((hid_t)file_id)) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -418,7 +418,7 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fget_1obj_1ids
|
||||
(JNIEnv *env, jclass cls, jlong file_id, jint types, jlong maxObjs,
|
||||
(JNIEnv *env, jclass clss, jlong file_id, jint types, jlong maxObjs,
|
||||
jlongArray obj_id_list)
|
||||
{
|
||||
jboolean isCopy;
|
||||
@ -428,7 +428,7 @@ Java_hdf_hdf5lib_H5_H5Fget_1obj_1ids
|
||||
jlong *obj_id_listP = NULL;
|
||||
hid_t *id_list = NULL;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (NULL == obj_id_list)
|
||||
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fget_obj_ids: obj_id_list is NULL");
|
||||
@ -466,11 +466,11 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fget_1obj_1count
|
||||
(JNIEnv *env, jclass cls, jlong file_id, jint types)
|
||||
(JNIEnv *env, jclass clss, jlong file_id, jint types)
|
||||
{
|
||||
ssize_t ret_val = -1;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if ((ret_val = H5Fget_obj_count((hid_t)file_id, (unsigned int)types)) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -506,11 +506,11 @@ done:
|
||||
*/
|
||||
JNIEXPORT jdouble JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fget_1mdc_1hit_1rate
|
||||
(JNIEnv *env, jclass cls, jlong file_id)
|
||||
(JNIEnv *env, jclass clss, jlong file_id)
|
||||
{
|
||||
double rate = 0.0;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (H5Fget_mdc_hit_rate((hid_t)file_id, &rate) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -526,7 +526,7 @@ done:
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fget_1mdc_1size
|
||||
(JNIEnv *env, jclass cls, jlong file_id, jlongArray metadata_cache)
|
||||
(JNIEnv *env, jclass clss, jlong file_id, jlongArray metadata_cache)
|
||||
{
|
||||
jboolean isCopy;
|
||||
size_t max_size = 0, min_clean_size = 0, cur_size = 0;
|
||||
@ -534,7 +534,7 @@ Java_hdf_hdf5lib_H5_H5Fget_1mdc_1size
|
||||
jsize size = 0;
|
||||
int cur_num_entries = -1;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (NULL == metadata_cache)
|
||||
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fget_mdc_size: metadata cache array is NULL");
|
||||
@ -612,9 +612,9 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Freset_1mdc_1hit_1rate_1stats
|
||||
(JNIEnv *env, jclass cls, jlong file_id)
|
||||
(JNIEnv *env, jclass clss, jlong file_id)
|
||||
{
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (H5Freset_mdc_hit_rate_stats((hid_t)file_id) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -630,9 +630,9 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fclear_1elink_1file_1cache
|
||||
(JNIEnv *env, jclass cls, jlong file_id)
|
||||
(JNIEnv *env, jclass clss, jlong file_id)
|
||||
{
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (H5Fclear_elink_file_cache((hid_t)file_id) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -648,9 +648,9 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fstart_1swmr_1write
|
||||
(JNIEnv *env, jclass cls, jlong file_id)
|
||||
(JNIEnv *env, jclass clss, jlong file_id)
|
||||
{
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (H5Fstart_swmr_write((hid_t)file_id) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -666,9 +666,9 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging
|
||||
(JNIEnv *env, jclass cls, jlong file_id)
|
||||
(JNIEnv *env, jclass clss, jlong file_id)
|
||||
{
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (H5Fstart_mdc_logging((hid_t)file_id) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -684,9 +684,9 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging
|
||||
(JNIEnv *env, jclass cls, jlong file_id)
|
||||
(JNIEnv *env, jclass clss, jlong file_id)
|
||||
{
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (H5Fstop_mdc_logging((hid_t)file_id) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -702,7 +702,7 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status
|
||||
(JNIEnv *env, jclass cls, jlong file_id, jbooleanArray mdc_logging_status)
|
||||
(JNIEnv *env, jclass clss, jlong file_id, jbooleanArray mdc_logging_status)
|
||||
{
|
||||
jboolean *mdc_logging_status_ptr = NULL;
|
||||
jboolean isCopy;
|
||||
@ -710,7 +710,7 @@ Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status
|
||||
hbool_t is_currently_logging;
|
||||
jsize size;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (NULL == mdc_logging_status)
|
||||
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fget_mdc_logging_status: mdc_logging_status is NULL");
|
||||
|
@ -148,11 +148,11 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5__1H5Gcreate_1anon
|
||||
(JNIEnv *env, jclass cls, jlong loc_id, jlong gcpl_id, jlong gapl_id)
|
||||
(JNIEnv *env, jclass clss, jlong loc_id, jlong gcpl_id, jlong gapl_id)
|
||||
{
|
||||
hid_t group_id = H5I_INVALID_HID;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if ((group_id = H5Gcreate_anon((hid_t)loc_id, (hid_t)gcpl_id, (hid_t)gapl_id)) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -198,11 +198,11 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Gget_1create_1plist
|
||||
(JNIEnv *env, jclass cls, jlong loc_id)
|
||||
(JNIEnv *env, jclass clss, jlong loc_id)
|
||||
{
|
||||
hid_t plist_id = H5I_INVALID_HID;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if ((plist_id = H5Gget_create_plist((hid_t)loc_id)) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -218,12 +218,12 @@ done:
|
||||
*/
|
||||
JNIEXPORT jobject JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Gget_1info
|
||||
(JNIEnv *env, jclass cls, jlong loc_id)
|
||||
(JNIEnv *env, jclass clss, jlong loc_id)
|
||||
{
|
||||
H5G_info_t group_info;
|
||||
jobject obj = NULL;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (H5Gget_info((hid_t)loc_id, &group_info) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
@ -242,14 +242,14 @@ done:
|
||||
*/
|
||||
JNIEXPORT jobject JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1name
|
||||
(JNIEnv *env, jclass cls, jlong loc_id, jstring name, jlong lapl_id)
|
||||
(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong lapl_id)
|
||||
{
|
||||
H5G_info_t group_info;
|
||||
const char *grpName = NULL;
|
||||
jobject obj = NULL;
|
||||
herr_t ret_val = FAIL;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (NULL == name)
|
||||
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Gget_info_by_name: group name is NULL");
|
||||
@ -278,7 +278,7 @@ done:
|
||||
*/
|
||||
JNIEXPORT jobject JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1idx
|
||||
(JNIEnv *env, jclass cls, jlong loc_id, jstring name, jint index_type,
|
||||
(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jint index_type,
|
||||
jint order, jlong n, jlong lapl_id)
|
||||
{
|
||||
H5_iter_order_t corder = (H5_iter_order_t)order;
|
||||
@ -288,7 +288,7 @@ Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1idx
|
||||
jobject obj = NULL;
|
||||
herr_t ret_val = FAIL;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (NULL == name)
|
||||
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Gget_info_by_idx: group name is NULL");
|
||||
|
@ -628,7 +628,7 @@ H5L_iterate_cb
|
||||
jclass cls;
|
||||
jvalue args[5];
|
||||
void *op_data = (void *)wrapper->op_data;
|
||||
jint status;
|
||||
jint status = -1;
|
||||
|
||||
if (JVMPTR->AttachCurrentThread(JVMPAR, (void **)&cbenv, NULL) < 0) {
|
||||
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_TRUE);
|
||||
|
@ -211,7 +211,7 @@ Java_hdf_hdf5lib_H5_H5Rget_1obj_1type2
|
||||
jboolean isCopy, isCopy2;
|
||||
jbyte *refBuf = NULL;
|
||||
jint *ref_objP = NULL;
|
||||
jint status;
|
||||
jint status = -1;
|
||||
int retVal = -1;
|
||||
|
||||
UNUSED(clss);
|
||||
|
@ -66,7 +66,7 @@ Java_hdf_hdf5lib_H5__1H5Screate_1simple
|
||||
hsize_t *lp = NULL;
|
||||
jlong *dimsP = NULL, *maxdimsP = NULL;
|
||||
jlong *jlp = NULL;
|
||||
jsize drank, mrank;
|
||||
jsize drank = 0, mrank = 0;
|
||||
int i;
|
||||
hid_t retVal = H5I_INVALID_HID;
|
||||
|
||||
@ -1129,14 +1129,14 @@ done:
|
||||
*/
|
||||
JNIEXPORT jbyteArray JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Sencode
|
||||
(JNIEnv *env, jclass cls, jlong obj_id)
|
||||
(JNIEnv *env, jclass clss, jlong obj_id)
|
||||
{
|
||||
unsigned char *bufPtr = NULL;
|
||||
size_t buf_size = 0;
|
||||
herr_t status = FAIL;
|
||||
jbyteArray returnedArray = NULL;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (obj_id < 0)
|
||||
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sencode: invalid object ID");
|
||||
@ -1173,13 +1173,13 @@ done:
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Sdecode
|
||||
(JNIEnv *env, jclass cls, jbyteArray buf)
|
||||
(JNIEnv *env, jclass clss, jbyteArray buf)
|
||||
{
|
||||
jboolean isCopy;
|
||||
jbyte *bufP = NULL;
|
||||
hid_t sid = H5I_INVALID_HID;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (NULL == buf)
|
||||
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Sdecode: buffer is NULL");
|
||||
@ -1203,11 +1203,11 @@ done:
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Sis_1regular_1hyperslab
|
||||
(JNIEnv *env, jclass cls, jlong obj_id)
|
||||
(JNIEnv *env, jclass clss, jlong obj_id)
|
||||
{
|
||||
htri_t bval = JNI_FALSE;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if ((bval = H5Sis_regular_hyperslab((hid_t)obj_id)) < 0)
|
||||
H5_LIBRARY_ERROR(ENVONLY);
|
||||
|
@ -1620,7 +1620,7 @@ done:
|
||||
|
||||
/*
|
||||
* Class: hdf_hdf5lib_H5
|
||||
* Method: H5Tarray_get_dims2
|
||||
* Method: H5Tget_array_dims2
|
||||
* Signature: (J[J)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
|
@ -3453,7 +3453,7 @@ done:
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5export_1dataset
|
||||
(JNIEnv *env, jclass cls, jstring file_export_name, jstring file_name, jstring object_path, jint binary_order)
|
||||
(JNIEnv *env, jclass clss, jstring file_export_name, jstring file_name, jstring object_path, jint binary_order)
|
||||
{
|
||||
const char *file_export = NULL;
|
||||
const char *object_name = NULL;
|
||||
@ -3462,9 +3462,9 @@ Java_hdf_hdf5lib_H5_H5export_1dataset
|
||||
herr_t ret_val = FAIL;
|
||||
hid_t file_id = H5I_INVALID_HID;
|
||||
hid_t dataset_id = H5I_INVALID_HID;
|
||||
FILE *stream;
|
||||
FILE *stream = NULL;
|
||||
|
||||
UNUSED(cls);
|
||||
UNUSED(clss);
|
||||
|
||||
if (NULL == file_export_name)
|
||||
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5export_dataset: file_export_name is NULL");
|
||||
|
@ -48,6 +48,18 @@ New Features
|
||||
|
||||
Configuration:
|
||||
-------------
|
||||
- Add options to enable or disable building tools and tests
|
||||
|
||||
Configure options --enable-tests and --enable-tools were added for
|
||||
autotools configure. These options are enabled by default, and can be
|
||||
disabled with either --disable-tests (or tools) or --enable-tests=no
|
||||
(or --enable-tools=no). Build time is reduced ~20% when tools are
|
||||
disabled, 35% when tests are disabled, 45% when both are disabled.
|
||||
Reenabling them after the initial build requires running configure
|
||||
again with the option(s) enabled.
|
||||
|
||||
(LRK - 2019/06/12, HDFFV-9976)
|
||||
|
||||
- Change tools test that test the error stack
|
||||
|
||||
There are some use cases which can cause the error stack of tools to be
|
||||
@ -130,6 +142,14 @@ New Features
|
||||
|
||||
Library:
|
||||
--------
|
||||
- Improved the performance of virtual dataset I/O
|
||||
|
||||
Refactored the internal dataspace routines used by the virtual dataset
|
||||
code to improve performance, especially when one of the selections
|
||||
involved is very long and non-contiguous.
|
||||
|
||||
(NAF - 2019/05/31, HDFFV-10693)
|
||||
|
||||
- Allow pre-generated H5Tinit.c and H5make_libsettings.c to be used.
|
||||
|
||||
Rather than always running H5detect and generating H5Tinit.c and
|
||||
|
@ -325,14 +325,11 @@ H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr)
|
||||
*/
|
||||
if(*user_attr != NULL) {
|
||||
H5A_t *old_attr = *user_attr;
|
||||
if(old_attr->shared) {
|
||||
/* Free any dynamically allocated items */
|
||||
if(H5A__free(old_attr) < 0)
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info")
|
||||
|
||||
/* Destroy shared attribute struct */
|
||||
old_attr->shared = H5FL_FREE(H5A_shared_t, old_attr->shared);
|
||||
} /* end if */
|
||||
/* Free any dynamically allocated items */
|
||||
if(old_attr->shared)
|
||||
if(H5A__shared_free(old_attr) < 0)
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info")
|
||||
|
||||
old_attr = H5FL_FREE(H5A_t, old_attr);
|
||||
} /* end if */
|
||||
|
43
src/H5Aint.c
43
src/H5Aint.c
@ -1092,48 +1092,55 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5A__free
|
||||
* Function: H5A__shared_free
|
||||
*
|
||||
* Purpose: Frees all memory associated with an attribute, but does not
|
||||
* free the H5A_t structure (which should be done in H5T_close).
|
||||
* Purpose: Cleans up the shared attribute data. This will free
|
||||
* the attribute's shared structure as well.
|
||||
*
|
||||
* attr and attr->shared must not be NULL
|
||||
*
|
||||
* Return: SUCCEED/FAIL
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Monday, November 15, 2004
|
||||
* Programmer: Quincey Koziol
|
||||
* Monday, November 15, 2004
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5A__free(H5A_t *attr)
|
||||
H5A__shared_free(H5A_t *attr)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
HDassert(attr);
|
||||
HDassert(attr->shared);
|
||||
|
||||
/* Free dynamically allocated items */
|
||||
/* Free dynamically allocated items.
|
||||
* When possible, keep trying to shut things down (via HDONE_ERROR).
|
||||
*/
|
||||
if(attr->shared->name) {
|
||||
H5MM_xfree(attr->shared->name);
|
||||
attr->shared->name = NULL;
|
||||
}
|
||||
if(attr->shared->dt) {
|
||||
if(H5T_close_real(attr->shared->dt) < 0)
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release datatype info")
|
||||
HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release datatype info")
|
||||
attr->shared->dt = NULL;
|
||||
}
|
||||
if(attr->shared->ds) {
|
||||
if(H5S_close(attr->shared->ds) < 0)
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release dataspace info")
|
||||
HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release dataspace info")
|
||||
attr->shared->ds = NULL;
|
||||
}
|
||||
if(attr->shared->data)
|
||||
attr->shared->data = H5FL_BLK_FREE(attr_buf, attr->shared->data);
|
||||
|
||||
done:
|
||||
/* Destroy shared attribute struct */
|
||||
attr->shared = H5FL_FREE(H5A_shared_t, attr->shared);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5A__free() */
|
||||
} /* end H5A__shared_free() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -1197,11 +1204,9 @@ H5A__close(H5A_t *attr)
|
||||
/* Reference count can be 0. It only happens when H5A__create fails. */
|
||||
if(attr->shared->nrefs <= 1) {
|
||||
/* Free dynamically allocated items */
|
||||
if(H5A__free(attr) < 0)
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info")
|
||||
|
||||
/* Destroy shared attribute struct */
|
||||
attr->shared = H5FL_FREE(H5A_shared_t, attr->shared);
|
||||
if(attr->shared)
|
||||
if(H5A__shared_free(attr) < 0)
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info")
|
||||
} /* end if */
|
||||
else {
|
||||
/* There are other references to the shared part of the attribute.
|
||||
@ -2396,9 +2401,13 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src,
|
||||
/* Check for expanding references */
|
||||
if(cpy_info->expand_ref) {
|
||||
size_t ref_count;
|
||||
size_t dst_dt_size; /* Destination datatype size */
|
||||
|
||||
/* Determine size of the destination datatype */
|
||||
if(0 == (dst_dt_size = H5T_get_size(attr_dst->shared->dt)))
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size")
|
||||
/* Determine # of reference elements to copy */
|
||||
ref_count = attr_dst->shared->data_size / H5T_get_size(attr_dst->shared->dt);
|
||||
ref_count = attr_dst->shared->data_size / dst_dt_size;
|
||||
|
||||
/* Copy objects referenced in source buffer to destination file and set destination elements */
|
||||
if(H5O_copy_expand_ref(file_src, attr_dst->shared->data, file_dst, attr_dst->shared->data, ref_count, H5T_get_ref_type(attr_dst->shared->dt), cpy_info) < 0)
|
||||
|
@ -196,7 +196,7 @@ H5_DLL H5A_t *H5A__copy(H5A_t *new_attr, const H5A_t *old_attr);
|
||||
H5_DLL hid_t H5A__get_type(H5A_t *attr);
|
||||
H5_DLL herr_t H5A__get_info(const H5A_t *attr, H5A_info_t *ainfo);
|
||||
H5_DLL hid_t H5A__get_create_plist(H5A_t* attr);
|
||||
H5_DLL herr_t H5A__free(H5A_t *attr);
|
||||
H5_DLL herr_t H5A__shared_free(H5A_t *attr);
|
||||
H5_DLL herr_t H5A__close(H5A_t *attr);
|
||||
H5_DLL herr_t H5A__close_cb(H5VL_object_t *attr_vol_obj);
|
||||
H5_DLL htri_t H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo);
|
||||
|
@ -707,15 +707,18 @@ H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims,
|
||||
|
||||
/* Compute the # of chunks in dataset dimensions */
|
||||
for(u = 0, layout->nchunks = 1, layout->max_nchunks = 1; u < ndims; u++) {
|
||||
/* Sanity check */
|
||||
HDassert(layout->dim[u] > 0);
|
||||
|
||||
/* Round up to the next integer # of chunks, to accommodate partial chunks */
|
||||
layout->chunks[u] = ((curr_dims[u] + layout->dim[u]) - 1) / layout->dim[u];
|
||||
if(H5S_UNLIMITED == max_dims[u])
|
||||
layout->max_chunks[u] = H5S_UNLIMITED;
|
||||
else
|
||||
{
|
||||
/* Sanity check */
|
||||
if(layout->dim[u] == 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "dimension size must be > 0, dim = %u ", u)
|
||||
|
||||
layout->max_chunks[u] = ((max_dims[u] + layout->dim[u]) - 1) / layout->dim[u];
|
||||
}
|
||||
|
||||
/* Accumulate the # of chunks */
|
||||
layout->nchunks *= layout->chunks[u];
|
||||
|
@ -559,9 +559,14 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
|
||||
/* Check for expanding references */
|
||||
if(cpy_info->expand_ref) {
|
||||
size_t ref_count;
|
||||
size_t src_dt_size; /* Source datatype size */
|
||||
|
||||
/* Determine largest datatype size */
|
||||
if(0 == (src_dt_size = H5T_get_size(dt_src)))
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size")
|
||||
|
||||
/* Determine # of reference elements to copy */
|
||||
ref_count = storage_src->size / H5T_get_size(dt_src);
|
||||
ref_count = storage_src->size / src_dt_size;
|
||||
|
||||
/* Copy objects referenced in source buffer to destination file and set destination elements */
|
||||
if(H5O_copy_expand_ref(f_src, storage_src->buf, f_dst,
|
||||
|
@ -35,6 +35,13 @@
|
||||
* until the virtual dataset is closed.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Note: H5S_select_project_intersection has been updated to no longer require
|
||||
* that the source and source intersect spaces have the same extent. This file
|
||||
* should therefore be updated to remove code that ensures this condition, which
|
||||
* should improve both maintainability and performance.
|
||||
*/
|
||||
|
||||
/****************/
|
||||
/* Module Setup */
|
||||
/****************/
|
||||
|
73
src/H5F.c
73
src/H5F.c
@ -560,20 +560,21 @@ done:
|
||||
*
|
||||
* Purpose: Check if the file can be opened with the given fapl.
|
||||
*
|
||||
* Return: TRUE/FALSE/FAIL
|
||||
* Return: Succeed: TRUE/FALSE
|
||||
* Failure: FAIL (includes file does not exist)
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
htri_t
|
||||
H5Fis_accessible(const char *name, hid_t fapl_id)
|
||||
H5Fis_accessible(const char *filename, hid_t fapl_id)
|
||||
{
|
||||
htri_t ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE2("t", "*si", name, fapl_id);
|
||||
H5TRACE2("t", "*si", filename, fapl_id);
|
||||
|
||||
/* Check args */
|
||||
if(!name || !*name)
|
||||
if(!filename || !*filename)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified")
|
||||
|
||||
/* Check the file access property list */
|
||||
@ -584,7 +585,7 @@ H5Fis_accessible(const char *name, hid_t fapl_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list")
|
||||
|
||||
/* Check if file is accessible */
|
||||
if(H5VL_file_specific(NULL, H5VL_FILE_IS_ACCESSIBLE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, fapl_id, name, &ret_value) < 0)
|
||||
if(H5VL_file_specific(NULL, H5VL_FILE_IS_ACCESSIBLE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, fapl_id, filename, &ret_value) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to determine if file is accessible as HDF5")
|
||||
|
||||
done:
|
||||
@ -836,6 +837,68 @@ done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
} /* end H5Fclose() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5Fdelete
|
||||
*
|
||||
* Purpose: Deletes an HDF5 file.
|
||||
*
|
||||
* Return: SUCCEED/FAIL
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5Fdelete(const char *filename, hid_t fapl_id)
|
||||
{
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
|
||||
htri_t is_hdf5 = FAIL;
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE2("e", "*si", filename, fapl_id);
|
||||
|
||||
/* Check args */
|
||||
if(!filename || !*filename)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified")
|
||||
|
||||
/* Check the file access property list */
|
||||
if(H5P_DEFAULT == fapl_id)
|
||||
fapl_id = H5P_FILE_ACCESS_DEFAULT;
|
||||
else
|
||||
if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
|
||||
|
||||
/* Verify access property list and set up collective metadata if appropriate */
|
||||
if(H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
|
||||
|
||||
/* Get the VOL info from the fapl */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(fapl_id, H5I_GENPROP_LST)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list")
|
||||
if(H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL connector info")
|
||||
|
||||
/* Stash a copy of the "top-level" connector property, before any pass-through
|
||||
* connectors modify or unwrap it.
|
||||
*/
|
||||
if(H5CX_set_vol_connector_prop(&connector_prop) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL connector info in API context")
|
||||
|
||||
/* Make sure this is HDF5 storage for this VOL connector */
|
||||
if(H5VL_file_specific(NULL, H5VL_FILE_IS_ACCESSIBLE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, fapl_id, filename, &is_hdf5) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to determine if file is accessible as HDF5")
|
||||
if(!is_hdf5)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "not an HDF5 file")
|
||||
|
||||
/* Delete the file */
|
||||
if(H5VL_file_specific(NULL, H5VL_FILE_DELETE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, fapl_id, filename, &ret_value) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTDELETEFILE, FAIL, "unable to delete the file")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
} /* end H5Fdelete() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5Freopen
|
||||
|
@ -863,7 +863,7 @@ H5F__is_hdf5(const char *name, hid_t fapl_id)
|
||||
* should work with arbitrary VFDs, unlike H5Fis_hdf5().
|
||||
*/
|
||||
if(NULL == (file = H5FD_open(name, H5F_ACC_RDONLY, fapl_id, HADDR_UNDEF)))
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to open file")
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to open file")
|
||||
|
||||
/* The file is an hdf5 file if the hdf5 file signature can be found */
|
||||
if(H5FD_locate_signature(file, &sig_addr) < 0)
|
||||
@ -874,7 +874,7 @@ done:
|
||||
/* Close the file */
|
||||
if(file)
|
||||
if(H5FD_close(file) < 0 && TRUE == ret_value)
|
||||
HDONE_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
|
||||
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5F__is_hdf5() */
|
||||
|
@ -233,6 +233,7 @@ H5_DLL hid_t H5Fopen(const char *filename, unsigned flags,
|
||||
H5_DLL hid_t H5Freopen(hid_t file_id);
|
||||
H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope);
|
||||
H5_DLL herr_t H5Fclose(hid_t file_id);
|
||||
H5_DLL herr_t H5Fdelete(const char *filename, hid_t fapl_id);
|
||||
H5_DLL hid_t H5Fget_create_plist(hid_t file_id);
|
||||
H5_DLL hid_t H5Fget_access_plist(hid_t file_id);
|
||||
H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned *intent);
|
||||
|
@ -200,7 +200,7 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
|
||||
* What's actually shared, though, is only the extent.
|
||||
*/
|
||||
if(NULL == (attr->shared->ds = H5FL_CALLOC(H5S_t)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
|
||||
/* Decode attribute's dataspace extent */
|
||||
if((extent = (H5S_extent_t *)(H5O_MSG_SDSPACE->decode)(f, open_oh,
|
||||
@ -253,15 +253,11 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
|
||||
done:
|
||||
if(NULL == ret_value)
|
||||
if(attr) {
|
||||
if(attr->shared) {
|
||||
/* Free any dynamically allocated items */
|
||||
if(H5A__free(attr) < 0)
|
||||
/* Free any dynamically allocated items */
|
||||
if(attr->shared)
|
||||
if(H5A__shared_free(attr) < 0)
|
||||
HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, NULL, "can't release attribute info")
|
||||
|
||||
/* Destroy shared attribute struct */
|
||||
attr->shared = H5FL_FREE(H5A_shared_t, attr->shared);
|
||||
} /* end if */
|
||||
|
||||
attr = H5FL_FREE(H5A_t, attr);
|
||||
} /* end if */
|
||||
|
||||
|
105
src/H5Pint.c
105
src/H5Pint.c
@ -127,62 +127,65 @@ static herr_t H5P__free_del_name_cb(void *item, void H5_ATTR_UNUSED *key, void H
|
||||
* Predefined property list classes. These are initialized at runtime by
|
||||
* H5P__init_package() in this source file.
|
||||
*/
|
||||
hid_t H5P_CLS_ROOT_ID_g = FAIL;
|
||||
hid_t H5P_CLS_ROOT_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_ROOT_g = NULL;
|
||||
hid_t H5P_CLS_OBJECT_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_CLS_OBJECT_CREATE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_OBJECT_CREATE_g = NULL;
|
||||
hid_t H5P_CLS_FILE_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_CLS_FILE_CREATE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_FILE_CREATE_g = NULL;
|
||||
hid_t H5P_CLS_FILE_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_CLS_FILE_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_FILE_ACCESS_g = NULL;
|
||||
hid_t H5P_CLS_DATASET_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_CLS_DATASET_CREATE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_DATASET_CREATE_g = NULL;
|
||||
hid_t H5P_CLS_DATASET_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_CLS_DATASET_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_DATASET_ACCESS_g = NULL;
|
||||
hid_t H5P_CLS_DATASET_XFER_ID_g = FAIL;
|
||||
hid_t H5P_CLS_DATASET_XFER_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_DATASET_XFER_g = NULL;
|
||||
hid_t H5P_CLS_FILE_MOUNT_ID_g = FAIL;
|
||||
hid_t H5P_CLS_FILE_MOUNT_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_FILE_MOUNT_g = NULL;
|
||||
hid_t H5P_CLS_GROUP_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_CLS_GROUP_CREATE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_GROUP_CREATE_g = NULL;
|
||||
hid_t H5P_CLS_GROUP_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_CLS_GROUP_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_GROUP_ACCESS_g = NULL;
|
||||
hid_t H5P_CLS_DATATYPE_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_CLS_DATATYPE_CREATE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_DATATYPE_CREATE_g = NULL;
|
||||
hid_t H5P_CLS_DATATYPE_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_CLS_DATATYPE_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_DATATYPE_ACCESS_g = NULL;
|
||||
hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_ATTRIBUTE_CREATE_g = NULL;
|
||||
hid_t H5P_CLS_ATTRIBUTE_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_CLS_ATTRIBUTE_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_ATTRIBUTE_ACCESS_g = NULL;
|
||||
hid_t H5P_CLS_OBJECT_COPY_ID_g = FAIL;
|
||||
hid_t H5P_CLS_OBJECT_COPY_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_OBJECT_COPY_g = NULL;
|
||||
hid_t H5P_CLS_LINK_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_CLS_LINK_CREATE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_LINK_CREATE_g = NULL;
|
||||
hid_t H5P_CLS_LINK_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_CLS_LINK_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_LINK_ACCESS_g = NULL;
|
||||
hid_t H5P_CLS_STRING_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_CLS_STRING_CREATE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_STRING_CREATE_g = NULL;
|
||||
hid_t H5P_CLS_VOL_INITIALIZE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_VOL_INITIALIZE_g = NULL;
|
||||
|
||||
/*
|
||||
* Predefined property lists for each predefined class. These are initialized
|
||||
* at runtime by H5P__init_package() in this source file.
|
||||
*/
|
||||
hid_t H5P_LST_FILE_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_LST_FILE_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_LST_DATASET_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_LST_DATASET_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_LST_DATASET_XFER_ID_g = FAIL;
|
||||
hid_t H5P_LST_FILE_MOUNT_ID_g = FAIL;
|
||||
hid_t H5P_LST_GROUP_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_LST_GROUP_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_LST_DATATYPE_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_LST_DATATYPE_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_LST_ATTRIBUTE_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_LST_OBJECT_COPY_ID_g = FAIL;
|
||||
hid_t H5P_LST_LINK_CREATE_ID_g = FAIL;
|
||||
hid_t H5P_LST_LINK_ACCESS_ID_g = FAIL;
|
||||
hid_t H5P_LST_FILE_CREATE_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_FILE_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_DATASET_CREATE_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_DATASET_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_DATASET_XFER_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_FILE_MOUNT_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_GROUP_CREATE_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_GROUP_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_DATATYPE_CREATE_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_DATATYPE_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_ATTRIBUTE_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_OBJECT_COPY_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_LINK_CREATE_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_LINK_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_VOL_INITIALIZE_ID_g = H5I_INVALID_HID;
|
||||
|
||||
/* Root property list class library initialization object */
|
||||
const H5P_libclass_t H5P_CLS_ROOT[1] = {{
|
||||
@ -283,6 +286,26 @@ const H5P_libclass_t H5P_CLS_TACC[1] = {{
|
||||
NULL /* Class close callback info */
|
||||
}};
|
||||
|
||||
/* VOL initialization property list class library initialization object */
|
||||
/* (move to proper source code file when used for real) */
|
||||
const H5P_libclass_t H5P_CLS_VINI[1] = {{
|
||||
"VOL initialization", /* Class name for debugging */
|
||||
H5P_TYPE_VOL_INITIALIZE, /* Class type */
|
||||
|
||||
&H5P_CLS_ROOT_g, /* Parent class */
|
||||
&H5P_CLS_VOL_INITIALIZE_g, /* Pointer to class */
|
||||
&H5P_CLS_VOL_INITIALIZE_ID_g, /* Pointer to class ID */
|
||||
&H5P_LST_VOL_INITIALIZE_ID_g, /* Pointer to default property list ID */
|
||||
NULL, /* Default property registration routine */
|
||||
|
||||
NULL, /* Class creation callback */
|
||||
NULL, /* Class creation callback info */
|
||||
NULL, /* Class copy callback */
|
||||
NULL, /* Class copy callback info */
|
||||
NULL, /* Class close callback */
|
||||
NULL /* Class close callback info */
|
||||
}};
|
||||
|
||||
|
||||
/* Library property list classes defined in other code modules */
|
||||
/* (And not present in src/H5Pprivate.h) */
|
||||
@ -331,7 +354,8 @@ static H5P_libclass_t const * const init_class[] = {
|
||||
H5P_CLS_TACC, /* Datatype access */
|
||||
H5P_CLS_ACRT, /* Attribute creation */
|
||||
H5P_CLS_AACC, /* Attribute access */
|
||||
H5P_CLS_LCRT /* Link creation */
|
||||
H5P_CLS_LCRT, /* Link creation */
|
||||
H5P_CLS_VINI /* VOL initialization */
|
||||
};
|
||||
|
||||
/* Declare a free list to manage the H5P_genclass_t struct */
|
||||
@ -525,7 +549,8 @@ H5P_term_package(void)
|
||||
H5P_LST_OBJECT_COPY_ID_g =
|
||||
H5P_LST_LINK_CREATE_ID_g =
|
||||
H5P_LST_LINK_ACCESS_ID_g =
|
||||
H5P_LST_FILE_MOUNT_ID_g = (-1);
|
||||
H5P_LST_VOL_INITIALIZE_ID_g =
|
||||
H5P_LST_FILE_MOUNT_ID_g = H5I_INVALID_HID;
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
|
||||
@ -552,6 +577,7 @@ H5P_term_package(void)
|
||||
H5P_CLS_OBJECT_COPY_g =
|
||||
H5P_CLS_LINK_CREATE_g =
|
||||
H5P_CLS_LINK_ACCESS_g =
|
||||
H5P_CLS_VOL_INITIALIZE_g =
|
||||
H5P_CLS_FILE_MOUNT_g = NULL;
|
||||
|
||||
H5P_CLS_ROOT_ID_g =
|
||||
@ -571,7 +597,8 @@ H5P_term_package(void)
|
||||
H5P_CLS_OBJECT_COPY_ID_g =
|
||||
H5P_CLS_LINK_CREATE_ID_g =
|
||||
H5P_CLS_LINK_ACCESS_ID_g =
|
||||
H5P_CLS_FILE_MOUNT_ID_g = (-1);
|
||||
H5P_CLS_VOL_INITIALIZE_ID_g =
|
||||
H5P_CLS_FILE_MOUNT_ID_g = H5I_INVALID_HID;
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
|
||||
@ -5408,7 +5435,7 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity checks */
|
||||
HDcompile_assert(H5P_TYPE_ATTRIBUTE_ACCESS == (H5P_TYPE_MAX_TYPE - 1));
|
||||
HDcompile_assert(H5P_TYPE_VOL_INITIALIZE == (H5P_TYPE_MAX_TYPE - 1));
|
||||
HDassert(type >= H5P_TYPE_USER && type <= H5P_TYPE_LINK_ACCESS);
|
||||
|
||||
/* Check arguments */
|
||||
@ -5487,6 +5514,10 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
|
||||
class_id = H5P_CLS_LINK_ACCESS_ID_g;
|
||||
break;
|
||||
|
||||
case H5P_TYPE_VOL_INITIALIZE:
|
||||
class_id = H5P_CLS_VOL_INITIALIZE_ID_g;
|
||||
break;
|
||||
|
||||
case H5P_TYPE_USER: /* shut compiler warnings up */
|
||||
case H5P_TYPE_ROOT:
|
||||
case H5P_TYPE_MAX_TYPE:
|
||||
|
@ -78,6 +78,7 @@ typedef enum H5P_plist_type_t {
|
||||
H5P_TYPE_LINK_CREATE = 16,
|
||||
H5P_TYPE_LINK_ACCESS = 17,
|
||||
H5P_TYPE_ATTRIBUTE_ACCESS = 18,
|
||||
H5P_TYPE_VOL_INITIALIZE = 19,
|
||||
H5P_TYPE_MAX_TYPE
|
||||
} H5P_plist_type_t;
|
||||
|
||||
|
@ -68,6 +68,7 @@
|
||||
#define H5P_OBJECT_COPY (H5OPEN H5P_CLS_OBJECT_COPY_ID_g)
|
||||
#define H5P_LINK_CREATE (H5OPEN H5P_CLS_LINK_CREATE_ID_g)
|
||||
#define H5P_LINK_ACCESS (H5OPEN H5P_CLS_LINK_ACCESS_ID_g)
|
||||
#define H5P_VOL_INITIALIZE (H5OPEN H5P_CLS_VOL_INITIALIZE_ID_g)
|
||||
|
||||
/*
|
||||
* The library's default property lists
|
||||
@ -87,6 +88,7 @@
|
||||
#define H5P_OBJECT_COPY_DEFAULT (H5OPEN H5P_LST_OBJECT_COPY_ID_g)
|
||||
#define H5P_LINK_CREATE_DEFAULT (H5OPEN H5P_LST_LINK_CREATE_ID_g)
|
||||
#define H5P_LINK_ACCESS_DEFAULT (H5OPEN H5P_LST_LINK_ACCESS_ID_g)
|
||||
#define H5P_VOL_INITIALIZE_DEFAULT (H5OPEN H5P_LST_VOL_INITIALIZE_ID_g)
|
||||
|
||||
/* Common creation order flags (for links in groups and attributes on objects) */
|
||||
#define H5P_CRT_ORDER_TRACKED 0x0001
|
||||
@ -195,6 +197,7 @@ H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_ACCESS_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_OBJECT_COPY_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_LINK_CREATE_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_LINK_ACCESS_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_VOL_INITIALIZE_ID_g;
|
||||
|
||||
/* Default roperty list IDs */
|
||||
/* (Internal to library, do not use! Use macros above) */
|
||||
@ -213,6 +216,7 @@ H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_ACCESS_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_OBJECT_COPY_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_LINK_CREATE_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_LINK_ACCESS_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_VOL_INITIALIZE_ID_g;
|
||||
|
||||
/*********************/
|
||||
/* Public Prototypes */
|
||||
|
10
src/H5S.c
10
src/H5S.c
@ -448,10 +448,14 @@ H5S_close(H5S_t *ds)
|
||||
if(H5S__extent_release(&ds->extent) < 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace extent")
|
||||
|
||||
/* Release the main structure */
|
||||
ds = H5FL_FREE(H5S_t, ds);
|
||||
|
||||
done:
|
||||
/* Release the main structure.
|
||||
* Always do this to ensure that we don't leak memory when calling this
|
||||
* function on partially constructed dataspaces (which will fail one or
|
||||
* both of the above calls)
|
||||
*/
|
||||
H5FL_FREE(H5S_t, ds);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5S_close() */
|
||||
|
||||
|
1055
src/H5Shyper.c
1055
src/H5Shyper.c
File diff suppressed because it is too large
Load Diff
@ -2374,10 +2374,11 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
|
||||
if(H5S_select_copy(new_space, dst_space, FALSE) < 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination space selection")
|
||||
} /* end if */
|
||||
/* If any of the spaces are "none", the projection must also be "none" */
|
||||
else if((src_intersect_space->select.type->type == H5S_SEL_NONE)
|
||||
|| (src_space->select.type->type == H5S_SEL_NONE)
|
||||
|| (dst_space->select.type->type == H5S_SEL_NONE)) {
|
||||
/* If any of the selections contain no elements, the projection must be
|
||||
* "none" */
|
||||
else if((H5S_GET_SELECT_NPOINTS(src_intersect_space) == 0)
|
||||
|| (H5S_GET_SELECT_NPOINTS(src_space) == 0)
|
||||
|| (H5S_GET_SELECT_NPOINTS(dst_space) == 0)) {
|
||||
/* Change to "none" selection */
|
||||
if(H5S_select_none(new_space) < 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection")
|
||||
@ -2389,6 +2390,8 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "point selections not currently supported")
|
||||
else {
|
||||
HDassert(src_intersect_space->select.type->type == H5S_SEL_HYPERSLABS);
|
||||
HDassert(src_space->select.type->type != H5S_SEL_NONE);
|
||||
HDassert(dst_space->select.type->type != H5S_SEL_NONE);
|
||||
|
||||
/* Intersecting space is hyperslab selection. Call the hyperslab
|
||||
* routine to project to another hyperslab selection. */
|
||||
|
136
src/H5VL.c
136
src/H5VL.c
@ -31,8 +31,11 @@
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
#include "H5Pprivate.h" /* Property lists */
|
||||
#include "H5VLpkg.h" /* Virtual Object Layer */
|
||||
|
||||
/* VOL connectors */
|
||||
#include "H5VLnative.h" /* Native VOL connector */
|
||||
|
||||
/****************/
|
||||
/* Local Macros */
|
||||
@ -71,6 +74,9 @@
|
||||
* Purpose: Registers a new VOL connector as a member of the virtual object
|
||||
* layer class.
|
||||
*
|
||||
* VIPL_ID is a VOL initialization property list which must be
|
||||
* created with H5Pcreate(H5P_VOL_INITIALIZE) (or H5P_DEFAULT).
|
||||
*
|
||||
* Return: Success: A VOL connector ID which is good until the
|
||||
* library is closed or the connector is
|
||||
* unregistered.
|
||||
@ -99,6 +105,13 @@ H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id)
|
||||
if (cls->wrap_cls.get_wrap_ctx && !cls->wrap_cls.free_wrap_ctx)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "VOL connector must provide free callback for object wrapping contexts when a get callback is provided")
|
||||
|
||||
/* Check VOL initialization property list */
|
||||
if(H5P_DEFAULT == vipl_id)
|
||||
vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
|
||||
else
|
||||
if(TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list")
|
||||
|
||||
/* Register connector */
|
||||
if((ret_value = H5VL__register_connector(cls, TRUE, vipl_id)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector")
|
||||
@ -114,6 +127,9 @@ done:
|
||||
* Purpose: Registers a new VOL connector as a member of the virtual object
|
||||
* layer class.
|
||||
*
|
||||
* VIPL_ID is a VOL initialization property list which must be
|
||||
* created with H5Pcreate(H5P_VOL_INITIALIZE) (or H5P_DEFAULT).
|
||||
*
|
||||
* Return: Success: A VOL connector ID which is good until the
|
||||
* library is closed or the connector is
|
||||
* unregistered.
|
||||
@ -136,6 +152,13 @@ H5VLregister_connector_by_name(const char *name, hid_t vipl_id)
|
||||
if (0 == HDstrlen(name))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "zero-length VOL connector name is disallowed")
|
||||
|
||||
/* Check VOL initialization property list */
|
||||
if(H5P_DEFAULT == vipl_id)
|
||||
vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
|
||||
else
|
||||
if(TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list")
|
||||
|
||||
/* Register connector */
|
||||
if((ret_value = H5VL__register_connector_by_name(name, TRUE, vipl_id)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector")
|
||||
@ -151,6 +174,9 @@ done:
|
||||
* Purpose: Registers a new VOL connector as a member of the virtual object
|
||||
* layer class.
|
||||
*
|
||||
* VIPL_ID is a VOL initialization property list which must be
|
||||
* created with H5Pcreate(H5P_VOL_INITIALIZE) (or H5P_DEFAULT).
|
||||
*
|
||||
* Return: Success: A VOL connector ID which is good until the
|
||||
* library is closed or the connector is
|
||||
* unregistered.
|
||||
@ -171,6 +197,13 @@ H5VLregister_connector_by_value(H5VL_class_value_t value, hid_t vipl_id)
|
||||
if(value < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "negative VOL connector value is disallowed")
|
||||
|
||||
/* Check VOL initialization property list */
|
||||
if(H5P_DEFAULT == vipl_id)
|
||||
vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
|
||||
else
|
||||
if(TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list")
|
||||
|
||||
/* Register connector */
|
||||
if((ret_value = H5VL__register_connector_by_value(value, TRUE, vipl_id)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector")
|
||||
@ -185,9 +218,9 @@ done:
|
||||
*
|
||||
* Purpose: Tests whether a VOL class has been registered or not
|
||||
*
|
||||
* Return: >0 if the VOL class has been registered
|
||||
* 0 if it is unregistered
|
||||
* <0 on error (if the class is not a valid class ID)
|
||||
* Return: >0 if a VOL connector with that name has been registered
|
||||
* 0 if a VOL connector with that name has NOT been registered
|
||||
* <0 on errors
|
||||
*
|
||||
* Programmer: Dana Robinson
|
||||
* June 17, 2017
|
||||
@ -216,8 +249,12 @@ done:
|
||||
*
|
||||
* Purpose: Retrieves the ID for a registered VOL connector.
|
||||
*
|
||||
* Return: Positive if the VOL class has been registered
|
||||
* Negative on error (if the class is not a valid class or not registered)
|
||||
* Return: A valid VOL connector ID if a connector by that name has
|
||||
* been registered. This ID will need to be closed using
|
||||
* H5VLclose().
|
||||
*
|
||||
* H5I_INVALID_HID on error or if a VOL connector of that
|
||||
* name has not been registered.
|
||||
*
|
||||
* Programmer: Dana Robinson
|
||||
* June 17, 2017
|
||||
@ -245,7 +282,12 @@ done:
|
||||
* Function: H5VLget_connector_name
|
||||
*
|
||||
* Purpose: Returns the connector name for the VOL associated with the
|
||||
* object or file ID
|
||||
* object or file ID.
|
||||
*
|
||||
* This works like other calls where the caller must provide a
|
||||
* buffer of the appropriate size for the library to fill in.
|
||||
* i.e., passing in a NULL pointer for NAME will return the
|
||||
* required size of the buffer.
|
||||
*
|
||||
* Return: Success: The length of the connector name
|
||||
*
|
||||
@ -312,6 +354,9 @@ done:
|
||||
* this VOL connector or files which are already opened under with
|
||||
* this connector.
|
||||
*
|
||||
* The native VOL connector cannot be unregistered and attempts
|
||||
* to do so are considered an error.
|
||||
*
|
||||
* Return: Success: Non-negative
|
||||
*
|
||||
* Failure: Negative
|
||||
@ -321,6 +366,7 @@ done:
|
||||
herr_t
|
||||
H5VLunregister_connector(hid_t vol_id)
|
||||
{
|
||||
hid_t native_id = H5I_INVALID_HID;
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
@ -328,13 +374,23 @@ H5VLunregister_connector(hid_t vol_id)
|
||||
|
||||
/* Check arguments */
|
||||
if(NULL == H5I_object_verify(vol_id, H5I_VOL))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector")
|
||||
HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector ID")
|
||||
|
||||
/* For the time being, we disallow unregistering the native VOL connector */
|
||||
if(H5I_INVALID_HID == (native_id = H5VL__get_connector_id(H5VL_NATIVE_NAME, FALSE)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to find the native VOL connector ID")
|
||||
if(vol_id == native_id)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "unregistering the native VOL connector is not allowed")
|
||||
|
||||
/* The H5VL_class_t struct will be freed by this function */
|
||||
if (H5I_dec_app_ref(vol_id) < 0)
|
||||
if(H5I_dec_app_ref(vol_id) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to unregister VOL connector")
|
||||
|
||||
done:
|
||||
if(native_id != H5I_INVALID_HID)
|
||||
if(H5I_dec_ref(native_id) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement count on native_id")
|
||||
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
} /* end H5VLunregister_connector() */
|
||||
|
||||
@ -344,8 +400,8 @@ done:
|
||||
*
|
||||
* Purpose: Compares two connector classes (based on their value field)
|
||||
*
|
||||
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
|
||||
* _not_ part of the public API for HDF5 application developers.
|
||||
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
|
||||
* _not_ part of the public API for HDF5 application developers.
|
||||
*
|
||||
* Return: Success: Non-negative, *cmp set to a value like strcmp
|
||||
*
|
||||
@ -381,11 +437,11 @@ done:
|
||||
* Function: H5VLwrap_register
|
||||
*
|
||||
* Purpose: Wrap an internal object with a "wrap context" and register an
|
||||
* hid_t for the resulting object.
|
||||
* hid_t for the resulting object.
|
||||
*
|
||||
* Note: This routine is mainly targeted toward wrapping objects for
|
||||
* iteration routine callbacks (i.e. the callbacks from H5Aiterate*,
|
||||
* H5Literate* / H5Lvisit*, and H5Ovisit* ).
|
||||
* Note: This routine is mainly targeted toward wrapping objects for
|
||||
* iteration routine callbacks (i.e. the callbacks from H5Aiterate*,
|
||||
* H5Literate* / H5Lvisit*, and H5Ovisit* ).
|
||||
*
|
||||
* Return: Success: Non-negative hid_t for the object.
|
||||
* Failure: Negative (H5I_INVALID_HID)
|
||||
@ -420,10 +476,10 @@ done:
|
||||
* Function: H5VLobject
|
||||
*
|
||||
* Purpose: Retrieve the object pointer associated with an hid_t for a.
|
||||
* VOL object.
|
||||
* VOL object.
|
||||
*
|
||||
* Note: This routine is mainly targeted toward unwrapping objects for
|
||||
* testing.
|
||||
* Note: This routine is mainly targeted toward unwrapping objects for
|
||||
* testing.
|
||||
*
|
||||
* Return: Success: Object pointer
|
||||
* Failure: NULL
|
||||
@ -451,16 +507,16 @@ done:
|
||||
* Function: H5VLretrieve_lib_state
|
||||
*
|
||||
* Purpose: Retrieves a copy of the internal state of the HDF5 library,
|
||||
* so that it can be restored later.
|
||||
* so that it can be restored later.
|
||||
*
|
||||
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
|
||||
* _not_ part of the public API for HDF5 application developers.
|
||||
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
|
||||
* _not_ part of the public API for HDF5 application developers.
|
||||
*
|
||||
* Return: Success: Non-negative, *state set
|
||||
* Failure: Negative, *state unset
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Thursday, January 10, 2019
|
||||
* Programmer: Quincey Koziol
|
||||
* Thursday, January 10, 2019
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
@ -491,14 +547,14 @@ done:
|
||||
*
|
||||
* Purpose: Restores the internal state of the HDF5 library.
|
||||
*
|
||||
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
|
||||
* _not_ part of the public API for HDF5 application developers.
|
||||
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
|
||||
* _not_ part of the public API for HDF5 application developers.
|
||||
*
|
||||
* Return: Success: Non-negative
|
||||
* Failure: Negative
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Thursday, January 10, 2019
|
||||
* Programmer: Quincey Koziol
|
||||
* Thursday, January 10, 2019
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
@ -528,20 +584,20 @@ done:
|
||||
* Function: H5VLreset_lib_state
|
||||
*
|
||||
* Purpose: Resets the internal state of the HDF5 library, undoing the
|
||||
* affects of H5VLrestore_lib_state.
|
||||
* affects of H5VLrestore_lib_state.
|
||||
*
|
||||
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
|
||||
* _not_ part of the public API for HDF5 application developers.
|
||||
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
|
||||
* _not_ part of the public API for HDF5 application developers.
|
||||
*
|
||||
* Note: This routine must be called as a "pair" with
|
||||
* H5VLrestore_lib_state. It can be called before / after /
|
||||
* independently of H5VLfree_lib_state.
|
||||
* Note: This routine must be called as a "pair" with
|
||||
* H5VLrestore_lib_state. It can be called before / after /
|
||||
* independently of H5VLfree_lib_state.
|
||||
*
|
||||
* Return: Success: Non-negative
|
||||
* Failure: Negative
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Saturday, February 23, 2019
|
||||
* Programmer: Quincey Koziol
|
||||
* Saturday, February 23, 2019
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
@ -568,17 +624,17 @@ done:
|
||||
*
|
||||
* Purpose: Free a retrieved library state.
|
||||
*
|
||||
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
|
||||
* _not_ part of the public API for HDF5 application developers.
|
||||
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
|
||||
* _not_ part of the public API for HDF5 application developers.
|
||||
*
|
||||
* Note: This routine must be called as a "pair" with
|
||||
* H5VLretrieve_lib_state.
|
||||
* Note: This routine must be called as a "pair" with
|
||||
* H5VLretrieve_lib_state.
|
||||
*
|
||||
* Return: Success: Non-negative
|
||||
* Failure: Negative
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Thursday, January 10, 2019
|
||||
* Programmer: Quincey Koziol
|
||||
* Thursday, January 10, 2019
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
@ -3041,7 +3041,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_t specific_t
|
||||
arg_started = TRUE;
|
||||
|
||||
/* Special treatment of file access check */
|
||||
if(specific_type == H5VL_FILE_IS_ACCESSIBLE) {
|
||||
if(specific_type == H5VL_FILE_IS_ACCESSIBLE || specific_type == H5VL_FILE_DELETE) {
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
|
||||
va_list tmp_args; /* argument list passed from the API call */
|
||||
|
@ -408,93 +408,6 @@ extern "C" {
|
||||
/* Helper routines for VOL connector authors */
|
||||
H5_DLL void *H5VLobject(hid_t obj_id);
|
||||
|
||||
/* Public wrappers for generic callbacks */
|
||||
H5_DLL herr_t H5VLinitialize(hid_t connector_id, hid_t vipl_id);
|
||||
H5_DLL herr_t H5VLterminate(hid_t connector_id);
|
||||
H5_DLL herr_t H5VLget_cap_flags(hid_t connector_id, unsigned *cap_flags);
|
||||
H5_DLL herr_t H5VLget_value(hid_t connector_id, H5VL_class_value_t *conn_value);
|
||||
|
||||
/* Public wrappers for info fields and callbacks */
|
||||
H5_DLL herr_t H5VLcopy_connector_info(hid_t connector_id, void **dst_vol_info, void *src_vol_info);
|
||||
H5_DLL herr_t H5VLcmp_connector_info(int *cmp, hid_t connector_id, const void *info1,
|
||||
const void *info2);
|
||||
H5_DLL herr_t H5VLfree_connector_info(hid_t connector_id, void *vol_info);
|
||||
H5_DLL herr_t H5VLconnector_info_to_str(const void *info, hid_t connector_id, char **str);
|
||||
H5_DLL herr_t H5VLconnector_str_to_info(const char *str, hid_t connector_id, void **info);
|
||||
|
||||
/* Public wrappers for attribute callbacks */
|
||||
H5_DLL void *H5VLattr_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLattr_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLattr_read(void *attr, hid_t connector_id, hid_t dtype_id, void *buf, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLattr_write(void *attr, hid_t connector_id, hid_t dtype_id, const void *buf, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLattr_get(void *obj, hid_t connector_id, H5VL_attr_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLattr_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_attr_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLattr_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLattr_close(void *attr, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for dataset callbacks */
|
||||
H5_DLL void *H5VLdataset_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLdataset_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLdataset_read(void *dset, hid_t connector_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, void *buf, void **req);
|
||||
H5_DLL herr_t H5VLdataset_write(void *dset, hid_t connector_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, const void *buf, void **req);
|
||||
H5_DLL herr_t H5VLdataset_get(void *dset, hid_t connector_id, H5VL_dataset_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdataset_specific(void *obj, hid_t connector_id, H5VL_dataset_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdataset_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdataset_close(void *dset, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for file callbacks */
|
||||
H5_DLL void *H5VLfile_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLfile_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLfile_get(void *file, hid_t connector_id, H5VL_file_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLfile_specific(void *obj, hid_t connector_id, H5VL_file_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLfile_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLfile_close(void *file, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for group callbacks */
|
||||
H5_DLL void *H5VLgroup_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLgroup_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLgroup_get(void *obj, hid_t connector_id, H5VL_group_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLgroup_specific(void *obj, hid_t connector_id, H5VL_group_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLgroup_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLgroup_close(void *grp, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for link callbacks */
|
||||
H5_DLL herr_t H5VLlink_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLlink_copy(void *src_obj, const H5VL_loc_params_t *loc_params1,
|
||||
void *dst_obj, const H5VL_loc_params_t *loc_params2, hid_t connector_id,
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLlink_move(void *src_obj, const H5VL_loc_params_t *loc_params1,
|
||||
void *dst_obj, const H5VL_loc_params_t *loc_params2, hid_t connector_id,
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLlink_get(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_link_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLlink_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_link_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLlink_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
|
||||
/* Public wrappers for object callbacks */
|
||||
H5_DLL void *H5VLobject_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5I_type_t *opened_type, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLobject_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, const char *src_name,
|
||||
void *dst_obj, const H5VL_loc_params_t *loc_params2, const char *dst_name,
|
||||
hid_t connector_id, hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLobject_get(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_object_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLobject_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLobject_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
|
||||
/* Public wrappers for named datatype callbacks */
|
||||
H5_DLL void *H5VLdatatype_commit(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLdatatype_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t tapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLdatatype_get(void *dt, hid_t connector_id, H5VL_datatype_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdatatype_specific(void *obj, hid_t connector_id, H5VL_datatype_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdatatype_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdatatype_close(void *dt, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for asynchronous request callbacks */
|
||||
H5_DLL herr_t H5VLrequest_wait(void *req, hid_t connector_id, uint64_t timeout, H5ES_status_t *status);
|
||||
H5_DLL herr_t H5VLrequest_notify(void *req, hid_t connector_id, H5VL_request_notify_t cb, void *ctx);
|
||||
H5_DLL herr_t H5VLrequest_cancel(void *req, hid_t connector_id);
|
||||
H5_DLL herr_t H5VLrequest_specific(void *req, hid_t connector_id, H5VL_request_specific_t specific_type, va_list arguments);
|
||||
H5_DLL herr_t H5VLrequest_optional(void *req, hid_t connector_id, va_list arguments);
|
||||
H5_DLL herr_t H5VLrequest_free(void *req, hid_t connector_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -20,7 +20,7 @@
|
||||
*
|
||||
* The functionality required to implement such a connector is specialized
|
||||
* and non-trivial so it has been split into this header in an effort to keep
|
||||
* the H5VLpublic_dev.h header easier to understand.
|
||||
* the H5VLconnector.h header easier to understand.
|
||||
*/
|
||||
|
||||
#ifndef _H5VLconnector_passthru_H
|
||||
@ -71,6 +71,92 @@ H5_DLL void *H5VLwrap_object(void *obj, H5I_type_t obj_type, hid_t connector_id,
|
||||
H5_DLL void *H5VLunwrap_object(void *obj, hid_t connector_id);
|
||||
H5_DLL herr_t H5VLfree_wrap_ctx(void *wrap_ctx, hid_t connector_id);
|
||||
|
||||
/* Public wrappers for generic callbacks */
|
||||
H5_DLL herr_t H5VLinitialize(hid_t connector_id, hid_t vipl_id);
|
||||
H5_DLL herr_t H5VLterminate(hid_t connector_id);
|
||||
H5_DLL herr_t H5VLget_cap_flags(hid_t connector_id, unsigned *cap_flags);
|
||||
H5_DLL herr_t H5VLget_value(hid_t connector_id, H5VL_class_value_t *conn_value);
|
||||
|
||||
/* Public wrappers for info fields and callbacks */
|
||||
H5_DLL herr_t H5VLcopy_connector_info(hid_t connector_id, void **dst_vol_info, void *src_vol_info);
|
||||
H5_DLL herr_t H5VLcmp_connector_info(int *cmp, hid_t connector_id, const void *info1,
|
||||
const void *info2);
|
||||
H5_DLL herr_t H5VLfree_connector_info(hid_t connector_id, void *vol_info);
|
||||
H5_DLL herr_t H5VLconnector_info_to_str(const void *info, hid_t connector_id, char **str);
|
||||
H5_DLL herr_t H5VLconnector_str_to_info(const char *str, hid_t connector_id, void **info);
|
||||
|
||||
/* Public wrappers for attribute callbacks */
|
||||
H5_DLL void *H5VLattr_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLattr_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLattr_read(void *attr, hid_t connector_id, hid_t dtype_id, void *buf, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLattr_write(void *attr, hid_t connector_id, hid_t dtype_id, const void *buf, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLattr_get(void *obj, hid_t connector_id, H5VL_attr_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLattr_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_attr_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLattr_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLattr_close(void *attr, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for dataset callbacks */
|
||||
H5_DLL void *H5VLdataset_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLdataset_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLdataset_read(void *dset, hid_t connector_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, void *buf, void **req);
|
||||
H5_DLL herr_t H5VLdataset_write(void *dset, hid_t connector_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, const void *buf, void **req);
|
||||
H5_DLL herr_t H5VLdataset_get(void *dset, hid_t connector_id, H5VL_dataset_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdataset_specific(void *obj, hid_t connector_id, H5VL_dataset_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdataset_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdataset_close(void *dset, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for file callbacks */
|
||||
H5_DLL void *H5VLfile_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLfile_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLfile_get(void *file, hid_t connector_id, H5VL_file_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLfile_specific(void *obj, hid_t connector_id, H5VL_file_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLfile_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLfile_close(void *file, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for group callbacks */
|
||||
H5_DLL void *H5VLgroup_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLgroup_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLgroup_get(void *obj, hid_t connector_id, H5VL_group_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLgroup_specific(void *obj, hid_t connector_id, H5VL_group_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLgroup_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLgroup_close(void *grp, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for link callbacks */
|
||||
H5_DLL herr_t H5VLlink_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLlink_copy(void *src_obj, const H5VL_loc_params_t *loc_params1,
|
||||
void *dst_obj, const H5VL_loc_params_t *loc_params2, hid_t connector_id,
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLlink_move(void *src_obj, const H5VL_loc_params_t *loc_params1,
|
||||
void *dst_obj, const H5VL_loc_params_t *loc_params2, hid_t connector_id,
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLlink_get(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_link_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLlink_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_link_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLlink_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
|
||||
/* Public wrappers for object callbacks */
|
||||
H5_DLL void *H5VLobject_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5I_type_t *opened_type, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLobject_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, const char *src_name,
|
||||
void *dst_obj, const H5VL_loc_params_t *loc_params2, const char *dst_name,
|
||||
hid_t connector_id, hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLobject_get(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_object_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLobject_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLobject_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
|
||||
/* Public wrappers for named datatype callbacks */
|
||||
H5_DLL void *H5VLdatatype_commit(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLdatatype_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t tapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLdatatype_get(void *dt, hid_t connector_id, H5VL_datatype_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdatatype_specific(void *obj, hid_t connector_id, H5VL_datatype_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdatatype_optional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLdatatype_close(void *dt, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for asynchronous request callbacks */
|
||||
H5_DLL herr_t H5VLrequest_wait(void *req, hid_t connector_id, uint64_t timeout, H5ES_status_t *status);
|
||||
H5_DLL herr_t H5VLrequest_notify(void *req, hid_t connector_id, H5VL_request_notify_t cb, void *ctx);
|
||||
H5_DLL herr_t H5VLrequest_cancel(void *req, hid_t connector_id);
|
||||
H5_DLL herr_t H5VLrequest_specific(void *req, hid_t connector_id, H5VL_request_specific_t specific_type, va_list arguments);
|
||||
H5_DLL herr_t H5VLrequest_optional(void *req, hid_t connector_id, va_list arguments);
|
||||
H5_DLL herr_t H5VLrequest_free(void *req, hid_t connector_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -386,10 +386,16 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type,
|
||||
|
||||
/* Call private routine */
|
||||
if((*ret = H5F__is_hdf5(name, fapl_id)) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "error in HDF5 file check")
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "error in HDF5 file check")
|
||||
break;
|
||||
}
|
||||
|
||||
/* H5Fdelete */
|
||||
case H5VL_FILE_DELETE:
|
||||
{
|
||||
HGOTO_ERROR(H5E_FILE, H5E_UNSUPPORTED, FAIL, "H5Fdelete() is currently not supported in the native VOL connector")
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
|
@ -1737,7 +1737,7 @@ H5VL_pass_through_file_specific(void *file, H5VL_file_specific_t specific_type,
|
||||
/* Re-issue 'file specific' call, using the unwrapped pieces */
|
||||
ret_value = H5VL_pass_through_file_specific_reissue(o->under_object, o->under_vol_id, specific_type, dxpl_id, req, (int)loc_type, name, child_file->under_object, plist_id);
|
||||
} /* end if */
|
||||
else if(specific_type == H5VL_FILE_IS_ACCESSIBLE) {
|
||||
else if(specific_type == H5VL_FILE_IS_ACCESSIBLE || specific_type == H5VL_FILE_DELETE) {
|
||||
H5VL_pass_through_info_t *info;
|
||||
hid_t fapl_id, under_fapl_id;
|
||||
const char *name;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* These are H5VL_class_value_t values, NOT hid_t values!
|
||||
*/
|
||||
#define H5_VOL_INVALID (-1) /* Invalid ID for VOL connector iD */
|
||||
#define H5_VOL_NATIVE 0 /* Native HDF5 file formnat VOL connector */
|
||||
#define H5_VOL_NATIVE 0 /* Native HDF5 file format VOL connector */
|
||||
#define H5_VOL_RESERVED 256 /* VOL connector IDs below this value are reserved for library use */
|
||||
#define H5_VOL_MAX 65535 /* Maximum VOL connector ID */
|
||||
|
||||
|
@ -134,6 +134,7 @@ MINOR, FILEACC, H5E_NOTHDF5, Not an HDF5 file
|
||||
MINOR, FILEACC, H5E_BADFILE, Bad file ID accessed
|
||||
MINOR, FILEACC, H5E_TRUNCATED, File has been truncated
|
||||
MINOR, FILEACC, H5E_MOUNT, File mount error
|
||||
MINOR, FILEACC, H5E_CANTDELETEFILE, Unable to delete file
|
||||
|
||||
# Generic low-level file I/O errors
|
||||
MINOR, FILE, H5E_SEEKERROR, Seek failed
|
||||
|
@ -2714,6 +2714,9 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
case H5VL_FILE_GET_INTENT:
|
||||
HDfprintf(out, "H5VL_FILE_GET_INTENT");
|
||||
break;
|
||||
case H5VL_FILE_GET_FILENO:
|
||||
HDfprintf(out, "H5VL_FILE_GET_FILENO");
|
||||
break;
|
||||
case H5VL_FILE_GET_NAME:
|
||||
HDfprintf(out, "H5VL_FILE_GET_NAME");
|
||||
break;
|
||||
@ -2755,6 +2758,9 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
case H5VL_FILE_IS_ACCESSIBLE:
|
||||
HDfprintf(out, "H5VL_FILE_IS_ACCESSIBLE");
|
||||
break;
|
||||
case H5VL_FILE_DELETE:
|
||||
HDfprintf(out, "H5VL_FILE_DELETE");
|
||||
break;
|
||||
default:
|
||||
HDfprintf(out, "%ld", (long)specific);
|
||||
break;
|
||||
|
@ -32,10 +32,18 @@ lib_LTLIBRARIES=libhdf5.la
|
||||
# Add libtool numbers to the HDF5 library (from config/lt_vers.am)
|
||||
libhdf5_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS)
|
||||
|
||||
# h5cc needs custom install and uninstall rules, since it may be
|
||||
# named h5pcc if hdf5 is being built in parallel mode.
|
||||
if BUILD_PARALLEL_CONDITIONAL
|
||||
H5CC_NAME=h5pcc
|
||||
else
|
||||
H5CC_NAME=h5cc
|
||||
endif
|
||||
|
||||
# H5Tinit.c and H5lib_settings.c are generated files and should be cleaned.
|
||||
MOSTLYCLEANFILES=H5Tinit.c H5lib_settings.c
|
||||
# H5pubconf.h is generated by configure, and should be cleaned.
|
||||
DISTCLEANFILES=H5pubconf.h
|
||||
DISTCLEANFILES=H5pubconf.h $(H5CC_NAME)
|
||||
|
||||
# library sources
|
||||
libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
|
||||
@ -152,6 +160,8 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers
|
||||
settingsdir=$(libdir)
|
||||
settings_DATA=libhdf5.settings
|
||||
|
||||
bin_SCRIPTS=$(H5CC_NAME)
|
||||
|
||||
# Number format detection
|
||||
# The LD_LIBRARY_PATH setting is a kludge.
|
||||
# Things should have been all set during H5detect making.
|
||||
@ -210,4 +220,10 @@ trace: $(libhdf5_la_SOURCES)
|
||||
fi; \
|
||||
done
|
||||
|
||||
#install-exec-local:
|
||||
# @$(INSTALL) h5cc $(DESTDIR)$(bindir)/$(H5CC_NAME)
|
||||
#uninstall-local:
|
||||
# @$(RM) $(DESTDIR)$(bindir)/$(H5CC_NAME)
|
||||
|
||||
include $(top_srcdir)/config/conclude.am
|
||||
|
||||
|
@ -71,6 +71,8 @@ Features:
|
||||
Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@
|
||||
Large Parallel I/O: @LARGE_PARALLEL_IO@
|
||||
High-level library: @HDF5_HL@
|
||||
Build HDF5 Tests: @HDF5_TESTS@
|
||||
Build HDF5 TOOLS: @HDF5_TOOLS@
|
||||
Threadsafety: @THREADSAFE@
|
||||
Default API mapping: @DEFAULT_API_VERSION@
|
||||
With deprecated public symbols: @DEPRECATED_SYMBOLS@
|
||||
|
107
test/tfile.c
107
test/tfile.c
@ -1850,6 +1850,102 @@ test_file_ishdf5(const char *env_h5_drvr)
|
||||
} /* end test_file_ishdf5() */
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_file_delete(): tests H5Fdelete for all VFDs
|
||||
**
|
||||
*****************************************************************/
|
||||
#define FILE_DELETE "test_file_delete"
|
||||
#define FILE_DELETE_NOT_HDF5 "test_file_delete_not_hdf5"
|
||||
static void
|
||||
test_file_delete(hid_t fapl_id)
|
||||
{
|
||||
hid_t fid = H5I_INVALID_HID; /* File to be deleted */
|
||||
char filename[FILENAME_LEN]; /* Filename to use */
|
||||
htri_t is_hdf5; /* Whether a file is an HDF5 file */
|
||||
int fd; /* POSIX file descriptor */
|
||||
int iret;
|
||||
herr_t ret;
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Deletion of HDF5 Files\n"));
|
||||
|
||||
/*************/
|
||||
/* HDF5 FILE */
|
||||
/*************/
|
||||
|
||||
/* This is just a placeholder until the native VOL connector supports
|
||||
* H5Fdelete().
|
||||
*/
|
||||
|
||||
/* Get fapl-dependent filename */
|
||||
h5_fixname(FILE_DELETE, fapl_id, filename, sizeof(filename));
|
||||
|
||||
/* Create a file */
|
||||
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
|
||||
CHECK(fid, H5I_INVALID_HID, "H5Fcreate");
|
||||
|
||||
/* Close file */
|
||||
ret = H5Fclose(fid);
|
||||
VERIFY(ret, SUCCEED, "H5Fclose");
|
||||
|
||||
/* Verify that the file is an HDF5 file */
|
||||
is_hdf5 = H5Fis_accessible(filename, fapl_id);
|
||||
VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
|
||||
|
||||
/* Attempt to delete the file - should fail */
|
||||
H5E_BEGIN_TRY {
|
||||
ret = H5Fdelete(filename, fapl_id);
|
||||
} H5E_END_TRY;
|
||||
VERIFY(ret, FAIL, "H5Fdelete");
|
||||
|
||||
/* Verify that the file still exists */
|
||||
is_hdf5 = H5Fis_accessible(filename, fapl_id);
|
||||
VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
|
||||
|
||||
/* Actually delete the test file */
|
||||
h5_delete_test_file(FILE_DELETE, fapl_id);
|
||||
|
||||
/*****************/
|
||||
/* NON-HDF5 FILE */
|
||||
/*****************/
|
||||
|
||||
/* Get fapl-dependent filename */
|
||||
h5_fixname(FILE_DELETE_NOT_HDF5, fapl_id, filename, sizeof(filename));
|
||||
|
||||
/* Create a non-HDF5 file */
|
||||
fd = HDopen(filename, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW);
|
||||
CHECK_I(fd, "HDopen");
|
||||
|
||||
/* Close the file */
|
||||
ret = HDclose(fd);
|
||||
VERIFY(ret, 0, "HDclose");
|
||||
|
||||
/* Verify that the file is not an HDF5 file */
|
||||
/* Note that you can get a FAIL result when h5_fixname()
|
||||
* perturbs the filename as a file with that exact name
|
||||
* may not have been created since we created it with
|
||||
* open(2) and not the library.
|
||||
*/
|
||||
H5E_BEGIN_TRY {
|
||||
is_hdf5 = H5Fis_accessible(filename, fapl_id);
|
||||
} H5E_END_TRY;
|
||||
VERIFY(is_hdf5, SUCCEED, "H5Fis_accessible");
|
||||
|
||||
/* Try to delete it (should fail) */
|
||||
H5E_BEGIN_TRY {
|
||||
ret = H5Fdelete(filename, fapl_id);
|
||||
} H5E_END_TRY;
|
||||
VERIFY(ret, FAIL, "H5Fdelete");
|
||||
|
||||
/* Delete the file */
|
||||
iret = HDremove(filename);
|
||||
VERIFY(iret, 0, "HDremove");
|
||||
|
||||
} /* end test_file_delete() */
|
||||
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_file_open_dot(): low-level file test routine.
|
||||
@ -7606,6 +7702,8 @@ void
|
||||
test_file(void)
|
||||
{
|
||||
const char *env_h5_drvr; /* File Driver value from environment */
|
||||
hid_t fapl_id = H5I_INVALID_HID; /* VFD-dependent fapl ID */
|
||||
herr_t ret;
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Low-Level File I/O\n"));
|
||||
@ -7615,6 +7713,10 @@ test_file(void)
|
||||
if(env_h5_drvr == NULL)
|
||||
env_h5_drvr = "nomatch";
|
||||
|
||||
/* Improved version of VFD-dependent checks */
|
||||
fapl_id = h5_fileaccess();
|
||||
CHECK(fapl_id, H5I_INVALID_HID, "h5_fileaccess");
|
||||
|
||||
test_file_create(); /* Test file creation(also creation templates)*/
|
||||
test_file_open(); /* Test file opening */
|
||||
test_file_reopen(); /* Test file reopening */
|
||||
@ -7624,6 +7726,7 @@ test_file(void)
|
||||
test_file_perm(); /* Test file access permissions */
|
||||
test_file_perm2(); /* Test file access permission again */
|
||||
test_file_is_accessible(env_h5_drvr); /* Test detecting HDF5 files correctly */
|
||||
test_file_delete(fapl_id); /* Test H5Fdelete */
|
||||
test_file_open_dot(); /* Test opening objects with "." for a name */
|
||||
test_file_open_overlap(); /* Test opening files in an overlapping manner */
|
||||
test_file_getname(); /* Test basic H5Fget_name() functionality */
|
||||
@ -7662,6 +7765,10 @@ test_file(void)
|
||||
test_file_ishdf5(env_h5_drvr); /* Test detecting HDF5 files correctly */
|
||||
test_deprec(); /* Test deprecated routines */
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
ret = H5Pclose(fapl_id);
|
||||
CHECK(ret, FAIL, "H5Pclose");
|
||||
|
||||
} /* test_file() */
|
||||
|
||||
|
||||
|
720
test/vds.c
720
test/vds.c
@ -1409,7 +1409,7 @@ test_basic_io(unsigned config, hid_t fapl)
|
||||
int erbuf[10][26]; /* Expected read buffer */
|
||||
int fill = -1; /* Fill value */
|
||||
herr_t ret; /* Generic return value */
|
||||
int i, j;
|
||||
int i, j, u, v;
|
||||
|
||||
TESTING("basic virtual dataset I/O")
|
||||
|
||||
@ -3498,6 +3498,724 @@ test_basic_io(unsigned config, hid_t fapl)
|
||||
memspace = -1;
|
||||
|
||||
|
||||
/*
|
||||
* Test 8: For code coverage: Horizontal block virtual mappings, and file
|
||||
* selection, grid memory selection
|
||||
*/
|
||||
/* Clear virtual layout in DCPL */
|
||||
if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create memory dataspace */
|
||||
if((memspace = H5Screate_simple(2, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create virtual dataspaces */
|
||||
dims[0] = 8;
|
||||
dims[1] = 15;
|
||||
if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
if((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create source dataspace */
|
||||
dims[0] = 4;
|
||||
if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Select all in source space (should not be necessary, but just to be sure)
|
||||
*/
|
||||
if(H5Sselect_all(srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Select hyperslabs in virtual spaces */
|
||||
start[0] = 0;
|
||||
start[1] = 0;
|
||||
if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
|
||||
TEST_ERROR
|
||||
start[0] = 4;
|
||||
if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Add virtual layout mappings */
|
||||
if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Reset dims */
|
||||
dims[0] = 10;
|
||||
dims[1] = 26;
|
||||
|
||||
/* Create virtual file */
|
||||
if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create source file if requested */
|
||||
if(config & TEST_IO_DIFFERENT_FILE) {
|
||||
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
|
||||
TEST_ERROR
|
||||
}
|
||||
else {
|
||||
srcfile[0] = vfile;
|
||||
if(H5Iinc_ref(srcfile[0]) < 0)
|
||||
TEST_ERROR
|
||||
}
|
||||
|
||||
/* Create source datasets */
|
||||
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create virtual dataset */
|
||||
if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Reset erbuf */
|
||||
HDmemset(erbuf[0], 0, sizeof(rbuf));
|
||||
|
||||
/* Populate write buffer */
|
||||
for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
|
||||
for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
|
||||
buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j;
|
||||
|
||||
/* Select hyperslab in memory */
|
||||
start[0] = 0;
|
||||
start[1] = 0;
|
||||
count[0] = 4;
|
||||
count[1] = 15;
|
||||
if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Write data directly to first source dataset */
|
||||
if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Update erbuf */
|
||||
u = 0;
|
||||
v = 0;
|
||||
for(i = 2; i < 4; i++)
|
||||
for(j = 0; j < 15; j++) {
|
||||
erbuf[u][v] = buf[i][j];
|
||||
v += 2;
|
||||
if(v >= 24) {
|
||||
u += 2;
|
||||
v = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Select hyperslab in memory */
|
||||
start[0] = 4;
|
||||
if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Write data directly to second source dataset */
|
||||
if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Update erbuf */
|
||||
for(i = 4; i < 6; i++)
|
||||
for(j = 0; j < 15; j++) {
|
||||
erbuf[u][v] = buf[i][j];
|
||||
v += 2;
|
||||
if(v >= 24) {
|
||||
u += 2;
|
||||
v = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Close srcdsets and srcfile if config option specified */
|
||||
if(config & TEST_IO_CLOSE_SRC) {
|
||||
if(H5Dclose(srcdset[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[0] = -1;
|
||||
if(H5Dclose(srcdset[1]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[1] = -1;
|
||||
if(H5Fclose(srcfile[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcfile[0] = -1;
|
||||
}
|
||||
|
||||
/* Reopen virtual dataset and file if config option specified */
|
||||
if(config & TEST_IO_REOPEN_VIRT) {
|
||||
if(H5Dclose(vdset) < 0)
|
||||
TEST_ERROR
|
||||
vdset = -1;
|
||||
if(H5Fclose(vfile) < 0)
|
||||
TEST_ERROR
|
||||
vfile = -1;
|
||||
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
|
||||
TEST_ERROR
|
||||
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
}
|
||||
|
||||
/* Select hyperslab in memory */
|
||||
start[0] = 0;
|
||||
start[1] = 0;
|
||||
stride[0] = 2;
|
||||
stride[1] = 2;
|
||||
count[0] = 5;
|
||||
count[1] = 12;
|
||||
block[0] = 1;
|
||||
block[1] = 1;
|
||||
if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Select hyperslab in file */
|
||||
start[0] = 2;
|
||||
start[1] = 0;
|
||||
count[0] = 4;
|
||||
count[1] = 15;
|
||||
if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Read data through virtual dataset */
|
||||
HDmemset(rbuf[0], 0, sizeof(rbuf));
|
||||
if(H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Verify read data */
|
||||
for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
|
||||
for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
|
||||
if(rbuf[i][j] != erbuf[i][j])
|
||||
TEST_ERROR
|
||||
|
||||
/* Close */
|
||||
if(!(config & TEST_IO_CLOSE_SRC)) {
|
||||
if(H5Dclose(srcdset[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[0] = -1;
|
||||
if(H5Dclose(srcdset[1]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[1] = -1;
|
||||
if(H5Fclose(srcfile[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcfile[0] = -1;
|
||||
}
|
||||
if(H5Dclose(vdset) < 0)
|
||||
TEST_ERROR
|
||||
vdset = -1;
|
||||
if(H5Fclose(vfile) < 0)
|
||||
TEST_ERROR
|
||||
vfile = -1;
|
||||
if(H5Sclose(srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcspace[0] = -1;
|
||||
if(H5Sclose(vspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
vspace[0] = -1;
|
||||
if(H5Sclose(vspace[1]) < 0)
|
||||
TEST_ERROR
|
||||
vspace[1] = -1;
|
||||
if(H5Sclose(memspace) < 0)
|
||||
TEST_ERROR
|
||||
memspace = -1;
|
||||
|
||||
|
||||
/*
|
||||
* Test 9: For code coverage: Horizontal block virtual mappings, and file
|
||||
* selection, grid memory selection, 3 mappings, 3D memory space
|
||||
*/
|
||||
/* Clear virtual layout in DCPL */
|
||||
if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create memory dataspace */
|
||||
dims[1] = 13;
|
||||
dims[2] = 2;
|
||||
if((memspace = H5Screate_simple(3, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create virtual dataspaces */
|
||||
dims[0] = 6;
|
||||
dims[1] = 10;
|
||||
if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
if((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
if((vspace[2] = H5Screate_simple(2, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create source dataspace */
|
||||
dims[0] = 2;
|
||||
if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Select all in source space (should not be necessary, but just to be sure)
|
||||
*/
|
||||
if(H5Sselect_all(srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Select hyperslabs in virtual spaces */
|
||||
start[0] = 0;
|
||||
start[1] = 0;
|
||||
if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
|
||||
TEST_ERROR
|
||||
start[0] = 2;
|
||||
if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
|
||||
TEST_ERROR
|
||||
start[0] = 4;
|
||||
if(H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Add virtual layout mappings */
|
||||
if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
if(H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset3", srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Reset dims */
|
||||
dims[0] = 10;
|
||||
dims[1] = 26;
|
||||
|
||||
/* Create virtual file */
|
||||
if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create source file if requested */
|
||||
if(config & TEST_IO_DIFFERENT_FILE) {
|
||||
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
|
||||
TEST_ERROR
|
||||
}
|
||||
else {
|
||||
srcfile[0] = vfile;
|
||||
if(H5Iinc_ref(srcfile[0]) < 0)
|
||||
TEST_ERROR
|
||||
}
|
||||
|
||||
/* Create source datasets */
|
||||
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
if((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create virtual dataset */
|
||||
if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Reset erbuf */
|
||||
HDmemset(erbuf[0], 0, sizeof(rbuf));
|
||||
|
||||
/* Populate write buffer */
|
||||
for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
|
||||
for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
|
||||
buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j;
|
||||
|
||||
/* Select hyperslab in memory */
|
||||
start[0] = 0;
|
||||
start[1] = 0;
|
||||
start[2] = 0;
|
||||
count[0] = 2;
|
||||
count[1] = 5;
|
||||
count[2] = 2;
|
||||
if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Write data directly to first source dataset */
|
||||
if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Update erbuf */
|
||||
u = 0;
|
||||
v = 0;
|
||||
for(i = 0; i < 2; i++)
|
||||
for(j = 0; j < 10; j++) {
|
||||
erbuf[u][v] = buf[i][j];
|
||||
if(++v == 6)
|
||||
v += 2;
|
||||
else if(v == 14) {
|
||||
u += 2;
|
||||
v = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Select hyperslab in memory */
|
||||
start[0] = 2;
|
||||
if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Write data directly to second source dataset */
|
||||
if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Update erbuf */
|
||||
for(i = 2; i < 4; i++)
|
||||
for(j = 0; j < 10; j++) {
|
||||
erbuf[u][v] = buf[i][j];
|
||||
if(++v == 6)
|
||||
v += 2;
|
||||
else if(v == 14) {
|
||||
u += 2;
|
||||
v = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Select hyperslab in memory */
|
||||
start[0] = 4;
|
||||
if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Write data directly to third source dataset */
|
||||
if(H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Update erbuf */
|
||||
for(i = 4; i < 6; i++)
|
||||
for(j = 0; j < 10; j++) {
|
||||
erbuf[u][v] = buf[i][j];
|
||||
if(++v == 6)
|
||||
v += 2;
|
||||
else if(v == 14) {
|
||||
u += 2;
|
||||
v = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Close srcdsets and srcfile if config option specified */
|
||||
if(config & TEST_IO_CLOSE_SRC) {
|
||||
if(H5Dclose(srcdset[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[0] = -1;
|
||||
if(H5Dclose(srcdset[1]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[1] = -1;
|
||||
if(H5Dclose(srcdset[2]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[2] = -1;
|
||||
if(H5Fclose(srcfile[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcfile[0] = -1;
|
||||
}
|
||||
|
||||
/* Reopen virtual dataset and file if config option specified */
|
||||
if(config & TEST_IO_REOPEN_VIRT) {
|
||||
if(H5Dclose(vdset) < 0)
|
||||
TEST_ERROR
|
||||
vdset = -1;
|
||||
if(H5Fclose(vfile) < 0)
|
||||
TEST_ERROR
|
||||
vfile = -1;
|
||||
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
|
||||
TEST_ERROR
|
||||
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
}
|
||||
|
||||
/* Select hyperslab in memory */
|
||||
start[0] = 0;
|
||||
start[1] = 0;
|
||||
start[2] = 0;
|
||||
stride[0] = 2;
|
||||
stride[1] = 4;
|
||||
stride[2] = 1;
|
||||
count[0] = 5;
|
||||
count[1] = 2;
|
||||
count[2] = 1;
|
||||
block[0] = 1;
|
||||
block[1] = 3;
|
||||
block[2] = 2;
|
||||
if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Read data through virtual dataset */
|
||||
HDmemset(rbuf[0], 0, sizeof(rbuf));
|
||||
if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Verify read data */
|
||||
for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
|
||||
for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
|
||||
if(rbuf[i][j] != erbuf[i][j])
|
||||
TEST_ERROR
|
||||
|
||||
/* Close */
|
||||
if(!(config & TEST_IO_CLOSE_SRC)) {
|
||||
if(H5Dclose(srcdset[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[0] = -1;
|
||||
if(H5Dclose(srcdset[1]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[1] = -1;
|
||||
if(H5Dclose(srcdset[2]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[2] = -1;
|
||||
if(H5Fclose(srcfile[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcfile[0] = -1;
|
||||
}
|
||||
if(H5Dclose(vdset) < 0)
|
||||
TEST_ERROR
|
||||
vdset = -1;
|
||||
if(H5Fclose(vfile) < 0)
|
||||
TEST_ERROR
|
||||
vfile = -1;
|
||||
if(H5Sclose(srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcspace[0] = -1;
|
||||
if(H5Sclose(vspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
vspace[0] = -1;
|
||||
if(H5Sclose(vspace[1]) < 0)
|
||||
TEST_ERROR
|
||||
vspace[1] = -1;
|
||||
if(H5Sclose(vspace[2]) < 0)
|
||||
TEST_ERROR
|
||||
vspace[2] = -1;
|
||||
if(H5Sclose(memspace) < 0)
|
||||
TEST_ERROR
|
||||
memspace = -1;
|
||||
|
||||
|
||||
/*
|
||||
* Test 10: For code coverage: Vertical stripe virtual mappings, vertical
|
||||
* block file selection, block memory selection, 3D VDS
|
||||
*/
|
||||
/* Clear virtual layout in DCPL */
|
||||
if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create memory dataspace */
|
||||
if((memspace = H5Screate_simple(2, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create virtual dataspaces */
|
||||
dims[0] = 10;
|
||||
dims[1] = 9;
|
||||
dims[2] = 6;
|
||||
if((vspace[0] = H5Screate_simple(3, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
if((vspace[1] = H5Screate_simple(3, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create source dataspace */
|
||||
dims[1] = 12;
|
||||
if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Select all in source space (should not be necessary, but just to be sure)
|
||||
*/
|
||||
if(H5Sselect_all(srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Select hyperslabs in virtual spaces */
|
||||
start[0] = 0;
|
||||
start[1] = 0;
|
||||
start[2] = 0;
|
||||
count[0] = 1;
|
||||
count[1] = 4;
|
||||
count[2] = 3;
|
||||
stride[0] = 1;
|
||||
stride[1] = 2;
|
||||
stride[2] = 2;
|
||||
block[0] = 10;
|
||||
block[1] = 1;
|
||||
block[2] = 1;
|
||||
if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
|
||||
TEST_ERROR
|
||||
start[2] = 1;
|
||||
if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Add virtual layout mappings */
|
||||
if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Reset dims */
|
||||
dims[0] = 10;
|
||||
dims[1] = 26;
|
||||
|
||||
/* Create virtual file */
|
||||
if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create source file if requested */
|
||||
if(config & TEST_IO_DIFFERENT_FILE) {
|
||||
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
|
||||
TEST_ERROR
|
||||
}
|
||||
else {
|
||||
srcfile[0] = vfile;
|
||||
if(H5Iinc_ref(srcfile[0]) < 0)
|
||||
TEST_ERROR
|
||||
}
|
||||
|
||||
/* Create source datasets */
|
||||
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Create virtual dataset */
|
||||
if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Initialize erbuf */
|
||||
HDmemset(erbuf[0], 0, sizeof(rbuf));
|
||||
for(i = 0; i < 10; i++)
|
||||
for(j = 0; j < 24; j += 6) {
|
||||
erbuf[i][j] = -1;
|
||||
erbuf[i][j + 1] = -1;
|
||||
}
|
||||
|
||||
/* Populate write buffer */
|
||||
for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
|
||||
for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
|
||||
buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j;
|
||||
|
||||
/* Select hyperslab in memory */
|
||||
start[0] = 0;
|
||||
start[1] = 0;
|
||||
count[0] = 10;
|
||||
count[1] = 12;
|
||||
if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Write data directly to first source dataset */
|
||||
if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Update erbuf */
|
||||
u = 0;
|
||||
v = 0;
|
||||
for(i = 0; i < 10; i++)
|
||||
for(j = 0; j < 8; j++) {
|
||||
if(v == 0 || v == 12)
|
||||
erbuf[u][v] = buf[i][j];
|
||||
v += 2;
|
||||
if(!(v % 6))
|
||||
v += 6;
|
||||
if(v >= 28) {
|
||||
u++;
|
||||
v = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Select hyperslab in memory */
|
||||
start[1] = 8;
|
||||
if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Write data directly to second source dataset */
|
||||
if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Update erbuf */
|
||||
u = 0;
|
||||
v = 1;
|
||||
for(i = 0; i < 10; i++)
|
||||
for(j = 8; j < 16; j++) {
|
||||
if(v == 1 || v == 13)
|
||||
erbuf[u][v] = buf[i][j];
|
||||
v += 2;
|
||||
if(!((v - 1) % 6))
|
||||
v += 6;
|
||||
if(v >= 28) {
|
||||
u++;
|
||||
v = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Close srcdsets and srcfile if config option specified */
|
||||
if(config & TEST_IO_CLOSE_SRC) {
|
||||
if(H5Dclose(srcdset[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[0] = -1;
|
||||
if(H5Dclose(srcdset[1]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[1] = -1;
|
||||
if(H5Fclose(srcfile[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcfile[0] = -1;
|
||||
}
|
||||
|
||||
/* Reopen virtual dataset and file if config option specified */
|
||||
if(config & TEST_IO_REOPEN_VIRT) {
|
||||
if(H5Dclose(vdset) < 0)
|
||||
TEST_ERROR
|
||||
vdset = -1;
|
||||
if(H5Fclose(vfile) < 0)
|
||||
TEST_ERROR
|
||||
vfile = -1;
|
||||
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
|
||||
TEST_ERROR
|
||||
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
}
|
||||
|
||||
/* Select hyperslab in memory */
|
||||
start[0] = 0;
|
||||
start[1] = 0;
|
||||
stride[0] = 1;
|
||||
stride[1] = 6;
|
||||
count[0] = 1;
|
||||
count[1] = 4;
|
||||
block[0] = 10;
|
||||
block[1] = 2;
|
||||
if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Select hyperslab in file */
|
||||
start[0] = 0;
|
||||
start[1] = 0;
|
||||
start[2] = 0;
|
||||
count[0] = 10;
|
||||
count[1] = 4;
|
||||
count[2] = 2;
|
||||
if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Read data through virtual dataset */
|
||||
HDmemset(rbuf[0], 0, sizeof(rbuf));
|
||||
if(H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
/* Verify read data */
|
||||
for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
|
||||
for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
|
||||
if(rbuf[i][j] != erbuf[i][j])
|
||||
TEST_ERROR
|
||||
|
||||
/* Close */
|
||||
if(!(config & TEST_IO_CLOSE_SRC)) {
|
||||
if(H5Dclose(srcdset[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[0] = -1;
|
||||
if(H5Dclose(srcdset[1]) < 0)
|
||||
TEST_ERROR
|
||||
srcdset[1] = -1;
|
||||
if(H5Fclose(srcfile[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcfile[0] = -1;
|
||||
}
|
||||
if(H5Dclose(vdset) < 0)
|
||||
TEST_ERROR
|
||||
vdset = -1;
|
||||
if(H5Fclose(vfile) < 0)
|
||||
TEST_ERROR
|
||||
vfile = -1;
|
||||
if(H5Sclose(srcspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
srcspace[0] = -1;
|
||||
if(H5Sclose(vspace[0]) < 0)
|
||||
TEST_ERROR
|
||||
vspace[0] = -1;
|
||||
if(H5Sclose(vspace[1]) < 0)
|
||||
TEST_ERROR
|
||||
vspace[1] = -1;
|
||||
if(H5Sclose(memspace) < 0)
|
||||
TEST_ERROR
|
||||
memspace = -1;
|
||||
|
||||
|
||||
/* Close */
|
||||
if(H5Pclose(dcpl) < 0)
|
||||
TEST_ERROR
|
||||
|
73
test/vol.c
73
test/vol.c
@ -11,7 +11,7 @@
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* Purpose: Tests the virtual object layer (H5VL)
|
||||
* Purpose: Tests the virtual object layer (H5VL)
|
||||
*
|
||||
* This is a minimal test to ensure VOL usage (setting a VOL, etc.)
|
||||
* works as expected. Actual VOL functionality is tested using
|
||||
@ -148,50 +148,83 @@ static const H5VL_class_t fake_vol_g = {
|
||||
static herr_t
|
||||
test_vol_registration(void)
|
||||
{
|
||||
htri_t is_registered;
|
||||
hid_t vol_id = -1, vol_id2 = -1;
|
||||
hid_t native_id = H5I_INVALID_HID;
|
||||
hid_t lapl_id = H5I_INVALID_HID;
|
||||
hid_t vipl_id = H5I_INVALID_HID;
|
||||
herr_t ret = SUCCEED;
|
||||
htri_t is_registered = FAIL;
|
||||
hid_t vol_id = H5I_INVALID_HID;
|
||||
hid_t vol_id2 = H5I_INVALID_HID;
|
||||
|
||||
TESTING("VOL registration");
|
||||
|
||||
/* The test/fake VOL connector should not be registered at the start of the test */
|
||||
if ((is_registered = H5VLis_connector_registered(FAKE_VOL_NAME)) < 0)
|
||||
FAIL_STACK_ERROR;
|
||||
TEST_ERROR;
|
||||
if (is_registered > 0)
|
||||
FAIL_PUTS_ERROR("native VOL connector is inappropriately registered");
|
||||
FAIL_PUTS_ERROR("VOL connector is inappropriately registered");
|
||||
|
||||
/* Load a VOL interface */
|
||||
if ((vol_id = H5VLregister_connector(&fake_vol_g, H5P_DEFAULT)) < 0)
|
||||
FAIL_STACK_ERROR;
|
||||
/* Test registering a connector with an incorrect property list (SHOULD FAIL) */
|
||||
if ((lapl_id = H5Pcreate(H5P_LINK_ACCESS)) < 0)
|
||||
TEST_ERROR;
|
||||
H5E_BEGIN_TRY {
|
||||
vol_id = H5VLregister_connector(&fake_vol_g, lapl_id);
|
||||
} H5E_END_TRY;
|
||||
if (H5I_INVALID_HID != vol_id)
|
||||
FAIL_PUTS_ERROR("should not be able to register a connector with an incorrect property list");
|
||||
if (H5Pclose(lapl_id) < 0)
|
||||
TEST_ERROR;
|
||||
|
||||
/* Load a VOL interface
|
||||
* The vipl_id does nothing without a VOL that needs it, but we do need to
|
||||
* test creating a property list of that class and passing it along as a
|
||||
* smoke check.
|
||||
*/
|
||||
if ((vipl_id = H5Pcreate(H5P_VOL_INITIALIZE)) < 0)
|
||||
TEST_ERROR;
|
||||
if ((vol_id = H5VLregister_connector(&fake_vol_g, vipl_id)) < 0)
|
||||
TEST_ERROR;
|
||||
if (H5Pclose(vipl_id) < 0)
|
||||
TEST_ERROR;
|
||||
|
||||
/* The test/fake VOL connector should be registered now */
|
||||
if ((is_registered = H5VLis_connector_registered(FAKE_VOL_NAME)) < 0)
|
||||
FAIL_STACK_ERROR;
|
||||
TEST_ERROR;
|
||||
if (0 == is_registered)
|
||||
FAIL_PUTS_ERROR("native VOL connector is un-registered");
|
||||
FAIL_PUTS_ERROR("VOL connector is un-registered");
|
||||
|
||||
/* Re-register a VOL connector */
|
||||
if ((vol_id2 = H5VLregister_connector(&fake_vol_g, H5P_DEFAULT)) < 0)
|
||||
FAIL_STACK_ERROR;
|
||||
TEST_ERROR;
|
||||
|
||||
/* The test/fake VOL connector should still be registered now */
|
||||
if ((is_registered = H5VLis_connector_registered(FAKE_VOL_NAME)) < 0)
|
||||
FAIL_STACK_ERROR;
|
||||
TEST_ERROR;
|
||||
if (0 == is_registered)
|
||||
FAIL_PUTS_ERROR("native VOL connector is un-registered");
|
||||
FAIL_PUTS_ERROR("VOL connector is un-registered");
|
||||
|
||||
/* Unregister the second test/fake VOL ID */
|
||||
if (H5VLunregister_connector(vol_id2) < 0)
|
||||
FAIL_STACK_ERROR;
|
||||
TEST_ERROR;
|
||||
|
||||
/* The test/fake VOL connector should still be registered now */
|
||||
if ((is_registered = H5VLis_connector_registered(FAKE_VOL_NAME)) < 0)
|
||||
FAIL_STACK_ERROR;
|
||||
TEST_ERROR;
|
||||
if (0 == is_registered)
|
||||
FAIL_PUTS_ERROR("native VOL connector is un-registered");
|
||||
FAIL_PUTS_ERROR("VOL connector is un-registered");
|
||||
|
||||
/* Unregister the original test/fake VOL ID */
|
||||
if (H5VLunregister_connector(vol_id) < 0)
|
||||
FAIL_STACK_ERROR;
|
||||
TEST_ERROR;
|
||||
|
||||
/* Try to unregister the native VOL connector (should fail) */
|
||||
if (H5I_INVALID_HID == (native_id = H5VLget_connector_id(H5VL_NATIVE_NAME)))
|
||||
TEST_ERROR;
|
||||
H5E_BEGIN_TRY {
|
||||
ret = H5VLunregister_connector(native_id);
|
||||
} H5E_END_TRY;
|
||||
if (FAIL != ret)
|
||||
FAIL_PUTS_ERROR("should not be able to unregister the native VOL connector");
|
||||
|
||||
PASSED();
|
||||
return SUCCEED;
|
||||
@ -199,6 +232,8 @@ test_vol_registration(void)
|
||||
error:
|
||||
H5E_BEGIN_TRY {
|
||||
H5VLunregister_connector(vol_id);
|
||||
H5Pclose(lapl_id);
|
||||
H5Pclose(vipl_id);
|
||||
} H5E_END_TRY;
|
||||
return FAIL;
|
||||
|
||||
@ -223,7 +258,7 @@ test_native_vol_init(void)
|
||||
|
||||
/* The native VOL connector should always be registered */
|
||||
if ((is_registered = H5VLis_connector_registered(H5VL_NATIVE_NAME)) < 0)
|
||||
FAIL_STACK_ERROR;
|
||||
TEST_ERROR;
|
||||
if (0 == is_registered)
|
||||
FAIL_PUTS_ERROR("native VOL connector is un-registered");
|
||||
|
||||
@ -281,7 +316,7 @@ test_basic_file_operation(const char *env_h5_drvr)
|
||||
if(H5Pset_fclose_degree(fapl_id, H5F_CLOSE_SEMI) < 0)
|
||||
TEST_ERROR;
|
||||
if(H5Pset_metadata_read_attempts(fapl_id, 9) < 0)
|
||||
FAIL_STACK_ERROR
|
||||
TEST_ERROR
|
||||
|
||||
/* H5Fcreate */
|
||||
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
|
||||
|
@ -19,10 +19,16 @@
|
||||
|
||||
include $(top_srcdir)/config/commence.am
|
||||
|
||||
if BUILD_TESTS_CONDITIONAL
|
||||
TESTSERIAL_DIR =test
|
||||
else
|
||||
TESTSERIAL_DIR=
|
||||
endif
|
||||
|
||||
CONFIG=ordered
|
||||
|
||||
# All subdirectories
|
||||
SUBDIRS=lib src test
|
||||
SUBDIRS=lib src $(TESTSERIAL_DIR)
|
||||
|
||||
# Test with just the native connector, with a single pass-through connector
|
||||
# and with a doubly-stacked pass-through.
|
||||
|
@ -28,7 +28,7 @@ libh5repack_la_SOURCES=h5repack.c h5repack_copy.c h5repack_filters.c \
|
||||
h5repack_opttable.c h5repack_parse.c h5repack_refs.c \
|
||||
h5repack_verify.c
|
||||
libh5repack_la_LDFLAGS = $(AM_LDFLAGS)
|
||||
libh5repack_la_LIBADD=$(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5)
|
||||
libh5repack_la_LIBADD=$(LIBH5TOOLS) $(LIBHDF5)
|
||||
|
||||
|
||||
# Our main target, h5repack tool
|
||||
|
@ -40,19 +40,6 @@ DISTCLEANFILES=h5cc
|
||||
# All programs rely on hdf5 library and h5tools library
|
||||
LDADD=$(LIBH5TOOLS) $(LIBHDF5)
|
||||
|
||||
# h5cc needs custom install and uninstall rules, since it may be
|
||||
# named h5pcc if hdf5 is being built in parallel mode.
|
||||
if BUILD_PARALLEL_CONDITIONAL
|
||||
H5CC_NAME=h5pcc
|
||||
else
|
||||
H5CC_NAME=h5cc
|
||||
endif
|
||||
|
||||
install-exec-local:
|
||||
@$(INSTALL) h5cc $(DESTDIR)$(bindir)/$(H5CC_NAME)
|
||||
uninstall-local:
|
||||
@$(RM) $(DESTDIR)$(bindir)/$(H5CC_NAME)
|
||||
|
||||
# How to build h5redeploy script
|
||||
h5redeploy: h5redeploy.in
|
||||
@cp $(srcdir)/$@.in $@
|
||||
|
Loading…
x
Reference in New Issue
Block a user