From f7d530dd275e176e59b26c1b7363ba16b3ab6c9c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 7 Jan 2019 11:07:52 -0600 Subject: HDFFV-10674, 10664, 10674 --- MANIFEST | 1 + config/cmake/HDF5UseFortran.cmake | 6 +- config/cmake/HDFCompilerFlags.cmake | 6 +- config/cmake_ext_mod/ConfigureChecks.cmake | 142 +++++++++++++++-------------- config/cmake_ext_mod/HDFUseCXX.cmake | 4 +- config/cmake_ext_mod/HDFUseFortran.cmake | 4 +- config/toolchain/GCC.cmake | 3 +- config/toolchain/PGI.cmake | 11 +++ config/toolchain/crayle.cmake | 3 +- config/toolchain/intel.cmake | 1 + java/src/hdf/hdf5lib/H5.java | 77 +++++++++++++++- java/src/jni/h5fImp.c | 60 ++++++++++++ java/src/jni/h5fImp.h | 27 ++++++ java/src/jni/h5pImp.c | 45 +++++++++ java/src/jni/h5pImp.h | 18 ++++ java/test/TestH5Dplist.java | 20 ++++ java/test/TestH5Fbasic.java | 17 ++++ java/test/TestH5Fparams.java | 40 ++++++++ java/test/junit.sh.in | 73 +++++++-------- java/test/testfiles/JUnit-TestH5Dplist.txt | 3 +- java/test/testfiles/JUnit-TestH5Fbasic.txt | 3 +- release_docs/RELEASE.txt | 37 ++++++-- 22 files changed, 476 insertions(+), 125 deletions(-) create mode 100644 config/toolchain/PGI.cmake diff --git a/MANIFEST b/MANIFEST index 936bd7e..a76435f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3159,6 +3159,7 @@ ./config/toolchain/crayle.cmake ./config/toolchain/GCC.cmake ./config/toolchain/intel.cmake +./config/toolchain/PGI.cmake ./config/cmake/cacheinit.cmake ./config/cmake/CMakeFindJavaCommon.cmake diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 157befd..14774c7 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -40,7 +40,7 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 - LINK_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}" + LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}" ) if (${COMPILE_RESULT_VAR}) @@ -367,9 +367,9 @@ ENABLE_LANGUAGE (C) #----------------------------------------------------------------------------- macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) message (STATUS "Detecting C ${FUNCTION_NAME}") - if (CMAKE_REQUIRED_LIBRARIES) + if (HDF5_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") else () set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) endif () diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 93ebc3c..0a39568 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -9,16 +9,16 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD_REQUIRED TRUE) message (STATUS "Warnings Configuration:") +set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}") #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") - if (NOT CYGWIN) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") - endif () if (${HDF_CFG_NAME} MATCHES "Debug") if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common") diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 40f1440..0424ed6 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -70,7 +70,7 @@ if (WIN32) set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1") endif () set (${HDF_PREFIX}_HAVE_WIN32_API 1) - set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib") + set (HDF5_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib") if (NOT UNIX AND NOT MINGW) set (WINDOWS 1) set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1") @@ -109,6 +109,78 @@ endif () # END of WINDOWS Hard code Values # ---------------------------------------------------------------------- +if (NOT WINDOWS) + TEST_BIG_ENDIAN (${HDF_PREFIX}_WORDS_BIGENDIAN) +endif () + +#----------------------------------------------------------------------------- +# Check IF header file exists and add it to the list. +#----------------------------------------------------------------------------- +macro (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE) + CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE}) + if (${VARIABLE}) + set (USE_INCLUDES ${USE_INCLUDES} ${FILE}) + endif () +endmacro () + +#----------------------------------------------------------------------------- +# Check for the existence of certain header files +#----------------------------------------------------------------------------- +CHECK_INCLUDE_FILE_CONCAT ("sys/file.h" ${HDF_PREFIX}_HAVE_SYS_FILE_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h" ${HDF_PREFIX}_HAVE_SYS_IOCTL_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" ${HDF_PREFIX}_HAVE_SYS_SOCKET_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" ${HDF_PREFIX}_HAVE_SYS_STAT_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" ${HDF_PREFIX}_HAVE_SYS_TIME_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" ${HDF_PREFIX}_HAVE_SYS_TYPES_H) +CHECK_INCLUDE_FILE_CONCAT ("features.h" ${HDF_PREFIX}_HAVE_FEATURES_H) +CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H) +CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" ${HDF_PREFIX}_HAVE_SETJMP_H) +CHECK_INCLUDE_FILE_CONCAT ("stddef.h" ${HDF_PREFIX}_HAVE_STDDEF_H) +CHECK_INCLUDE_FILE_CONCAT ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H) +CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H) + +# Darwin +CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" ${HDF_PREFIX}_HAVE_MACH_MACH_TIME_H) + +# Windows +CHECK_INCLUDE_FILE_CONCAT ("io.h" ${HDF_PREFIX}_HAVE_IO_H) +if (NOT CYGWIN) + CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" ${HDF_PREFIX}_HAVE_WINSOCK2_H) +endif () +CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" ${HDF_PREFIX}_HAVE_SYS_TIMEB_H) + +if (CMAKE_SYSTEM_NAME MATCHES "OSF") + CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" ${HDF_PREFIX}_HAVE_SYS_SYSINFO_H) + CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" ${HDF_PREFIX}_HAVE_SYS_PROC_H) +else () + set (${HDF_PREFIX}_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE) + set (${HDF_PREFIX}_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE) +endif () + +CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" ${HDF_PREFIX}_HAVE_GLOBUS_COMMON_H) +CHECK_INCLUDE_FILE_CONCAT ("pdb.h" ${HDF_PREFIX}_HAVE_PDB_H) +CHECK_INCLUDE_FILE_CONCAT ("pthread.h" ${HDF_PREFIX}_HAVE_PTHREAD_H) +CHECK_INCLUDE_FILE_CONCAT ("srbclient.h" ${HDF_PREFIX}_HAVE_SRBCLIENT_H) +CHECK_INCLUDE_FILE_CONCAT ("string.h" ${HDF_PREFIX}_HAVE_STRING_H) +CHECK_INCLUDE_FILE_CONCAT ("strings.h" ${HDF_PREFIX}_HAVE_STRINGS_H) +CHECK_INCLUDE_FILE_CONCAT ("stdlib.h" ${HDF_PREFIX}_HAVE_STDLIB_H) +CHECK_INCLUDE_FILE_CONCAT ("memory.h" ${HDF_PREFIX}_HAVE_MEMORY_H) +CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" ${HDF_PREFIX}_HAVE_DLFCN_H) +CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" ${HDF_PREFIX}_HAVE_INTTYPES_H) +CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" ${HDF_PREFIX}_HAVE_NETINET_IN_H) +# _Bool type support +CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H) + +## Check for non-standard extenstion quadmath.h + +CHECK_INCLUDE_FILES(quadmath.h C_HAVE_QUADMATH) +if (${C_HAVE_QUADMATH}) + set(${HDF_PREFIX}_HAVE_QUADMATH_H 1) +else () + set(${HDF_PREFIX}_HAVE_QUADMATH_H 0) +endif () + if (CYGWIN) set (${HDF_PREFIX}_HAVE_LSEEK64 0) endif () @@ -127,17 +199,13 @@ endif () CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname ${HDF_PREFIX}_HAVE_LIBUCB) # For other tests to use the same libraries -set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LINK_LIBS}) +set (HDF5_REQUIRED_LIBRARIES ${HDF5_REQUIRED_LIBRARIES} ${LINK_LIBS}) set (USE_INCLUDES "") if (WINDOWS) set (USE_INCLUDES ${USE_INCLUDES} "windows.h") endif () -if (NOT WINDOWS) - TEST_BIG_ENDIAN (${HDF_PREFIX}_WORDS_BIGENDIAN) -endif () - # For other specific tests, use this MACRO. macro (HDF_FUNCTION_TEST OTHER_TEST) if (NOT DEFINED ${HDF_PREFIX}_${OTHER_TEST}) @@ -165,7 +233,7 @@ macro (HDF_FUNCTION_TEST OTHER_TEST) ${CMAKE_BINARY_DIR} ${HDF_RESOURCES_EXT_DIR}/HDFTests.c COMPILE_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS}" - LINK_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}" + LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}" OUTPUT_VARIABLE OUTPUT ) if (${OTHER_TEST}) @@ -188,63 +256,6 @@ endmacro () HDF_FUNCTION_TEST (STDC_HEADERS) #----------------------------------------------------------------------------- -# Check IF header file exists and add it to the list. -#----------------------------------------------------------------------------- -macro (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE) - CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE}) - if (${VARIABLE}) - set (USE_INCLUDES ${USE_INCLUDES} ${FILE}) - endif () -endmacro () - -#----------------------------------------------------------------------------- -# Check for the existence of certain header files -#----------------------------------------------------------------------------- -CHECK_INCLUDE_FILE_CONCAT ("sys/file.h" ${HDF_PREFIX}_HAVE_SYS_FILE_H) -CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h" ${HDF_PREFIX}_HAVE_SYS_IOCTL_H) -CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H) -CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" ${HDF_PREFIX}_HAVE_SYS_SOCKET_H) -CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" ${HDF_PREFIX}_HAVE_SYS_STAT_H) -CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" ${HDF_PREFIX}_HAVE_SYS_TIME_H) -CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" ${HDF_PREFIX}_HAVE_SYS_TYPES_H) -CHECK_INCLUDE_FILE_CONCAT ("features.h" ${HDF_PREFIX}_HAVE_FEATURES_H) -CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H) -CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" ${HDF_PREFIX}_HAVE_SETJMP_H) -CHECK_INCLUDE_FILE_CONCAT ("stddef.h" ${HDF_PREFIX}_HAVE_STDDEF_H) -CHECK_INCLUDE_FILE_CONCAT ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H) -CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H) - -# Darwin -CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" ${HDF_PREFIX}_HAVE_MACH_MACH_TIME_H) - -# Windows -CHECK_INCLUDE_FILE_CONCAT ("io.h" ${HDF_PREFIX}_HAVE_IO_H) -if (NOT CYGWIN) - CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" ${HDF_PREFIX}_HAVE_WINSOCK2_H) -endif () -CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" ${HDF_PREFIX}_HAVE_SYS_TIMEB_H) - -if (CMAKE_SYSTEM_NAME MATCHES "OSF") - CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" ${HDF_PREFIX}_HAVE_SYS_SYSINFO_H) - CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" ${HDF_PREFIX}_HAVE_SYS_PROC_H) -else () - set (${HDF_PREFIX}_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE) - set (${HDF_PREFIX}_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE) -endif () - -CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" ${HDF_PREFIX}_HAVE_GLOBUS_COMMON_H) -CHECK_INCLUDE_FILE_CONCAT ("pdb.h" ${HDF_PREFIX}_HAVE_PDB_H) -CHECK_INCLUDE_FILE_CONCAT ("pthread.h" ${HDF_PREFIX}_HAVE_PTHREAD_H) -CHECK_INCLUDE_FILE_CONCAT ("srbclient.h" ${HDF_PREFIX}_HAVE_SRBCLIENT_H) -CHECK_INCLUDE_FILE_CONCAT ("string.h" ${HDF_PREFIX}_HAVE_STRING_H) -CHECK_INCLUDE_FILE_CONCAT ("strings.h" ${HDF_PREFIX}_HAVE_STRINGS_H) -CHECK_INCLUDE_FILE_CONCAT ("stdlib.h" ${HDF_PREFIX}_HAVE_STDLIB_H) -CHECK_INCLUDE_FILE_CONCAT ("memory.h" ${HDF_PREFIX}_HAVE_MEMORY_H) -CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" ${HDF_PREFIX}_HAVE_DLFCN_H) -CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" ${HDF_PREFIX}_HAVE_INTTYPES_H) -CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" ${HDF_PREFIX}_HAVE_NETINET_IN_H) - -#----------------------------------------------------------------------------- # Check for large file support #----------------------------------------------------------------------------- @@ -408,7 +419,6 @@ endif () #----------------------------------------------------------------------------- # _Bool type support -CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H) if (HAVE_STDBOOL_H) set (CMAKE_EXTRA_INCLUDE_FILES stdbool.h) HDF_CHECK_TYPE_SIZE (bool ${HDF_PREFIX}_SIZEOF_BOOL) @@ -580,7 +590,7 @@ if (WINDOWS) ${CMAKE_BINARY_DIR} ${HDF_RESOURCES_EXT_DIR}/HDFTests.c COMPILE_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} ${MACRO_CHECK_FUNCTION_DEFINITIONS}" - LINK_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}" + LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}" CMAKE_FLAGS "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES} -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}" COMPILE_OUTPUT_VARIABLE OUTPUT ) diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake index f293ec5..efaa556 100644 --- a/config/cmake_ext_mod/HDFUseCXX.cmake +++ b/config/cmake_ext_mod/HDFUseCXX.cmake @@ -48,8 +48,8 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) if (NOT DEFINED ${OTHER_TEST}) set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}") set (OTHER_TEST_ADD_LIBRARIES) - if (CMAKE_REQUIRED_LIBRARIES) - set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + if (HDF5_REQUIRED_LIBRARIES) + set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") endif () foreach (def diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index f8f3cea..c68c921 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -48,9 +48,9 @@ set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}") #----------------------------------------------------------------------------- macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) message (STATUS "Testing Fortran ${FUNCTION}") - if (CMAKE_REQUIRED_LIBRARIES) + if (HDF5_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") else () set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) endif () diff --git a/config/toolchain/GCC.cmake b/config/toolchain/GCC.cmake index ddb1641..c41d0ca 100644 --- a/config/toolchain/GCC.cmake +++ b/config/toolchain/GCC.cmake @@ -1,5 +1,6 @@ -# Uncomment the following to use cross-compiling +# Uncomment the following line and the correct system name to use cross-compiling #set(CMAKE_SYSTEM_NAME Linux) + set(CMAKE_COMPILER_VENDOR "GCC") set(CMAKE_C_COMPILER cc) diff --git a/config/toolchain/PGI.cmake b/config/toolchain/PGI.cmake new file mode 100644 index 0000000..ec58cbb --- /dev/null +++ b/config/toolchain/PGI.cmake @@ -0,0 +1,11 @@ +# Uncomment the following to use cross-compiling +#set(CMAKE_SYSTEM_NAME Linux) + +set(CMAKE_COMPILER_VENDOR "PGI") + +set(CMAKE_C_COMPILER pgcc) +set(CMAKE_CXX_COMPILER pgc++) +set(CMAKE_Fortran_COMPILER pgf90) + +# the following is used if cross-compiling +set(CMAKE_CROSSCOMPILING_EMULATOR "") diff --git a/config/toolchain/crayle.cmake b/config/toolchain/crayle.cmake index a83147b..47d8afc 100644 --- a/config/toolchain/crayle.cmake +++ b/config/toolchain/crayle.cmake @@ -1,5 +1,6 @@ -# Uncomment the following to use cross-compiling +# The following line will use cross-compiling set(CMAKE_SYSTEM_NAME Linux) + set(CMAKE_COMPILER_VENDOR "CrayLinuxEnvironment") set(CMAKE_C_COMPILER cc) diff --git a/config/toolchain/intel.cmake b/config/toolchain/intel.cmake index f1a5734..97f6a64 100644 --- a/config/toolchain/intel.cmake +++ b/config/toolchain/intel.cmake @@ -1,5 +1,6 @@ # Uncomment the following to use cross-compiling #set(CMAKE_SYSTEM_NAME Linux) + set(CMAKE_COMPILER_VENDOR "intel") set(CMAKE_C_COMPILER icc) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 9f4e4f9..eb7cc7b 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -3210,13 +3210,56 @@ public class H5 implements java.io.Serializable { public synchronized static native void H5Fget_mdc_logging_status(long file_id, boolean[] mdc_logging_status) throws HDF5LibraryException, NullPointerException; + /** + * H5Fget_dset_no_attrs_hint gets the file-level setting to create minimized dataset object headers. + * + * @param file_id + * IN: Identifier of the target file. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native boolean H5Fget_dset_no_attrs_hint(long file_id) + throws HDF5LibraryException; + + + /** + * H5Fset_dset_no_attrs_hint sets the file-level setting to create minimized dataset object headers. + * + * @param file_id + * IN: Identifier of the target file. + * @param minimize + * the minimize hint setting + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5Fset_dset_no_attrs_hint(long file_id, boolean minimize) + throws HDF5LibraryException; + + + /** + * H5Fset_libver_bounds sets a different low and high bounds while a file is open. + * + * @param file_id + * IN: Identifier of the target file. + * @param low + * IN: The earliest version of the library that will be used for writing objects + * @param high + * IN: The latest version of the library that will be used for writing objects. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5Fset_libver_bounds(long file_id, int low, int high) + throws HDF5LibraryException; + // /////// unimplemented //////// // herr_t H5Fget_eoa(hid_t file_id, haddr_t *eoa); // herr_t H5Fincrement_filesize(hid_t file_id, hsize_t increment); // ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len); // herr_t H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info); // ssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info_t *sect_info/*out*/); - // herr_t H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high); // herr_t H5Fformat_convert(hid_t fid); // herr_t H5Freset_page_buffering_stats(hid_t file_id); // herr_t H5Fget_page_buffering_stats(hid_t file_id, unsigned accesses[2], @@ -6869,8 +6912,6 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pset_fill_time(long plist_id, int fill_time) throws HDF5LibraryException, NullPointerException; - // /////// Dataset creation property list (DCPL) routines /////// - /** * H5Pset_chunk_opts Sets the edge chunk option in a dataset creation property list. * @@ -6899,6 +6940,36 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native int H5Pget_chunk_opts(long dcpl_id) throws HDF5LibraryException; + /** + * H5Pget_dset_no_attrs_hint accesses the flag for whether or not datasets created by the given dcpl + * will be created with a "minimized" object header. + * + * @param dcpl_id + * IN: Dataset creation property list + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native boolean H5Pget_dset_no_attrs_hint(long dcpl_id) + throws HDF5LibraryException; + + + /** + * H5Pset_dset_no_attrs_hint sets the dcpl to minimize (or explicitly to not minimized) dataset object + * headers upon creation. + * + * @param dcpl_id + * IN: Dataset creation property list + * + * @param minimize + * the minimize hint setting + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5Pset_dset_no_attrs_hint(long dcpl_id, boolean minimize) + throws HDF5LibraryException; + // /////// Dataset access property list (DAPL) routines /////// /** diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c index 20c22c3..9313e9f 100644 --- a/java/src/jni/h5fImp.c +++ b/java/src/jni/h5fImp.c @@ -609,6 +609,66 @@ Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status } /* end else */ } /* end Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Fset_dset_no_attrs_hint + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint +(JNIEnv *env, jclass clss, jlong file_id, jboolean minimize) +{ + herr_t retVal = -1; + hbool_t minimize_val; + + if (minimize == JNI_TRUE) + minimize_val = TRUE; + else + minimize_val = FALSE; + + retVal = H5Fset_dset_no_attrs_hint((hid_t)file_id, (hbool_t)minimize_val); + if (retVal < 0) + h5libraryError(env); +} + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Fget_dset_no_attrs_hint + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint +(JNIEnv *env, jclass clss, jlong file_id) +{ + hbool_t minimize = FALSE; + jboolean bval = JNI_FALSE; + + if (H5Fget_dset_no_attrs_hint((hid_t)file_id, (hbool_t *)&minimize) < 0) { + h5libraryError(env); + } + else { + if (minimize == TRUE) + bval = JNI_TRUE; + } /* end else */ + + return bval; +} + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Fset_libver_bounds + * Signature: (JII)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Fset_1libver_1bounds + (JNIEnv *env, jclass clss, jlong file_id, jint low, jint high) +{ + herr_t retVal = -1; + + retVal = H5Fset_libver_bounds((hid_t)file_id, (H5F_libver_t)low, (H5F_libver_t)high); + if(retVal < 0) + h5libraryError(env); +} /* end Java_hdf_hdf5lib_H5_H5Fset_1libver_1bounds */ #ifdef __cplusplus diff --git a/java/src/jni/h5fImp.h b/java/src/jni/h5fImp.h index fcfdedf..0b36772 100644 --- a/java/src/jni/h5fImp.h +++ b/java/src/jni/h5fImp.h @@ -246,6 +246,33 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status (JNIEnv *, jclass, jlong, jbooleanArray); +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Fset_dset_no_attrs_hint + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint + (JNIEnv *, jclass, jlong, jboolean); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Fget_dset_no_attrs_hint + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint + (JNIEnv *, jclass, jlong); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Fset_libver_bounds + * Signature: (JII)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Fset_1libver_1bounds +(JNIEnv *, jclass, jlong, jint, jint); + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c index 52008ce..19f9640 100644 --- a/java/src/jni/h5pImp.c +++ b/java/src/jni/h5pImp.c @@ -5946,6 +5946,51 @@ Java_hdf_hdf5lib_H5_H5Pget_1chunk_1opts return (jint)opts; } /* end Java_hdf_hdf5lib_H5_H5Pget_1chunk_1opts */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_dset_no_attrs_hint + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1dset_1no_1attrs_1hint +(JNIEnv *env, jclass clss, jlong dcpl_id, jboolean minimize) +{ + herr_t retVal = -1; + hbool_t minimize_val; + + if (minimize == JNI_TRUE) + minimize_val = TRUE; + else + minimize_val = FALSE; + + retVal = H5Pset_dset_no_attrs_hint((hid_t)dcpl_id, (hbool_t)minimize_val); + if (retVal < 0) + h5libraryError(env); +} + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_dset_no_attrs_hint + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1dset_1no_1attrs_1hint +(JNIEnv *env, jclass clss, jlong dcpl_id) +{ + hbool_t minimize = FALSE; + jboolean bval = JNI_FALSE; + + if (H5Pget_dset_no_attrs_hint((hid_t)dcpl_id, (hbool_t *)&minimize) < 0) { + h5libraryError(env); + } + else { + if (minimize == TRUE) + bval = JNI_TRUE; + } /* end else */ + + return bval; +} + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/src/jni/h5pImp.h b/java/src/jni/h5pImp.h index 1d12e3d..0a603f7 100644 --- a/java/src/jni/h5pImp.h +++ b/java/src/jni/h5pImp.h @@ -1614,6 +1614,24 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Pget_1chunk_1opts (JNIEnv *, jclass, jlong); +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_dset_no_attrs_hint + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1dset_1no_1attrs_1hint + (JNIEnv *, jclass, jlong, jboolean); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_dset_no_attrs_hint + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1dset_1no_1attrs_1hint + (JNIEnv *, jclass, jlong); + #ifdef __cplusplus } /* end extern "C" */ diff --git a/java/test/TestH5Dplist.java b/java/test/TestH5Dplist.java index 406a1d3..1b5acfa 100644 --- a/java/test/TestH5Dplist.java +++ b/java/test/TestH5Dplist.java @@ -13,6 +13,7 @@ package test; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -211,4 +212,23 @@ public class TestH5Dplist { assertTrue("testH5Dset_extent - H5.H5Dread: ", extend_dset_data[4][8] == 99); } + @Test + public void testH5P_dset_no_attrs_hint() { + boolean ret_val_id = true; + + _createPDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DATASET_CREATE); + + try { + ret_val_id = H5.H5Pget_dset_no_attrs_hint(H5dcpl_id); + assertFalse("H5P_dset_no_attrs_hint", ret_val_id); + H5.H5Pset_dset_no_attrs_hint(H5dcpl_id, true); + ret_val_id = H5.H5Pget_dset_no_attrs_hint(H5dcpl_id); + assertTrue("H5P_dset_no_attrs_hint", ret_val_id); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5P_dset_no_attrs_hint: " + err); + } + } + } diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java index 11d6644..e72431b 100644 --- a/java/test/TestH5Fbasic.java +++ b/java/test/TestH5Fbasic.java @@ -14,6 +14,7 @@ package test; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -315,4 +316,20 @@ public class TestH5Fbasic { fail("H5.H5Freset_mdc_hit_rate_stats: " + err); } } + + @Test + public void testH5F_dset_no_attrs_hint() { + boolean ret_val_id = true; + try { + ret_val_id = H5.H5Fget_dset_no_attrs_hint(H5fid); + assertFalse("H5F_dset_no_attrs_hint", ret_val_id); + H5.H5Fset_dset_no_attrs_hint(H5fid, true); + ret_val_id = H5.H5Fget_dset_no_attrs_hint(H5fid); + assertTrue("H5F_dset_no_attrs_hint", ret_val_id); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5F_dset_no_attrs_hint: " + err); + } + } } diff --git a/java/test/TestH5Fparams.java b/java/test/TestH5Fparams.java index fffded1..54a4579 100644 --- a/java/test/TestH5Fparams.java +++ b/java/test/TestH5Fparams.java @@ -22,10 +22,12 @@ import java.io.File; import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; +import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException; import hdf.hdf5lib.structs.H5F_info2_t; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; @@ -210,4 +212,42 @@ public class TestH5Fparams { try {H5.H5Fclose(fid);} catch (Exception ex) {} } } + + @Ignore//(expected = HDF5FunctionArgumentException.class) + public void testH5Fset_libver_bounds_invalidlow() throws Throwable { + long fid = -1; + + try { + try { + fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, + HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + fail("H5.H5Fcreate: " + err); + } + H5.H5Fset_libver_bounds(fid, 5, HDF5Constants.H5F_LIBVER_LATEST); + } + finally { + try {H5.H5Fclose(fid);} catch (Exception ex) {} + } + } + + @Ignore//(expected = HDF5FunctionArgumentException.class) + public void testH5Fset_libver_bounds_invalidhigh() throws Throwable { + long fid = -1; + + try { + try { + fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, + HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + fail("H5.H5Fcreate: " + err); + } + H5.H5Fset_libver_bounds(fid, HDF5Constants.H5F_LIBVER_V110, HDF5Constants.H5F_LIBVER_V110+1); + } + finally { + try {H5.H5Fclose(fid);} catch (Exception ex) {} + } + } } diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 02d0147..66469bb 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -324,7 +324,7 @@ TESTING JUnit-TestH5 # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5.ext > JUnit-TestH5.out @@ -345,7 +345,7 @@ TESTING JUnit-TestH5Eparams # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Eparams.ext > JUnit-TestH5Eparams.out @@ -366,7 +366,7 @@ TESTING JUnit-TestH5Eregister # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Eregister.ext > JUnit-TestH5Eregister.out @@ -387,7 +387,7 @@ TESTING JUnit-TestH5Fparams # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Fparams.ext > JUnit-TestH5Fparams.out @@ -408,7 +408,7 @@ TESTING JUnit-TestH5Fbasic # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Fbasic.ext > JUnit-TestH5Fbasic.out @@ -429,7 +429,7 @@ TESTING JUnit-TestH5F # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5F.ext > JUnit-TestH5F.out @@ -450,7 +450,7 @@ TESTING JUnit-TestH5Fswmr # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Fswmr.ext > JUnit-TestH5Fswmr.out @@ -471,7 +471,7 @@ TESTING JUnit-TestH5Gbasic # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Gbasic.ext > JUnit-TestH5Gbasic.out @@ -492,7 +492,7 @@ TESTING JUnit-TestH5G # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5G.ext > JUnit-TestH5G.out @@ -513,7 +513,7 @@ TESTING JUnit-TestH5Sbasic # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Sbasic.ext > JUnit-TestH5Sbasic.out @@ -534,7 +534,7 @@ TESTING JUnit-TestH5S # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5S.ext > JUnit-TestH5S.out @@ -555,7 +555,7 @@ TESTING JUnit-TestH5Tparams # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Tparams.ext > JUnit-TestH5Tparams.out @@ -576,7 +576,7 @@ TESTING JUnit-TestH5Tbasic # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Tbasic.ext > JUnit-TestH5Tbasic.out @@ -597,7 +597,7 @@ TESTING JUnit-TestH5T # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5T.ext > JUnit-TestH5T.out @@ -618,7 +618,7 @@ TESTING JUnit-TestH5Dparams # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Dparams.ext > JUnit-TestH5Dparams.out @@ -639,7 +639,7 @@ TESTING JUnit-TestH5D # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5D.ext > JUnit-TestH5D.out @@ -660,7 +660,7 @@ TESTING JUnit-TestH5Dplist # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Dplist.ext > JUnit-TestH5Dplist.out @@ -681,7 +681,7 @@ TESTING JUnit-TestH5Lparams # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Lparams.ext > JUnit-TestH5Lparams.out @@ -702,7 +702,7 @@ TESTING JUnit-TestH5Lbasic # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Lbasic.ext > JUnit-TestH5Lbasic.out @@ -723,7 +723,7 @@ TESTING JUnit-TestH5Lcreate # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Lcreate.ext > JUnit-TestH5Lcreate.out @@ -744,7 +744,7 @@ TESTING JUnit-TestH5R # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5R.ext > JUnit-TestH5R.out @@ -765,7 +765,7 @@ TESTING JUnit-TestH5P # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5P.ext > JUnit-TestH5P.out @@ -786,7 +786,7 @@ TESTING JUnit-TestH5PData # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5PData.ext > JUnit-TestH5PData.out @@ -807,7 +807,7 @@ TESTING JUnit-TestH5Pfapl # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Pfapl.ext > JUnit-TestH5Pfapl.out @@ -828,7 +828,7 @@ TESTING JUnit-TestH5Pvirtual # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Pvirtual.ext > JUnit-TestH5Pvirtual.out @@ -849,7 +849,7 @@ TESTING JUnit-TestH5Plist # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Plist.ext > JUnit-TestH5Plist.out @@ -870,7 +870,7 @@ TESTING JUnit-TestH5A # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5A.ext > JUnit-TestH5A.out @@ -891,7 +891,7 @@ TESTING JUnit-TestH5Oparams # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Oparams.ext > JUnit-TestH5Oparams.out @@ -912,7 +912,7 @@ TESTING JUnit-TestH5Obasic # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Obasic.ext > JUnit-TestH5Obasic.out @@ -933,7 +933,7 @@ TESTING JUnit-TestH5Ocreate # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Ocreate.ext > JUnit-TestH5Ocreate.out @@ -954,7 +954,7 @@ TESTING JUnit-TestH5Ocopy # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Ocopy.ext > JUnit-TestH5Ocopy.out @@ -975,7 +975,7 @@ TESTING JUnit-TestH5PL # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5PL.ext > JUnit-TestH5PL.out @@ -996,7 +996,7 @@ TESTING JUnit-TestH5Z # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Z.ext > JUnit-TestH5Z.out @@ -1019,7 +1019,7 @@ if test "X-$BUILD_MODE" = "X-production" ; then # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5E.ext > JUnit-TestH5E.out @@ -1042,7 +1042,7 @@ if test "X-$BUILD_MODE" = "X-production" ; then # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Edefault.ext > JUnit-TestH5Edefault.out @@ -1057,6 +1057,7 @@ if test "X-$BUILD_MODE" = "X-production" ; then fi fi fi + if test $USE_FILTER_SZIP = "yes"; then echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Giterate" TESTING JUnit-TestH5Giterate @@ -1065,7 +1066,7 @@ if test $USE_FILTER_SZIP = "yes"; then # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/line [0-9]*/line (number)/' \ - -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/Time: [0-9]*\(\.[0-9]*\)\?/Time: XXXX/' \ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ JUnit-TestH5Giterate.ext > JUnit-TestH5Giterate.out diff --git a/java/test/testfiles/JUnit-TestH5Dplist.txt b/java/test/testfiles/JUnit-TestH5Dplist.txt index 1dfbed1..64e924a 100644 --- a/java/test/testfiles/JUnit-TestH5Dplist.txt +++ b/java/test/testfiles/JUnit-TestH5Dplist.txt @@ -1,7 +1,8 @@ JUnit version 4.11 +.testH5P_dset_no_attrs_hint .testH5Dset_extent Time: XXXX -OK (1 test) +OK (2 tests) diff --git a/java/test/testfiles/JUnit-TestH5Fbasic.txt b/java/test/testfiles/JUnit-TestH5Fbasic.txt index 467e2fb..56cc5c7 100644 --- a/java/test/testfiles/JUnit-TestH5Fbasic.txt +++ b/java/test/testfiles/JUnit-TestH5Fbasic.txt @@ -2,6 +2,7 @@ JUnit version 4.11 .testH5Fget_mdc_size .testH5Fget_mdc_hit_rate .testH5Fis_hdf5 +.testH5F_dset_no_attrs_hint .testH5Fget_freespace .testH5Fclose .testH5Fget_filesize @@ -17,5 +18,5 @@ JUnit version 4.11 Time: XXXX -OK (15 tests) +OK (16 tests) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 05daa53..cb1d33a 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -47,6 +47,14 @@ New Features Configuration: ------------- + - Rework CMake configure files to eliminate developer CMP0075 warning + + Renamed varname to HDF5_REQUIRED_LIBRARIES as the contents were not + required for configuration. Also moved check includes calls to top of + files. + + (ADB - 2019/01/03, HDFFV-10546) + - Keep stderr and stdout separate in tests Changed test handling of output capture. Tests now keep the stderr @@ -105,7 +113,7 @@ New Features h5trav.h (DER - 2018/10/26, HDFFV-10614, 10609) - + - Autotools installs now install H5FDwindows.h This is simply to align the installed header files between the @@ -114,7 +122,7 @@ New Features (DER - 2018/10/26, HDFFV-10614) - + Library: -------- - Added new chunk query functions @@ -193,10 +201,27 @@ New Features C++ Library: ------------ - - + - Java Library: ---------------- + - Add new functions to java interface + + Added wrappers for: + H5Fset_libver_bounds + H5Fget_dset_no_attrs_hint/H5Fset_dset_no_attrs_hint + H5Pget_dset_no_attrs_hint/H5Pset_dset_no_attrs_hint + + (ADB - 2019/01/07, HDFFV-10664) + + - Fix java unit tests when Time is a natural number + + Time substitution in java/test/junit.sh.in doesn't + handle the case when Time is a natural number. Fixed + the regular expression. + + (ADB - 2019/01/07, HDFFV-10674) + - Duplicate the data read/write functions of Datasets for Attributes. Region references could not be displayed for attributes as they could @@ -285,7 +310,7 @@ Bug Fixes since HDF5-1.10.3 release - There was an incorrect protection against division by zero reported to The HDF Group as issue #CVE-2018-17233. - + Protection against division by zero was added to address the issue #CVE-2018-17233. In addition, several similar occurrences in the same file were fixed as well. @@ -333,7 +358,7 @@ Bug Fixes since HDF5-1.10.3 release - Made Fortran specific subroutines PRIVATE in generic procedures. Effected generic procedures were functions in H5A, H5D, H5P, H5R and H5T. - + (MSB, 2018/12/04, HDFFV-10511) Supported Platforms @@ -459,7 +484,7 @@ The following platforms are not supported but have been tested for this release. #1 SMP x86_64 GNU/Linux Version 4.8.5 20150623 (Red Hat 4.8.5-4) (jelly) with NAG Fortran Compiler Release 6.1(Tozai) GCC Version 7.1.0 - OpenMPI 3.0.0-GCC-7.2.0-2.29, + OpenMPI 3.0.0-GCC-7.2.0-2.29, 3.1.0-GCC-7.2.0-2.29 Intel(R) C (icc) and C++ (icpc) compilers Version 17.0.0.098 Build 20160721 -- cgit v0.12