From c4f785bc93c5f4e8677b325c321e0f9ed41c3baa Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Mon, 7 Oct 2019 16:00:44 -0500 Subject: Partial fix for HDFFV-10792 --- release_docs/RELEASE.txt | 13 +++++++++++++ src/H5Dchunk.c | 49 ++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 58 insertions(+), 4 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 4c398a0..592acd8 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -370,6 +370,19 @@ Bug Fixes since HDF5-1.10.3 release Library ------- + - Fixed an assertion failure in the parallel library when collectively + filling chunks. As it is required that chunks be written in + monotonically non-decreasing order of offset in the file, this assertion + was being triggered when the list of chunk file space allocations being + passed to the collective chunk filling routine was not sorted according + to this particular requirement. + + The addition of a sort of the out of order chunks trades a bit of + performance for the elimination of this assertion and of any complaints + from MPI implementations about the file offsets used being out of order. + + (JTH - 2019/10/07) + - Fixed the iteration error in test_versionbounds() in test/dtypes.c The test was supposed to loop through all valid combinations of diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index ed82b3b..66dd414 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -323,6 +323,7 @@ static herr_t H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfil #ifdef H5_HAVE_PARALLEL static herr_t H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_info_t *chunk_info, size_t chunk_size, const void *fill_buf); +static int H5D__chunk_cmp_addr(const void *addr1, const void *addr2); #endif /* H5_HAVE_PARALLEL */ static int @@ -4977,6 +4978,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_info_t *chunk_info, MPI_Datatype mem_type, file_type; H5FD_mpio_xfer_t prev_xfer_mode; /* Previous data xfer mode */ hbool_t have_xfer_mode = FALSE; /* Whether the previous xffer mode has been retrieved */ + hbool_t need_addr_sort = FALSE; int i; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -5025,19 +5027,28 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_info_t *chunk_info, /* make sure that the addresses in the datatype are monotonically non decreasing */ - if(i) - HDassert(chunk_disp_array[i] > chunk_disp_array[i - 1]); - } /* end if */ + if(i && (chunk_disp_array[i] < chunk_disp_array[i - 1])) + need_addr_sort = TRUE; + } /* end for */ /* calculate if there are any leftover blocks after evenly distributing. If there are, then round robin the distribution to processes 0 -> leftover. */ if(leftover && leftover > mpi_rank) { - chunk_disp_array[blocks] = (MPI_Aint)chunk_info->addr[blocks*mpi_size + mpi_rank]; + chunk_disp_array[blocks] = (MPI_Aint)chunk_info->addr[blocks*mpi_size + mpi_rank]; + if(blocks && (chunk_disp_array[blocks] < chunk_disp_array[blocks - 1])) + need_addr_sort = TRUE; block_lens[blocks] = block_len; blocks++; } + /* + * Ensure that the blocks are sorted in monotonically non-decreasing + * order of offset in the file. + */ + if(need_addr_sort) + HDqsort(chunk_disp_array, blocks, sizeof(MPI_Aint), H5D__chunk_cmp_addr); + /* MSC * should use this if MPI_type_create_hindexed block is working * mpi_code = MPI_Type_create_hindexed_block(blocks, block_len, chunk_disp_array, MPI_BYTE, &file_type); @@ -5093,6 +5104,36 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__chunk_collective_fill() */ + + +static int +H5D__chunk_cmp_addr(const void *addr1, const void *addr2) +{ + MPI_Aint _addr1 = (MPI_Aint)0, _addr2 = (MPI_Aint)0; + int ret_value = 0; + + FUNC_ENTER_STATIC_NOERR + + _addr1 = *((const MPI_Aint *) addr1); + _addr2 = *((const MPI_Aint *) addr2); + +#if MPI_VERSION >= 3 && MPI_SUBVERSION >= 1 + { + MPI_Aint diff = MPI_Aint_diff(_addr1, _addr2); + + if(diff < (MPI_Aint)0) + ret_value = -1; + else if(diff > (MPI_Aint)0) + ret_value = 1; + else + ret_value = 0; + } +#else + ret_value = (_addr1 > _addr2) - (_addr1 < _addr2); +#endif + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__chunk_cmp_addr() */ #endif /* H5_HAVE_PARALLEL */ -- cgit v0.12 From 224cb4a03406ed72e02d026efeab47fdf7f6b33b Mon Sep 17 00:00:00 2001 From: David Young Date: Wed, 5 Feb 2020 19:31:59 -0600 Subject: Use a naked pthread_self() call in the HDF5 thread wrappers. --- src/H5TS.c | 4 ++-- src/H5private.h | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/H5TS.c b/src/H5TS.c index 7a801e2..cc55810 100644 --- a/src/H5TS.c +++ b/src/H5TS.c @@ -262,7 +262,7 @@ H5TS_mutex_lock(H5TS_mutex_t *mutex) if (ret_value) return ret_value; - if(mutex->lock_count && pthread_equal(HDpthread_self(), mutex->owner_thread)) { + if(mutex->lock_count && pthread_equal(pthread_self(), mutex->owner_thread)) { /* already owned by self - increment count */ mutex->lock_count++; } else { @@ -271,7 +271,7 @@ H5TS_mutex_lock(H5TS_mutex_t *mutex) pthread_cond_wait(&mutex->cond_var, &mutex->atomic_lock); /* After we've received the signal, take ownership of the mutex */ - mutex->owner_thread = HDpthread_self(); + mutex->owner_thread = pthread_self(); mutex->lock_count = 1; } diff --git a/src/H5private.h b/src/H5private.h index f0f3687..f090203 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1545,10 +1545,6 @@ extern char *strdup(const char *s); #define HDstrdup(S) strdup(S) #endif /* HDstrdup */ -#ifndef HDpthread_self - #define HDpthread_self() pthread_self() -#endif /* HDpthread_self */ - /* Macro for "stringizing" an integer in the C preprocessor (use H5_TOSTRING) */ /* (use H5_TOSTRING, H5_STRINGIZE is just part of the implementation) */ #define H5_STRINGIZE(x) #x -- cgit v0.12 From 921278c604b3129c1ff5066f0a2b94abcb3aa8f7 Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 20 Feb 2020 13:34:33 -0600 Subject: Add missing MANIFEST entry, ./doc/code-conventions.md . --- MANIFEST | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MANIFEST b/MANIFEST index 35d21ce..3fe44f9 100644 --- a/MANIFEST +++ b/MANIFEST @@ -150,6 +150,8 @@ ./config/site-specific/BlankForm +./doc/code-conventions.md + ./examples/Attributes.txt ./examples/Makefile.am ./examples/h5_chunk_read.c -- cgit v0.12 From 399ef726f092237abb1039960edf837a38600813 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 21 Feb 2020 15:14:00 -0600 Subject: HDFFV-11032 fix JNI call --- java/src/hdf/hdf5lib/H5.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 872fbc7..1527dc2 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -3590,7 +3590,7 @@ public class H5 implements java.io.Serializable { * - name is null. */ public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] objNames, int[] objTypes, - H5O_token_t[] tokens) throws HDF5LibraryException, NullPointerException { + H5O_token_t[] tokens) throws HDF5LibraryException, NullPointerException { if (objNames == null) { throw new NullPointerException("H5Gget_obj_info_all(): name array is null"); } @@ -3605,7 +3605,7 @@ public class H5 implements java.io.Serializable { public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] oname, int[] otype, int[] ltype, long[] fno, H5O_token_t[] tokens, int indx_type) throws HDF5LibraryException, NullPointerException { - return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, tokens, oname.length, indx_type, -1); + return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, tokens, indx_type, -1); } public synchronized static int H5Gget_obj_info_full(long loc_id, String name, String[] oname, int[] otype, -- cgit v0.12 From 3f3e1520d5fa494c80da6bf42bab906d24c1d864 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 21 Feb 2020 15:14:42 -0600 Subject: CMake cleanup --- config/cmake_ext_mod/CTestCustom.cmake | 2 +- config/cmake_ext_mod/runTest.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cmake_ext_mod/CTestCustom.cmake b/config/cmake_ext_mod/CTestCustom.cmake index 4e292a7..2d72e8d 100644 --- a/config/cmake_ext_mod/CTestCustom.cmake +++ b/config/cmake_ext_mod/CTestCustom.cmake @@ -5,7 +5,7 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION ".*note.*expected.*void.*but argument is of type.*volatile.*" ".*src.SZIP.*:[ \t]*warning.*" ".*src.ZLIB.*:[ \t]*warning.*" - ".*jpeg.src.*:[ \t]*warning.*" + ".*src.JPEG.*:[ \t]*warning.*" ".*POSIX name for this item is deprecated.*" ".*disabling jobserver mode.*" ".*warning.*implicit declaration of function.*" diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 6440c81..6e78ba5 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -163,7 +163,7 @@ endif () # if the output file needs Modified text removed if (TEST_MASK_MOD) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - string (REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") + string (REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif () -- cgit v0.12 From 380fe7cfdfd98461cb1bff54bad4de0ee9904ad6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 21 Feb 2020 15:15:34 -0600 Subject: Fix always true issue because member is not dynamically allocated --- java/src/jni/h5pFAPLImp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/java/src/jni/h5pFAPLImp.c b/java/src/jni/h5pFAPLImp.c index c9844b7..178b1af 100644 --- a/java/src/jni/h5pFAPLImp.c +++ b/java/src/jni/h5pFAPLImp.c @@ -395,7 +395,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs if (H5Pget_fapl_hdfs((hid_t)fapl_id, &fa) < 0) H5_LIBRARY_ERROR(ENVONLY); - if (NULL != fa.namenode_name) { + if (HDstrlen(fa.namenode_name) > 0) { if (NULL == (j_namenode_name = ENVPTR->NewStringUTF(ENVONLY, fa.namenode_name))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create namenode_name string"); @@ -405,7 +405,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs args[1].i = (jint)fa.namenode_port; - if (NULL != fa.user_name) { + if (HDstrlen(fa.user_name) > 0) { if (NULL == (j_user_name = ENVPTR->NewStringUTF(ENVONLY, fa.user_name))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create user_name string"); @@ -413,7 +413,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs } args[2].l = j_user_name; - if (NULL != fa.kerberos_ticket_cache) { + if (HDstrlen(fa.kerberos_ticket_cache) > 0) { if (NULL == (j_kerb_cache_path = ENVPTR->NewStringUTF(ENVONLY, fa.kerberos_ticket_cache))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create kerberos_ticket_cache string"); @@ -820,7 +820,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3 if (H5Pget_fapl_ros3((hid_t)fapl_id, &fa) < 0) H5_LIBRARY_ERROR(ENVONLY); - if (NULL != fa.aws_region) { + if (HDstrlen(fa.aws_region) > 0) { if (NULL == (j_aws = ENVPTR->NewStringUTF(ENVONLY, fa.aws_region))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create aws_region string"); @@ -828,7 +828,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3 } args[0].l = j_aws; - if (NULL != fa.secret_id) { + if (HDstrlen(fa.secret_id) > 0) { if (NULL == (j_id = ENVPTR->NewStringUTF(ENVONLY, fa.secret_id))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_id string"); @@ -836,7 +836,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3 } args[1].l = j_id; - if (NULL != fa.secret_key) { + if (HDstrlen(fa.secret_key) > 0) { if (NULL == (j_key = ENVPTR->NewStringUTF(ENVONLY, fa.secret_key))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_key string"); @@ -1685,7 +1685,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1mdc_1config args[2].z = cacheinfo.open_trace_file; args[3].z = cacheinfo.close_trace_file; - if (NULL != cacheinfo.trace_file_name) { + if (HDstrlen(cacheinfo.trace_file_name) > 0) { if (NULL == (j_str = ENVPTR->NewStringUTF(ENVONLY, cacheinfo.trace_file_name))) { CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_mdc_config: out of memory - unable to construct string from UTF characters"); -- cgit v0.12 From 666205a55f01698a71484f504bc8eb9541800f25 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 21 Feb 2020 16:16:06 -0600 Subject: TRILAB-142 Change minimum CMake version to 3.12 --- CMakeInstallation.cmake | 32 ++--- CMakeLists.txt | 29 ++-- c++/CMakeLists.txt | 2 +- c++/examples/CMakeLists.txt | 2 +- c++/src/CMakeLists.txt | 2 +- c++/test/CMakeLists.txt | 2 +- config/cmake/CTestScript.cmake | 2 +- config/cmake/ConfigureChecks.cmake | 4 - config/cmake/HDF5UseFortran.cmake | 220 +++++++++++++++++++++-------- config/cmake/HDF5_Examples.cmake.in | 2 +- config/cmake/UseJava.cmake | 32 ++--- config/cmake/UseJavaClassFilelist.cmake | 2 +- config/cmake/jrunTest.cmake | 12 +- config/cmake/scripts/CTestScript.cmake | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- config/cmake/userblockTest.cmake | 2 +- config/cmake/wait_H5Tinit.cmake | 2 +- config/cmake_ext_mod/FindSZIP.cmake | 2 +- config/cmake_ext_mod/HDFMacros.cmake | 36 ++--- config/cmake_ext_mod/HDFUseFortran.cmake | 179 ++++++++++++----------- config/cmake_ext_mod/grepTest.cmake | 6 +- config/cmake_ext_mod/runTest.cmake | 12 +- examples/CMakeLists.txt | 2 +- fortran/CMakeLists.txt | 2 +- fortran/examples/CMakeLists.txt | 2 +- fortran/src/CMakeLists.txt | 2 +- fortran/test/CMakeLists.txt | 2 +- fortran/testpar/CMakeLists.txt | 2 +- hl/CMakeLists.txt | 2 +- hl/c++/CMakeLists.txt | 2 +- hl/c++/examples/CMakeLists.txt | 2 +- hl/c++/src/CMakeLists.txt | 2 +- hl/c++/test/CMakeLists.txt | 2 +- hl/examples/CMakeLists.txt | 2 +- hl/fortran/CMakeLists.txt | 2 +- hl/fortran/examples/CMakeLists.txt | 2 +- hl/fortran/src/CMakeLists.txt | 2 +- hl/fortran/test/CMakeLists.txt | 2 +- hl/src/CMakeLists.txt | 2 +- hl/test/CMakeLists.txt | 2 +- hl/tools/CMakeLists.txt | 2 +- hl/tools/gif2h5/CMakeLists.txt | 2 +- hl/tools/h5watch/CMakeLists.txt | 2 +- java/CMakeLists.txt | 2 +- java/examples/CMakeLists.txt | 2 +- java/examples/datasets/CMakeLists.txt | 2 +- java/examples/datatypes/CMakeLists.txt | 2 +- java/examples/groups/CMakeLists.txt | 2 +- java/examples/intro/CMakeLists.txt | 2 +- java/src/CMakeLists.txt | 2 +- java/src/hdf/CMakeLists.txt | 2 +- java/src/hdf/hdf5lib/CMakeLists.txt | 2 +- java/src/jni/CMakeLists.txt | 2 +- java/test/CMakeLists.txt | 2 +- release_docs/RELEASE.txt | 7 + release_docs/USING_HDF5_CMake.txt | 2 +- src/CMakeLists.txt | 2 +- test/CMakeLists.txt | 2 +- testpar/CMakeLists.txt | 2 +- tools/CMakeLists.txt | 2 +- tools/lib/CMakeLists.txt | 2 +- tools/libtest/CMakeLists.txt | 2 +- tools/src/CMakeLists.txt | 2 +- tools/src/h5copy/CMakeLists.txt | 2 +- tools/src/h5diff/CMakeLists.txt | 2 +- tools/src/h5dump/CMakeLists.txt | 2 +- tools/src/h5format_convert/CMakeLists.txt | 2 +- tools/src/h5import/CMakeLists.txt | 2 +- tools/src/h5jam/CMakeLists.txt | 2 +- tools/src/h5ls/CMakeLists.txt | 2 +- tools/src/h5repack/CMakeLists.txt | 2 +- tools/src/h5stat/CMakeLists.txt | 2 +- tools/src/misc/CMakeLists.txt | 2 +- tools/test/CMakeLists.txt | 2 +- tools/test/h5copy/CMakeLists.txt | 2 +- tools/test/h5diff/CMakeLists.txt | 2 +- tools/test/h5dump/CMakeLists.txt | 2 +- tools/test/h5dump/CMakeTests.cmake | 54 ++++--- tools/test/h5format_convert/CMakeLists.txt | 2 +- tools/test/h5import/CMakeLists.txt | 2 +- tools/test/h5jam/CMakeLists.txt | 2 +- tools/test/h5ls/CMakeLists.txt | 2 +- tools/test/h5repack/CMakeLists.txt | 2 +- tools/test/h5stat/CMakeLists.txt | 2 +- tools/test/misc/CMakeLists.txt | 2 +- tools/test/misc/vds/CMakeLists.txt | 2 +- tools/test/perform/CMakeLists.txt | 2 +- 87 files changed, 436 insertions(+), 337 deletions(-) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index dc229d2..12d8273 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -41,13 +41,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) #----------------------------------------------------------------------------- # Export all exported targets to the build tree for use by parent project #----------------------------------------------------------------------------- - if (NOT HDF5_EXTERNALLY_CONFIGURED) - export ( - TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT} - FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake - NAMESPACE ${HDF_PACKAGE_NAMESPACE} - ) - endif () + export ( + TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT} + FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake + NAMESPACE ${HDF_PACKAGE_NAMESPACE} + ) endif () #----------------------------------------------------------------------------- @@ -104,16 +102,15 @@ endif () # Configure the hdf5-config-version .cmake file for the install directory #----------------------------------------------------------------------------- if (NOT HDF5_EXTERNALLY_CONFIGURED) - # 3.11 or greater - #write_basic_package_version_file ( - # ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake - # VERSION ${HDF5_PACKAGE_VERSION} - # COMPATIBILITY SameMinorVersion - #) - configure_file ( - ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in - ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY + write_basic_package_version_file ( + "${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake" + VERSION ${HDF5_PACKAGE_VERSION} + COMPATIBILITY SameMinorVersion ) + #configure_file ( + # ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in + # ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY + #) install ( FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5 @@ -201,8 +198,7 @@ endif () #----------------------------------------------------------------------------- if (NOT HDF5_EXTERNALLY_CONFIGURED) install ( - FILES - ${HDF5_SOURCE_DIR}/COPYING + FILES ${HDF5_SOURCE_DIR}/COPYING DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 129a73a..487ca18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,14 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5 C) if (POLICY CMP0074) cmake_policy (SET CMP0074 NEW) endif () +if (POLICY CMP0083) + cmake_policy (SET CMP0083 NEW) +endif () + #----------------------------------------------------------------------------- # Instructions for use : Normal Build # @@ -34,9 +38,14 @@ endif () # CMake version 3.14 added option --ignore-eol to compare files # cmake -E compare_files --ignore-eol file1 file2 -#if(CMAKE_VERSION VERSION_LESS "3.14.0" AND WIN32) -# MESSAGE(FATAL_ERROR "Windows builds requires a minimum of CMake 3.14") -#endif() +set (CMAKE_IGNORE_EOL "--ignore-eol") +if (CMAKE_VERSION VERSION_LESS "3.14.0") + set (CMAKE_IGNORE_EOL "") + if (WIN32) + message (FATAL_ERROR "Windows builds requires a minimum of CMake 3.14") + endif() +else () +endif () #----------------------------------------------------------------------------- # Instructions for use : Sub-Project Build @@ -555,9 +564,9 @@ endif () set (EXE_EXT "") if (WIN32 OR MINGW) set (EXE_EXT ".exe") - add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1) - add_definitions (-D_CRT_SECURE_NO_WARNINGS) - add_definitions (-D_CONSOLE) + add_compile_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1) + add_compile_definitions (-D_CRT_SECURE_NO_WARNINGS) + add_compile_definitions (-D_CONSOLE) endif () if (MSVC) @@ -957,12 +966,6 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}") - # Building with PGI requires CMake 3.3 or greater because previous versions - # of CMake add the wrong compiler flag for the PGI Fortran compiler. - if (CMAKE_Fortran_COMPILER_ID MATCHES "PGI" AND CMAKE_VERSION VERSION_LESS "3.3") - message (FATAL_ERROR " **** PGI FORTRAN REQUIRES CMAKE VERSION 3.3 OR GREATER **** ") - endif () - include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) set (LINK_Fortran_LIBS ${LINK_LIBS}) diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index 80bd810..036735e 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_CPP CXX) add_subdirectory (src) diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index 89d62f1..890d22d 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_CPP_EXAMPLES CXX) # -------------------------------------------------------------------- diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 2a92ed2..39f0f3a 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_CPP_SRC CXX) #----------------------------------------------------------------------------- diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index 5e7134d..29534a7 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_CPP_TEST CXX) # -------------------------------------------------------------------- diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake index e914c4d..5478862 100644 --- a/config/cmake/CTestScript.cmake +++ b/config/cmake/CTestScript.cmake @@ -9,7 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) ######################################################## # For any comments please contact cdashhelp@hdfgroup.org # diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index ab1fa89..11bf39c 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -160,10 +160,6 @@ endif () #----------------------------------------------------------------------------- option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF) if (HDF5_ENABLE_ROS3_VFD) - # CMake version 3.13 fixed FindCURL module - if(CMAKE_VERSION VERSION_LESS "3.13.0" AND WIN32) - MESSAGE(FATAL_ERROR "Windows builds for this option requires a minimum of CMake 3.13") - endif () find_package(CURL REQUIRED) find_package(OpenSSL REQUIRED) if (${CURL_FOUND} AND ${OPENSSL_FOUND}) diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 2d3d371..465afbf 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -19,6 +19,24 @@ enable_language (Fortran) set (HDF_PREFIX "H5") include (CheckFortranFunctionExists) +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + include (CheckFortranSourceRuns) + include (CheckFortranSourceCompiles) +endif () + +# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END" +macro (READ_SOURCE SOURCE_START SOURCE_END RETURN_VAR) + file (READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" SOURCE_MASTER) + string (REGEX MATCH "${SOURCE_START}[\\\t\\\n\\\r[].+]*${SOURCE_END}" SOURCE_CODE ${SOURCE_MASTER}) + set (RETURN_VAR "${SOURCE_CODE}") +endmacro () + +set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR}) +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + if (HDF5_REQUIRED_LIBRARIES) + set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}") + endif () +else () # The provided CMake Fortran macros don't provide a general compile/run function # so this one is used. #----------------------------------------------------------------------------- @@ -55,22 +73,19 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 set(${RETURN_VAR} ${COMPILE_RESULT_VAR}) endif () endmacro () - -# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END" -macro (READ_SOURCE SOURCE_START SOURCE_END RETURN_VAR) - file (READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" SOURCE_MASTER) - string (REGEX MATCH "${SOURCE_START}[\\\t\\\n\\\r[].+]*${SOURCE_END}" SOURCE_CODE ${SOURCE_MASTER}) - set (RETURN_VAR "${SOURCE_CODE}") -endmacro () - +endif () #----------------------------------------------------------------------------- # Check to see C_LONG_DOUBLE is available READ_SOURCE("PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" "END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" SOURCE_CODE) -CHECK_FORTRAN_FEATURE(c_long_double - "${SOURCE_CODE}" - FORTRAN_HAVE_C_LONG_DOUBLE -) +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90) +else () + CHECK_FORTRAN_FEATURE(c_long_double + "${SOURCE_CODE}" + FORTRAN_HAVE_C_LONG_DOUBLE + ) +endif () if (${FORTRAN_HAVE_C_LONG_DOUBLE}) set (${HDF_PREFIX}_FORTRAN_HAVE_C_LONG_DOUBLE 1) @@ -81,10 +96,14 @@ endif () # Check to see C_LONG_DOUBLE is different from C_DOUBLE READ_SOURCE("MODULE type_mod" "END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE" SOURCE_CODE) -CHECK_FORTRAN_FEATURE(c_long_double - "${SOURCE_CODE}" - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE -) +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_C_LONG_DOUBLE_IS_UNIQUE SRC_EXT f90) +else () + CHECK_FORTRAN_FEATURE(c_long_double + "${SOURCE_CODE}" + FORTRAN_C_LONG_DOUBLE_IS_UNIQUE + ) +endif () if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE}) set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1) else () @@ -108,13 +127,80 @@ endif () # Determine the available KINDs for REALs and INTEGERs #----------------------------------------------------------------------------- -READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE) +#READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE) +set (PROG_SRC_CODE + " + PROGRAM FC_AVAIL_KINDS + IMPLICIT NONE + INTEGER :: ik, jk, k, max_decimal_prec + INTEGER :: num_rkinds = 1, num_ikinds = 1 + INTEGER, DIMENSION(1:10) :: list_ikinds = -1 + INTEGER, DIMENSION(1:10) :: list_rkinds = -1 + + OPEN(8, FILE='pac_fconftest.out', FORM='formatted') + + ! Find integer KINDs + list_ikinds(num_ikinds)=SELECTED_INT_KIND(1) + DO ik = 2, 36 + k = SELECTED_INT_KIND(ik) + IF(k.LT.0) EXIT + IF(k.GT.list_ikinds(num_ikinds))THEN + num_ikinds = num_ikinds + 1 + list_ikinds(num_ikinds) = k + ENDIF + ENDDO + + DO k = 1, num_ikinds + WRITE(8,'(I0)', ADVANCE='NO') list_ikinds(k) + IF(k.NE.num_ikinds)THEN + WRITE(8,'(A)',ADVANCE='NO') ',' + ELSE + WRITE(8,'()') + ENDIF + ENDDO + + ! Find real KINDs + list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1) + max_decimal_prec = 1 + + prec: DO ik = 2, 36 + exp: DO jk = 1, 17000 + k = SELECTED_REAL_KIND(ik,jk) + IF(k.LT.0) EXIT exp + IF(k.GT.list_rkinds(num_rkinds))THEN + num_rkinds = num_rkinds + 1 + list_rkinds(num_rkinds) = k + ENDIF + max_decimal_prec = ik + ENDDO exp + ENDDO prec + + DO k = 1, num_rkinds + WRITE(8,'(I0)', ADVANCE='NO') list_rkinds(k) + IF(k.NE.num_rkinds)THEN + WRITE(8,'(A)',ADVANCE='NO') ',' + ELSE + WRITE(8,'()') + ENDIF + ENDDO + + WRITE(8,'(I0)') max_decimal_prec + WRITE(8,'(I0)') num_ikinds + WRITE(8,'(I0)') num_rkinds + END PROGRAM FC_AVAIL_KINDS + " +) +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + check_fortran_source_runs (${PROG_SRC_CODE} FC_AVAIL_KINDS_RESULT SRC_EXT f90) +else () FORTRAN_RUN ("REAL and INTEGER KINDs" - "${SOURCE_CODE}" + "${PROG_SRC_CODE}" XX YY - PROG_RESULT + FC_AVAIL_KINDS_RESULT ) +endif () + # dnl The output from the above program will be: # dnl -- LINE 1 -- valid integer kinds (comma seperated list) # dnl -- LINE 2 -- valid real kinds (comma seperated list) @@ -122,7 +208,7 @@ FORTRAN_RUN ("REAL and INTEGER KINDs" # dnl -- LINE 4 -- number of valid integer kinds # dnl -- LINE 5 -- number of valid real kinds -file (READ "${CMAKE_BINARY_DIR}/pac_fconftest.out" PROG_OUTPUT) +file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_fconftest.out" PROG_OUTPUT) # Convert the string to a list of strings by replacing the carriage return with a semicolon string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") @@ -165,25 +251,25 @@ message (STATUS "....MAX DECIMAL PRECISION ${${HDF_PREFIX}_PAC_FC_MAX_REAL_PRECI # ********** string (REGEX REPLACE "," ";" VAR "${pac_validIntKinds}") -foreach (KIND ${VAR} ) - set (PROG_SRC - " - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER (KIND=${KIND}) a - OPEN(8,FILE='pac_validIntKinds.out',FORM='formatted') - WRITE(8,'(I0)') ${FC_SIZEOF_A} - CLOSE(8) - END - " - ) - FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC} - XX - YY - PROG_RESULT1 +foreach (KIND ${VAR}) + set (PROG_SRC_${KIND} + " + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER (KIND=${KIND}) a + OPEN(8,FILE='pac_validIntKinds.out',FORM='formatted') + WRITE(8,'(I0)') ${FC_SIZEOF_A} + CLOSE(8) + END + " ) - file (READ "${CMAKE_BINARY_DIR}/pac_validIntKinds.out" PROG_OUTPUT1) + if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + check_fortran_source_runs (${PROG_SRC_${KIND}} VALIDINTKINDS_RESULT_${KIND} SRC_EXT f90) + else () + FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC_${KIND}} XX YY VALIDINTKINDS_RESULT_${KIND}) + endif () + file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validIntKinds.out" PROG_OUTPUT1) string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}") set (pack_int_sizeof "${pack_int_sizeof} ${PROG_OUTPUT1},") endforeach () @@ -213,24 +299,24 @@ math (EXPR _LEN "${LEN_VAR}-1") list (GET VAR ${_LEN} max_real_fortran_kind) foreach (KIND ${VAR} ) - set (PROG_SRC - " - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - REAL (KIND=${KIND}) a - OPEN(8,FILE='pac_validRealKinds.out',FORM='formatted') - WRITE(8,'(I0)') ${FC_SIZEOF_A} - CLOSE(8) - END - " - ) - FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC} - XX - YY - PROG_RESULT1 + set (PROG_SRC2_${KIND} + " + PROGRAM main + USE ISO_C_BINDING + IMPLICIT NONE + REAL (KIND=${KIND}) a + OPEN(8,FILE='pac_validRealKinds.out',FORM='formatted') + WRITE(8,'(I0)') ${FC_SIZEOF_A} + CLOSE(8) + END + " ) - file (READ "${CMAKE_BINARY_DIR}/pac_validRealKinds.out" PROG_OUTPUT1) + if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + check_fortran_source_runs (${PROG_SRC2_${KIND}} VALIDREALKINDS_RESULT_${KIND} SRC_EXT f90) + else () + FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC2_${KIND}} XX YY VALIDREALKINDS_RESULT_${KIND}) + endif () + file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validRealKinds.out" PROG_OUTPUT1) string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}") set (pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT1},") endforeach () @@ -261,7 +347,7 @@ list (GET VAR ${_LEN} max_real_fortran_sizeof) #----------------------------------------------------------------------------- # Find sizeof of native kinds #----------------------------------------------------------------------------- -FORTRAN_RUN ("SIZEOF NATIVE KINDs" +set (PROG_SRC3 " PROGRAM main USE ISO_C_BINDING @@ -279,11 +365,13 @@ FORTRAN_RUN ("SIZEOF NATIVE KINDs" CLOSE(8) END " - XX - YY - PROG_RESULT - ) - file (READ "${CMAKE_BINARY_DIR}/pac_sizeof_native_kinds.out" PROG_OUTPUT) +) +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + check_fortran_source_runs (${PROG_SRC3} PAC_SIZEOF_NATIVE_KINDS_RESULT SRC_EXT f90) +else () + FORTRAN_RUN ("SIZEOF NATIVE KINDs" ${PROG_SRC3} XX YY PAC_SIZEOF_NATIVE_KINDS_RESULT) +endif () +file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_sizeof_native_kinds.out" PROG_OUTPUT) # dnl The output from the above program will be: # dnl -- LINE 1 -- sizeof INTEGER # dnl -- LINE 2 -- kind of INTEGER @@ -352,6 +440,9 @@ set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: ENABLE_LANGUAGE (C) +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") +include (CheckCSourceRuns) +else () #----------------------------------------------------------------------------- # The provided CMake C macros don't provide a general compile/run function # so this one is used. @@ -402,6 +493,7 @@ macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) message (FATAL_ERROR "Compilation of C ${FUNCTION_NAME} - Failed") endif () endmacro () +endif () set (PROG_SRC " @@ -432,7 +524,11 @@ set (PROG_SRC " ) -C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_OUTPUT) +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + check_c_source_runs (${PROG_SRC} PROG_OUTPUT) +else () + C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_OUTPUT) +endif () # dnl The output from the above program will be: # dnl -- LINE 1 -- long double decimal precision diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index 4755ec8..dd064d3 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -9,7 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) ############################################################################################################### # This script will build and run the examples from a folder # Execute from a command line: diff --git a/config/cmake/UseJava.cmake b/config/cmake/UseJava.cmake index 8efee11..375004e 100644 --- a/config/cmake/UseJava.cmake +++ b/config/cmake/UseJava.cmake @@ -536,7 +536,7 @@ function(add_jar _TARGET_NAME) if (_JAVA_SOURCE_FILE MATCHES "^@(.+)$") get_filename_component(_JAVA_FULL ${CMAKE_MATCH_1} ABSOLUTE) - list(APPEND _JAVA_COMPILE_FILELISTS ${_JAVA_FULL}) + list (APPEND _JAVA_COMPILE_FILELISTS ${_JAVA_FULL}) elseif (_JAVA_EXT MATCHES ".java") file(RELATIVE_PATH _JAVA_REL_BINARY_PATH ${CMAKE_CURRENT_BINARY_DIR} ${_JAVA_FULL}) @@ -550,7 +550,7 @@ function(add_jar _TARGET_NAME) endif () get_filename_component(_JAVA_REL_PATH ${_JAVA_REL_PATH} PATH) - list(APPEND _JAVA_COMPILE_FILES ${_JAVA_SOURCE_FILE}) + list (APPEND _JAVA_COMPILE_FILES ${_JAVA_SOURCE_FILE}) set(_JAVA_CLASS_FILE "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_REL_PATH}/${_JAVA_FILE}.class") set(_JAVA_CLASS_FILES ${_JAVA_CLASS_FILES} ${_JAVA_CLASS_FILE}) @@ -561,15 +561,15 @@ function(add_jar _TARGET_NAME) # Ignored for backward compatibility elseif (_JAVA_EXT STREQUAL "") - list(APPEND CMAKE_JAVA_INCLUDE_PATH ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}} ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}_CLASSPATH}) - list(APPEND _JAVA_DEPENDS ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}}) + list (APPEND CMAKE_JAVA_INCLUDE_PATH ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}} ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}_CLASSPATH}) + list (APPEND _JAVA_DEPENDS ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}}) else () __java_copy_file(${CMAKE_CURRENT_SOURCE_DIR}/${_JAVA_SOURCE_FILE} ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_SOURCE_FILE} "Copying ${_JAVA_SOURCE_FILE} to the build directory") - list(APPEND _JAVA_RESOURCE_FILES ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_SOURCE_FILE}) - list(APPEND _JAVA_RESOURCE_FILES_RELATIVE ${_JAVA_SOURCE_FILE}) + list (APPEND _JAVA_RESOURCE_FILES ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_SOURCE_FILE}) + list (APPEND _JAVA_RESOURCE_FILES_RELATIVE ${_JAVA_SOURCE_FILE}) endif () endforeach() @@ -578,17 +578,17 @@ function(add_jar _TARGET_NAME) get_target_property(_JAVA_JAR_PATH ${_JAVA_INCLUDE_JAR} JAR_FILE) if (_JAVA_JAR_PATH) string(APPEND CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_FLAG_SEP}${_JAVA_JAR_PATH}") - list(APPEND CMAKE_JAVA_INCLUDE_PATH ${_JAVA_JAR_PATH}) - list(APPEND _JAVA_DEPENDS ${_JAVA_INCLUDE_JAR}) - list(APPEND _JAVA_COMPILE_DEPENDS ${_JAVA_JAR_PATH}) + list (APPEND CMAKE_JAVA_INCLUDE_PATH ${_JAVA_JAR_PATH}) + list (APPEND _JAVA_DEPENDS ${_JAVA_INCLUDE_JAR}) + list (APPEND _JAVA_COMPILE_DEPENDS ${_JAVA_JAR_PATH}) else () message(SEND_ERROR "add_jar: INCLUDE_JARS target ${_JAVA_INCLUDE_JAR} is not a jar") endif () else () string(APPEND CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_FLAG_SEP}${_JAVA_INCLUDE_JAR}") - list(APPEND CMAKE_JAVA_INCLUDE_PATH "${_JAVA_INCLUDE_JAR}") - list(APPEND _JAVA_DEPENDS "${_JAVA_INCLUDE_JAR}") - list(APPEND _JAVA_COMPILE_DEPENDS "${_JAVA_INCLUDE_JAR}") + list (APPEND CMAKE_JAVA_INCLUDE_PATH "${_JAVA_INCLUDE_JAR}") + list (APPEND _JAVA_DEPENDS "${_JAVA_INCLUDE_JAR}") + list (APPEND _JAVA_COMPILE_DEPENDS "${_JAVA_INCLUDE_JAR}") endif () endforeach() @@ -985,7 +985,7 @@ function(create_javadoc _target) elseif (arg STREQUAL "VERSION") set(_state "version") else () - list(APPEND _javadoc_packages ${arg}) + list (APPEND _javadoc_packages ${arg}) endif () elseif (_state STREQUAL "files") if (arg STREQUAL "PACKAGES") @@ -1009,7 +1009,7 @@ function(create_javadoc _target) elseif (arg STREQUAL "VERSION") set(_state "version") else () - list(APPEND _javadoc_files ${arg}) + list (APPEND _javadoc_files ${arg}) endif () elseif (_state STREQUAL "sourcepath") if (arg STREQUAL "PACKAGES") @@ -1033,7 +1033,7 @@ function(create_javadoc _target) elseif (arg STREQUAL "VERSION") set(_state "version") else () - list(APPEND _javadoc_sourcepath ${arg}) + list (APPEND _javadoc_sourcepath ${arg}) endif () elseif (_state STREQUAL "classpath") if (arg STREQUAL "PACKAGES") @@ -1057,7 +1057,7 @@ function(create_javadoc _target) elseif (arg STREQUAL "VERSION") set(_state "version") else () - list(APPEND _javadoc_classpath ${arg}) + list (APPEND _javadoc_classpath ${arg}) endif () elseif (_state STREQUAL "installpath") if (arg STREQUAL "PACKAGES") diff --git a/config/cmake/UseJavaClassFilelist.cmake b/config/cmake/UseJavaClassFilelist.cmake index b98276f..8348e4c 100644 --- a/config/cmake/UseJavaClassFilelist.cmake +++ b/config/cmake/UseJavaClassFilelist.cmake @@ -23,7 +23,7 @@ if (CMAKE_JAVA_CLASS_OUTPUT_PATH) file(GLOB_RECURSE _JAVA_GLOBBED_TMP_FILES "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${JAR_CLASS_PREFIX}/*.class") if (_JAVA_GLOBBED_TMP_FILES) - list(APPEND _JAVA_GLOBBED_FILES ${_JAVA_GLOBBED_TMP_FILES}) + list (APPEND _JAVA_GLOBBED_FILES ${_JAVA_GLOBBED_TMP_FILES}) endif () endforeach() else() diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake index 0315536..583613e 100644 --- a/config/cmake/jrunTest.cmake +++ b/config/cmake/jrunTest.cmake @@ -75,7 +75,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}") # if the .err file exists and ERRROR_APPEND is enabled if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) if (TEST_MASK_FILE) STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}") @@ -129,7 +129,7 @@ set (TEST_COMPARE_RESULT 0) if (NOT TEST_SKIP_COMPARE) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}") file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) if (WIN32 OR MINGW) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) @@ -143,7 +143,7 @@ if (NOT TEST_SKIP_COMPARE) 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} + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} RESULT_VARIABLE TEST_COMPARE_RESULT ) else () @@ -200,7 +200,7 @@ if (NOT TEST_SKIP_COMPARE) set (TEST_ERRREF_RESULT 0) if (TEST_ERRREF) file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) if (WIN32 OR MINGW) configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF) @@ -213,7 +213,7 @@ if (NOT TEST_SKIP_COMPARE) # now compare the error output with the error reference execute_process ( - COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF} + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF} RESULT_VARIABLE TEST_ERRREF_RESULT ) if (TEST_ERRREF_RESULT) @@ -262,7 +262,7 @@ set (TEST_GREP_RESULT 0) if (TEST_GREP_COMPARE) # now grep the output with the reference file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) # TEST_REFERENCE should always be matched string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index 3c85d48..01335b8 100644 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -9,7 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) ######################################################## # This dashboard is maintained by The HDF Group # For any comments please contact cdashhelp@hdfgroup.org diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 6096860..10ab5f2 100644 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -15,7 +15,7 @@ ### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ### ############################################################################################# -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) ############################################################################ # Usage: # ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake index c9fc36f..d3806f1 100644 --- a/config/cmake/userblockTest.cmake +++ b/config/cmake/userblockTest.cmake @@ -102,7 +102,7 @@ if (TEST_CHECKUB STREQUAL "YES") # now compare the outputs EXECUTE_PROCESS ( - COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp RESULT_VARIABLE TEST_RESULT ) diff --git a/config/cmake/wait_H5Tinit.cmake b/config/cmake/wait_H5Tinit.cmake index c0b4d06..b778765 100644 --- a/config/cmake/wait_H5Tinit.cmake +++ b/config/cmake/wait_H5Tinit.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) message(STATUS "Check for existence of ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") execute_process(COMMAND ls ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c RESULT_VARIABLE H5TI_result OUTPUT_QUIET ERROR_QUIET) diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake index 2303d6d..8f882b4 100644 --- a/config/cmake_ext_mod/FindSZIP.cmake +++ b/config/cmake_ext_mod/FindSZIP.cmake @@ -51,7 +51,7 @@ find_path(SZIP_INCLUDE_DIR szlib.h) set(szip_names ${SZIP_NAMES} sz szip szip-static libsz libszip libszip-static) foreach(name ${szip_names}) - list(APPEND szip_names_debug "${name}d") + list (APPEND szip_names_debug "${name}d") endforeach() if(NOT SZIP_LIBRARY) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index d1d9a6c..fee6def 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -82,10 +82,8 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent) set (targetfilename $/${target_name}.pdb) endif () install ( - FILES - ${targetfilename} - DESTINATION - ${targetdestination} + FILES ${targetfilename} + DESTINATION ${targetdestination} CONFIGURATIONS Debug RelWithDebInfo COMPONENT ${targetcomponent} OPTIONAL @@ -97,10 +95,8 @@ endmacro () macro (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent) if (WIN32 AND MSVC) install ( - FILES - $ - DESTINATION - ${targetdestination} + FILES $ + DESTINATION ${targetdestination} CONFIGURATIONS Debug RelWithDebInfo COMPONENT ${targetcomponent} OPTIONAL @@ -123,18 +119,12 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) endif () endif () - set_target_properties (${libtarget} - PROPERTIES - OUTPUT_NAME - ${LIB_RELEASE_NAME} -# OUTPUT_NAME_DEBUG -# ${LIB_DEBUG_NAME} - OUTPUT_NAME_RELEASE - ${LIB_RELEASE_NAME} - OUTPUT_NAME_MINSIZEREL - ${LIB_RELEASE_NAME} - OUTPUT_NAME_RELWITHDEBINFO - ${LIB_RELEASE_NAME} + set_target_properties (${libtarget} PROPERTIES + OUTPUT_NAME ${LIB_RELEASE_NAME} +# OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME} + OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME} + OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME} + OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME} ) #get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME) #get_property (target_name_debug TARGET ${libtarget} PROPERTY OUTPUT_NAME_DEBUG) @@ -143,8 +133,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) if (${libtype} MATCHES "STATIC") if (WIN32) - set_target_properties (${libtarget} - PROPERTIES + set_target_properties (${libtarget} PROPERTIES COMPILE_PDB_NAME_DEBUG ${LIB_DEBUG_NAME} COMPILE_PDB_NAME_RELEASE ${LIB_RELEASE_NAME} COMPILE_PDB_NAME_MINSIZEREL ${LIB_RELEASE_NAME} @@ -156,8 +145,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) #----- Use MSVC Naming conventions for Shared Libraries if (MINGW AND ${libtype} MATCHES "SHARED") - set_target_properties (${libtarget} - PROPERTIES + set_target_properties (${libtarget} PROPERTIES IMPORT_SUFFIX ".lib" IMPORT_PREFIX "" PREFIX "" diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index 1cce918..b0f3972 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -16,6 +16,11 @@ enable_language (Fortran) set (HDF_PREFIX "H5") +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + include (CheckFortranSourceRuns) + include (CheckFortranSourceCompiles) +endif () + #------------------------------------------------------------------------------- # Fix Fortran flags if we are compiling staticly on Windows using # Windows_MT.cmake from config/cmake/UserMacros @@ -42,71 +47,15 @@ file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*, string (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS}) set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}") -#----------------------------------------------------------------------------- -# The provided CMake Fortran macros don't provide a general check function -# so this one is used for a sizeof test. -#----------------------------------------------------------------------------- -macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) - message (STATUS "Testing Fortran ${FUNCTION}") - if (HDF5_REQUIRED_LIBRARIES) - set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") - else () - set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) - endif () - file (WRITE - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90 - "${CODE}" - ) - TRY_COMPILE (RESULT_VAR - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90 - CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" - OUTPUT_VARIABLE OUTPUT - ) - -# message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") -# message (STATUS "Test result ${OUTPUT}") -# message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - - if (${RESULT_VAR}) - set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") - message (STATUS "Testing Fortran ${FUNCTION} - OK") - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" - "${OUTPUT}\n\n" - ) - else () - message (STATUS "Testing Fortran ${FUNCTION} - Fail") - set (${VARIABLE} 0 CACHE INTERNAL "Have Fortran function ${FUNCTION}") - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" - "${OUTPUT}\n\n") - endif () -endmacro () - -#----------------------------------------------------------------------------- -# Configure Checks which require Fortran compilation must go in here -# not in the main ConfigureChecks.cmake files, because if the user has -# no Fortran compiler, problems arise. -# -# Be careful with leading spaces here, do not remove them. -#----------------------------------------------------------------------------- - -# Check for Non-standard extension intrinsic function SIZEOF -set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE) -CHECK_FORTRAN_FEATURE(sizeof +#test code source +set (SIZEOF_CODE " PROGRAM main i = sizeof(x) END PROGRAM " - ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF ) - -# Check for F2008 standard intrinsic function C_SIZEOF -set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE) -CHECK_FORTRAN_FEATURE(c_sizeof +set (C_SIZEOF_CODE " PROGRAM main USE ISO_C_BINDING @@ -115,11 +64,8 @@ CHECK_FORTRAN_FEATURE(c_sizeof result = c_sizeof(a) END PROGRAM " - ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF ) - -# Check for F2008 standard intrinsic function STORAGE_SIZE -CHECK_FORTRAN_FEATURE(storage_size +set (STORAGE_SIZE_CODE " PROGRAM main INTEGER :: a @@ -127,22 +73,15 @@ CHECK_FORTRAN_FEATURE(storage_size result = storage_size(a) END PROGRAM " - ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE ) - -# Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV" -set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE) -CHECK_FORTRAN_FEATURE(ISO_FORTRAN_ENV +set (ISO_FORTRAN_ENV_CODE " PROGRAM main USE, INTRINSIC :: ISO_FORTRAN_ENV END PROGRAM " - ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV ) - -set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE) -CHECK_FORTRAN_FEATURE(RealIsNotDouble +set (REALISNOTDOUBLE_CODE " MODULE type_mod INTERFACE h5t @@ -165,14 +104,8 @@ CHECK_FORTRAN_FEATURE(RealIsNotDouble CALL h5t(d) END PROGRAM main " - ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE ) - -#----------------------------------------------------------------------------- -# Checks if the ISO_C_BINDING module meets all the requirements -#----------------------------------------------------------------------------- -set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE) -CHECK_FORTRAN_FEATURE(iso_c_binding +set (ISO_C_BINDING_CODE " PROGRAM main USE iso_c_binding @@ -184,9 +117,95 @@ CHECK_FORTRAN_FEATURE(iso_c_binding ptr = C_LOC(ichr(1:1)) END PROGRAM " - ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING ) +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + if (HDF5_REQUIRED_LIBRARIES) + set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}") + endif () + check_fortran_source_compiles (${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF SRC_EXT f90) + check_fortran_source_compiles (${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF SRC_EXT f90) + check_fortran_source_compiles (${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE SRC_EXT f90) + check_fortran_source_compiles (${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV SRC_EXT f90) + check_fortran_source_compiles (${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE SRC_EXT f90) + check_fortran_source_compiles (${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING SRC_EXT f90) +else () + #----------------------------------------------------------------------------- + # The provided CMake Fortran macros don't provide a general check function + # so this one is used for a sizeof test. + #----------------------------------------------------------------------------- + macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) + message (STATUS "Testing Fortran ${FUNCTION}") + if (HDF5_REQUIRED_LIBRARIES) + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") + else () + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) + endif () + file (WRITE + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90 + "${CODE}" + ) + TRY_COMPILE (RESULT_VAR + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90 + CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT + ) + + # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # message (STATUS "Test result ${OUTPUT}") + # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + + if (${RESULT_VAR}) + set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") + message (STATUS "Testing Fortran ${FUNCTION} - OK") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" + "${OUTPUT}\n\n" + ) + else () + message (STATUS "Testing Fortran ${FUNCTION} - Fail") + set (${VARIABLE} 0 CACHE INTERNAL "Have Fortran function ${FUNCTION}") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" + "${OUTPUT}\n\n") + endif () + endmacro () + + #----------------------------------------------------------------------------- + # Configure Checks which require Fortran compilation must go in here + # not in the main ConfigureChecks.cmake files, because if the user has + # no Fortran compiler, problems arise. + # + # Be careful with leading spaces here, do not remove them. + #----------------------------------------------------------------------------- + + # Check for Non-standard extension intrinsic function SIZEOF + set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE) + CHECK_FORTRAN_FEATURE(${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF) + + # Check for F2008 standard intrinsic function C_SIZEOF + set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE) + CHECK_FORTRAN_FEATURE(${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF) + + # Check for F2008 standard intrinsic function STORAGE_SIZE + CHECK_FORTRAN_FEATURE(${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE) + + # Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV" + set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE) + CHECK_FORTRAN_FEATURE(${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV) + + set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE) + CHECK_FORTRAN_FEATURE(${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE) + + #----------------------------------------------------------------------------- + # Checks if the ISO_C_BINDING module meets all the requirements + #----------------------------------------------------------------------------- + set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE) + CHECK_FORTRAN_FEATURE(${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING) +endif () + #----------------------------------------------------------------------------- # Add debug information (intel Fortran : JB) #----------------------------------------------------------------------------- diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index c65c951..b011ae8 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -87,7 +87,7 @@ if (TEST_ERRREF) # if the .err file exists grep the error output with the error reference before comparing stdout if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_ERR_STREAM) - list(LENGTH TEST_ERR_STREAM test_len) + list (LENGTH TEST_ERR_STREAM test_len) if (test_len GREATER 0) # TEST_ERRREF should always be matched string (REGEX MATCH "${TEST_ERRREF}" TEST_MATCH ${TEST_ERR_STREAM}) @@ -103,7 +103,7 @@ if (TEST_ERRREF) if (NOT TEST_SKIP_COMPARE) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}") file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) if (WIN32 OR MINGW) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) @@ -116,7 +116,7 @@ if (TEST_ERRREF) 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} + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} RESULT_VARIABLE TEST_COMPARE_RESULT ) else () diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 6e78ba5..2b8b6b0 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -90,7 +90,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}") # if the .err file exists and ERRROR_APPEND is enabled if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) if (TEST_MASK_FILE) STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}") @@ -210,7 +210,7 @@ set (TEST_COMPARE_RESULT 0) if (NOT TEST_SKIP_COMPARE) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}") file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) if (WIN32 OR MINGW) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) @@ -224,7 +224,7 @@ if (NOT TEST_SKIP_COMPARE) 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} + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} RESULT_VARIABLE TEST_COMPARE_RESULT ) else () @@ -281,7 +281,7 @@ if (NOT TEST_SKIP_COMPARE) set (TEST_ERRREF_RESULT 0) if (TEST_ERRREF) file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) if (WIN32 OR MINGW) configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF) @@ -294,7 +294,7 @@ if (NOT TEST_SKIP_COMPARE) # now compare the error output with the error reference execute_process ( - COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF} + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF} RESULT_VARIABLE TEST_ERRREF_RESULT ) if (TEST_ERRREF_RESULT) @@ -343,7 +343,7 @@ set (TEST_GREP_RESULT 0) if (TEST_GREP_COMPARE) # now grep the output with the reference file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) # TEST_REFERENCE should always be matched string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 89cafc8..1bcbbf2 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_EXAMPLES C) #----------------------------------------------------------------------------- diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index 31edad2..7b90d83 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_F90 C Fortran) if (H5_HAVE_PARALLEL) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index be98963..aa702ff 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_F90_EXAMPLES C Fortran) # -------------------------------------------------------------------- # Notes: When creating examples they should be prefixed diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index b380340..f333f60 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_F90_SRC C Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index a3cc552..5657323 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_FORTRAN_TESTS C Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 1f8dbb4..5c80fd6 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_FORTRAN_TESTPAR C Fortran) #----------------------------------------------------------------------------- diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index bef034c..70c458d 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL C) #----------------------------------------------------------------------------- diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt index a62d9d4..4e55078 100644 --- a/hl/c++/CMakeLists.txt +++ b/hl/c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_CPP CXX) #----------------------------------------------------------------------------- diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index 4bd4807..22c9973 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_CPP_EXAMPLES CXX) # -------------------------------------------------------------------- diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 9964160..866f372 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_CPP_SRC CXX) #----------------------------------------------------------------------------- diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt index 429e5c7..9bf32ef 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_CPP_TEST CXX) add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp) diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt index 44115e5..1707ae9 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_EXAMPLES C) #----------------------------------------------------------------------------- diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt index 3c82574..70da026 100644 --- a/hl/fortran/CMakeLists.txt +++ b/hl/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_F90 C Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index 449194e..265d8db 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_F90_EXAMPLES C Fortran) set (examples diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 91ec669..d4979ba 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_F90_SRC C Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index 369692d..269cefb 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_FORTRAN_TESTS C Fortran) #----------------------------------------------------------------------------- diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 9bce694..55d84c7 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_SRC C) #----------------------------------------------------------------------------- diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 69f3dae..43fc312 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_TEST C) # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index c2889c3..fd9b6d9 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_TOOLS C) add_subdirectory (gif2h5) diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt index e12588b..cc2ba68 100644 --- a/hl/tools/gif2h5/CMakeLists.txt +++ b/hl/tools/gif2h5/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_TOOLS_GIF2H5 C) #----------------------------------------------------------------------------- diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt index edb78c0..9329c97 100644 --- a/hl/tools/h5watch/CMakeLists.txt +++ b/hl/tools/h5watch/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_HL_TOOLS_H5WATCH C) #----------------------------------------------------------------------------- diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt index 56e1695..416e495 100644 --- a/java/CMakeLists.txt +++ b/java/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_JAVA C Java) set (CMAKE_MODULE_PATH "${HDF_RESOURCES_DIR};${HDF_RESOURCES_EXT_DIR}") diff --git a/java/examples/CMakeLists.txt b/java/examples/CMakeLists.txt index 828b96a..3412c40 100644 --- a/java/examples/CMakeLists.txt +++ b/java/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDFJAVA_EXAMPLES Java) add_subdirectory (datasets) diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt index 02b9fdf..fc4acc4 100644 --- a/java/examples/datasets/CMakeLists.txt +++ b/java/examples/datasets/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDFJAVA_EXAMPLES_DATASETS Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt index f32f645..bd4f483 100644 --- a/java/examples/datatypes/CMakeLists.txt +++ b/java/examples/datatypes/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDFJAVA_EXAMPLES_DATATYPES Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt index e319a7f..c2c7d0f 100644 --- a/java/examples/groups/CMakeLists.txt +++ b/java/examples/groups/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDFJAVA_EXAMPLES_GROUPS Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt index a1ccd6b..6cb1e16 100644 --- a/java/examples/intro/CMakeLists.txt +++ b/java/examples/intro/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDFJAVA_EXAMPLES_INTRO Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/src/CMakeLists.txt b/java/src/CMakeLists.txt index 3f80d8f..0bfbaf7 100644 --- a/java/src/CMakeLists.txt +++ b/java/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_JAVA_SRC C) #----------------------------------------------------------------------------- diff --git a/java/src/hdf/CMakeLists.txt b/java/src/hdf/CMakeLists.txt index 161ddf1..5660158 100644 --- a/java/src/hdf/CMakeLists.txt +++ b/java/src/hdf/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_JAVA_HDF C) add_subdirectory (hdf5lib) diff --git a/java/src/hdf/hdf5lib/CMakeLists.txt b/java/src/hdf/hdf5lib/CMakeLists.txt index b0293fb..f3d9b8d 100644 --- a/java/src/hdf/hdf5lib/CMakeLists.txt +++ b/java/src/hdf/hdf5lib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_JAVA_HDF_HDF5 Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index ac41bfb..d945c33 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_JAVA_JNI C) set (HDF5_JAVA_JNI_CSRCS diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index 6275227..b97ad26 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_JAVA_TEST Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 02979c6..2cdf7a6 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -48,6 +48,13 @@ New Features Configuration: ------------- + - Update CMake minimum version to 3.12 + + Updated CMake minimum version to 3.12 and added version checks + for Windows features. + + (ADB - 2020/02/05, TRILABS-142) + - Fixed CMake include properties for Fortran libraries Corrected the library properties for Fortran to use the diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index 73a24d9..751041d 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -180,7 +180,7 @@ Given the preconditions in section I, create a CMakeLists.txt file at the source root. Include the following text in the file: ########################################################## -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5MyApp C CXX) set (LIB_TYPE STATIC) # or SHARED diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 070cf62..f582056 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_SRC C) #----------------------------------------------------------------------------- diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a2fb31d..2594477 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TEST C) #----------------------------------------------------------------------------- diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index 3e4957d..d88e27f 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TEST_PAR C) #----------------------------------------------------------------------------- diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index aa09aa6..f453ad5 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS C) add_subdirectory (lib) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 2acfab0..9ce7538 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_LIB C) #----------------------------------------------------------------------------- diff --git a/tools/libtest/CMakeLists.txt b/tools/libtest/CMakeLists.txt index 5f53272..7246e66 100644 --- a/tools/libtest/CMakeLists.txt +++ b/tools/libtest/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_LIBTEST C) #----------------------------------------------------------------------------- diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt index 757c9cd..8c3e361 100644 --- a/tools/src/CMakeLists.txt +++ b/tools/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_SRC C) #-- Add the h5diff and test executables diff --git a/tools/src/h5copy/CMakeLists.txt b/tools/src/h5copy/CMakeLists.txt index 85233ef..29888f2 100644 --- a/tools/src/h5copy/CMakeLists.txt +++ b/tools/src/h5copy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_SRC_H5COPY C) # -------------------------------------------------------------------- diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt index 2009a14..93e99cf 100644 --- a/tools/src/h5diff/CMakeLists.txt +++ b/tools/src/h5diff/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_SRC_H5DIFF C) # -------------------------------------------------------------------- diff --git a/tools/src/h5dump/CMakeLists.txt b/tools/src/h5dump/CMakeLists.txt index 383b04e..dbf92cf 100644 --- a/tools/src/h5dump/CMakeLists.txt +++ b/tools/src/h5dump/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_SRC_H5DUMP C) # -------------------------------------------------------------------- diff --git a/tools/src/h5format_convert/CMakeLists.txt b/tools/src/h5format_convert/CMakeLists.txt index 540be8c..70c07ee 100644 --- a/tools/src/h5format_convert/CMakeLists.txt +++ b/tools/src/h5format_convert/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_SRC_H5FC C) # -------------------------------------------------------------------- diff --git a/tools/src/h5import/CMakeLists.txt b/tools/src/h5import/CMakeLists.txt index dd7921d..a52467e 100644 --- a/tools/src/h5import/CMakeLists.txt +++ b/tools/src/h5import/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_SRC_H5IMPORT C) # -------------------------------------------------------------------- diff --git a/tools/src/h5jam/CMakeLists.txt b/tools/src/h5jam/CMakeLists.txt index f430417..69d4c4d 100644 --- a/tools/src/h5jam/CMakeLists.txt +++ b/tools/src/h5jam/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_SRC_H5JAM C) # -------------------------------------------------------------------- diff --git a/tools/src/h5ls/CMakeLists.txt b/tools/src/h5ls/CMakeLists.txt index ffbb1c7..7be33b5 100644 --- a/tools/src/h5ls/CMakeLists.txt +++ b/tools/src/h5ls/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_SRC_H5LS C) #----------------------------------------------------------------------------- diff --git a/tools/src/h5repack/CMakeLists.txt b/tools/src/h5repack/CMakeLists.txt index 4a1430e..967e8d7 100644 --- a/tools/src/h5repack/CMakeLists.txt +++ b/tools/src/h5repack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_SRC_H5REPACK C) # -------------------------------------------------------------------- diff --git a/tools/src/h5stat/CMakeLists.txt b/tools/src/h5stat/CMakeLists.txt index 55c675f..f6cc542 100644 --- a/tools/src/h5stat/CMakeLists.txt +++ b/tools/src/h5stat/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_SRC_H5STAT C) # -------------------------------------------------------------------- diff --git a/tools/src/misc/CMakeLists.txt b/tools/src/misc/CMakeLists.txt index 6b41d7f..16e4555 100644 --- a/tools/src/misc/CMakeLists.txt +++ b/tools/src/misc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_SRC_MISC C) # -------------------------------------------------------------------- diff --git a/tools/test/CMakeLists.txt b/tools/test/CMakeLists.txt index f4106fc..a43a848 100644 --- a/tools/test/CMakeLists.txt +++ b/tools/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST C) #-- Add the h5diff tests diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt index 028935f..034c8d3 100644 --- a/tools/test/h5copy/CMakeLists.txt +++ b/tools/test/h5copy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_H5COPY C) # -------------------------------------------------------------------- diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt index 82e09c6..e4bfc99 100644 --- a/tools/test/h5diff/CMakeLists.txt +++ b/tools/test/h5diff/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_H5DIFF C) # -------------------------------------------------------------------- diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt index b9e4ef5..cfc542f 100644 --- a/tools/test/h5dump/CMakeLists.txt +++ b/tools/test/h5dump/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_H5DUMP C) #----------------------------------------------------------------------------- diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index 187328e..91d3ea9 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -558,14 +558,12 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") - if(NOT CMAKE_VERSION VERSION_LESS "3.14.0") - add_test ( - NAME H5DUMP-${resultfile}-output-cmp - COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp - ) - set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile}) - endif () + add_test ( + NAME H5DUMP-${resultfile}-output-cmp + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp + ) + set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile}) endif () endmacro () @@ -601,20 +599,18 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") - if(NOT CMAKE_VERSION VERSION_LESS "3.14.0") - add_test ( - NAME H5DUMP-${resultfile}-output-cmp - COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp - ) - set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile}) - add_test ( - NAME H5DUMP-${resultfile}-output-cmp-ddl - COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${ddlfile}.txt ${ddlfile}.exp - ) - set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp) - endif () + add_test ( + NAME H5DUMP-${resultfile}-output-cmp + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp + ) + set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile}) + add_test ( + NAME H5DUMP-${resultfile}-output-cmp-ddl + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${ddlfile}.txt ${ddlfile}.exp + ) + set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp) endif () endmacro () @@ -631,14 +627,12 @@ ) set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects) - if(NOT CMAKE_VERSION VERSION_LESS "3.14.0") - add_test ( - NAME H5DUMP-output-cmp-${resultfile} - COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp - ) - set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}) - endif () + add_test ( + NAME H5DUMP-output-cmp-${resultfile} + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp + ) + set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}) endif () endmacro () diff --git a/tools/test/h5format_convert/CMakeLists.txt b/tools/test/h5format_convert/CMakeLists.txt index 9e49c4f..99420d8 100644 --- a/tools/test/h5format_convert/CMakeLists.txt +++ b/tools/test/h5format_convert/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_H5FC C) # -------------------------------------------------------------------- diff --git a/tools/test/h5import/CMakeLists.txt b/tools/test/h5import/CMakeLists.txt index a77ba00..f3991c5 100644 --- a/tools/test/h5import/CMakeLists.txt +++ b/tools/test/h5import/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_H5IMPORT C) # -------------------------------------------------------------------- diff --git a/tools/test/h5jam/CMakeLists.txt b/tools/test/h5jam/CMakeLists.txt index f00e781..78160d3 100644 --- a/tools/test/h5jam/CMakeLists.txt +++ b/tools/test/h5jam/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_H5JAM C) # -------------------------------------------------------------------- diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt index abbe6d0..3993277 100644 --- a/tools/test/h5ls/CMakeLists.txt +++ b/tools/test/h5ls/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_H5LS C) #----------------------------------------------------------------------------- diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt index 5722354..6f0b284 100644 --- a/tools/test/h5repack/CMakeLists.txt +++ b/tools/test/h5repack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_H5REPACK C) # -------------------------------------------------------------------- diff --git a/tools/test/h5stat/CMakeLists.txt b/tools/test/h5stat/CMakeLists.txt index 0e2ee5e..f50a747 100644 --- a/tools/test/h5stat/CMakeLists.txt +++ b/tools/test/h5stat/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_H5STAT C) # -------------------------------------------------------------------- diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt index 089a302..060c15b 100644 --- a/tools/test/misc/CMakeLists.txt +++ b/tools/test/misc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_MISC C) # -------------------------------------------------------------------- diff --git a/tools/test/misc/vds/CMakeLists.txt b/tools/test/misc/vds/CMakeLists.txt index 092cabc..71261c4 100644 --- a/tools/test/misc/vds/CMakeLists.txt +++ b/tools/test/misc/vds/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_MISC_VDS C) MACRO (ADD_H5_GENERATOR genfile) diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt index d788ffa..3dda45c 100644 --- a/tools/test/perform/CMakeLists.txt +++ b/tools/test/perform/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.12) project (HDF5_TOOLS_TEST_PERFORM C) # -------------------------------------------------------------------- -- cgit v0.12 From 1773b327fb7611429a572020e4649b05358c911e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Sun, 23 Feb 2020 16:22:31 -0600 Subject: Correct usage of add_compile_definitions --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 487ca18..2bad805 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -564,9 +564,7 @@ endif () set (EXE_EXT "") if (WIN32 OR MINGW) set (EXE_EXT ".exe") - add_compile_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1) - add_compile_definitions (-D_CRT_SECURE_NO_WARNINGS) - add_compile_definitions (-D_CONSOLE) + add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CRT_SECURE_NO_WARNINGS _CONSOLE) endif () if (MSVC) -- cgit v0.12 From f7212df0300f0d776b328fda05ef99947db59c0a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Feb 2020 12:45:22 -0600 Subject: HDFFV-11036 add file compare test process --- MANIFEST | 1 + config/cmake/fileCompareTest.cmake | 104 +++++++++++++++++++++++++++++++++++ config/cmake/userblockTest.cmake | 10 ++-- tools/test/h5repack/CMakeTests.cmake | 60 +++++++++++++++++--- 4 files changed, 162 insertions(+), 13 deletions(-) create mode 100644 config/cmake/fileCompareTest.cmake diff --git a/MANIFEST b/MANIFEST index 35d21ce..e746731 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3348,6 +3348,7 @@ ./config/cmake/ConfigureChecks.cmake ./config/cmake/CPack.Info.plist.in ./config/cmake/CTestCustom.cmake +./config/cmake/fileCompareTest.cmake ./config/cmake/FindHDFS.cmake ./config/cmake/H5cxx_config.h.in ./config/cmake/H5pubconf.h.in diff --git a/config/cmake/fileCompareTest.cmake b/config/cmake/fileCompareTest.cmake new file mode 100644 index 0000000..d913da0 --- /dev/null +++ b/config/cmake/fileCompareTest.cmake @@ -0,0 +1,104 @@ +# +# 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. +# +# fileCompareTest.cmake compares two files. + +# arguments checking +if (NOT TEST_FOLDER) + message (FATAL_ERROR "Require TEST_FOLDER to be defined") +endif () +if (NOT TEST_ONEFILE) + message (FATAL_ERROR "Require TEST_ONEFILE the first file to be defined") +endif () +if (NOT TEST_TWOFILE) + message (FATAL_ERROR "Require TEST_TWOFILE the second file to be defined") +endif () +if (NOT TEST_FUNCTION) + message (FATAL_ERROR "Require TEST_FUNCTION (LT,LTEQ,EQ,GTEQ,GT) to be defined") +endif () +#if (NOT TEST_EXPECT) +# message (STATUS "Require TEST_EXPECT to be defined") +#endif () + +set (TEST_ONE_SIZE 0) +set (TEST_TWO_SIZE 0) +set (TEST_ONE_STRING 0) +set (TEST_TWO_STRING 0) +set (TEST_ONE_STRING_LEN 0) +set (TEST_TWO_STRING_LEN 0) + +if (TEST_STRINGS STREQUAL "YES") + # find the length of the first file + #s1=`cat $ufile | wc -c | sed -e 's/ //g'` + file (STRINGS ${TEST_FOLDER}/${TEST_ONEFILE} TEST_ONE_STRING) + string (LENGTH ${TEST_ONE_STRING} TEST_ONE_STRING_LEN) + + # Get the size of the second file. + file (STRINGS ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_STRING) + string (LENGTH ${TEST_TWO_STRING} TEST_TWO_STRING_LEN) + + math (EXPR TEST_STRING_SIZE "${TEST_ONE_STRING_LEN} - ${TEST_TWO_STRING_LEN}" ) + + # now compare the outputs + execute_process ( + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_ONEFILE} ${TEST_FOLDER}/${TEST_TWOFILE} + RESULT_VARIABLE TEST_RESULT + ) + + message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}") + # if the return value is !=${TEST_EXPECT} bail out + if (NOT TEST_RESULT EQUAL TEST_EXPECT) + message (FATAL_ERROR "Failed: The output of ${TEST_FOLDER}/${TEST_ONEFILE} did not match ${TEST_FOLDER}/${TEST_TWOFILE}.\n${TEST_ERROR}") + endif () +else () + if (CMAKE_VERSION VERSION_LESS "3.14.0") + message (FATAL_ERROR "CANNOT get file size, file command SIZE not supported") + else () + file (SIZE ${TEST_FOLDER}/${TEST_ONEFILE} TEST_ONE_SIZE) + file (SIZE ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_SIZE) + if (TEST_FUNCTION MATCHES "LT") + if (TEST_ONE_SIZE LESS TEST_TWO_SIZE) + message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}") + else () + message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () + elseif (TEST_FUNCTION MATCHES "LTEQ") + if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) + message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + else () + message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () + elseif (TEST_FUNCTION MATCHES "EQ") + if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) + message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}") + else () + message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () + elseif (TEST_FUNCTION MATCHES "GTEQ") + if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) + message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + else () + message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () + elseif (TEST_FUNCTION MATCHES "GT") + if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) + message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}") + else () + message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () + else () + message (FATAL_ERROR "Failed: Incorrect test size compare command provided.\n${TEST_ERROR}") + endif () + endif () +endif () + +# everything went fine... + diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake index d3806f1..c02669d 100644 --- a/config/cmake/userblockTest.cmake +++ b/config/cmake/userblockTest.cmake @@ -54,7 +54,7 @@ if (TEST_CHECKUB STREQUAL "YES") # 'tellub' calls H5Fget_user_block to get the size # of the user block #s2=`$JAM_BIN/tellub $origfile` - EXECUTE_PROCESS ( + execute_process ( COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_OFILE} WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_RESULT @@ -72,7 +72,7 @@ if (TEST_CHECKUB STREQUAL "YES") if (TEST_O_STRING_LEN) #$JAM_BIN/getub -c $s2 $origfile > $cmpfile - EXECUTE_PROCESS ( + execute_process ( COMMAND ${TEST_EMULATOR} ${TEST_GET_PROGRAM} -c ${TEST_O_STRING_LEN} ${TEST_OFILE} WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_RESULT @@ -90,7 +90,7 @@ if (TEST_CHECKUB STREQUAL "YES") endif () #$JAM_BIN/getub -c $size $hfile > $tfile - EXECUTE_PROCESS ( + execute_process ( COMMAND ${TEST_EMULATOR} ${TEST_GET_PROGRAM} -c ${TEST_STRING_SIZE} ${TEST_HFILE} WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_RESULT @@ -101,7 +101,7 @@ if (TEST_CHECKUB STREQUAL "YES") ) # now compare the outputs - EXECUTE_PROCESS ( + execute_process ( COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp RESULT_VARIABLE TEST_RESULT ) @@ -114,7 +114,7 @@ if (TEST_CHECKUB STREQUAL "YES") else () # call 'ubsize' to get the size of the user block #ubsize=`$JAM_BIN/tellub $hfile` - EXECUTE_PROCESS ( + execute_process ( COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_HFILE} WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_H_STRING_LEN diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index e654bce..4823d07 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -638,12 +638,16 @@ macro (ADD_H5_TEST_META testname testfile) # Remove any output file left over from previous test run add_test ( - NAME H5REPACK_META-${testname}_N-clear-objects + NAME H5REPACK_META-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}_N.${testname}.h5 + testfiles/out-${testname}_N.${testname}.out + testfiles/out-${testname}_N.${testname}.out.err testfiles/out-${testname}_M.${testname}.h5 + testfiles/out-${testname}_M.${testname}.out + testfiles/out-${testname}_M.${testname}.out.err ) - set_tests_properties (H5REPACK_META-${testname}_N-clear-objects PROPERTIES + set_tests_properties (H5REPACK_META-${testname}-clear-objects PROPERTIES FIXTURES_REQUIRED clear_h5repack ) add_test ( @@ -651,21 +655,61 @@ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ) set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES - DEPENDS H5REPACK_META-${testname}_N-clear-objects + DEPENDS H5REPACK_META-${testname}-clear-objects + ) + add_test ( + NAME H5REPACK_META-${testname}_N_DFF + COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-v;${testfile};out-${testname}_N.${testname}.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=out-${testname}_N.${testname}.out" + -D "TEST_EXPECT=0" + -D "TEST_REFERENCE=out-${testname}_N.${testname}.txt" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5REPACK_META-${testname}_N_DFF PROPERTIES + DEPENDS H5REPACK_META-${testname}_N ) add_test ( NAME H5REPACK_META-${testname}_M COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5 ) set_tests_properties (H5REPACK_META-${testname}_M PROPERTIES - DEPENDS H5REPACK_META-${testname}_N + DEPENDS H5REPACK_META-${testname}_N_DFF ) - - add_test (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5) - set_tests_properties (H5REPACK_META-${testname} PROPERTIES - WILL_FAIL "true" + add_test ( + NAME H5REPACK_META-${testname}_M_DFF + COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-v;${testfile};out-${testname}_M.${testname}.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=out-${testname}_M.${testname}.out" + -D "TEST_EXPECT=0" + -D "TEST_REFERENCE=out-${testname}_M.${testname}.txt" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5REPACK_META-${testname}_M_DFF PROPERTIES DEPENDS H5REPACK_META-${testname}_M ) + add_test (NAME H5REPACK_META-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_ONEFILE=out-${testname}_N.${testname}.out" + -D "TEST_TWOFILE=out-${testname}_M.${testname}.h5" + -D "TEST_FUNCTION=LTEQ" + -P "${HDF_RESOURCES_DIR}/fileCompareTest.cmake" + ) + if (CMAKE_VERSION VERSION_LESS "3.14.0") + set_tests_properties (H5REPACK_META-${testname} PROPERTIES + DISABLED "true" + ) + endif () + set_tests_properties (H5REPACK_META-${testname} PROPERTIES + DEPENDS H5REPACK_META-${testname}_M_DFF + ) endmacro () macro (ADD_H5_UD_TEST testname resultcode resultfile) -- cgit v0.12 From 4fcd2589bbfca6448968a9a11748b81c24a37ce0 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Feb 2020 12:49:56 -0600 Subject: HDFFV-11036 add release note --- release_docs/RELEASE.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 2cdf7a6..54d91b5 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -48,6 +48,13 @@ New Features Configuration: ------------- + - Added test script for file size compare + + if CMake minimum version is at least 3.14, the fileCompareTest.cmake + script will compare file sizes. + + (ADB - 2020/02/24, HDFFV-11036) + - Update CMake minimum version to 3.12 Updated CMake minimum version to 3.12 and added version checks @@ -894,7 +901,7 @@ Bug Fixes since HDF5-1.10.3 release (MSB, 2018/1/8, HDFFV-10443) - Corrected INTERFACE INTENT(IN) to INTENT(OUT) for buf_size in h5fget_file_image_f. - + (MSB - 2020/2/18, HDFFV-11029) Tools -- cgit v0.12 From cf58730177d60fd7311582a29539d87f10a7d88e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Feb 2020 13:54:00 -0600 Subject: Update Windows platforms --- release_docs/RELEASE.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 54d91b5..6d06bbc 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1222,12 +1222,8 @@ Supported Platforms (emu) Sun Fortran 95 8.6 SunOS_sparc Sun C++ 5.12 SunOS_sparc - Windows 7 Visual Studio 2015 w/ Intel Fortran 18 (cmake) - Windows 7 x64 Visual Studio 2015 w/ Intel C, Fortran 2018 (cmake) - Visual Studio 2015 w/ MSMPI 8 (cmake) - - Windows 10 Visual Studio 2015 w/ Intel Fortran 18 (cmake) + Visual Studio 2015 w/ MSMPI 10 (cmake) Windows 10 x64 Visual Studio 2015 w/ Intel Fortran 18 (cmake) Visual Studio 2017 w/ Intel Fortran 19 (cmake) -- cgit v0.12 From 04e67af8f968b2c6f50cb42990d3dfa79aa353d9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 25 Feb 2020 09:22:19 -0600 Subject: Fix Fortran macro use and jni comment --- config/cmake/HDF5UseFortran.cmake | 10 ++-------- config/cmake_ext_mod/HDFUseFortran.cmake | 12 ++++++------ java/src/jni/h5sImp.c | 3 ++- java/src/jni/h5sImp.h | 3 ++- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 465afbf..c5d8200 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -81,10 +81,7 @@ READ_SOURCE("PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" "END PROGRAM PROG_FC_HAVE_C_LON if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90) else () - CHECK_FORTRAN_FEATURE(c_long_double - "${SOURCE_CODE}" - FORTRAN_HAVE_C_LONG_DOUBLE - ) + CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_HAVE_C_LONG_DOUBLE) endif () if (${FORTRAN_HAVE_C_LONG_DOUBLE}) @@ -99,10 +96,7 @@ READ_SOURCE("MODULE type_mod" "END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE" SO if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_C_LONG_DOUBLE_IS_UNIQUE SRC_EXT f90) else () - CHECK_FORTRAN_FEATURE(c_long_double - "${SOURCE_CODE}" - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE - ) + CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_C_LONG_DOUBLE_IS_UNIQUE) endif () if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE}) set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1) diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index b0f3972..0a6a092 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -183,27 +183,27 @@ else () # Check for Non-standard extension intrinsic function SIZEOF set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE) - CHECK_FORTRAN_FEATURE(${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF) + CHECK_FORTRAN_FEATURE(sizeof_code ${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF) # Check for F2008 standard intrinsic function C_SIZEOF set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE) - CHECK_FORTRAN_FEATURE(${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF) + CHECK_FORTRAN_FEATURE(c_sizeof_code ${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF) # Check for F2008 standard intrinsic function STORAGE_SIZE - CHECK_FORTRAN_FEATURE(${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE) + CHECK_FORTRAN_FEATURE(storage_size_code ${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE) # Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV" set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE) - CHECK_FORTRAN_FEATURE(${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV) + CHECK_FORTRAN_FEATURE(iso_fortran_env_code ${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV) set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE) - CHECK_FORTRAN_FEATURE(${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE) + CHECK_FORTRAN_FEATURE(realisnotdouble_code ${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE) #----------------------------------------------------------------------------- # Checks if the ISO_C_BINDING module meets all the requirements #----------------------------------------------------------------------------- set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE) - CHECK_FORTRAN_FEATURE(${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING) + CHECK_FORTRAN_FEATURE(iso_c_binding_code ${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING) endif () #----------------------------------------------------------------------------- diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c index 74866ed..33d3c2b 100644 --- a/java/src/jni/h5sImp.c +++ b/java/src/jni/h5sImp.c @@ -164,7 +164,8 @@ done: #ifdef notdef /* 10/28/99 -- added code to copy the array -- this is not used, * but serves as a reminder in case we try to implement this in - */ the future.... + * the future.... + */ /* * Note: the argument coord is actually long coord[][], which has been * flattened by the caller. diff --git a/java/src/jni/h5sImp.h b/java/src/jni/h5sImp.h index 87661e3..a07d4c5 100644 --- a/java/src/jni/h5sImp.h +++ b/java/src/jni/h5sImp.h @@ -51,7 +51,8 @@ Java_hdf_hdf5lib_H5__1H5Scopy #ifdef notdef /* 10/28/99 -- added code to copy the array -- this is not used, * but serves as a reminder in case we try to implement this in - */ the future.... + * the future.... + */ /* * Note: the argument coord is actually long coord[][], which has been * flattened by the caller. -- cgit v0.12 From 4906d3d6a82e1dcc10bae150a1e0dc9bbc890259 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 25 Feb 2020 14:57:02 -0600 Subject: Fix standalone link --- tools/src/h5repack/h5repack_refs.c | 6 +++--- tools/test/h5dump/h5dumpgentest.c | 3 ++- tools/test/misc/h5clear_gentest.c | 2 +- tools/test/perform/CMakeLists.txt | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index 54fe1f2..2685823 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/h5repack/h5repack_refs.c @@ -530,14 +530,14 @@ static int copy_refs_attr(hid_t loc_in, ref_comp_size = NULL; } } - /* This line below needs to be moved in this loop instead of inserting outside. Otherwise, - ref_comp_field_n may be >0 for the next attribute, which may not be + /* This line below needs to be moved in this loop instead of inserting outside. Otherwise, + ref_comp_field_n may be >0 for the next attribute, which may not be the reference type and will be accidently treated as the reference type. It will then cause the H5Acreate2 failed since that attribute is already created. KY 2020-02-07 */ is_ref_comp = (ref_comp_field_n > 0); - + } diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index d72664e..550b182 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -6312,7 +6312,7 @@ static int gent_ldouble(void) return 0; - error: +error: HDprintf("error !\n"); return -1; @@ -7567,6 +7567,7 @@ gent_attr_intsize(void) H5Gclose(root); H5Fclose(fid); } + static void gent_nodata(void) { diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c index 1411c21..d5f415e 100644 --- a/tools/test/misc/h5clear_gentest.c +++ b/tools/test/misc/h5clear_gentest.c @@ -170,7 +170,7 @@ gen_enhance_files(hbool_t user) hid_t did = H5I_INVALID_HID; /* Dataset ID */ hsize_t dim[1]; /* Dimension sizes */ int data[NUM_ELMTS]; /* Buffer for data */ - int fd = -1; /* The file descriptor ID */ + int fd = H5I_INVALID_HID; /* The file descriptor ID */ int64_t eoa; /* The EOA value */ uint32_t chksum; /* The chksum value */ int i = 0 , j = 0, u = 0; /* Local index variable */ diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt index 3dda45c..6780c06 100644 --- a/tools/test/perform/CMakeLists.txt +++ b/tools/test/perform/CMakeLists.txt @@ -179,10 +179,10 @@ if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL) target_include_directories (h5perf_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TOOLS_DIR}/lib;$<$:${MPI_C_INCLUDE_DIRS}>") if (NOT BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (h5perf_alone STATIC) - target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIB_TARGET} "$<$:${MPI_C_LIBRARIES}>") + target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIB_TARGET} ${LINK_LIBS} "$<$:${MPI_C_LIBRARIES}>") else () TARGET_C_PROPERTIES (h5perf_alone SHARED) - target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIBSH_TARGET} "$<$:${MPI_C_LIBRARIES}>") + target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIBSH_TARGET} ${LINK_LIBS} "$<$:${MPI_C_LIBRARIES}>") endif () set_target_properties (h5perf_alone PROPERTIES FOLDER perform) set_property (TARGET h5perf_alone -- cgit v0.12 From 2af8a87af0d7a1589a4df22d16b2d2513876e7a9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 25 Feb 2020 16:04:56 -0600 Subject: Copy generated files instead creating twice --- fortran/src/CMakeLists.txt | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index f333f60..b5d1a60 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -80,13 +80,25 @@ add_executable (H5match_types ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c ) target_include_directories (H5match_types PRIVATE "${HDF5_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + +add_custom_command ( + OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h + ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + DEPENDS H5match_types +) + if (NOT ONLY_SHARED_LIBS) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5f90i_gen.h" "${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h" + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5fortran_types.F90" "${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90" WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static - DEPENDS H5match_types + DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE) set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 PROPERTIES GENERATED TRUE) @@ -95,9 +107,12 @@ if (BUILD_SHARED_LIBS) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5f90i_gen.h" "${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h" + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5fortran_types.F90" "${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90" WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared - DEPENDS H5match_types + DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h PROPERTIES GENERATED TRUE) set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 PROPERTIES GENERATED TRUE) @@ -180,12 +195,20 @@ set (f90_F_GEN_SOURCES ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90 ${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90 ) +add_custom_command ( + OUTPUT ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + DEPENDS ${f90_F_GEN_SOURCES} + COMMENT "Generating the H5_gen.F90 file" +) if (NOT ONLY_SHARED_LIBS) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5_gen.F90" "${HDF5_F90_BINARY_DIR}/static/H5_gen.F90" WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static - DEPENDS ${f90_F_GEN_SOURCES} + DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90 COMMENT "Generating the H5_gen.F90 file" ) add_custom_target (H5gen ALL @@ -197,9 +220,10 @@ endif () if (BUILD_SHARED_LIBS) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5_gen.F90" "${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90" WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared - DEPENDS ${f90_F_GEN_SOURCES} + DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90 COMMENT "Generating the H5_gen.F90 shared file" ) add_custom_target (H5genSH ALL -- cgit v0.12 From f53220dc201ba9ace215d517d857998e1e205fc7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 26 Feb 2020 09:50:38 -0600 Subject: Move MODEL check to before usage in CTestScript.cmake. --- config/cmake/scripts/CTestScript.cmake | 8 ++++++++ config/cmake/scripts/HDF5config.cmake | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index 01335b8..e3659f6 100644 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -253,6 +253,14 @@ endforeach () message (STATUS "Dashboard script configuration:\n${vars}\n") #----------------------------------------------------------------------------- + +################################################################### +######### Following is for submission to CDash ############ +################################################################### +if (NOT DEFINED MODEL) + set (MODEL "Experimental") +endif () + #----------------------------------------------------------------------------- ## NORMAL process ## -- LOCAL_UPDATE updates the source folder from svn diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 10ab5f2..45f96fe 100644 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -189,13 +189,6 @@ endif () ################################################################### ################################################################### -######### Following is for submission to CDash ############ -################################################################### -if (NOT DEFINED MODEL) - set (MODEL "Experimental") -endif () - -################################################################### ################################################################### ##### Following controls CDash submission ##### -- cgit v0.12 From 13f5b3aee20d1d65f56dc08f088e0f218da5cf37 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 26 Feb 2020 13:54:34 -0600 Subject: Update examples and fix old version references. --- bin/release | 6 +- config/cmake/HDF5_Examples.cmake.in | 2 +- config/cmake/jrunTest.cmake | 12 ++- config/cmake/scripts/HDF5config.cmake | 6 +- config/cmake/scripts/HDF5options.cmake | 2 +- java/src/hdf/overview.html | 2 +- java/src/jni/h5pFAPLImp.c | 56 ++++------- release_docs/INSTALL | 10 +- release_docs/INSTALL_CMake.txt | 62 ++++++------ release_docs/INSTALL_Cygwin.txt | 178 ++++++++++++++++----------------- release_docs/README_HPC | 156 ++++++++++++++--------------- release_docs/RELEASE.txt | 2 +- release_docs/USING_CMake_Examples.txt | 4 +- release_docs/USING_HDF5_CMake.txt | 6 +- release_docs/USING_HDF5_VS.txt | 4 +- 15 files changed, 249 insertions(+), 259 deletions(-) diff --git a/bin/release b/bin/release index a9cf3f0..1568e02 100755 --- a/bin/release +++ b/bin/release @@ -233,7 +233,7 @@ tar2cmakezip() # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmziptmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir - cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.0-Source.zip $cmziptmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.1-Source.zip $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpsubdir @@ -328,7 +328,7 @@ tar2cmaketgz() # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir - cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.0-Source.tar.gz $cmgztmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.1-Source.tar.gz $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpsubdir @@ -411,7 +411,7 @@ tar2hpccmaketgz() # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir - cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.0-Source.tar.gz $cmgztmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.1-Source.tar.gz $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index dd064d3..273f32a 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -77,7 +77,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) -# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.14.0-Source") +# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.14.1-Source") #endif() ############################################################################################################### diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake index 583613e..41570eb 100644 --- a/config/cmake/jrunTest.cmake +++ b/config/cmake/jrunTest.cmake @@ -284,11 +284,13 @@ endif () # dump the output unless nodisplay option is set if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY) - file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - execute_process ( - COMMAND ${CMAKE_COMMAND} -E echo ${TEST_STREAM} - RESULT_VARIABLE TEST_RESULT - ) + if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}") + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + execute_process ( + COMMAND ${CMAKE_COMMAND} -E echo ${TEST_STREAM} + RESULT_VARIABLE TEST_RESULT + ) + endif () endif () # everything went fine... diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 45f96fe..7b7560f 100644 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -42,9 +42,9 @@ set (CTEST_SOURCE_VERSEXT "") ############################################################################## # handle input parameters to script. #BUILD_GENERATOR - which CMake generator to use, required -#INSTALLDIR - HDF5-1.13.0 root folder +#INSTALLDIR - HDF5-1.13.x root folder #CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo -#CTEST_SOURCE_NAME - name of source folder; HDF5-1.13.0 +#CTEST_SOURCE_NAME - name of source folder; HDF5-1.13.x #MODEL - CDash group name #HPC - run alternate configurations for HPC machines; sbatch, bsub, raybsub, qsub #MPI - enable MPI @@ -189,8 +189,6 @@ endif () ################################################################### ################################################################### - -################################################################### ##### Following controls CDash submission ##### #set (LOCAL_SUBMIT "TRUE") ##### Following controls test process ##### diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index d1c14e9..f132234 100644 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -67,7 +67,7 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF") #### package examples #### -#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-1.14.0-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}") +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-1.14.1-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}") ############################################################################################# ### enable parallel builds diff --git a/java/src/hdf/overview.html b/java/src/hdf/overview.html index e3a032b..f6a34fc 100644 --- a/java/src/hdf/overview.html +++ b/java/src/hdf/overview.html @@ -7,7 +7,7 @@ The Java HD5 Interface (JHI5) is a Java package (hdf.hdf5lib) that ``wraps around'' the HDF5 library.

