From 269224c73d19a12336dc0dd12e787c359dec5665 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 20 Dec 2018 15:36:19 -0600 Subject: Merge CMake changes from develop --- MANIFEST | 3 + c++/test/CMakeTests.cmake | 57 +++-------------- c++/test/CMakeVFDTests.cmake | 65 ++++++++++++++++++++ config/cmake_ext_mod/runTest.cmake | 8 ++- examples/CMakeTests.cmake | 18 +++--- java/src/hdf/hdf5lib/H5.java | 104 ++++++++++++++++---------------- java/src/jni/h5Constants.c | 4 +- testpar/CMakeTests.cmake | 49 +++------------ testpar/CMakeVFDTests.cmake | 57 +++++++++++++++++ tools/test/h5repack/CMakeTests.cmake | 48 +++------------ tools/test/h5repack/CMakeVFDTests.cmake | 65 ++++++++++++++++++++ 11 files changed, 284 insertions(+), 194 deletions(-) create mode 100644 c++/test/CMakeVFDTests.cmake create mode 100644 testpar/CMakeVFDTests.cmake create mode 100644 tools/test/h5repack/CMakeVFDTests.cmake diff --git a/MANIFEST b/MANIFEST index e3c0cd4..57e1864 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3229,6 +3229,7 @@ ./c++/src/CMakeLists.txt ./c++/test/CMakeLists.txt ./c++/test/CMakeTests.cmake +./c++/test/CMakeVFDTests.cmake ./examples/CMakeLists.txt ./examples/CMakeTests.cmake ./examples/run-all-ex.sh @@ -3272,6 +3273,7 @@ ./test/ShellTests.cmake ./testpar/CMakeLists.txt ./testpar/CMakeTests.cmake +./testpar/CMakeVFDTests.cmake ./tools/CMakeLists.txt ./tools/lib/CMakeLists.txt ./tools/src/CMakeLists.txt @@ -3304,6 +3306,7 @@ ./tools/src/h5repack/CMakeLists.txt ./tools/test/h5repack/CMakeLists.txt ./tools/test/h5repack/CMakeTests.cmake +./tools/test/h5repack/CMakeVFDTests.cmake ./tools/src/h5stat/CMakeLists.txt ./tools/test/h5stat/CMakeLists.txt ./tools/test/h5stat/CMakeTests.cmake diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake index 6de801e..02bff3e 100644 --- a/c++/test/CMakeTests.cmake +++ b/c++/test/CMakeTests.cmake @@ -47,55 +47,12 @@ else () endif () set_tests_properties (CPP_testhdf5 PROPERTIES DEPENDS CPP_testhdf5-clear-objects) -if (HDF5_TEST_VFD) - - set (VFD_LIST - sec2 - stdio - core - split - multi - family - ) - - if (DIRECT_VFD) - set (VFD_LIST ${VFD_LIST} direct) - endif () - - macro (ADD_VFD_TEST vfdname resultcode) - if (NOT HDF5_ENABLE_USING_MEMCHECKER) - file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}") - add_test ( - NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - tattr_basic.h5 - tattr_compound.h5 - tattr_dtype.h5 - tattr_multi.h5 - tattr_scalar.h5 - tfattrs.h5 - titerate.h5 - ) - add_test ( - NAME CPP_VFD-${vfdname}-cpp_testhdf5 - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=cpp_testhdf5" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects) - set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT 30) - endif () - endmacro () - - # Run test with different Virtual File Driver - foreach (vfd ${VFD_LIST}) - ADD_VFD_TEST (${vfd} 0) - endforeach () +############################################################################## +############################################################################## +### V F D T E S T S ### +############################################################################## +############################################################################## +if (HDF5_TEST_VFD) + include (CMakeVFDTests.cmake) endif () diff --git a/c++/test/CMakeVFDTests.cmake b/c++/test/CMakeVFDTests.cmake new file mode 100644 index 0000000..996a20f --- /dev/null +++ b/c++/test/CMakeVFDTests.cmake @@ -0,0 +1,65 @@ +# +# Copyright by The HDF Group. +# 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. +# + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + set (VFD_LIST + sec2 + stdio + core + split + multi + family + ) + + if (DIRECT_VFD) + set (VFD_LIST ${VFD_LIST} direct) + endif () + + macro (ADD_VFD_TEST vfdname resultcode) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}") + add_test ( + NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + tattr_basic.h5 + tattr_compound.h5 + tattr_dtype.h5 + tattr_multi.h5 + tattr_scalar.h5 + tfattrs.h5 + titerate.h5 + ) + add_test ( + NAME CPP_VFD-${vfdname}-cpp_testhdf5 + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=cpp_testhdf5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects) + set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT 30) + endif () + endmacro () + + # Run test with different Virtual File Driver + foreach (vfd ${VFD_LIST}) + ADD_VFD_TEST (${vfd} 0) + endforeach () diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 0bc2db0..8181ff0 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -93,6 +93,8 @@ if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err) if (TEST_MASK_FILE) STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}") endif () + # remove special output + string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") if (NOT ERROR_APPEND) # append error output to the stdout output file @@ -121,6 +123,11 @@ endif () message (STATUS "COMMAND Error: ${TEST_ERROR}") +# remove special output +file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) +string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") +file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + # if the output file needs Storage text removed if (TEST_MASK) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) @@ -144,7 +151,6 @@ if (TEST_MASK_ERROR) # the error stack remains in the .err file file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) endif () - string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake index dd4766a..6b4504b 100644 --- a/examples/CMakeTests.cmake +++ b/examples/CMakeTests.cmake @@ -181,9 +181,9 @@ ### Windows pops up a modal permission dialog on this test if (H5_HAVE_PARALLEL AND NOT WIN32) if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME EXAMPLES-ph5example COMMAND $) + add_test (NAME EXAMPLES_PAR-ph5example COMMAND $) else () - add_test (NAME EXAMPLES-ph5example COMMAND "${CMAKE_COMMAND}" + add_test (NAME EXAMPLES_PAR-ph5example COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" -D "TEST_EXPECT=0" @@ -195,14 +195,14 @@ ) endif () if (NOT "${last_test}" STREQUAL "") - set_tests_properties (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test}) + set_tests_properties (EXAMPLES_PAR-ph5example PROPERTIES DEPENDS ${last_test}) endif () - set (last_test "EXAMPLES-ph5example") + set (last_test "EXAMPLES_PAR-ph5example") if (BUILD_SHARED_LIBS) if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME EXAMPLES-shared-ph5example COMMAND $) + add_test (NAME EXAMPLES_PAR-shared-ph5example COMMAND $) else () - add_test (NAME EXAMPLES-shared-ph5example COMMAND "${CMAKE_COMMAND}" + add_test (NAME EXAMPLES_PAR-shared-ph5example COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" -D "TEST_EXPECT=0" @@ -213,10 +213,10 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared) + set_tests_properties (EXAMPLES_PAR-shared-ph5example PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES DEPENDS ${last_test}) + set_tests_properties (EXAMPLES_PAR-shared-ph5example PROPERTIES DEPENDS ${last_test}) endif () - set (last_test "EXAMPLES-shared-ph5example") + set (last_test "EXAMPLES_PAR-shared-ph5example") endif () endif () diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 751528e..9f4e4f9 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -499,9 +499,9 @@ public class H5 implements java.io.Serializable { private synchronized static native boolean H5is_library_threadsafe(); // /////// unimplemented //////// - // H5_DLL herr_t H5free_memory(void *mem); - // H5_DLL void *H5allocate_memory(size_t size, hbool_t clear); - // H5_DLL void *H5resize_memory(void *mem, size_t size); + // herr_t H5free_memory(void *mem); + // void *H5allocate_memory(size_t size, hbool_t clear); + // void *H5resize_memory(void *mem, size_t size); // //////////////////////////////////////////////////////////// // // @@ -2402,10 +2402,10 @@ public class H5 implements java.io.Serializable { public synchronized static native void H5Drefresh(long dset_id) throws HDF5LibraryException; // /////// unimplemented //////// - // H5_DLL herr_t H5Ddebug(hid_t dset_id); - // H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes); - // H5_DLL herr_t H5Dformat_convert(hid_t dset_id); - // H5_DLL herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type); + // herr_t H5Ddebug(hid_t dset_id); + // herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes); + // herr_t H5Dformat_convert(hid_t dset_id); + // herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type); // herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, // size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data); @@ -3211,20 +3211,20 @@ public class H5 implements java.io.Serializable { throws HDF5LibraryException, NullPointerException; // /////// unimplemented //////// - // H5_DLL herr_t H5Fget_eoa(hid_t file_id, haddr_t *eoa); - // H5_DLL herr_t H5Fincrement_filesize(hid_t file_id, hsize_t increment); + // 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*/); - // H5_DLL herr_t H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high); - // H5_DLL herr_t H5Fformat_convert(hid_t fid); - // H5_DLL herr_t H5Freset_page_buffering_stats(hid_t file_id); - // H5_DLL herr_t H5Fget_page_buffering_stats(hid_t file_id, unsigned accesses[2], + // 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], // unsigned hits[2], unsigned misses[2], unsigned evictions[2], unsigned bypasses[2]); - // H5_DLL herr_t H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t *image_size); + // herr_t H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t *image_size); // #ifdef H5_HAVE_PARALLEL - // H5_DLL herr_t H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag); - // H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag); + // herr_t H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag); + // herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag); // #endif /* H5_HAVE_PARALLEL */ // /** @@ -3284,25 +3284,25 @@ public class H5 implements java.io.Serializable { // //////////////////////////////////////////////////////////// // /////// unimplemented //////// - // H5_DLL hid_t H5FDregister(const H5FD_class_t *cls); - // H5_DLL herr_t H5FDunregister(hid_t driver_id); - // H5_DLL H5FD_t *H5FDopen(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr); - // H5_DLL herr_t H5FDclose(H5FD_t *file); - // H5_DLL int H5FDcmp(const H5FD_t *f1, const H5FD_t *f2); - // H5_DLL int H5FDquery(const H5FD_t *f, unsigned long *flags); - // H5_DLL haddr_t H5FDalloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size); - // H5_DLL herr_t H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size); - // H5_DLL haddr_t H5FDget_eoa(H5FD_t *file, H5FD_mem_t type); - // H5_DLL herr_t H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t eoa); - // H5_DLL haddr_t H5FDget_eof(H5FD_t *file, H5FD_mem_t type); - // H5_DLL herr_t H5FDget_vfd_handle(H5FD_t *file, hid_t fapl, void**file_handle); - // H5_DLL herr_t H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *buf/*out*/); - // H5_DLL herr_t H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *buf); - // H5_DLL herr_t H5FDflush(H5FD_t *file, hid_t dxpl_id, hbool_t closing); - // H5_DLL herr_t H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing); - // H5_DLL herr_t H5FDlock(H5FD_t *file, hbool_t rw); - // H5_DLL herr_t H5FDunlock(H5FD_t *file); - // H5_DLL herr_t H5FDdriver_query(hid_t driver_id, unsigned long *flags/*out*/); + // hid_t H5FDregister(const H5FD_class_t *cls); + // herr_t H5FDunregister(hid_t driver_id); + // H5FD_t *H5FDopen(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr); + // herr_t H5FDclose(H5FD_t *file); + // int H5FDcmp(const H5FD_t *f1, const H5FD_t *f2); + // int H5FDquery(const H5FD_t *f, unsigned long *flags); + // haddr_t H5FDalloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size); + // herr_t H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size); + // haddr_t H5FDget_eoa(H5FD_t *file, H5FD_mem_t type); + // herr_t H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t eoa); + // haddr_t H5FDget_eof(H5FD_t *file, H5FD_mem_t type); + // herr_t H5FDget_vfd_handle(H5FD_t *file, hid_t fapl, void**file_handle); + // herr_t H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *buf/*out*/); + // herr_t H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *buf); + // herr_t H5FDflush(H5FD_t *file, hid_t dxpl_id, hbool_t closing); + // herr_t H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing); + // herr_t H5FDlock(H5FD_t *file, hbool_t rw); + // herr_t H5FDunlock(H5FD_t *file); + // herr_t H5FDdriver_query(hid_t driver_id, unsigned long *flags/*out*/); // //////////////////////////////////////////////////////////// // // @@ -3775,7 +3775,7 @@ public class H5 implements java.io.Serializable { // //////////////////////////////////////////////////////////// // // - // H5I: HDF5 1.8 Identifier Interface API Functions // + // H5I: HDF5 Identifier Interface API Functions // // // // //////////////////////////////////////////////////////////// @@ -4964,9 +4964,9 @@ public class H5 implements java.io.Serializable { public synchronized static native void H5Orefresh(long object_id) throws HDF5LibraryException; // /////// unimplemented //////// - // H5_DLL herr_t H5Odisable_mdc_flushes(hid_t object_id); - // H5_DLL herr_t H5Oenable_mdc_flushes(hid_t object_id); - // H5_DLL herr_t H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled); + // herr_t H5Odisable_mdc_flushes(hid_t object_id); + // herr_t H5Oenable_mdc_flushes(hid_t object_id); + // herr_t H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled); // //////////////////////////////////////////////////////////// // // @@ -7792,13 +7792,13 @@ public class H5 implements java.io.Serializable { // herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size); // #ifdef H5_HAVE_PARALLEL // herr_t H5Pset_all_coll_metadata_ops(hid_t accpl_id, hbool_t is_collective); - // H5_DLL herr_t H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective); + // herr_t H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective); // herr_t H5Pset_coll_metadata_write(hid_t fapl_id, hbool_t is_collective); // herr_t H5Pget_coll_metadata_write(hid_t fapl_id, hbool_t *is_collective); // #endif /* H5_HAVE_PARALLEL */ - // H5_DLL herr_t H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr); - // H5_DLL herr_t H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr /*out*/); - // H5_DLL herr_t H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_per, unsigned min_raw_per); + // herr_t H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr); + // herr_t H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr /*out*/); + // herr_t H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_per, unsigned min_raw_per); // herr_t H5Pget_page_buffer_size(hid_t fapl_id, size_t *buf_size, unsigned *min_meta_perc, unsigned *min_raw_perc); // herr_t H5Pset_object_flush_cb (hid_t fapl_id, H5F_flush_cb_t func, void *user_data); // herr_t H5Pget_object_flush_cb (hid_t fapl_id, H5F_flush_cb_t *func, void **user_data); @@ -7821,9 +7821,9 @@ public class H5 implements java.io.Serializable { // herr_t H5Pget_type_conv_cb(hid_t plist, H5T_conv_except_func_t *func, void **op_data) // herr_t H5Pset_type_conv_cb( hid_t plist, H5T_conv_except_func_t func, void *op_data) // #ifdef H5_HAVE_PARALLEL - // H5_DLL herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode); - // H5_DLL herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode); - // H5_DLL herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, uint32_t *global_no_collective_cause); + // herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode); + // herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode); + // herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, uint32_t *global_no_collective_cause); // #endif /* H5_HAVE_PARALLEL */ // Link creation property list (LCPL) routines // @@ -8766,14 +8766,14 @@ public class H5 implements java.io.Serializable { // /////// unimplemented //////// // #ifdef NEW_HYPERSLAB_API - // H5_DLL hid_t H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, + // hid_t H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, // const hsize_t start[], // const hsize_t _stride[], // const hsize_t count[], // const hsize_t _block[]); - // H5_DLL herr_t H5Sselect_select(hid_t space1_id, H5S_seloper_t op, + // herr_t H5Sselect_select(hid_t space1_id, H5S_seloper_t op, // hid_t space2_id); - // H5_DLL hid_t H5Scombine_select(hid_t space1_id, H5S_seloper_t op, + // hid_t H5Scombine_select(hid_t space1_id, H5S_seloper_t op, // hid_t space2_id); // #endif /* NEW_HYPERSLAB_API */ @@ -10264,9 +10264,9 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Zunregister(int filter) throws HDF5LibraryException, NullPointerException; -} + // /////// unimplemented //////// -// /////// unimplemented //////// + // herr_t H5Zregister(const void *cls); -// herr_t H5Zregister(const void *cls); +} diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index c99745d..1ea549e 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -21,8 +21,10 @@ extern "C" { #endif /* __cplusplus */ -#include #include "hdf5.h" +#include +#include +#include "h5jni.h" #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-prototypes" diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake index 87470f3..dffb813 100644 --- a/testpar/CMakeTests.cmake +++ b/testpar/CMakeTests.cmake @@ -27,47 +27,12 @@ endforeach () set_property (TEST TEST_PAR_t_pflush1 PROPERTY PASS_REGULAR_EXPRESSION "PASSED") set_tests_properties (TEST_PAR_t_pflush2 PROPERTIES DEPENDS TEST_PAR_t_pflush1) -if (HDF5_TEST_VFD) - - set (VFD_LIST - sec2 - stdio - core - split - multi - family - ) - - set (H5P_VFD_TESTS - t_pflush1 - t_pflush2 - ) - - if (DIRECT_VFD) - set (VFD_LIST ${VFD_LIST} direct) - endif () - - macro (ADD_VFD_TEST vfdname resultcode) - if (NOT HDF5_ENABLE_USING_MEMCHECKER) - foreach (test ${H5P_VFD_TESTS}) - add_test ( - NAME TEST_PAR_VFD-${vfdname}-${test} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${test}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - endforeach () - endif () - endmacro () - - # Run test with different Virtual File Driver - foreach (vfd ${VFD_LIST}) - ADD_VFD_TEST (${vfd} 0) - endforeach () +############################################################################## +############################################################################## +### V F D T E S T S ### +############################################################################## +############################################################################## +if (HDF5_TEST_VFD) + include (CMakeVFDTests.cmake) endif () diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake new file mode 100644 index 0000000..b6b065f --- /dev/null +++ b/testpar/CMakeVFDTests.cmake @@ -0,0 +1,57 @@ +# +# Copyright by The HDF Group. +# 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. +# + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + set (VFD_LIST + sec2 + stdio + core + split + multi + family + ) + + set (H5P_VFD_TESTS + t_pflush1 + t_pflush2 + ) + + if (DIRECT_VFD) + set (VFD_LIST ${VFD_LIST} direct) + endif () + + macro (ADD_VFD_TEST vfdname resultcode) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + foreach (test ${H5P_VFD_TESTS}) + add_test ( + NAME TEST_PAR_VFD-${vfdname}-${test} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${test}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + endforeach () + endif () + endmacro () + + # Run test with different Virtual File Driver + foreach (vfd ${VFD_LIST}) + ADD_VFD_TEST (${vfd} 0) + endforeach () diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index ad468f0..c2a2be7 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -16,39 +16,6 @@ ############################################################################## ############################################################################## - if (HDF5_TEST_VFD) - set (VFD_LIST - sec2 - stdio - core - split - multi - family - ) - - if (DIRECT_VFD) - set (VFD_LIST ${VFD_LIST} direct) - endif () - - macro (ADD_VFD_TEST vfdname resultcode) - add_test ( - NAME H5REPACK-VFD-${vfdname}-h5repacktest - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=h5repacktest" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test}) - endif () - set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest") - endmacro () - endif () - # -------------------------------------------------------------------- # Copy all the HDF5 files from the source directory into the test directory # -------------------------------------------------------------------- @@ -1459,9 +1426,12 @@ if (BUILD_SHARED_LIBS) ADD_H5_UD_TEST (plugin_zero 0 h5repack_layout.h5 -v -f UD=250,0,0) endif () - if (HDF5_TEST_VFD) - # Run test with different Virtual File Driver - foreach (vfd ${VFD_LIST}) - ADD_VFD_TEST (${vfd} 0) - endforeach () - endif () +############################################################################## +############################################################################## +### V F D T E S T S ### +############################################################################## +############################################################################## + +if (HDF5_TEST_VFD) + include (CMakeVFDTests.cmake) +endif () diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake new file mode 100644 index 0000000..2042f31 --- /dev/null +++ b/tools/test/h5repack/CMakeVFDTests.cmake @@ -0,0 +1,65 @@ +# +# Copyright by The HDF Group. +# 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. +# + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + set (VFD_LIST + sec2 + stdio + core + split + multi + family + ) + + if (DIRECT_VFD) + set (VFD_LIST ${VFD_LIST} direct) + endif () + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + macro (ADD_VFD_TEST vfdname resultcode) + add_test ( + NAME H5REPACK-VFD-${vfdname}-h5repacktest + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=h5repacktest" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest") + endmacro () + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + + # Run test with different Virtual File Driver + foreach (vfd ${VFD_LIST}) + ADD_VFD_TEST (${vfd} 0) + endforeach () -- cgit v0.12