There are a large number of functions in the HDF5 -library (version 1.10). Some of the functions are not supported in JHI5. Most +library (version 1.13). Some of the functions are not supported in JHI5. Most of the unsupported functions have C function pointers, which is not currently implemented in JHI5.

diff --git a/java/src/jni/h5pFAPLImp.c b/java/src/jni/h5pFAPLImp.c index 178b1af..9ae8775 100644 --- a/java/src/jni/h5pFAPLImp.c +++ b/java/src/jni/h5pFAPLImp.c @@ -395,29 +395,23 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs if (H5Pget_fapl_hdfs((hid_t)fapl_id, &fa) < 0) H5_LIBRARY_ERROR(ENVONLY); - if (HDstrlen(fa.namenode_name) > 0) { - if (NULL == (j_namenode_name = ENVPTR->NewStringUTF(ENVONLY, fa.namenode_name))) { - CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create namenode_name string"); - } + if (NULL == (j_namenode_name = ENVPTR->NewStringUTF(ENVONLY, fa.namenode_name))) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create namenode_name string"); } args[0].l = j_namenode_name; args[1].i = (jint)fa.namenode_port; - if (HDstrlen(fa.user_name) > 0) { - if (NULL == (j_user_name = ENVPTR->NewStringUTF(ENVONLY, fa.user_name))) { - CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create user_name string"); - } + if (NULL == (j_user_name = ENVPTR->NewStringUTF(ENVONLY, fa.user_name))) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create user_name string"); } args[2].l = j_user_name; - if (HDstrlen(fa.kerberos_ticket_cache) > 0) { - if (NULL == (j_kerb_cache_path = ENVPTR->NewStringUTF(ENVONLY, fa.kerberos_ticket_cache))) { - CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create kerberos_ticket_cache string"); - } + if (NULL == (j_kerb_cache_path = ENVPTR->NewStringUTF(ENVONLY, fa.kerberos_ticket_cache))) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create kerberos_ticket_cache string"); } args[3].l = j_kerb_cache_path; @@ -820,27 +814,21 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3 if (H5Pget_fapl_ros3((hid_t)fapl_id, &fa) < 0) H5_LIBRARY_ERROR(ENVONLY); - if (HDstrlen(fa.aws_region) > 0) { - if (NULL == (j_aws = ENVPTR->NewStringUTF(ENVONLY, fa.aws_region))) { - CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create aws_region string"); - } + if (NULL == (j_aws = ENVPTR->NewStringUTF(ENVONLY, fa.aws_region))) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create aws_region string"); } args[0].l = j_aws; - if (HDstrlen(fa.secret_id) > 0) { - if (NULL == (j_id = ENVPTR->NewStringUTF(ENVONLY, fa.secret_id))) { - CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_id string"); - } + if (NULL == (j_id = ENVPTR->NewStringUTF(ENVONLY, fa.secret_id))) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_id string"); } args[1].l = j_id; - if (HDstrlen(fa.secret_key) > 0) { - if (NULL == (j_key = ENVPTR->NewStringUTF(ENVONLY, fa.secret_key))) { - CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_key string"); - } + if (NULL == (j_key = ENVPTR->NewStringUTF(ENVONLY, fa.secret_key))) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_key string"); } args[2].l = j_key; @@ -1685,11 +1673,9 @@ Java_hdf_hdf5lib_H5_H5Pget_1mdc_1config args[2].z = cacheinfo.open_trace_file; args[3].z = cacheinfo.close_trace_file; - if (HDstrlen(cacheinfo.trace_file_name) > 0) { - if (NULL == (j_str = ENVPTR->NewStringUTF(ENVONLY, cacheinfo.trace_file_name))) { - CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_mdc_config: out of memory - unable to construct string from UTF characters"); - } + if (NULL == (j_str = ENVPTR->NewStringUTF(ENVONLY, cacheinfo.trace_file_name))) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_mdc_config: out of memory - unable to construct string from UTF characters"); } args[4].l = j_str; diff --git a/release_docs/INSTALL b/release_docs/INSTALL index 5c54698..fcf9602 100644 --- a/release_docs/INSTALL +++ b/release_docs/INSTALL @@ -414,13 +414,17 @@ CONTENTS 4.3.11. Backward compatibility - The 1.10 version of the HDF5 library can be configured to operate - identically to the v1.8 library with the + The 1.13 version of the HDF5 library can be configured to operate + identically to the v1.12 library with the + --with-default-api-version=v112 + configure flag, or identically to the v1.10 library with the + --with-default-api-version=v110 + configure flag, or identically to the v1.8 library with the --with-default-api-version=v18 configure flag, or identically to the v1.6 library with the --with-default-api-version=v16 configure flag. This allows existing code to be compiled with the - v1.10 library without requiring immediate changes to the application + v1.13 library without requiring immediate changes to the application source code. For additional configuration options and other details, see "API Compatibility Macros": diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 652e1f4..e1a34c5 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -26,11 +26,11 @@ Obtaining HDF5 source code 2. Obtain compressed (*.tar or *.zip) HDF5 source from https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake and put it in "myhdfstuff". - Uncompress the file. There should be a hdf5-1.10."X" folder. + Uncompress the file. There should be a hdf5-1.13."X" folder. CMake version 1. We suggest you obtain the latest CMake from the Kitware web site. - The HDF5 1.10."X" product requires a minimum CMake version 3.10, + The HDF5 1.13."X" product requires a minimum CMake version 3.12, where "X" is the current HDF5 release version. If you are using VS2019, the minimum version is 3.15. @@ -53,7 +53,7 @@ The following files referenced below are available at the HDF web site: https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake Single compressed file with all the files needed, including source: - CMake-hdf5-1.10.X.zip or CMake-hdf5-1.10.X.tar.gz + CMake-hdf5-1.13.X.zip or CMake-hdf5-1.13.X.tar.gz Individual files included in the above mentioned compressed files ----------------------------------------------- @@ -65,7 +65,7 @@ External compression szip and zlib libraries: ZLib.tar.gz Examples Source package: - HDF5Examples-1.10.x-Source.tar.gz + HDF5Examples-1.14.x-Source.tar.gz Configuration files: HDF5config.cmake @@ -78,10 +78,10 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to: 1. Change to the development directory "myhdfstuff". - 2. Download the CMake-hdf5-1.10.X.zip(.tar.gz) file to "myhdfstuff". + 2. Download the CMake-hdf5-1.13.X.zip(.tar.gz) file to "myhdfstuff". Uncompress the file. - 3. Change to the source directory "hdf5-1.10.x". + 3. Change to the source directory "hdf5-1.13.x". CTestScript.cmake file should not be modified. 4. Edit the platform configuration file, HDF5options.cmake, if you want to change @@ -109,7 +109,7 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to: The command above will configure, build, test, and create an install package in the myhdfstuff folder. It will have the format: - HDF5-1.10.NN-. + HDF5-1.13.NN-. On Unix, will be "Linux". A similar .sh file will also be created. On Windows, will be "win64" or "win32". If you have an @@ -130,13 +130,13 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to: 6. To install, "X" is the current release version On Windows (with WiX installed), execute: - HDF5-1.10."X"-win32.msi or HDF5-1.10."X"-win64.msi + HDF5-1.13."X"-win32.msi or HDF5-1.13."X"-win64.msi By default this program will install the hdf5 library into the "C:\Program Files" directory and will create the following directory structure: HDF_Group --HDF5 - ----1.10."X" + ----1.13."X" ------bin ------include ------lib @@ -144,40 +144,40 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to: On Linux, change to the install destination directory (create it if doesn't exist) and execute: - /myhdfstuff/HDF5-1.10."X"-Linux.sh + /myhdfstuff/HDF5-1.13."X"-Linux.sh After accepting the license, the script will prompt: By default the HDF5 will be installed in: - "/HDF5-1.10."X"-Linux" - Do you want to include the subdirectory HDF5-1.10."X"-Linux? + "/HDF5-1.13."X"-Linux" + Do you want to include the subdirectory HDF5-1.13."X"-Linux? Saying no will install in: "" [Yn]: Note that the script will create the following directory structure relative to the install point: HDF_Group --HDF5 - ----1.10."X" + ----1.13."X" ------bin ------include ------lib ------share - On Mac you will find HDF5-1.10."X"-Darwin.dmg in the myhdfstuff folder. Click + On Mac you will find HDF5-1.13."X"-Darwin.dmg in the myhdfstuff folder. Click on the dmg file to proceed with installation. After accepting the license, there will be a folder with the following structure: HDF_Group --HDF5 - ----1.10."X" + ----1.13."X" ------bin ------include ------lib ------share By default the installation will create the bin, include, lib and cmake - folders in the /HDF_Group/HDF5/1.10."X" + folders in the /HDF_Group/HDF5/1.13."X" The depends on the build platform; Windows will set the default to: - C:/Program Files/HDF_Group/HDF5/1.10."X" + C:/Program Files/HDF_Group/HDF5/1.13."X" Linux will set the default to: - "myhdfstuff/HDF_Group/HDF5/1.10."X" + "myhdfstuff/HDF_Group/HDF5/1.13."X" The default can be changed by adding ",INSTALLDIR=" to the "ctest -S HDF5config.cmake..." command. For example on linux: ctest -S HDF5config.cmake,INSTALLDIR=/usr/local/myhdf5,BUILD_GENERATOR=Unix -C Release -VV -O hdf5.log @@ -204,13 +204,13 @@ Notes: This short set of instructions is written for users who want to 5. Configure the C library, tools and tests with one of the following commands: On Windows 32 bit - cmake -G "Visual Studio 12 2013" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.10."X" + cmake -G "Visual Studio 12 2013" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.13."X" On Windows 64 bit - cmake -G "Visual Studio 12 2013 Win64" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.10."X" + cmake -G "Visual Studio 12 2013 Win64" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.13."X" On Linux and Mac - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ../hdf5-1.10."X" + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ../hdf5-1.13."X" where "X" is the current release version. @@ -225,13 +225,13 @@ Notes: This short set of instructions is written for users who want to 9. To install On Windows (with WiX installed), execute: - HDF5-1.10."X"-win32.msi or HDF5-1.10."X"-win64.msi + HDF5-1.13."X"-win32.msi or HDF5-1.13."X"-win64.msi By default this program will install the hdf5 library into the "C:\Program Files" directory and will create the following directory structure: HDF_Group --HDF5 - ----1.10."X" + ----1.13."X" ------bin ------include ------lib @@ -239,28 +239,28 @@ Notes: This short set of instructions is written for users who want to On Linux, change to the install destination directory (create if doesn't exist) and execute: - /myhdfstuff/build/HDF5-1.10."X"-Linux.sh + /myhdfstuff/build/HDF5-1.13."X"-Linux.sh After accepting the license, the script will prompt: By default the HDF5 will be installed in: - "/HDF5-1.10."X"-Linux" - Do you want to include the subdirectory HDF5-1.10."X"-Linux? + "/HDF5-1.13."X"-Linux" + Do you want to include the subdirectory HDF5-1.13."X"-Linux? Saying no will install in: "" [Yn]: Note that the script will create the following directory structure relative to the install point: HDF_Group --HDF5 - ----1.10."X" + ----1.13."X" ------bin ------include ------lib ------share - On Mac you will find HDF5-1.10."X"-Darwin.dmg in the build folder. Click + On Mac you will find HDF5-1.13."X"-Darwin.dmg in the build folder. Click on the dmg file to proceed with installation. After accepting the license, there will be a folder with the following structure: HDF_Group --HDF5 - ----1.10."X" + ----1.13."X" ------bin ------include ------lib @@ -272,7 +272,7 @@ IV. Further considerations ======================================================================== 1. We suggest you obtain the latest CMake for windows from the Kitware - web site. The HDF5 1.10."X" product requires a minimum CMake version 3.10. + web site. The HDF5 1.13."X" product requires a minimum CMake version 3.12. 2. If you plan to use Zlib or Szip: A. Download the binary packages and install them in a central location. @@ -656,7 +656,7 @@ HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" HDF_TEST_EXPRESS "Control testing framework (0-3)" "0" HDF5_TEST_VFD "Execute tests with different VFDs" OFF HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF -DEFAULT_API_VERSION "Enable default API (v16, v18, v110, v112)" "v112" +DEFAULT_API_VERSION "Enable default API (v16, v18, v110, v112, v114)" "v114" HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON diff --git a/release_docs/INSTALL_Cygwin.txt b/release_docs/INSTALL_Cygwin.txt index 74f494c..eebffba 100644 --- a/release_docs/INSTALL_Cygwin.txt +++ b/release_docs/INSTALL_Cygwin.txt @@ -2,8 +2,8 @@ HDF5 Build and Install Instructions for Cygwin ************************************************************************ -This document is a instruction on how to build, test and install HDF5 libary on -Cygwin. See detailed information in hdf5/INSTALL. +This document is a instruction on how to build, test and install HDF5 libary on +Cygwin. See detailed information in hdf5/INSTALL. NOTE: hdf5 can be built with CMake, see the INSTALL_CMake.txt file for more guidance. @@ -12,16 +12,16 @@ Preconditions: 1. Installed Cygwin 1.7.25 or higher - To install the Cygwin net release, go to http://www.cygwin.com and + To install the Cygwin net release, go to http://www.cygwin.com and click on "setup-x86.exe" (32-bit installation) under the heading - "Current Cygwin DLL version". This will download a GUI - installer called setup-x86.exe which can be run to download a complete - Cygwin installation via the internet. Then follow the instructions + "Current Cygwin DLL version". This will download a GUI + installer called setup-x86.exe which can be run to download a complete + Cygwin installation via the internet. Then follow the instructions on each screen to install Cygwin. - Cygwin uses packages to manage installing various software. Users can + Cygwin uses packages to manage installing various software. Users can choose to install or uninstall certain packages by running setup.exe. - http://www.cygwin.com/packages/ provides detailed information about + http://www.cygwin.com/packages/ provides detailed information about Cygwin packages. Most required dependencies can be satisfied by installing all packages in @@ -31,32 +31,32 @@ Preconditions: 2. Compilers, Libraries and Utilities Installed 2.1 Compilers Supported - + The following compilers are supported by HDF5 and included in the Cygwin package system: gcc (4.7.3 and 4.9.2), which includes: gcc4-core : C compiler gcc4-g++ : C++ compiler gcc4-fortran : fortran compiler - + 2.1.1 Using Compilers Not Supported - + By default the current configuration uses vendor compilers; to use another compiler run the following commands before running - configure: - + configure: + setenv CC "foo -flags" setenv FC "fffoo -flags" - For example, if users want to use pgf90 as fortran compiler, then + For example, if users want to use pgf90 as fortran compiler, then setenv FC pgf90 See the configure help page (configure --help) for a list of environment variables that have an affect on building the library. - + 2.2 HDF5 External Library Dependencies 2.2.1 Zlib @@ -66,162 +66,162 @@ Preconditions: 2.2.2 Szip The HDF5 library has a predefined compression filter that uses the extended-Rice lossless compression algorithm for chunked - datatsets. For more information on Szip compression, license terms, + datatsets. For more information on Szip compression, license terms, and obtaining the Szip source code, see: https://portal.hdfgroup.org/display/HDF5/Szip+Compression+in+HDF+Products - - + + 2.3 Additional Utilities - + The following standard utilities are also required to build and test HDF5: - + bison : yacc implementation flex : flex utility make : make utility - + 2.4 Alternate Build Process - - Download the CMake package and follow the notes in the "INSTALL_CMake.txt" + + Download the CMake package and follow the notes in the "INSTALL_CMake.txt" file to build HDF5 with the CMake utilities. - - - + + + Build, Test and Install HDF5 on Cygwin -------------------------------------- 1. Get HDF5 source code package Users can download HDF5 source code package from HDF website - (http://hdfgroup.org). - + (http://hdfgroup.org). + 2. Unpacking the distribution The HDF5 source code is distributed in a variety of formats which - can be unpacked with the following commands, each of which creates - an `hdf5-1.10.x' directory. + can be unpacked with the following commands, each of which creates + an `hdf5-1.13.x' directory. 2.1 Non-compressed tar archive (*.tar) - $ tar xf hdf5-1.10.x.tar + $ tar xf hdf5-1.13.x.tar 2.2 Gzip'd tar archive (*.tar.gz) - $ gunzip < hdf5-1.10.x.tar.gz | tar xf - + $ gunzip < hdf5-1.13.x.tar.gz | tar xf - 2.3 Bzip'd tar archive (*.tar.bz2) - $ bunzip2 < hdf5-1.10.x.tar.bz2 | tar xf - + $ bunzip2 < hdf5-1.13.x.tar.bz2 | tar xf - 2. Setup Environment In Cygwin, most compilers and setting are automatically detected during - the configure script. However, if you are building Fortran we recommend - that you explicitly set the "FC" variable in your environment to use the + the configure script. However, if you are building Fortran we recommend + that you explicitly set the "FC" variable in your environment to use the gfortran compiler. For example, issue the command: - + $ export FC=gfortran - -4. Configuring - - Notes: See detailed information in hdf5/release_docs/INSTALL, - part 5. Full installation instructions for source + +4. Configuring + + Notes: See detailed information in hdf5/release_docs/INSTALL, + part 5. Full installation instructions for source distributions - The host configuration file for cygwin i686-pc-cygwin is located - in the `config' directory and are based on architecture name, - vendor name, and operating system which are displayed near the + The host configuration file for cygwin i686-pc-cygwin is located + in the `config' directory and are based on architecture name, + vendor name, and operating system which are displayed near the beginning of the `configure' output. The host config file influences - the behavior of configure by setting or augmenting shell variables. - + the behavior of configure by setting or augmenting shell variables. + In short, - - To configure HDF5 C Library, using - + + To configure HDF5 C Library, using + $ ./configure - + To configure HDF5 C/C++ Library, using $ ./configure --enable-cxx - + To configure HDF5 C/Fortran Library, using $ ./configure --enable-fortran - + To configure HDF5 C with Szip library, using $ ./configure --with-szlib="path to szlib" - - For example, if szip library was installed in the directory + + For example, if szip library was installed in the directory /cygdrive/c/szip, which is parent directory of "include" and - "lib", then the following command will configure HDF5 C library + "lib", then the following command will configure HDF5 C library with szip enabled: - + $ ./configure --with-szlib=/cygdrive/c/szip - + To configure HDF5 C without Zlib, - + To disable zlib, using $ ./configure --without-zlib - + Two ways to configure HDF5 C with specified Zlib - + Using $ ./configure --with-zlib=INCDIR,LIBDIR For example, if the zlib library is installed in /cygdrive/c/usr, which is the parent directory of directories - "include" and "lib", + "include" and "lib", $ ./configure --with-zlib=/cygdrive/c/usr/include,/cygdrive/c/usr/lib Through the CPPFLAGS and LDFLAGS Variables - - For example, if zlib was installed in the directory - /cygdrive/c/usr then using the following command to configure + + For example, if zlib was installed in the directory + /cygdrive/c/usr then using the following command to configure HDF5 with zib $ CPPFLAGS=-I/cygdrive/c/usr/include \ $ LDFLAGS=-L/cygdrive/c/usr/lib \ $ ./configure - To specify the installation directories, using + To specify the installation directories, using $ ./configure --prefix="path for installation" - - By default, HDF5 library, header files, examples, and + + By default, HDF5 library, header files, examples, and support programs will be installed in /usr/local/lib, /usr/local/include, /usr/local/doc/hdf5/examples, and - /usr/local/bin. To use a path other than /usr/local specify + /usr/local/bin. To use a path other than /usr/local specify the path with the `--prefix=PATH' switch as in the above command. - Combination of Switches + Combination of Switches - All of the above switches can be combined together. For - example, if users want to configure HDF5 C/C++/Fortran - library with szip library enabled, with zlib library at - /cygdrive/c/usr/, and install HDF5 into directory + All of the above switches can be combined together. For + example, if users want to configure HDF5 C/C++/Fortran + library with szip library enabled, with zlib library at + /cygdrive/c/usr/, and install HDF5 into directory /cygdrive/c/hdf5 using gcc/g++ as C/C++ compiler and gfortran as fortran compiler - + $ ./configure --with-szlib=/cygdrive/c/szip --with-zlib=/cygdrive/c/usr/include,/cygdrive/c/usr/lib --prefix=/cygdrive/c/hdf5 --enable-cxx - --enable-fortran + --enable-fortran <"If no more switches, then hit Enter"> Notes: The command format above is for readilibity. In practice, please type in the command above with at least one - space between each line, No "Enter" until users finish - the switches and want to run the configure. + space between each line, No "Enter" until users finish + the switches and want to run the configure. + - or do it through CPPFLAGS and LDFLAGS variables: - + $ CPPFLAGS=-I/cygdrive/c/usr/include \ $ LDFLAGS=-L/cygdrive/c/usr/lib \ @@ -229,38 +229,38 @@ Build, Test and Install HDF5 on Cygwin --with-szlib=/cygdrive/c/szip --prefix=/cygdrive/c/hdf5 --enable-cxx - --enable-fortran + --enable-fortran <"If no more switches, then hit Enter"> - + 5. Make and Make Check After configuration is done successfully, run the following series of commands to build, test and install HDF5 - + $ make > "output file name" $ make check > "output file name" - + Before run "make install", check output file for "make check", there should be no failures at all. 6. Make Install $ make install > "output file name" - - + + 7. Check installed HDF5 library - After step 6, go to your installation directory, there should be + After step 6, go to your installation directory, there should be three subdirectories: "bin" "include" and "lib". -8. Known Problems - +8. Known Problems + dt_arith tests may fail due to the use of fork. This is a known issue with cygwin on Windows. "make check" fails when building shared lib files is enabled. The default on Cygwin has been changed to disable shared. It can be enabled with - the --enable-shared configure option but is likely to fail "make check" + the --enable-shared configure option but is likely to fail "make check" with GCC compilers. ----------------------------------------------------------------------- diff --git a/release_docs/README_HPC b/release_docs/README_HPC index 67a5d6c..513064c 100644 --- a/release_docs/README_HPC +++ b/release_docs/README_HPC @@ -1,6 +1,6 @@ ************************************************************************ * Using CMake to build and test HDF5 source on HPC machines * -************************************************************************ +************************************************************************ Contents @@ -16,34 +16,34 @@ Section VI: Other cross compiling options ======================================================================== I. Prerequisites ======================================================================== - 1. Create a working directory that is accessible from the compute nodes for + 1. Create a working directory that is accessible from the compute nodes for running tests; the working directory should be in a scratch space or a parallel file system space since testing will use this space. Building - from HDF5 source in a 'home' directory typically results in test + from HDF5 source in a 'home' directory typically results in test failures and should be avoided. - - 2. Load modules for desired compilers, module for cmake version 3.10 or greater, + + 2. Load modules for desired compilers, module for cmake version 3.12 or greater, and set any needed environment variables for compilers (i.e., CC, FC, CXX). Unload any problematic modules (i.e., craype-hugepages2M). ======================================================================== II. Obtain HDF5 source ======================================================================== -Obtain HDF5 source code from the HDF5 repository using a git command or +Obtain HDF5 source code from the HDF5 repository using a git command or from a release tar file in a working directory: - git clone https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git + git clone https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git [-b branch] [source directory] If no branch is specified, then the 'develop' version will be checked out. -If no source directory is specified, then the source will be located in the -'hdf5' directory. The Cmake scripts expect the source to be in a directory +If no source directory is specified, then the source will be located in the +'hdf5' directory. The CMake scripts expect the source to be in a directory named hdf5-, where 'version string' uses the format '1.xx.xx'. -For example, for the current 'develop' version, the "hdf5" directory should -be renamed "hdf5-1.11.4", or for the first hdf5_1_10_5 pre-release version, -it should be renamed "hdf5-1.10.5-pre1". +For example, for the current 'develop' version, the "hdf5" directory should +be renamed "hdf5-1.13.0", or for the first hdf5_1_12_0 pre-release version, +it should be renamed "hdf5-1.12.0-5". -If the version number is not known a priori, the version string +If the version number is not known a priori, the version string can be obtained by running bin/h5vers in the top level directory of the source clone, and the source directory renamed 'hdf5-'. @@ -57,23 +57,23 @@ The ctest command [1]: ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log -will configure, build, test and package HDF5 from the downloaded source +will configure, build, test and package HDF5 from the downloaded source after the setup steps outlined below are followed. -CMake option variables are available to allow running test programs in batch -scripts on compute nodes and to cross-compile for compute node hardware using +CMake option variables are available to allow running test programs in batch +scripts on compute nodes and to cross-compile for compute node hardware using a cross-compiling emulator. The setup steps will make default settings for -parallel or serial only builds available to the CMake command. +parallel or serial only builds available to the CMake command. - 1. For the current 'develop' version the "hdf5" directory should be renamed - "hdf5-1.11.4". + 1. For the current 'develop' version the "hdf5" directory should be renamed + "hdf5-1.13.0". 2. Three cmake script files need to be copied to the working directory, or have symbolic links to them, created in the working directory: - - hdf5-1.11.4/config/cmake/scripts/HDF5config.cmake - hdf5-1.11.4/config/cmake/scripts/CTestScript.cmake - hdf5-1.11.4/config/cmake/scripts/HDF5options.cmake + + hdf5-1.13.0/config/cmake/scripts/HDF5config.cmake + hdf5-1.13.0/config/cmake/scripts/CTestScript.cmake + hdf5-1.13.0/config/cmake/scripts/HDF5options.cmake should be copied to the working directory. @@ -82,16 +82,16 @@ parallel or serial only builds available to the CMake command. CTestScript.cmake HDF5config.cmake HDF5options.cmake - hdf5-1.11.4 + hdf5-1.13.0 - Additionally, when the ctest command runs [1], it will add a build directory + Additionally, when the ctest command runs [1], it will add a build directory in the working directory. 4. The following options (among others) can be added to the ctest command [1], following '-S HDF5config.cmake,' and separated by ',': HPC=sbatch (or 'bsub' or 'raybsub') indicates which type of batch - files to use for running tests. If omitted, test + files to use for running tests. If omitted, test will run on the local machine or login node. KNL=true to cross-compile for KNL compute nodes on CrayXC40 @@ -104,27 +104,27 @@ parallel or serial only builds available to the CMake command. The HPC options will add BUILD_GENERATOR=Unix for the three HPC options. An example ctest command for a parallel build on a system using sbatch is - + ctest -S HDF5config.cmake,HPC=sbatch,MPI=true -C Release -V -O hdf5.log - Adding the option 'KNL=true' to the above list will compile for KNL nodes, + Adding the option 'KNL=true' to the above list will compile for KNL nodes, for example, on 'mutrino' and other CrayXC40 machines. - Changing -V to -VV will produce more logging information in HDF5.log. + Changing -V to -VV will produce more logging information in HDF5.log. - More detailed CMake information can be found in the HDF5 source in + More detailed CMake information can be found in the HDF5 source in release_docs/INSTALL_CMake.txt. ======================================================================== IV. Cross-compiling ======================================================================== -For cross-compiling on Cray, set environment variables CC=cc, FC=ftn +For cross-compiling on Cray, set environment variables CC=cc, FC=ftn and CXX=CC (for c++) after all compiler modules are loaded since switching compiler modules may unset or reset these variables. -CMake provides options for cross-compiling. To cross-compile for KNL hardware -on mutrino and other CrayXC40 machines, add HPC=sbatch,KNL=true to the -ctest command line. This will set the following options from the +CMake provides options for cross-compiling. To cross-compile for KNL hardware +on mutrino and other CrayXC40 machines, add HPC=sbatch,KNL=true to the +ctest command line. This will set the following options from the config/cmake/scripts/HPC/sbatch-HDF5options.cmake file: set (COMPILENODE_HWCOMPILE_MODULE "craype-haswell") @@ -133,74 +133,74 @@ config/cmake/scripts/HPC/sbatch-HDF5options.cmake file: set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "knl_ctestP.sl") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake") -On the Cray XC40 the craype-haswell module is needed for configuring, and the +On the Cray XC40 the craype-haswell module is needed for configuring, and the craype-mic-knl module is needed for building to run on the KNL nodes. CMake -with the above options will swap modules after configuring is complete, +with the above options will swap modules after configuring is complete, but before compiling programs for KNL. The sbatch script arguments for running jobs on KNL nodes may differ on CrayXC40 -machines other than mutrino. The batch scripts knl_ctestS.sl and knl_ctestP.sl -have the correct arguments for mutrino: "#SBATCH -p knl -C quad,cache". For -cori, another CrayXC40, that line is replaced by "#SBATCH -C knl,quad,cache". -For cori (and other machines), the values in LOCAL_BATCH_SCRIPT_NAME and -LOCAL_BATCH_SCRIPT_PARALLEL_NAME in the config/cmake/scripts/HPC/sbatch-HDF5options.cmake -file can be replaced by cori_knl_ctestS.sl and cori_knl_ctestS.sl, or the lines -can be edited in the batch files in hdf5-1.11.4/bin/batch. +machines other than mutrino. The batch scripts knl_ctestS.sl and knl_ctestP.sl +have the correct arguments for mutrino: "#SBATCH -p knl -C quad,cache". For +cori, another CrayXC40, that line is replaced by "#SBATCH -C knl,quad,cache". +For cori (and other machines), the values in LOCAL_BATCH_SCRIPT_NAME and +LOCAL_BATCH_SCRIPT_PARALLEL_NAME in the config/cmake/scripts/HPC/sbatch-HDF5options.cmake +file can be replaced by cori_knl_ctestS.sl and cori_knl_ctestS.sl, or the lines +can be edited in the batch files in hdf5-1.13.0/bin/batch. ======================================================================== V. Manual alternatives ======================================================================== -If using ctest is undesirable, one can create a build directory and run the cmake +If using ctest is undesirable, one can create a build directory and run the cmake configure command, for example -"/projects/Mutrino/hpcsoft/cle6.0/common/cmake/3.10.2/bin/cmake" --C "/hdf5-1.11.4/config/cmake/cacheinit.cmake" --DCMAKE_BUILD_TYPE:STRING=Release -DHDF5_BUILD_FORTRAN:BOOL=ON --DHDF5_BUILD_JAVA:BOOL=OFF --DCMAKE_INSTALL_PREFIX:PATH=/HDF_Group/HDF5/1.11.4 --DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF --DHDF5_ENABLE_PARALLEL:BOOL=ON -DHDF5_BUILD_CPP_LIB:BOOL=OFF --DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_ENABLE_THREADSAFE:BOOL=OFF --DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DLOCAL_BATCH_TEST:BOOL=ON --DMPIEXEC_EXECUTABLE:STRING=srun -DMPIEXEC_NUMPROC_FLAG:STRING=-n --DMPIEXEC_MAX_NUMPROCS:STRING=6 --DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake --DLOCAL_BATCH_SCRIPT_NAME:STRING=knl_ctestS.sl --DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=knl_ctestP.sl -DSITE:STRING=mutrino --DBUILDNAME:STRING=par-knl_GCC493-SHARED-Linux-4.4.156-94.61.1.16335.0.PTF.1107299-default-x86_64 -"-GUnix Makefiles" "" "/hdf5-1.11.4" +"/projects/Mutrino/hpcsoft/cle6.0/common/cmake/3.12/bin/cmake" +-C "/hdf5-1.13.0/config/cmake/cacheinit.cmake" +-DCMAKE_BUILD_TYPE:STRING=Release -DHDF5_BUILD_FORTRAN:BOOL=ON +-DHDF5_BUILD_JAVA:BOOL=OFF +-DCMAKE_INSTALL_PREFIX:PATH=/HDF_Group/HDF5/1.13.0 +-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF +-DHDF5_ENABLE_PARALLEL:BOOL=ON -DHDF5_BUILD_CPP_LIB:BOOL=OFF +-DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_ENABLE_THREADSAFE:BOOL=OFF +-DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DLOCAL_BATCH_TEST:BOOL=ON +-DMPIEXEC_EXECUTABLE:STRING=srun -DMPIEXEC_NUMPROC_FLAG:STRING=-n +-DMPIEXEC_MAX_NUMPROCS:STRING=6 +-DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake +-DLOCAL_BATCH_SCRIPT_NAME:STRING=knl_ctestS.sl +-DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=knl_ctestP.sl -DSITE:STRING=mutrino +-DBUILDNAME:STRING=par-knl_GCC493-SHARED-Linux-4.4.156-94.61.1.16335.0.PTF.1107299-default-x86_64 +"-GUnix Makefiles" "" "/hdf5-1.13.0" followed by make and batch jobs to run tests. -To cross-compile on CrayXC40, run the configure command with the craype-haswell +To cross-compile on CrayXC40, run the configure command with the craype-haswell module loaded, then switch to the craype-mic-knl module for the build process. -Tests on machines using slurm can be run with +Tests on machines using slurm can be run with -"sbatch -p knl -C quad,cache ctestS.sl" +"sbatch -p knl -C quad,cache ctestS.sl" -or +or -"sbatch -p knl -C quad,cache ctestP.sl" +"sbatch -p knl -C quad,cache ctestP.sl" for parallel builds. - + Tests on machines using LSF will typically use "bsub ctestS.lsf", etc. ======================================================================== VI. Other cross compiling options ======================================================================== -Settings for two other cross-compiling options are also in the config/toolchain +Settings for two other cross-compiling options are also in the config/toolchain files which do not seem to be necessary with the Cray PrgEnv-* modules -1. HDF5_USE_PREGEN. This option, along with the HDF5_USE_PREGEN_DIR CMake - variable would allow the use of an appropriate H5Tinit.c file with type - information generated on a compute node to be used when cross compiling - for those compute nodes. The use of the variables in lines 110 and 111 - of HDF5options.cmake file seem to preclude needing this option with the - available Cray modules and CMake option. - -2. HDF5_BATCH_H5DETECT and associated CMake variables. This option when - properly configured will run H5detect in a batch job on a compute node - at the beginning of the CMake build process. It was also found to be - unnecessary with the available Cray modules and CMake options. +1. HDF5_USE_PREGEN. This option, along with the HDF5_USE_PREGEN_DIR CMake + variable would allow the use of an appropriate H5Tinit.c file with type + information generated on a compute node to be used when cross compiling + for those compute nodes. The use of the variables in lines 110 and 111 + of HDF5options.cmake file seem to preclude needing this option with the + available Cray modules and CMake option. + +2. HDF5_BATCH_H5DETECT and associated CMake variables. This option when + properly configured will run H5detect in a batch job on a compute node + at the beginning of the CMake build process. It was also found to be + unnecessary with the available Cray modules and CMake options. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 6d06bbc..ff024c3 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -20,7 +20,7 @@ The official HDF5 releases can be obtained from: https://www.hdfgroup.org/downloads/hdf5/ -Changes from Release to Release and New Features in the HDF5-1.10.x release series +Changes from Release to Release and New Features in the HDF5-1.13.x release series can be found at: https://portal.hdfgroup.org/display/HDF5/HDF5+Application+Developer%27s+Guide diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt index 21e153f..bd089a6 100644 --- a/release_docs/USING_CMake_Examples.txt +++ b/release_docs/USING_CMake_Examples.txt @@ -21,8 +21,8 @@ I. Preconditions ======================================================================== 1. We suggest you obtain the latest CMake for windows from the Kitware - web site. The HDF5 1.10.x product requires a minimum CMake version - of 3.10.2. If you are using VS2019, the minimum version is 3.15. + web site. The HDF5 1.13.x product requires a minimum CMake version + of 3.12. If you are using VS2019, the minimum version is 3.15. 2. You have installed the HDF5 library built with CMake, by executing the HDF Install Utility (the *.msi file in the binary package for diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index 751041d..f2d7754 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -36,8 +36,8 @@ I. Preconditions ======================================================================== 1. We suggest you obtain the latest CMake for windows from the Kitware - web site. The HDF5 1.10.x product requires a minimum CMake version - of 3.10.1. + web site. The HDF5 1.13.x product requires a minimum CMake version + of 3.12. 2. You have installed the HDF5 library built with CMake, by executing the HDF Install Utility (the *.msi file in the binary package for @@ -47,7 +47,7 @@ I. Preconditions 3. Set the environment variable HDF5_DIR to the installed location of the config files for HDF5. On Windows: - HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.10.x/cmake + HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.13.x/cmake (Note there are no quote characters used on Windows and all platforms use forward slashes) diff --git a/release_docs/USING_HDF5_VS.txt b/release_docs/USING_HDF5_VS.txt index ba22753..5ec9996 100644 --- a/release_docs/USING_HDF5_VS.txt +++ b/release_docs/USING_HDF5_VS.txt @@ -54,11 +54,11 @@ Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008 and select "x64". 2.2 Find the box "Show directories for", choose "Include files", add the - header path (i.e. c:\Program Files\HDF_Group\HDF5\1.10.x\include) + header path (i.e. c:\Program Files\HDF_Group\HDF5\1.13.x\include) to the included directories. 2.3 Find the box "Show directories for", choose "Library files", add the - library path (i.e. c:\Program Files\HDF_Group\HDF5\1.10.x\lib) + library path (i.e. c:\Program Files\HDF_Group\HDF5\1.13.x\lib) to the library directories. 2.4 If using Fortran libraries, you will also need to setup the path -- cgit v0.12 From b87d9cb50e68da06210a49eedfd01356e127b011 Mon Sep 17 00:00:00 2001 From: David Young Date: Wed, 26 Feb 2020 20:38:57 -0600 Subject: Implement pthread_barrier(3) for Darwin using a counter, condition variable, and mutex. Untested. --- test/thread_id.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/test/thread_id.c b/test/thread_id.c index af36625..4637d9c 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -42,6 +42,129 @@ my_errx(int code, const char *fmt, ...) #if defined(H5_HAVE_THREADSAFE) && !defined(H5_HAVE_WIN_THREADS) +#if defined(H5_HAVE_DARWIN) + +typedef struct _pthread_barrierattr { + uint8_t unused; +} pthread_barrierattr_t; + +typedef struct _pthread_barrier { + uint32_t magic; + unsigned int count; + uint64_t nentered; + pthread_cond_t cv; + pthread_mutex_t mtx; +} pthread_barrier_t; + +int pthread_barrier_init(pthread_barrier_t *, const pthread_barrierattr_t *, + unsigned int); +int pthread_barrier_wait(pthread_barrier_t *); +int pthread_barrier_destroy(pthread_barrier_t *); + +static const uint32_t barrier_magic = 0xf00dd00f; + +int +pthread_barrier_init(pthread_barrier_t *barrier, + const pthread_barrierattr_t *attr, unsigned int count) +{ + int rc; + + if (count == 0) + return EINVAL; + + if (attr != NULL) + return EINVAL; + + memset(barrier, 0, sizeof(*barrier)); + + barrier->count = count; + + if ((rc = pthread_cond_init(&barrier->cv, NULL)) != 0) + return rc; + + if ((rc = pthread_mutex_init(&barrier->mtx, NULL)) != 0) { + (void)pthread_cond_destroy(&barrier->cv); + return rc; + } + + barrier->magic = barrier_magic; + + return 0; +} + +static void +barrier_lock(pthread_barrier_t *barrier) +{ + int rc; + + if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) { + my_errx(exit_failure, "%s: pthread_mutex_lock: %s", __func__, + strerror(rc)); + } +} + +static void +barrier_unlock(pthread_barrier_t *barrier) +{ + int rc; + + if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) { + my_errx(exit_failure, "%s: pthread_mutex_unlock: %s", __func__, + strerror(rc)); + } +} + +int +pthread_barrier_destroy(pthread_barrier_t *barrier) +{ + int rc; + + barrier_lock(barrier); + if (barrier->magic != barrier_magic) + rc = EINVAL; + else if (barrier->count != 0) + rc = EBUSY; + else { + rc = 0; + barrier->magic = ~barrier->magic; + } + barrier_unlock(barrier); + + if (rc != 0) + return rc; + + (void)pthread_cond_destroy(&barrier->cv); + (void)pthread_mutex_destroy(&barrier->mtx); + + return 0; +} + +int +pthread_barrier_wait(pthread_barrier_t *barrier) +{ + int rc; + + if (barrier == NULL) + return EINVAL; + + barrier_lock(barrier); + if (barrier->magic != barrier_magic) { + rc = EINVAL; + goto out; + } + barrier->nentered++; + while (barrier->nentered % barrier->count != 0) { + if ((rc = pthread_cond_wait(&barrier->cv, &barrier->mtx)) != 0) + goto out; + } + rc = pthread_cond_broadcast(&barrier->cv); +out: + barrier_unlock(barrier); + return rc; +} + +#endif /* H5_HAVE_DARWIN */ + static void my_err(int, const char *, ...) H5_ATTR_FORMAT(printf, 2, 3); static void -- cgit v0.12 From 802bf2dc1eca3c3fd4f3f2cbc90c9c40c6d94607 Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 27 Feb 2020 10:16:49 -0600 Subject: s/exit_failure/EXIT_FAILURE/g --- test/thread_id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/thread_id.c b/test/thread_id.c index 4637d9c..84676bf 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -98,7 +98,7 @@ barrier_lock(pthread_barrier_t *barrier) int rc; if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) { - my_errx(exit_failure, "%s: pthread_mutex_lock: %s", __func__, + my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, strerror(rc)); } } @@ -109,7 +109,7 @@ barrier_unlock(pthread_barrier_t *barrier) int rc; if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) { - my_errx(exit_failure, "%s: pthread_mutex_unlock: %s", __func__, + my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, strerror(rc)); } } -- cgit v0.12 From 11d22f3ea50d45796e110fe805a694692de91456 Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 27 Feb 2020 10:17:24 -0600 Subject: Test the right condition for the EBUSY return in pthread_barrier_destroy(). --- test/thread_id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/thread_id.c b/test/thread_id.c index 84676bf..49e3710 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -122,7 +122,7 @@ pthread_barrier_destroy(pthread_barrier_t *barrier) barrier_lock(barrier); if (barrier->magic != barrier_magic) rc = EINVAL; - else if (barrier->count != 0) + else if (barrier->nentered % barrier->count != 0) rc = EBUSY; else { rc = 0; -- cgit v0.12 From 6686cac564f5d0015a32b92e4478002069c973ee Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 27 Feb 2020 10:51:01 -0600 Subject: Add java version and reference libsettings --- config/cmake/README.txt.cmake.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in index b29d50b..3afebc2 100644 --- a/config/cmake/README.txt.cmake.in +++ b/config/cmake/README.txt.cmake.in @@ -9,7 +9,7 @@ It was built with the following options: -- @LIB_TYPE@ C/C++/Fortran libraries -- SZIP (encoder enabled) and ZLIB -- @LIB_TYPE@ HDF5 tools - -- Java + -- Java @Java_VERSION@ The contents of this directory are: @@ -28,7 +28,8 @@ After Installation The examples folder, HDF5Examples, located in the HDF5 install folder, can be built and tested with CMake and the supplied HDF5_Examples.cmake file. The HDF5_Examples.cmake expects HDF5 to have -been installed in the default location with above compilers. Also, the CMake +been installed in the default location with above compilers (see the +libhdf5.settings file in the lib install folder). Also, the CMake utility should be installed. To test the installation with the examples; -- cgit v0.12 From 4be589813a8fc5e2c5313464b088d7d3c31a754d Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 27 Feb 2020 11:27:45 -0600 Subject: The first implementation seemed to allow for the possibility that a thread could block at the barrier, wake and exit the barrier, re-acquire the barrier lock and increase `nentered` before the other blocked threads woke and checked `nentered % count == 0`. Then the other blocked threads would check `nentered % count == 0` and, finding it false, go back to sleep in the barrier. This new implementation waits for a looser condition to obtain so that threads don't go back to sleep in the barrier. --- test/thread_id.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/thread_id.c b/test/thread_id.c index 49e3710..e3cf42e 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -143,6 +143,7 @@ int pthread_barrier_wait(pthread_barrier_t *barrier) { int rc; + uint64_t threshold; if (barrier == NULL) return EINVAL; @@ -152,8 +153,14 @@ pthread_barrier_wait(pthread_barrier_t *barrier) rc = EINVAL; goto out; } + /* Compute the release `threshold`. All threads entering with count = 5 + * and `nentered` in [0, 4] should be released once `nentered` reaches 5: + * call 5 the release `threshold`. All threads entering with count = 5 + * and `nentered` in [5, 9] should be released once `nentered` reaches 10. + */ + threshold = (barrier->nentered / barrier->count + 1) * barrier->count; barrier->nentered++; - while (barrier->nentered % barrier->count != 0) { + while (barrier->nentered < threshold) { if ((rc = pthread_cond_wait(&barrier->cv, &barrier->mtx)) != 0) goto out; } -- cgit v0.12 From dde7e73d9fe8cc3b849767790aa9b13ee2d600cd Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Thu, 27 Feb 2020 12:19:29 -0600 Subject: Fixed issue building HDF5 with NAG Fortran 7.0. Accounted for the additon of half precision floating-point with a KIND=16. HDFFV-11033 --- m4/aclocal_fc.f90 | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90 index 664a3c6..7e81a52 100644 --- a/m4/aclocal_fc.f90 +++ b/m4/aclocal_fc.f90 @@ -83,10 +83,11 @@ END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE !---- START ----- Determine the available KINDs for REALs and INTEGERs PROGRAM FC_AVAIL_KINDS IMPLICIT NONE - INTEGER :: ik, jk, k, max_decimal_prec - INTEGER :: num_rkinds = 1, num_ikinds = 1 + INTEGER :: ik, jk, k, kk, max_decimal_prec + INTEGER :: prev_rkind, num_rkinds = 1, num_ikinds = 1 INTEGER, DIMENSION(1:10) :: list_ikinds = -1 INTEGER, DIMENSION(1:10) :: list_rkinds = -1 + LOGICAL :: new_kind OPEN(8, FILE='pac_fconftest.out', FORM='formatted') @@ -113,14 +114,26 @@ PROGRAM FC_AVAIL_KINDS ! Find real KINDs list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1) max_decimal_prec = 1 + prev_rkind=list_rkinds(num_rkinds) prec: DO ik = 2, 36 - exp: DO jk = 1, 17000 + exp: DO jk = 1, 700 k = SELECTED_REAL_KIND(ik,jk) IF(k.LT.0) EXIT exp - IF(k.GT.list_rkinds(num_rkinds))THEN - num_rkinds = num_rkinds + 1 - list_rkinds(num_rkinds) = k + IF(k.NE.prev_rkind)THEN + ! Check if we aleady have that kind + new_kind = .TRUE. + DO kk = 1, num_rkinds + IF(k.EQ.list_rkinds(kk))THEN + new_kind=.FALSE. + EXIT + ENDIF + ENDDO + IF(new_kind)THEN + num_rkinds = num_rkinds + 1 + list_rkinds(num_rkinds) = k + prev_rkind=list_rkinds(num_rkinds) + ENDIF ENDIF max_decimal_prec = ik ENDDO exp -- cgit v0.12 From 803d805c74466a9d736455930b17de2d9f5cb02d Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 27 Feb 2020 16:14:44 -0600 Subject: Complete the comment on thread_main(), explaining why the barrier is used. --- test/thread_id.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/thread_id.c b/test/thread_id.c index e3cf42e..818ab4a 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -226,7 +226,15 @@ atomic_printf(const char *fmt, ...) /* Each thread runs this routine. The routine fetches the current * thread's ID, makes sure that it is in the expected range, makes * sure that in this round of testing, no two threads shared the - * same ID, + * same ID, and checks that each thread's ID is constant over its lifetime. + * + * main() checks that every ID in [1, NTHREADS] is used in each round + * of testing. All NTHREADS threads synchronize on a barrier after each + * has fetched its ID. The barrier guarantees that all threads' lifetimes + * overlap at least momentarily, so the IDs will be unique, and there + * will be NTHREADS of them. Further, since thread IDs are assigned + * starting with 1, and the number of threads with IDs alive never exceeds + * NTHREADS, the least ID has to be 1 and the greatest, NTHREADS. */ static void * thread_main(void H5_ATTR_UNUSED *arg) -- cgit v0.12 From 811988f82c182012704942d333ee7800f4a78349 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Thu, 27 Feb 2020 17:06:41 -0600 Subject: Modfy expression to match mpicc build with Intel as intel compiler, not gcc. --- config/gnu-cxxflags | 2 +- config/gnu-flags | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags index e0f2999..f8a6d8c 100644 --- a/config/gnu-cxxflags +++ b/config/gnu-cxxflags @@ -32,7 +32,7 @@ if test X = "X$cxx_flags_set"; then # containing 'icc version'. The cc_version for icc is correctly determined # and flags added in the intel-flags script. cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 | grep -v 'PathScale' |\ - grep -v 'icc version' |\ + grep -v '^icc.*version' |\ grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`" cxx_vendor=`echo $cxx_version |sed 's/\([a-z]*\).*/\1/'` cxx_version=`echo $cxx_version |sed 's/[-a-z]//g'` diff --git a/config/gnu-flags b/config/gnu-flags index 3ca74c1..11aaa71 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -47,7 +47,7 @@ if test "X-" = "X-$cc_flags_set"; then # containing 'icc version'. The cc_version for icc is correctly determined # and flags added in the intel-flags script. cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 | grep -v 'PathScale' |\ - grep -v 'icc version' |\ + grep -v '^icc.*version' |\ grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`" cc_vendor=`echo $cc_version |sed 's/\([a-z]*\).*/\1/'` cc_version=`echo $cc_version |sed 's/[-a-z]//g'` -- cgit v0.12 From 38af6ee3d59a8e836f4c62dd533ddabd914c7abb Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 28 Feb 2020 14:06:28 -0600 Subject: Switch the 'get offset' operation from a dataset 'get' callback to a [native] dataset 'optional' operation. --- src/H5D.c | 2 +- src/H5VLconnector.h | 1 - src/H5VLnative.h | 1 + src/H5VLnative_dataset.c | 48 ++++++++++++++++-------------------------------- src/H5trace.c | 6 +++--- 5 files changed, 21 insertions(+), 37 deletions(-) diff --git a/src/H5D.c b/src/H5D.c index 178bb30..61a40df 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -598,7 +598,7 @@ H5Dget_offset(hid_t dset_id) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "invalid dataset identifier") /* Get the offset */ - if(H5VL_dataset_get(vol_obj, H5VL_DATASET_GET_OFFSET, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0) + if(H5VL_dataset_optional(vol_obj, H5VL_NATIVE_DATASET_GET_OFFSET, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HADDR_UNDEF, "unable to get offset") done: diff --git a/src/H5VLconnector.h b/src/H5VLconnector.h index baa4cca..39d9b14 100644 --- a/src/H5VLconnector.h +++ b/src/H5VLconnector.h @@ -91,7 +91,6 @@ typedef int H5VL_attr_optional_t; typedef enum H5VL_dataset_get_t { H5VL_DATASET_GET_DAPL, /* access property list */ H5VL_DATASET_GET_DCPL, /* creation property list */ - H5VL_DATASET_GET_OFFSET, /* offset */ H5VL_DATASET_GET_SPACE, /* dataspace */ H5VL_DATASET_GET_SPACE_STATUS, /* space status */ H5VL_DATASET_GET_STORAGE_SIZE, /* storage size */ diff --git a/src/H5VLnative.h b/src/H5VLnative.h index e1f3f93..b607abc 100644 --- a/src/H5VLnative.h +++ b/src/H5VLnative.h @@ -48,6 +48,7 @@ #define H5VL_NATIVE_DATASET_CHUNK_READ 6 /* H5Dchunk_read */ #define H5VL_NATIVE_DATASET_CHUNK_WRITE 7 /* H5Dchunk_write */ #define H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE 8 /* H5Dvlen_get_buf_size */ +#define H5VL_NATIVE_DATASET_GET_OFFSET 9 /* H5Dget_offset */ /* Values for native VOL connector file optional VOL operations */ #define H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE 0 /* H5Fclear_elink_file_cache */ diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c index bea2c50..8660e80 100644 --- a/src/H5VLnative_dataset.c +++ b/src/H5VLnative_dataset.c @@ -297,18 +297,6 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_t get_type, break; } - /* H5Dget_offset */ - case H5VL_DATASET_GET_OFFSET: - { - haddr_t *ret = HDva_arg(arguments, haddr_t *); - - /* Set return value */ - *ret = H5D__get_offset(dset); - if(!H5F_addr_defined(*ret)) - *ret = HADDR_UNDEF; - break; - } - default: HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from dataset") } /* end switch */ @@ -391,16 +379,17 @@ herr_t H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req, va_list arguments) { - H5D_t *dset = NULL; /* Dataset */ - herr_t ret_value = SUCCEED; /* Return value */ + H5D_t *dset = (H5D_t *)obj; /* Dataset */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE + /* Sanity checks */ + HDassert(dset); + switch(optional_type) { case H5VL_NATIVE_DATASET_FORMAT_CONVERT: { /* H5Dformat_convert */ - dset = (H5D_t *)obj; - switch(dset->shared->layout.type) { case H5D_CHUNKED: /* Convert the chunk indexing type to version 1 B-tree if not */ @@ -436,8 +425,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type, { /* H5Dget_chunk_index_type */ H5D_chunk_index_t *idx_type = HDva_arg(arguments, H5D_chunk_index_t *); - dset = (H5D_t *)obj; - /* Make sure the dataset is chunked */ if(H5D_CHUNKED != dset->shared->layout.type) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") @@ -453,8 +440,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type, hsize_t *offset = HDva_arg(arguments, hsize_t *); hsize_t *chunk_nbytes = HDva_arg(arguments, hsize_t *); - dset = (H5D_t *)obj; - /* Make sure the dataset is chunked */ if(H5D_CHUNKED != dset->shared->layout.type) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") @@ -472,8 +457,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type, hid_t space_id = HDva_arg(arguments, hid_t); hsize_t *nchunks = HDva_arg(arguments, hsize_t *); - dset = (H5D_t *)obj; - HDassert(dset); HDassert(dset->shared); HDassert(dset->shared->space); @@ -505,8 +488,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type, haddr_t *addr = HDva_arg(arguments, haddr_t *); hsize_t *size = HDva_arg(arguments, hsize_t *); - dset = (H5D_t *)obj; - HDassert(dset); HDassert(dset->shared); HDassert(dset->shared->space); @@ -534,8 +515,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type, haddr_t *addr = HDva_arg(arguments, haddr_t *); hsize_t *size = HDva_arg(arguments, hsize_t *); - dset = (H5D_t *)obj; - HDassert(dset); HDassert(dset->shared); /* Make sure the dataset is chunked */ @@ -556,8 +535,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type, void *buf = HDva_arg(arguments, void *); hsize_t offset_copy[H5O_LAYOUT_NDIMS]; /* Internal copy of chunk offset */ - dset = (H5D_t *)obj; - /* Check arguments */ if(NULL == dset->oloc.file) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not associated with a file") @@ -585,8 +562,6 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type, const void *buf = HDva_arg(arguments, const void *); hsize_t offset_copy[H5O_LAYOUT_NDIMS]; /* Internal copy of chunk offset */ - dset = (H5D_t *)obj; - /* Check arguments */ if(NULL == dset->oloc.file) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not associated with a file") @@ -612,13 +587,22 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type, hid_t space_id = HDva_arg(arguments, hid_t); hsize_t *size = HDva_arg(arguments, hsize_t *); - dset = (H5D_t *)obj; - if(H5D__vlen_get_buf_size(dset, type_id, space_id, size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get size of vlen buf needed") break; } + /* H5Dget_offset */ + case H5VL_NATIVE_DATASET_GET_OFFSET: + { + haddr_t *ret = HDva_arg(arguments, haddr_t *); + + /* Set return value */ + *ret = H5D__get_offset(dset); + if(!H5F_addr_defined(*ret)) + *ret = HADDR_UNDEF; + break; + } default: HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation") diff --git a/src/H5trace.c b/src/H5trace.c index ec5c6a2..7168d5d 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -2746,9 +2746,6 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case H5VL_DATASET_GET_STORAGE_SIZE: HDfprintf(out, "H5VL_DATASET_GET_STORAGE_SIZE"); break; - case H5VL_DATASET_GET_OFFSET: - HDfprintf(out, "H5VL_DATASET_GET_OFFSET"); - break; default: HDfprintf(out, "%ld", (long)get); break; @@ -3276,6 +3273,9 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE: HDfprintf(out, "H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE"); break; + case H5VL_NATIVE_DATASET_GET_OFFSET: + HDfprintf(out, "H5VL_NATIVE_DATASET_GET_OFFSET"); + break; default: HDfprintf(out, "%ld", (long)optional); break; -- cgit v0.12 From b5cf422799797cf0b573cc9992f866381bd63054 Mon Sep 17 00:00:00 2001 From: kmu Date: Fri, 28 Feb 2020 14:47:13 -0600 Subject: revert type cast --- testpar/t_mpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index 670e02b..9e5d839 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -526,7 +526,7 @@ static int test_mpio_1wMr(char *filename, int special_request) { * ==================================================*/ irank = 0; for (i = 0; i < DIMSIZE; i++) - H5_CHECKED_ASSIGN(writedata[i], uint8_t, irank * DIMSIZE + i, int) + writedata[i] = (uint8_t)(irank * DIMSIZE + i); mpi_off = irank * DIMSIZE; /* Only one process writes */ @@ -597,7 +597,7 @@ static int test_mpio_1wMr(char *filename, int special_request) { return 1; }; for (i = 0; i < DIMSIZE; i++) { - H5_CHECKED_ASSIGN(expect_val, uint8_t, irank * DIMSIZE + i, int); + expect_val = (uint8_t)(irank * DIMSIZE + i); if (readdata[i] != expect_val) { PRINTID; HDprintf("read data[%d:%d] got %02x, expect %02x\n", irank, i, -- cgit v0.12 From 3e93aa9514d6b0d40f5baa2f3b25c99c06333aa2 Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 28 Feb 2020 16:44:16 -0600 Subject: So that I can use PASSED(); anywhere a statement can go, #define PASSED() with a do-while wrapper. --- hl/test/test_file_image.c | 2 +- test/cache.c | 12 +-- test/dtransform.c | 12 +-- test/earray.c | 18 ++--- test/farray.c | 18 ++--- test/fheap.c | 194 +++++++++++++++++++++++----------------------- test/flush2.c | 14 ++-- test/freespace.c | 44 +++++------ test/getname.c | 28 +++---- test/h5test.h | 2 +- test/hyperslab.c | 14 ++-- test/mf.c | 116 +++++++++++++-------------- test/ohdr.c | 8 +- test/page_buffer.c | 12 +-- test/set_extent.c | 3 +- 15 files changed, 248 insertions(+), 249 deletions(-) diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c index fd2d0d2..504a3f5 100644 --- a/hl/test/test_file_image.c +++ b/hl/test/test_file_image.c @@ -467,7 +467,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags) FAIL_PUTS_ERROR("H5Dclose() failed"); } /* end for */ - PASSED() + PASSED(); HL_TESTING2("close file images"); diff --git a/test/cache.c b/test/cache.c index 349d048..bb18728 100644 --- a/test/cache.c +++ b/test/cache.c @@ -13932,7 +13932,7 @@ check_move_entry(unsigned paged) takedown_cache(file_ptr, FALSE, FALSE); if(pass) - PASSED() + PASSED(); else H5_FAILED() @@ -17061,7 +17061,7 @@ check_move_entry_errs(unsigned paged) takedown_cache(file_ptr, FALSE, FALSE); if(pass) - PASSED() + PASSED(); else { H5_FAILED() @@ -30716,7 +30716,7 @@ done: takedown_cache(file_ptr, FALSE, FALSE); if(pass) - PASSED() + PASSED(); else { H5_FAILED(); HDfprintf(stdout, "%s.\n", failure_mssg); @@ -30939,7 +30939,7 @@ done: takedown_cache(file_ptr, FALSE, FALSE); if(pass) - PASSED() + PASSED(); else { H5_FAILED(); HDfprintf(stdout, "%s.\n", failure_mssg); @@ -33511,7 +33511,7 @@ done: takedown_cache(file_ptr, FALSE, FALSE); if(pass) - PASSED() + PASSED(); else { H5_FAILED(); HDfprintf(stdout, "%s.\n", failure_mssg); @@ -33714,7 +33714,7 @@ done: takedown_cache(file_ptr, FALSE, FALSE); if(pass) - PASSED() + PASSED(); else { H5_FAILED(); HDfprintf(stdout, "%s.\n", failure_mssg); diff --git a/test/dtransform.c b/test/dtransform.c index 6f7e8a4..bc61232 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -700,7 +700,7 @@ test_trivial(const hid_t dxpl_id_simple) FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n"); } - PASSED() + PASSED(); TESTING("data transform, trivial transform, with type conversion") if(H5Dread(dset_id_float, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, @@ -712,7 +712,7 @@ test_trivial(const hid_t dxpl_id_simple) FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n") } - PASSED() + PASSED(); return 0; error: @@ -739,7 +739,7 @@ test_getset(const hid_t dxpl_id_c_to_f) if(HDstrcmp(c_to_f, ptrgetTest) != 0) FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n") - PASSED() + PASSED(); HDfree(ptrgetTest); ptrgetTest = NULL; @@ -759,7 +759,7 @@ test_getset(const hid_t dxpl_id_c_to_f) FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n") } - PASSED() + PASSED(); TESTING("H5Pget_data_transform, after resetting transform property") @@ -770,7 +770,7 @@ test_getset(const hid_t dxpl_id_c_to_f) if(HDstrcmp(simple, ptrgetTest) != 0) FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n") - PASSED() + PASSED(); HDfree(ptrgetTest); ptrgetTest = NULL; @@ -806,7 +806,7 @@ test_set(void) H5Eset_auto2(H5E_DEFAULT, NULL, NULL); if(H5Pget_data_transform(dxpl_id, ptrgetTest, HDstrlen(str) + 1) < 0) - PASSED() + PASSED(); else FAIL_PUTS_ERROR(" ERROR: Data transform get before set succeeded (it shouldn't have)\n"); diff --git a/test/earray.c b/test/earray.c index 3c0212d..6597afd 100644 --- a/test/earray.c +++ b/test/earray.c @@ -768,7 +768,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE TEST_ERROR } /* end if */ - PASSED() + PASSED(); } #else /* NDEBUG */ SKIPPED(); @@ -784,7 +784,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE if(create_array(f, cparam, &ea, &ea_addr, NULL) < 0) TEST_ERROR - PASSED() + PASSED(); /* Verify the creation parameters */ TESTING("verify array creation parameters"); @@ -798,7 +798,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -868,7 +868,7 @@ test_reopen(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam) TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -972,7 +972,7 @@ test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam) TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -1112,7 +1112,7 @@ test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tpa TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -1233,7 +1233,7 @@ test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam) TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -2234,7 +2234,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam, TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -2391,7 +2391,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam, TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; diff --git a/test/farray.c b/test/farray.c index d6610f2..355ecbb 100644 --- a/test/farray.c +++ b/test/farray.c @@ -500,7 +500,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE TEST_ERROR } /* end if */ - PASSED() + PASSED(); } #else /* NDEBUG */ SKIPPED(); @@ -516,7 +516,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE if(create_array(f, cparam, &fa, &fa_addr) < 0) TEST_ERROR - PASSED() + PASSED(); /* Verify the creation parameters */ TESTING("verify array creation parameters"); @@ -530,7 +530,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -597,7 +597,7 @@ test_reopen(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -696,7 +696,7 @@ test_open_twice(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *tpara TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -829,7 +829,7 @@ test_open_twice_diff(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t * TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -947,7 +947,7 @@ test_delete_open(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam) TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -1487,7 +1487,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -1614,7 +1614,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; diff --git a/test/fheap.c b/test/fheap.c index 7772ff7..899c41f 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -1903,7 +1903,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) HDmemset(&state, 0, sizeof(fheap_heap_state_t)); if(check_stats(fh, &state)) TEST_ERROR - PASSED() + PASSED(); /* Query the type of address mapping */ TESTING("query heap creation parameters"); @@ -1935,7 +1935,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -2087,7 +2087,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -2260,7 +2260,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -2435,7 +2435,7 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -2781,7 +2781,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl) FAIL_STACK_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -2904,7 +2904,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl) H5O_msg_reset(H5O_PLINE_ID, &test_cparam.pline); /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -3044,7 +3044,7 @@ test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl) FAIL_STACK_ERROR /* All tests passed */ - PASSED() + PASSED(); return 0; @@ -3181,7 +3181,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl) FAIL_STACK_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -3292,7 +3292,7 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa FAIL_STACK_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -3393,7 +3393,7 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -3487,7 +3487,7 @@ test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -3584,7 +3584,7 @@ test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -3689,7 +3689,7 @@ test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_par TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -3794,7 +3794,7 @@ test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -3905,7 +3905,7 @@ test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -4000,7 +4000,7 @@ test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -4102,7 +4102,7 @@ test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -4201,7 +4201,7 @@ test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -4311,7 +4311,7 @@ test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -4408,7 +4408,7 @@ test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -4503,7 +4503,7 @@ test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -4603,7 +4603,7 @@ test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_ TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -4712,7 +4712,7 @@ test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhe TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -4813,7 +4813,7 @@ test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_ TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -4922,7 +4922,7 @@ test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -5029,7 +5029,7 @@ test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -5128,7 +5128,7 @@ test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_te TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -5236,7 +5236,7 @@ test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -5337,7 +5337,7 @@ test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_te TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -5446,7 +5446,7 @@ test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -5556,7 +5556,7 @@ test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -5662,7 +5662,7 @@ test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -5768,7 +5768,7 @@ test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -5882,7 +5882,7 @@ test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -6001,7 +6001,7 @@ test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -6112,7 +6112,7 @@ test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -6223,7 +6223,7 @@ test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -6357,7 +6357,7 @@ test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -6511,7 +6511,7 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed); TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -6675,7 +6675,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -6867,7 +6867,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -7035,7 +7035,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -7278,7 +7278,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size); TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -7581,7 +7581,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size); TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -7701,7 +7701,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ TEST_ERROR /* All tests passed */ - PASSED() + PASSED(); HDfree(heap_id); HDfree(heap_id_data); @@ -7780,7 +7780,7 @@ test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -7868,7 +7868,7 @@ test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -7938,7 +7938,7 @@ test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -8010,7 +8010,7 @@ test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_par H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -8086,7 +8086,7 @@ test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -8156,7 +8156,7 @@ test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -8230,7 +8230,7 @@ test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -8308,7 +8308,7 @@ test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -8389,7 +8389,7 @@ test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -8486,7 +8486,7 @@ test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -8595,7 +8595,7 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -8688,7 +8688,7 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -8830,7 +8830,7 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -8996,7 +8996,7 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t * H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -9125,7 +9125,7 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -9252,7 +9252,7 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -9374,7 +9374,7 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -9501,7 +9501,7 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_ H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -9643,7 +9643,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -9817,7 +9817,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -9968,7 +9968,7 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -10148,7 +10148,7 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -10274,7 +10274,7 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -10412,7 +10412,7 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -10562,7 +10562,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -10723,7 +10723,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -10884,7 +10884,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -11052,7 +11052,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -11211,7 +11211,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -11388,7 +11388,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -11600,7 +11600,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -11796,7 +11796,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -12028,7 +12028,7 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -12162,7 +12162,7 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -12331,7 +12331,7 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -12443,7 +12443,7 @@ HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -12561,7 +12561,7 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -12714,7 +12714,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -12945,7 +12945,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -13251,7 +13251,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -13676,7 +13676,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -13896,7 +13896,7 @@ HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_si H5MM_xfree(heap_id); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -14049,7 +14049,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -14280,7 +14280,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -14885,7 +14885,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -15073,7 +15073,7 @@ HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_si H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */ /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -15401,7 +15401,7 @@ HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_si H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */ /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -15601,7 +15601,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -15820,7 +15820,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size); H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -16108,7 +16108,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) H5MM_xfree(rewrite_obj); /* All tests passed */ - PASSED() + PASSED(); return(0); @@ -16286,7 +16286,7 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) H5MM_xfree(keep_ids.offs); /* All tests passed */ - PASSED() + PASSED(); return(0); diff --git a/test/flush2.c b/test/flush2.c index 0f15903..a6acb41 100644 --- a/test/flush2.c +++ b/test/flush2.c @@ -266,7 +266,7 @@ main(void) h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename)); check_second_dset = FALSE; if(file_ok(filename, fapl_id, check_second_dset)) - PASSED() + PASSED(); else TEST_ERROR @@ -279,7 +279,7 @@ main(void) if(clear_status_flags(filename, fapl_id) < 0) TEST_ERROR if(file_ok(filename, fapl_id, check_second_dset)) - PASSED() + PASSED(); else TEST_ERROR } /* end if */ @@ -305,7 +305,7 @@ main(void) #endif } /* end if */ else - PASSED() + PASSED(); /* Turn the error stack back on */ if(H5Eset_auto2(H5E_DEFAULT, func, NULL) < 0) FAIL_STACK_ERROR @@ -332,7 +332,7 @@ main(void) #endif } /* end if */ else - PASSED() + PASSED(); /* Turn the error stack back on */ if(H5Eset_auto2(H5E_DEFAULT, func, NULL) < 0) FAIL_STACK_ERROR @@ -348,7 +348,7 @@ main(void) check_second_dset = TRUE; h5_fixname(FILENAME[4], fapl_id, filename, sizeof(filename)); if(file_ok(filename, fapl_id, check_second_dset)) - PASSED() + PASSED(); else TEST_ERROR @@ -363,7 +363,7 @@ main(void) if(clear_status_flags(filename, fapl_id) < 0) TEST_ERROR if(file_ok(filename, fapl_id, check_second_dset)) - PASSED() + PASSED(); else TEST_ERROR } /* end if */ @@ -391,7 +391,7 @@ main(void) #endif } /* end if */ else - PASSED() + PASSED(); /* Turn the error stack back on */ if(H5Eset_auto2(H5E_DEFAULT, func, NULL) < 0) FAIL_STACK_ERROR diff --git a/test/freespace.c b/test/freespace.c index 947b2ce..f9f1932 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -547,7 +547,7 @@ test_fs_create(hid_t fapl) if(file_size != empty_size) TEST_ERROR - PASSED() + PASSED(); return 0; @@ -674,7 +674,7 @@ test_fs_sect_add(hid_t fapl) if (tmp_file_size <= (file_size+fr_meta_size)) TEST_ERROR - PASSED() + PASSED(); TESTING("adding a section via H5FS_sect_add() to free-space with H5FS_CLS_GHOST_OBJ: test 2"); @@ -736,7 +736,7 @@ test_fs_sect_add(hid_t fapl) if (tmp_file_size != (file_size+fr_meta_size)) TEST_ERROR - PASSED() + PASSED(); TESTING("adding a section via H5FS_sect_add() to free-space: test 3"); @@ -805,7 +805,7 @@ test_fs_sect_add(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); TESTING("adding a section via H5FS_sect_add() to free-space: test 4"); @@ -884,7 +884,7 @@ test_fs_sect_add(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return 0; @@ -982,7 +982,7 @@ test_fs_sect_find(hid_t fapl) FAIL_STACK_ERROR frsp = NULL; - PASSED() + PASSED(); TESTING("H5FS_sect_find() a section equal to requested-size from free-space"); @@ -1110,7 +1110,7 @@ test_fs_sect_find(hid_t fapl) FAIL_STACK_ERROR frsp = NULL; - PASSED() + PASSED(); TESTING("H5FS_sect_find() a section greater than requested-size from free-space"); @@ -1190,7 +1190,7 @@ test_fs_sect_find(hid_t fapl) FAIL_STACK_ERROR frsp = NULL; - PASSED() + PASSED(); TESTING("H5FS_sect_find(): cannot find a section with requested-size from free-space"); @@ -1253,7 +1253,7 @@ test_fs_sect_find(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return 0; @@ -1453,7 +1453,7 @@ test_fs_sect_merge(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); /* * TEST 2 @@ -1555,7 +1555,7 @@ test_fs_sect_merge(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); /* * TEST 3 @@ -1723,7 +1723,7 @@ test_fs_sect_merge(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return 0; @@ -1894,7 +1894,7 @@ test_fs_sect_shrink(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); TESTING("shrinking of sections when H5FS_sect_add() to free-space: test 2"); @@ -1996,7 +1996,7 @@ test_fs_sect_shrink(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); TESTING("shrinking of sections when H5FS_sect_add() to free-space: test 3"); @@ -2087,7 +2087,7 @@ test_fs_sect_shrink(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return 0; @@ -2240,7 +2240,7 @@ test_fs_sect_change_class(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); /* * TEST 2 @@ -2362,7 +2362,7 @@ test_fs_sect_change_class(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return 0; @@ -2515,7 +2515,7 @@ test_fs_sect_extend(hid_t fapl) FAIL_STACK_ERROR fs_addr = HADDR_UNDEF; - PASSED() + PASSED(); /* * TEST 2 @@ -2588,7 +2588,7 @@ test_fs_sect_extend(hid_t fapl) FAIL_STACK_ERROR fs_addr = HADDR_UNDEF; - PASSED() + PASSED(); /* * Test 3 @@ -2662,7 +2662,7 @@ test_fs_sect_extend(hid_t fapl) FAIL_STACK_ERROR fs_addr = HADDR_UNDEF; - PASSED() + PASSED(); /* * TEST 4 @@ -2735,7 +2735,7 @@ test_fs_sect_extend(hid_t fapl) FAIL_STACK_ERROR fs_addr = HADDR_UNDEF; - PASSED() + PASSED(); /* Close the file and dxpl */ if(H5Fclose(file) < 0) @@ -2843,7 +2843,7 @@ test_fs_sect_iterate(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return 0; diff --git a/test/getname.c b/test/getname.c index f677d78..c542ec5 100644 --- a/test/getname.c +++ b/test/getname.c @@ -2588,7 +2588,7 @@ test_obj_ref(hid_t fapl) namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0], (char*)buf, sizeof(buf)); if(!((HDstrcmp(buf, "/Dataset3") == 0) &&(namelen == 9))) TEST_ERROR - PASSED() + PASSED(); HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to dataset in /Group1"); @@ -2600,7 +2600,7 @@ test_obj_ref(hid_t fapl) *buf = '\0'; namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char*)buf, sizeof(buf)); if(!((HDstrcmp(buf, "/Group1/Dataset2") == 0) &&(namelen == 16))) TEST_ERROR - PASSED() + PASSED(); HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to /Group1"); @@ -2612,7 +2612,7 @@ test_obj_ref(hid_t fapl) *buf = '\0'; namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[2], (char*)buf, sizeof(buf)); if(!((HDstrcmp(buf, "/Group1") == 0) &&(namelen == 7))) TEST_ERROR - PASSED() + PASSED(); HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to datatype in /Group1"); @@ -2624,7 +2624,7 @@ test_obj_ref(hid_t fapl) *buf = '\0'; namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[3], (char*)buf, sizeof(buf)); if(!((HDstrcmp(buf, "/Group1/Datatype1") == 0) &&(namelen == 17))) TEST_ERROR - PASSED() + PASSED(); HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to dataset in nested group"); @@ -2636,7 +2636,7 @@ test_obj_ref(hid_t fapl) *buf = '\0'; namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char*)buf, sizeof(buf)); if(!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) &&(namelen == 23))) TEST_ERROR - PASSED() + PASSED(); HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to nested group"); @@ -2648,7 +2648,7 @@ test_obj_ref(hid_t fapl) *buf = '\0'; namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[5], (char*)buf, sizeof(buf)); if(!((HDstrcmp(buf, "/Group1/Group2") == 0) &&(namelen == 14))) TEST_ERROR - PASSED() + PASSED(); HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to dataset created via hard link"); @@ -2660,7 +2660,7 @@ test_obj_ref(hid_t fapl) *buf = '\0'; namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[6], (char*)buf, sizeof(buf)); if(!((HDstrcmp(buf, "/Group1/Dataset5") == 0) &&(namelen == 16))) TEST_ERROR - PASSED() + PASSED(); HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to root group"); @@ -2672,7 +2672,7 @@ test_obj_ref(hid_t fapl) *buf = '\0'; namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[7], (char*)buf, sizeof(buf)); if(!((HDstrcmp(buf, "/") == 0) &&(namelen == 1))) TEST_ERROR - PASSED() + PASSED(); /* Now we mount fid2 at /Group2 and look for dataset4. It shouldn't be found */ if(H5Fmount(fid1, "/Group1/Group2", fid2, H5P_DEFAULT) < 0) @@ -2687,7 +2687,7 @@ test_obj_ref(hid_t fapl) *buf = '\0'; namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char*)buf, sizeof(buf)); if(namelen != 0) TEST_ERROR - PASSED() + PASSED(); /* Now we try unlinking dataset2 from the file and searching for it. It shouldn't be found */ if((dataset2 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &wbuf[1])) < 0) @@ -2703,7 +2703,7 @@ test_obj_ref(hid_t fapl) *buf = '\0'; namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char*)buf, sizeof(buf)); if(namelen != 0) TEST_ERROR - PASSED() + PASSED(); /* Close disk dataspace */ if(H5Sclose(sid1) < 0) @@ -2830,7 +2830,7 @@ test_reg_ref(hid_t fapl) name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0], (char*)buf1, NAME_BUF_SIZE ); if(!((HDstrcmp(buf1, "/MATRIX") == 0) &&(name_size1 == 7))) TEST_ERROR - PASSED() + PASSED(); TESTING("H5Iget_name to get name from region reference(hyperslab)"); @@ -2844,14 +2844,14 @@ test_reg_ref(hid_t fapl) if(H5Dclose(dsetv_id) < 0) TEST_ERROR - PASSED() + PASSED(); /* Get name of the dataset the second region reference points to using H5Rget_name */ TESTING("H5Rget_name to get name from region reference(pnt selec)"); *buf1 = '\0'; name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[1], (char*)buf1, NAME_BUF_SIZE); if(!((HDstrcmp(buf1, "/MATRIX") == 0) &&(name_size1 == 7))) TEST_ERROR - PASSED() + PASSED(); TESTING("H5Iget_name to get name from region reference(pnt selec)"); @@ -2865,7 +2865,7 @@ test_reg_ref(hid_t fapl) if(H5Dclose(dsetv_id) < 0) TEST_ERROR - PASSED() + PASSED(); if(H5Dclose(dsetr_id) < 0) TEST_ERROR diff --git a/test/h5test.h b/test/h5test.h index 15bb15c..e67e559 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -103,7 +103,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */ */ #define TESTING(WHAT) {HDprintf("Testing %-62s",WHAT); HDfflush(stdout);} #define TESTING_2(WHAT) {HDprintf(" Testing %-60s",WHAT); HDfflush(stdout);} -#define PASSED() {HDputs(" PASSED");HDfflush(stdout);} +#define PASSED() do {HDputs(" PASSED");HDfflush(stdout);} while (0) #define H5_FAILED() {HDputs("*FAILED*");HDfflush(stdout);} #define H5_WARNING() {HDputs("*WARNING*");HDfflush(stdout);} #define SKIPPED() {HDputs(" -SKIP-");HDfflush(stdout);} diff --git a/test/hyperslab.c b/test/hyperslab.c index 8ed9c22..e702023 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -265,7 +265,7 @@ test_fill(size_t nx, size_t ny, size_t nz, } /* end for */ } /* end for */ - PASSED() + PASSED(); HDfree(dst); @@ -545,7 +545,7 @@ test_copy(int mode, } /* end for */ } /* end for */ - PASSED() + PASSED(); HDfree(src); HDfree(dst); @@ -666,7 +666,7 @@ test_multifill(size_t nx) } /* end if */ } /* end for */ - PASSED() + PASSED(); HDfree(src); HDfree(dst); @@ -753,7 +753,7 @@ test_endian(size_t nx) } /* end for */ } /* end for */ - PASSED() + PASSED(); HDfree(src); HDfree(dst); @@ -850,7 +850,7 @@ test_transpose(size_t nx, size_t ny) } /* end for */ } /* end for */ - PASSED() + PASSED(); HDfree(src); HDfree(dst); @@ -943,7 +943,7 @@ test_sub_super(size_t nx, size_t ny) } /* end if */ } /* end for */ } /* end for */ - PASSED() + PASSED(); /* * Test replicating pixels to produce an image twice as large in each @@ -1007,7 +1007,7 @@ test_sub_super(size_t nx, size_t ny) } /* end for */ } /* end for */ - PASSED() + PASSED(); HDfree(full); HDfree(half); diff --git a/test/mf.c b/test/mf.c index 141f5ec..7cfc954 100644 --- a/test/mf.c +++ b/test/mf.c @@ -318,7 +318,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl) if(H5Pclose(fapl_new) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -460,7 +460,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -508,7 +508,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(new_file_size != (file_size + TBLOCK_SIZE30)) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -552,7 +552,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(new_file_size != (file_size + TBLOCK_SIZE30)) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -600,7 +600,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(H5Pclose(fapl_new) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -738,7 +738,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) if(new_file_size != (file_size + TBLOCK_SIZE30 + TBLOCK_SIZE50)) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -801,7 +801,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) if(H5Pclose(fapl_new) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -999,7 +999,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if(new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -1093,7 +1093,7 @@ test_mf_fs_start(hid_t fapl) if(H5Pclose(fapl_new) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return(0); @@ -1242,7 +1242,7 @@ test_mf_fs_alloc_free(hid_t fapl) if (new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); TESTING("H5MF_alloc()/H5MF_xfree() of free-space manager:test 2"); @@ -1317,7 +1317,7 @@ test_mf_fs_alloc_free(hid_t fapl) if (new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); TESTING("H5MF_alloc()/H5MF_xfree() of free-space manager:test 3"); @@ -1405,7 +1405,7 @@ test_mf_fs_alloc_free(hid_t fapl) if(H5Pclose(fapl_new) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return(0); @@ -1598,7 +1598,7 @@ test_mf_fs_extend(hid_t fapl) if (new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); TESTING("H5MF_try_extend() of free-space manager:test 2"); @@ -1700,7 +1700,7 @@ test_mf_fs_extend(hid_t fapl) if (new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); TESTING("H5MF_try_extend() of free-space manager:test 3"); @@ -1802,7 +1802,7 @@ test_mf_fs_extend(hid_t fapl) if (new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); TESTING("H5MF_try_extend() of free-space manager:test 4"); @@ -1911,7 +1911,7 @@ test_mf_fs_extend(hid_t fapl) if(H5Pclose(fapl_new) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return(0); @@ -2023,7 +2023,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -2084,7 +2084,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -2226,7 +2226,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl) if(H5Pclose(fcpl) < 0) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -2368,7 +2368,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl) if (new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -2528,7 +2528,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl) if(new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -2695,7 +2695,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl) if(new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -2818,7 +2818,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl) if(new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -2974,7 +2974,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl) if(new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -3158,7 +3158,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl) if (file_size != empty_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -3312,7 +3312,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) if (file_size != empty_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -3382,7 +3382,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) if(file_size != empty_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -3450,7 +3450,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) if(file_size != empty_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -3559,7 +3559,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) if(file_size != empty_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -3618,7 +3618,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) if(file_size != empty_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -3680,7 +3680,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) if(file_size != empty_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -3847,7 +3847,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if (new_file_size != file_size) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -3902,7 +3902,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if (new_file_size != (file_size-TBLOCK_SIZE50)) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -3958,7 +3958,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if (new_file_size != (file_size+TBLOCK_SIZE30)) TEST_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -4095,7 +4095,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); TESTING("H5MF_alloc() of free-space manager with alignment: test 2"); @@ -4170,7 +4170,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); TESTING("H5MF_alloc() of free-space manager with alignment: test 3"); @@ -4245,7 +4245,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -4515,7 +4515,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -4801,7 +4801,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -5177,7 +5177,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -5386,7 +5386,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -5609,7 +5609,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -5915,7 +5915,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } /* end if */ else { SKIPPED(); @@ -6078,7 +6078,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl) * the previous */ if((addr2 - addr1) != (3 * align)) TEST_ERROR - PASSED() + PASSED(); /* Close file */ if(H5Fclose(file) < 0) @@ -6358,7 +6358,7 @@ test_mf_fs_persist_split(void) if(H5Pclose(fcpl) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return(0); @@ -6711,7 +6711,7 @@ test_mf_fs_persist_multi(void) if(H5Pclose(fcpl) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return(0); @@ -6878,7 +6878,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if(H5Pclose(fapl2) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } else { SKIPPED(); @@ -7062,7 +7062,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if(H5Pclose(fapl2) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } else { SKIPPED(); @@ -7235,7 +7235,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for if(H5Pclose(fapl2) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return(0); @@ -7420,7 +7420,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format if(H5Pclose(fapl2) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return(0); @@ -7509,7 +7509,7 @@ test_dichotomy(hid_t fapl) if(H5Fclose(file) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); return(0); @@ -7763,7 +7763,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl) if(H5Pclose(fapl_new) < 0) TEST_ERROR - PASSED() + PASSED(); } else { SKIPPED(); @@ -7887,7 +7887,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl) if(H5Pclose(fcpl) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } else { SKIPPED(); @@ -8042,7 +8042,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl) if(H5Pclose(fcpl) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } else { SKIPPED(); @@ -8183,7 +8183,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl) if(H5Pclose(fcpl) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } else { SKIPPED(); @@ -8336,7 +8336,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl) if(file_size % TBLOCK_SIZE4096) TEST_ERROR - PASSED() + PASSED(); } else { SKIPPED(); @@ -8499,7 +8499,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl) if(H5Pclose(fcpl) < 0) FAIL_STACK_ERROR - PASSED() + PASSED(); } else { SKIPPED(); @@ -8805,7 +8805,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl) if(H5Pclose(fapl_new) < 0) TEST_ERROR - PASSED() + PASSED(); } else { SKIPPED(); diff --git a/test/ohdr.c b/test/ohdr.c index 120935c..31a54d2 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -1142,7 +1142,7 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id) if(H5Dclose(dset_F_N_id) < 0) TEST_ERROR if(H5Dclose(dset_F_Y_id) < 0) TEST_ERROR - PASSED() + PASSED(); } /* compact and non-compact */ @@ -1274,7 +1274,7 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id) if(H5Dclose(dset_mZ_id) < 0) TEST_ERROR if(H5Fclose(file_id) < 0) TEST_ERROR - PASSED() + PASSED(); return SUCCEED; error: @@ -1448,7 +1448,7 @@ test_minimized_dset_ohdr_modification_times(hid_t _fapl_id) if(H5Pclose(dcpl_mT_id) < 0) TEST_ERROR if(H5Pclose(dcpl_mN_id) < 0) TEST_ERROR - PASSED() + PASSED(); return SUCCEED; error: @@ -1563,7 +1563,7 @@ test_minimized_dset_ohdr_fillvalue_backwards_compatability(hid_t _fapl_id) if(H5Dclose(dset_1_id) < 0) TEST_ERROR if(H5Fclose(file_id) < 0) TEST_ERROR; - PASSED() + PASSED(); return SUCCEED; error: diff --git a/test/page_buffer.c b/test/page_buffer.c index 21ffbf5..a6b3561 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -529,7 +529,7 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr) if(H5Pclose(fapl) < 0) FAIL_STACK_ERROR; - PASSED() + PASSED(); return 0; error: @@ -803,7 +803,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr) FAIL_STACK_ERROR; HDfree(data); - PASSED() + PASSED(); return 0; error: @@ -1056,7 +1056,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) FAIL_STACK_ERROR; HDfree(data); - PASSED() + PASSED(); return 0; error: @@ -1688,7 +1688,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) HDfree(data); - PASSED() + PASSED(); return 0; @@ -1994,7 +1994,7 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr) HDfree(data); - PASSED() + PASSED(); return 0; error: @@ -2108,7 +2108,7 @@ verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr) if(H5Pclose(fapl) < 0) FAIL_STACK_ERROR; - PASSED() + PASSED(); return 0; diff --git a/test/set_extent.c b/test/set_extent.c index 17d439e..171fd05 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -2013,8 +2013,7 @@ static int test_external(hid_t fapl) { if (H5Fclose(fid) < 0) FAIL_STACK_ERROR - PASSED() - ; + PASSED(); return 0; -- cgit v0.12 From b53eb6fb29e556c482ce20fa7a21485c99beea74 Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 28 Feb 2020 16:52:22 -0600 Subject: Add semicolons to more PASSED() invocations. --- testpar/t_init_term.c | 2 +- testpar/t_pflush2.c | 4 ++-- testpar/t_prestart.c | 2 +- testpar/t_pshutdown.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/testpar/t_init_term.c b/testpar/t_init_term.c index 933fbd2..6176bb5 100644 --- a/testpar/t_init_term.c +++ b/testpar/t_init_term.c @@ -65,7 +65,7 @@ main (int argc, char **argv) if(MAINPROCESS) { if(0 == nerrors) - PASSED() + PASSED(); else H5_FAILED() } diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c index f58e5a5..f4589c8 100644 --- a/testpar/t_pflush2.c +++ b/testpar/t_pflush2.c @@ -189,7 +189,7 @@ main(int argc, char *argv[]) goto error; } else if(mpi_rank == 0) { - PASSED() + PASSED(); } /* Check the case where the file was not flushed. This should give an error @@ -203,7 +203,7 @@ main(int argc, char *argv[]) h5_fixname(FILENAME[1], fapl_id2, name, sizeof(name)); if(check_test_file(name, fapl_id2)) { if(mpi_rank == 0) - PASSED() + PASSED(); } else { H5_FAILED() diff --git a/testpar/t_prestart.c b/testpar/t_prestart.c index cf974e8..71a8277 100644 --- a/testpar/t_prestart.c +++ b/testpar/t_prestart.c @@ -128,7 +128,7 @@ main (int argc, char **argv) if(MAINPROCESS) { if(0 == nerrors) - PASSED() + PASSED(); else H5_FAILED() } diff --git a/testpar/t_pshutdown.c b/testpar/t_pshutdown.c index ddbae9e..55073c8 100644 --- a/testpar/t_pshutdown.c +++ b/testpar/t_pshutdown.c @@ -116,7 +116,7 @@ main (int argc, char **argv) if(MAINPROCESS) { if(0 == nerrors) - PASSED() + PASSED(); else H5_FAILED() } -- cgit v0.12 From 2d9a81878d05732725f96d7d9b20ada8dfd2a146 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Fri, 28 Feb 2020 17:14:45 -0600 Subject: Fix incorrect FUNC_LEAVE macro (should match FUNC_ENTER_*_TAG). --- src/H5Dchunk.c | 4 ++-- src/H5Ochunk.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 58dfbc5..e760f63 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -7203,7 +7203,7 @@ H5D__get_num_chunks(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_ } /* end else */ done: - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__get_num_chunks() */ @@ -7341,7 +7341,7 @@ H5D__get_chunk_info(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_ } /* end if H5F_addr_defined */ done: - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__get_chunk_info() */ diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c index 9ce5a46..72402e4 100644 --- a/src/H5Ochunk.c +++ b/src/H5Ochunk.c @@ -358,7 +358,7 @@ H5O__chunk_update_idx(H5F_t *f, H5O_t *oh, unsigned idx) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk") done: - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5O__chunk_update_idx() */ -- cgit v0.12 From 5abf6785cbfe3fefa63c7cfb5b88ef6268b6d2f8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Sat, 29 Feb 2020 14:01:45 -0600 Subject: Whitespace --- tools/lib/h5tools_dump.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 3cca910..96545c8 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -3978,16 +3978,16 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool void h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t obj_id, int obj_data) { - H5S_class_t space_type; - int ndims; - size_t i; - hid_t space = H5I_INVALID_HID; - hid_t f_type = H5I_INVALID_HID; - hid_t new_obj_id = H5I_INVALID_HID; - hid_t new_obj_sid = H5I_INVALID_HID; - hsize_t total_size[H5S_MAX_RANK]; - hsize_t elmt_counter = 0; /*counts the # elements printed. */ - int status = -1; + H5S_class_t space_type; + int ndims; + size_t i; + hid_t space = H5I_INVALID_HID; + hid_t f_type = H5I_INVALID_HID; + hid_t new_obj_id = H5I_INVALID_HID; + hid_t new_obj_sid = H5I_INVALID_HID; + hsize_t total_size[H5S_MAX_RANK]; + hsize_t elmt_counter = 0; /*counts the # elements printed. */ + int status = -1; h5tools_context_t datactx; /* print context */ h5tools_str_t buffer; /* string into which to render */ hsize_t curr_pos = 0; /* total data element position */ @@ -4061,21 +4061,21 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t * datactx.need_prefix = TRUE; if (NULL != (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) { - if(obj_data) { - if(H5Dread(obj_id, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_buf) < 0) { + if (obj_data) { + if (H5Dread(obj_id, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_buf) < 0) { HDfree(ref_buf); H5TOOLS_INFO("H5Dread reference failed"); H5TOOLS_GOTO_DONE_NO_RET(); } } else { - if(H5Aread(obj_id, H5T_STD_REF, ref_buf) < 0) { + if (H5Aread(obj_id, H5T_STD_REF, ref_buf) < 0) { HDfree(ref_buf); H5TOOLS_INFO("H5Aread reference failed"); H5TOOLS_GOTO_DONE_NO_RET(); } } - for(i = 0; i < (size_t)ndims; i++, datactx.cur_elmt++, elmt_counter++) { + for (i = 0; i < (size_t)ndims; i++, datactx.cur_elmt++, elmt_counter++) { H5O_type_t obj_type = -1; /* Object type */ H5R_type_t ref_type; /* Reference type */ -- cgit v0.12 From 24298a031f0b7f6a04364cfbfbdd9c8b6cc1a038 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 2 Mar 2020 14:11:25 -0600 Subject: Remove system command from valgrind reports --- config/cmake/CTestCustom.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index fa4c66e..7f71e8d 100644 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -142,8 +142,8 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE H5REPACK-bug1814-clear-objects H5REPACK-HDFFV-5932-clear-objects H5REPACK-HDFFV-7840-clear-objects - H5REPACK_META-meta_long_N-clear-objects - H5REPACK_META-meta_short_N-clear-objects + H5REPACK_META-meta_long-clear-objects + H5REPACK_META-meta_short-clear-objects H5REPACK_STAT-GS_AGGR-clear-objects H5REPACK_STAT-S_AGGR-clear-objects H5REPACK_STAT-SP_NONE-clear-objects -- cgit v0.12