From 62b92ddf4096d9b8f6235587ec16f34f6c6fa119 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 26 Oct 2018 20:44:29 -0700 Subject: Makes the installed header files the same between the autotools and CMake. * CMake will no longer install private generated headers and tools library headers. * Several empty public header files (which represent internal packages) were removed. These were only installed by CMake. * Autotools installs will install H5FDwindows.h. Fixes HDFFV-10614. --- MANIFEST | 5 -- hl/src/CMakeLists.txt | 9 ++- release_docs/RELEASE.txt | 51 ++++++++++++++++- src/CMakeLists.txt | 139 +++++++++++++++++++++++++++++++---------------- src/H5B2private.h | 3 - src/H5B2public.h | 52 ------------------ src/H5Bprivate.h | 1 - src/H5Bpublic.h | 39 ------------- src/H5FSprivate.h | 3 - src/H5FSpublic.h | 52 ------------------ src/H5Fpkg.h | 2 +- src/H5HFprivate.h | 3 - src/H5HFpublic.h | 52 ------------------ src/H5HGprivate.h | 3 - src/H5HGpublic.h | 31 ----------- src/H5HLprivate.h | 3 - src/H5HLpublic.h | 37 ------------- src/Makefile.am | 2 +- tools/lib/CMakeLists.txt | 12 ---- 19 files changed, 149 insertions(+), 350 deletions(-) delete mode 100644 src/H5B2public.h delete mode 100644 src/H5Bpublic.h delete mode 100644 src/H5FSpublic.h delete mode 100644 src/H5HFpublic.h delete mode 100644 src/H5HGpublic.h delete mode 100644 src/H5HLpublic.h diff --git a/MANIFEST b/MANIFEST index a7df90c..a1b3dd3 100644 --- a/MANIFEST +++ b/MANIFEST @@ -496,7 +496,6 @@ ./src/H5Bmodule.h ./src/H5Bpkg.h ./src/H5Bprivate.h -./src/H5Bpublic.h ./src/H5B2.c ./src/H5B2cache.c ./src/H5B2dbg.c @@ -507,7 +506,6 @@ ./src/H5B2module.h ./src/H5B2pkg.h ./src/H5B2private.h -./src/H5B2public.h ./src/H5B2stat.c ./src/H5B2test.c ./src/H5C.c @@ -692,7 +690,6 @@ ./src/H5HFmodule.h ./src/H5HFpkg.h ./src/H5HFprivate.h -./src/H5HFpublic.h ./src/H5HFsection.c ./src/H5HFspace.c ./src/H5HFstat.c @@ -704,7 +701,6 @@ ./src/H5HGmodule.h ./src/H5HGpkg.h ./src/H5HGprivate.h -./src/H5HGpublic.h ./src/H5HGquery.c ./src/H5HL.c ./src/H5HLcache.c @@ -715,7 +711,6 @@ ./src/H5HLpkg.h ./src/H5HLprfx.c ./src/H5HLprivate.h -./src/H5HLpublic.h ./src/H5HP.c ./src/H5HPprivate.h ./src/H5I.c diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index e339f11..bf0f6ff 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -21,7 +21,6 @@ set (HL_HEADERS ${HDF5_HL_SRC_SOURCE_DIR}/H5DOpublic.h ${HDF5_HL_SRC_SOURCE_DIR}/H5DSpublic.h ${HDF5_HL_SRC_SOURCE_DIR}/H5IMpublic.h - ${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.h ${HDF5_HL_SRC_SOURCE_DIR}/H5LTpublic.h ${HDF5_HL_SRC_SOURCE_DIR}/H5PTpublic.h ${HDF5_HL_SRC_SOURCE_DIR}/H5TBpublic.h @@ -29,7 +28,11 @@ set (HL_HEADERS ${HDF5_HL_SRC_SOURCE_DIR}/hdf5_hl.h ) -add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS}) +set (HL_PRIVATE_HEADERS + ${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.h +) + +add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS} ${HL_PRIVATE_HEADERS}) target_include_directories(${HDF5_HL_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$/include>" @@ -42,7 +45,7 @@ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF set (install_targets ${HDF5_HL_LIB_TARGET}) if (BUILD_SHARED_LIBS) - add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS}) + add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS} ${HL_PRIVATE_HEADERS}) target_include_directories(${HDF5_HL_LIBSH_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$/include>" diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 4ae69f0..5b56252 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -110,6 +110,37 @@ New Features (ADB - 2018/07/16) + + - Incorrectly installed private header files were removed from + CMake installs. + + The CMake build files incorrectly flagged the following header files + as public and installed them. They are private and will no longer be + installed. + + H5Edefin.h + H5Einit.h + H5Eterm.h + H5LTparse.h + h5diff.h + h5tools_dump.h + h5tools.h + h5tools_ref.h + h5tools_str.h + h5tools_utils.h + h5trav.h + + (DER - 2018/10/26, HDFFV-10614) + + - Autotools installs now install H5FDwindows.h + + This is simply to align the installed header files between the + autotools and CMake. H5FDwindows.h has no functionality on + non-Windows systems. + + (DER - 2018/10/26, HDFFV-10614) + + Library: -------- - Allow pre-generated H5Tinit.c and H5make_libsettings.c to be used. @@ -120,7 +151,25 @@ New Features (ADB - 2018/09/18, HDFFV-10332) - Parallel Library: + - Several empty public header files where removed from the distribution + + The following files were empty placeholders. They are for internal + packages that are unlikely to ever have public functionality and have + thus been removed. + + H5Bpublic.h + H5B2public.h + H5FSpublic.h + H5HFpublic.h + H5HGpublic.h + H5HLpublic.h + + They were only installed in CMake builds. + + (DER - 2018/10/26, HDFFV-10614) + + + Parallel Library: ----------------- - diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f82b8de..311f8b4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -32,7 +32,6 @@ set (H5A_SOURCES ) set (H5A_HDRS - ${HDF5_SRC_DIR}/H5Apkg.h ${HDF5_SRC_DIR}/H5Apublic.h ) IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SOURCES}" ) @@ -46,7 +45,6 @@ set (H5AC_SOURCES ) set (H5AC_HDRS - ${HDF5_SRC_DIR}/H5ACpkg.h ${HDF5_SRC_DIR}/H5ACpublic.h ) IDE_GENERATED_PROPERTIES ("H5AC" "${H5AC_HDRS}" "${H5AC_SOURCES}" ) @@ -57,8 +55,6 @@ set (H5B_SOURCES ${HDF5_SRC_DIR}/H5Bdbg.c ) set (H5B_HDRS - ${HDF5_SRC_DIR}/H5Bpkg.h - ${HDF5_SRC_DIR}/H5Bpublic.h ) IDE_GENERATED_PROPERTIES ("H5B" "${H5B_HDRS}" "${H5B_SOURCES}" ) @@ -75,8 +71,6 @@ set (H5B2_SOURCES ${HDF5_SRC_DIR}/H5B2test.c ) set (H5B2_HDRS - ${HDF5_SRC_DIR}/H5B2pkg.h - ${HDF5_SRC_DIR}/H5B2public.h ) IDE_GENERATED_PROPERTIES ("H5B2" "${H5B2_HDRS}" "${H5B2_SOURCES}" ) @@ -94,7 +88,6 @@ set (H5C_SOURCES ${HDF5_SRC_DIR}/H5Ctest.c ) set (H5C_HDRS - ${HDF5_SRC_DIR}/H5Cpkg.h ${HDF5_SRC_DIR}/H5Cpublic.h ) IDE_GENERATED_PROPERTIES ("H5C" "${H5C_HDRS}" "${H5C_SOURCES}" ) @@ -143,7 +136,6 @@ set (H5D_SOURCES ) set (H5D_HDRS - ${HDF5_SRC_DIR}/H5Dpkg.h ${HDF5_SRC_DIR}/H5Dpublic.h ) IDE_GENERATED_PROPERTIES ("H5D" "${H5D_HDRS}" "${H5D_SOURCES}" ) @@ -155,12 +147,8 @@ set (H5E_SOURCES ) set (H5E_HDRS - #${HDF5_SRC_DIR}/H5Edefin.h - #${HDF5_SRC_DIR}/H5Einit.h - ${HDF5_SRC_DIR}/H5Epkg.h - #${HDF5_SRC_DIR}/H5Epubgen.h + ${HDF5_SRC_DIR}/H5Epubgen.h ${HDF5_SRC_DIR}/H5Epublic.h - #${HDF5_SRC_DIR}/H5Eterm.h ) IDE_GENERATED_PROPERTIES ("H5E" "${H5E_HDRS}" "${H5E_SOURCES}" ) @@ -179,7 +167,6 @@ set (H5EA_SOURCES ${HDF5_SRC_DIR}/H5EAtest.c ) set (H5EA_HDRS - ${HDF5_SRC_DIR}/H5EApkg.h ) IDE_GENERATED_PROPERTIES ("H5EA" "${H5EA_HDRS}" "${H5EA_SOURCES}" ) @@ -213,7 +200,6 @@ set (H5F_SOURCES ) set (H5F_HDRS - ${HDF5_SRC_DIR}/H5Fpkg.h ${HDF5_SRC_DIR}/H5Fpublic.h ) IDE_GENERATED_PROPERTIES ("H5F" "${H5F_HDRS}" "${H5F_SOURCES}" ) @@ -231,7 +217,6 @@ set (H5FA_SOURCES ${HDF5_SRC_DIR}/H5FAtest.c ) set (H5FA_HDRS - ${HDF5_SRC_DIR}/H5FApkg.h ) IDE_GENERATED_PROPERTIES ("H5FA" "${H5FA_HDRS}" "${H5FA_SOURCES}" ) @@ -261,7 +246,6 @@ set (H5FD_HDRS ${HDF5_SRC_DIR}/H5FDmpi.h ${HDF5_SRC_DIR}/H5FDmpio.h ${HDF5_SRC_DIR}/H5FDmulti.h - ${HDF5_SRC_DIR}/H5FDpkg.h ${HDF5_SRC_DIR}/H5FDpublic.h ${HDF5_SRC_DIR}/H5FDsec2.h ${HDF5_SRC_DIR}/H5FDstdio.h @@ -297,8 +281,6 @@ set (H5FS_SOURCES ) set (H5FS_HDRS - ${HDF5_SRC_DIR}/H5FSpkg.h - ${HDF5_SRC_DIR}/H5FSpublic.h ) IDE_GENERATED_PROPERTIES ("H5FS" "${H5FS_HDRS}" "${H5FS_SOURCES}" ) @@ -324,7 +306,6 @@ set (H5G_SOURCES ) set (H5G_HDRS - ${HDF5_SRC_DIR}/H5Gpkg.h ${HDF5_SRC_DIR}/H5Gpublic.h ) IDE_GENERATED_PROPERTIES ("H5G" "${H5G_HDRS}" "${H5G_SOURCES}" ) @@ -349,8 +330,6 @@ set (H5HF_SOURCES ) set (H5HF_HDRS - ${HDF5_SRC_DIR}/H5HFpkg.h - ${HDF5_SRC_DIR}/H5HFpublic.h ) IDE_GENERATED_PROPERTIES ("H5HF" "${H5HF_HDRS}" "${H5HF_SOURCES}" ) @@ -362,8 +341,6 @@ set (H5HG_SOURCES ) set (H5HG_HDRS - ${HDF5_SRC_DIR}/H5HGpkg.h - ${HDF5_SRC_DIR}/H5HGpublic.h ) IDE_GENERATED_PROPERTIES ("H5HG" "${H5HG_HDRS}" "${H5HG_SOURCES}" ) @@ -377,8 +354,6 @@ set (H5HL_SOURCES ) set (H5HL_HDRS - ${HDF5_SRC_DIR}/H5HLpkg.h - ${HDF5_SRC_DIR}/H5HLpublic.h ) IDE_GENERATED_PROPERTIES ("H5HL" "${H5HL_HDRS}" "${H5HL_SOURCES}" ) @@ -396,7 +371,6 @@ set (H5I_SOURCES ${HDF5_SRC_DIR}/H5Itest.c ) set (H5I_HDRS - ${HDF5_SRC_DIR}/H5Ipkg.h ${HDF5_SRC_DIR}/H5Ipublic.h ) IDE_GENERATED_PROPERTIES ("H5I" "${H5I_HDRS}" "${H5I_SOURCES}" ) @@ -407,7 +381,6 @@ set (H5L_SOURCES ${HDF5_SRC_DIR}/H5Lexternal.c ) set (H5L_HDRS - ${HDF5_SRC_DIR}/H5Lpkg.h ${HDF5_SRC_DIR}/H5Lpublic.h ) IDE_GENERATED_PROPERTIES ("H5L" "${H5L_HDRS}" "${H5L_SOURCES}" ) @@ -440,7 +413,6 @@ set (H5MP_SOURCES ) set (H5MP_HDRS - ${HDF5_SRC_DIR}/H5MPpkg.h ) IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SOURCES}" ) @@ -485,9 +457,7 @@ set (H5O_SOURCES ) set (H5O_HDRS - ${HDF5_SRC_DIR}/H5Opkg.h ${HDF5_SRC_DIR}/H5Opublic.h - ${HDF5_SRC_DIR}/H5Oshared.h ) IDE_GENERATED_PROPERTIES ("H5O" "${H5O_HDRS}" "${H5O_SOURCES}" ) @@ -513,7 +483,6 @@ set (H5P_SOURCES ) set (H5P_HDRS - ${HDF5_SRC_DIR}/H5Ppkg.h ${HDF5_SRC_DIR}/H5Ppublic.h ) IDE_GENERATED_PROPERTIES ("H5P" "${H5P_HDRS}" "${H5P_SOURCES}" ) @@ -523,7 +492,6 @@ set (H5PB_SOURCES ) set (H5PB_HDRS - ${HDF5_SRC_DIR}/H5PBpkg.h ) IDE_GENERATED_PROPERTIES ("H5PB" "${H5PB_HDRS}" "${H5PB_SOURCES}" ) @@ -536,7 +504,6 @@ set (H5PL_SOURCES set (H5PL_HDRS ${HDF5_SRC_DIR}/H5PLextern.h - ${HDF5_SRC_DIR}/H5PLpkg.h ${HDF5_SRC_DIR}/H5PLpublic.h ) IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SOURCES}" ) @@ -548,7 +515,6 @@ set (H5R_SOURCES ${HDF5_SRC_DIR}/H5Rint.c ) set (H5R_HDRS - ${HDF5_SRC_DIR}/H5Rpkg.h ${HDF5_SRC_DIR}/H5Rpublic.h ) IDE_GENERATED_PROPERTIES ("H5R" "${H5R_HDRS}" "${H5R_SOURCES}" ) @@ -575,7 +541,6 @@ set (H5S_SOURCES ) set (H5S_HDRS - ${HDF5_SRC_DIR}/H5Spkg.h ${HDF5_SRC_DIR}/H5Spublic.h ) IDE_GENERATED_PROPERTIES ("H5S" "${H5S_HDRS}" "${H5S_SOURCES}" ) @@ -598,7 +563,6 @@ set (H5SM_SOURCES ) set (H5SM_HDRS - ${HDF5_SRC_DIR}/H5SMpkg.h ) IDE_GENERATED_PROPERTIES ("H5SM" "${H5SM_HDRS}" "${H5SM_SOURCES}" ) @@ -638,7 +602,6 @@ set (H5T_SOURCES ) set (H5T_HDRS - ${HDF5_SRC_DIR}/H5Tpkg.h ${HDF5_SRC_DIR}/H5Tpublic.h ) IDE_GENERATED_PROPERTIES ("H5T" "${H5T_HDRS}" "${H5T_SOURCES}" ) @@ -666,7 +629,6 @@ set (H5VL_SOURCES ${HDF5_SRC_DIR}/H5VLnative.c ) set (H5VL_HDRS - ${HDF5_SRC_DIR}/H5VLpkg.h ${HDF5_SRC_DIR}/H5VLnative.h ${HDF5_SRC_DIR}/H5VLpublic.h ) @@ -705,7 +667,6 @@ endif () set (H5Z_HDRS - ${HDF5_SRC_DIR}/H5Zpkg.h ${HDF5_SRC_DIR}/H5Zpublic.h ) IDE_GENERATED_PROPERTIES ("H5Z" "${H5Z_HDRS}" "${H5Z_SOURCES}" ) @@ -795,51 +756,127 @@ set (H5_PUBLIC_HEADERS set (H5_PRIVATE_HEADERS ${HDF5_SRC_DIR}/H5private.h + + ${HDF5_SRC_DIR}/H5Apkg.h ${HDF5_SRC_DIR}/H5Aprivate.h + + ${HDF5_SRC_DIR}/H5ACpkg.h ${HDF5_SRC_DIR}/H5ACprivate.h - ${HDF5_SRC_DIR}/H5B2private.h + + ${HDF5_SRC_DIR}/H5Bpkg.h ${HDF5_SRC_DIR}/H5Bprivate.h + + ${HDF5_SRC_DIR}/H5B2pkg.h + ${HDF5_SRC_DIR}/H5B2private.h + + ${HDF5_SRC_DIR}/H5Cpkg.h ${HDF5_SRC_DIR}/H5Cprivate.h + ${HDF5_SRC_DIR}/H5CSprivate.h + ${HDF5_SRC_DIR}/H5CXprivate.h + + ${HDF5_SRC_DIR}/H5Dpkg.h ${HDF5_SRC_DIR}/H5Dprivate.h + + ${HDF5_SRC_DIR}/H5Edefin.h + ${HDF5_SRC_DIR}/H5Einit.h + ${HDF5_SRC_DIR}/H5Epkg.h ${HDF5_SRC_DIR}/H5Eprivate.h + ${HDF5_SRC_DIR}/H5Eterm.h + + ${HDF5_SRC_DIR}/H5EApkg.h ${HDF5_SRC_DIR}/H5EAprivate.h + + ${HDF5_SRC_DIR}/H5Fpkg.h + ${HDF5_SRC_DIR}/H5Fprivate.h + + ${HDF5_SRC_DIR}/H5FApkg.h ${HDF5_SRC_DIR}/H5FAprivate.h + + ${HDF5_SRC_DIR}/H5FDpkg.h ${HDF5_SRC_DIR}/H5FDprivate.h - ${HDF5_SRC_DIR}/H5Fprivate.h + ${HDF5_SRC_DIR}/H5FLprivate.h + ${HDF5_SRC_DIR}/H5FOprivate.h - ${HDF5_SRC_DIR}/H5MFprivate.h - ${HDF5_SRC_DIR}/H5MMprivate.h - ${HDF5_SRC_DIR}/H5Cprivate.h + + ${HDF5_SRC_DIR}/H5FSpkg.h ${HDF5_SRC_DIR}/H5FSprivate.h + + ${HDF5_SRC_DIR}/H5Gpkg.h ${HDF5_SRC_DIR}/H5Gprivate.h + + ${HDF5_SRC_DIR}/H5HFpkg.h ${HDF5_SRC_DIR}/H5HFprivate.h + + ${HDF5_SRC_DIR}/H5HGpkg.h ${HDF5_SRC_DIR}/H5HGprivate.h + + ${HDF5_SRC_DIR}/H5HLpkg.h ${HDF5_SRC_DIR}/H5HLprivate.h + ${HDF5_SRC_DIR}/H5HPprivate.h + + ${HDF5_SRC_DIR}/H5Ipkg.h ${HDF5_SRC_DIR}/H5Iprivate.h + + ${HDF5_SRC_DIR}/H5Lpkg.h ${HDF5_SRC_DIR}/H5Lprivate.h + + ${HDF5_SRC_DIR}/H5MFprivate.h + + ${HDF5_SRC_DIR}/H5MMprivate.h + + ${HDF5_SRC_DIR}/H5MPpkg.h ${HDF5_SRC_DIR}/H5MPprivate.h + + ${HDF5_SRC_DIR}/H5Opkg.h ${HDF5_SRC_DIR}/H5Oprivate.h + ${HDF5_SRC_DIR}/H5Oshared.h + + ${HDF5_SRC_DIR}/H5Ppkg.h ${HDF5_SRC_DIR}/H5Pprivate.h + ${HDF5_SRC_DIR}/H5PBprivate.h + ${HDF5_SRC_DIR}/H5PBpkg.h + + ${HDF5_SRC_DIR}/H5PLpkg.h ${HDF5_SRC_DIR}/H5PLprivate.h - ${HDF5_SRC_DIR}/H5UCprivate.h + + ${HDF5_SRC_DIR}/H5Rpkg.h ${HDF5_SRC_DIR}/H5Rprivate.h + ${HDF5_SRC_DIR}/H5RSprivate.h + + ${HDF5_SRC_DIR}/H5Spkg.h + ${HDF5_SRC_DIR}/H5Sprivate.h + ${HDF5_SRC_DIR}/H5SLprivate.h + + ${HDF5_SRC_DIR}/H5SMpkg.h ${HDF5_SRC_DIR}/H5SMprivate.h - ${HDF5_SRC_DIR}/H5Sprivate.h + ${HDF5_SRC_DIR}/H5STprivate.h + + ${HDF5_SRC_DIR}/H5Tpkg.h ${HDF5_SRC_DIR}/H5Tprivate.h + ${HDF5_SRC_DIR}/H5TSprivate.h + + ${HDF5_SRC_DIR}/H5UCprivate.h + + ${HDF5_SRC_DIR}/H5VLpkg.h ${HDF5_SRC_DIR}/H5VLnative_private.h ${HDF5_SRC_DIR}/H5VLprivate.h + ${HDF5_SRC_DIR}/H5VMprivate.h + ${HDF5_SRC_DIR}/H5WBprivate.h + + ${HDF5_SRC_DIR}/H5Zpkg.h ${HDF5_SRC_DIR}/H5Zprivate.h + ${HDF5_SRC_DIR}/H5win32defs.h ) @@ -852,6 +889,12 @@ set (H5_GENERATED_HEADERS ${HDF5_SRC_DIR}/H5overflow.h ) +set (H5_PUBLIC_GENERATED_HEADERS + ${HDF5_SRC_DIR}/H5Epubgen.h + ${HDF5_SRC_DIR}/H5version.h + ${HDF5_SRC_DIR}/H5overflow.h +) + option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" ON) if (HDF5_GENERATE_HEADERS) set_source_files_properties(${H5_GENERATED_HEADERS} PROPERTIES GENERATED TRUE) @@ -1054,7 +1097,7 @@ if (NOT HDF5_INSTALL_NO_DEVELOPMENT) install ( FILES ${H5_PUBLIC_HEADERS} - ${H5_GENERATED_HEADERS} + ${H5_PUBLIC_GENERATED_HEADERS} ${HDF5_BINARY_DIR}/H5pubconf.h DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} diff --git a/src/H5B2private.h b/src/H5B2private.h index 83a5272..0b64381 100644 --- a/src/H5B2private.h +++ b/src/H5B2private.h @@ -25,9 +25,6 @@ #ifndef _H5B2private_H #define _H5B2private_H -/* Include package's public header */ -#include "H5B2public.h" - /* Private headers needed by this file */ #include "H5ACprivate.h" /* Metadata cache */ #include "H5Fprivate.h" /* File access */ diff --git a/src/H5B2public.h b/src/H5B2public.h deleted file mode 100644 index 6e0b964..0000000 --- a/src/H5B2public.h +++ /dev/null @@ -1,52 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/*------------------------------------------------------------------------- - * - * Created: H5B2public.h - * Jan 31 2005 - * Quincey Koziol - * - * Purpose: Public declarations for the v2 B-tree package. - * - *------------------------------------------------------------------------- - */ - -#ifndef _H5B2public_H -#define _H5B2public_H - -/* Public headers needed by this file */ -#include "H5public.h" - -/*****************/ -/* Public Macros */ -/*****************/ - -/*******************/ -/* Public Typedefs */ -/*******************/ - -/**********************************/ -/* Public API Function Prototypes */ -/**********************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _H5B2public_H */ - diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h index e203b87..5aa3628 100644 --- a/src/H5Bprivate.h +++ b/src/H5Bprivate.h @@ -27,7 +27,6 @@ #ifndef _H5Bprivate_H #define _H5Bprivate_H -#include "H5Bpublic.h" /*API prototypes */ /* Private headers needed by this file */ #include "H5private.h" /* Generic Functions */ diff --git a/src/H5Bpublic.h b/src/H5Bpublic.h deleted file mode 100644 index 1764f61..0000000 --- a/src/H5Bpublic.h +++ /dev/null @@ -1,39 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/*------------------------------------------------------------------------- - * - * Created: H5Bproto.h - * Jul 10 1997 - * Robb Matzke - * - * Purpose: Public declarations for the H5B package. - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -#ifndef _H5Bpublic_H -#define _H5Bpublic_H - -/* Public headers needed by this file */ -#include "H5public.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h index de1b4c1..31fc63c 100644 --- a/src/H5FSprivate.h +++ b/src/H5FSprivate.h @@ -25,9 +25,6 @@ #ifndef _H5FSprivate_H #define _H5FSprivate_H -/* Include package's public header */ -#include "H5FSpublic.h" - /* Private headers needed by this file */ #include "H5Fprivate.h" /* File access */ #include "H5FLprivate.h" /* Free Lists */ diff --git a/src/H5FSpublic.h b/src/H5FSpublic.h deleted file mode 100644 index 3090d0d..0000000 --- a/src/H5FSpublic.h +++ /dev/null @@ -1,52 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/*------------------------------------------------------------------------- - * - * Created: H5FSpublic.h - * May 2 2006 - * Quincey Koziol - * - * Purpose: Public declarations for the file free space package. - * - *------------------------------------------------------------------------- - */ - -#ifndef _H5FSpublic_H -#define _H5FSpublic_H - -/* Public headers needed by this file */ -#include "H5public.h" - -/*****************/ -/* Public Macros */ -/*****************/ - -/*******************/ -/* Public Typedefs */ -/*******************/ - -/**********************************/ -/* Public API Function Prototypes */ -/**********************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _H5FSpublic_H */ - diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index e97144f..2098a77 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -30,12 +30,12 @@ #include "H5Fprivate.h" /* Other public headers needed by this file */ -#include "H5Bpublic.h" /* B-tree header (for H5B_NUM_BTREE_ID) */ #include "H5VLpublic.h" /* Virtual Object Layer */ /* Other private headers needed by this file */ #include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ +#include "H5Bprivate.h" /* B-trees */ #include "H5FLprivate.h" /* Free Lists */ #include "H5FOprivate.h" /* File objects */ #include "H5FSprivate.h" /* File free space */ diff --git a/src/H5HFprivate.h b/src/H5HFprivate.h index 587a8fc..4eec1c1 100644 --- a/src/H5HFprivate.h +++ b/src/H5HFprivate.h @@ -25,9 +25,6 @@ #ifndef _H5HFprivate_H #define _H5HFprivate_H -/* Include package's public header */ -#include "H5HFpublic.h" - /* Private headers needed by this file */ #include "H5Fprivate.h" /* File access */ #include "H5Oprivate.h" /* Object headers */ diff --git a/src/H5HFpublic.h b/src/H5HFpublic.h deleted file mode 100644 index 82cfc21..0000000 --- a/src/H5HFpublic.h +++ /dev/null @@ -1,52 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/*------------------------------------------------------------------------- - * - * Created: H5HFpublic.h - * Feb 24 2006 - * Quincey Koziol - * - * Purpose: Public declarations for the fractal heap package. - * - *------------------------------------------------------------------------- - */ - -#ifndef _H5HFpublic_H -#define _H5HFpublic_H - -/* Public headers needed by this file */ -#include "H5public.h" - -/*****************/ -/* Public Macros */ -/*****************/ - -/*******************/ -/* Public Typedefs */ -/*******************/ - -/**********************************/ -/* Public API Function Prototypes */ -/**********************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _H5HFpublic_H */ - diff --git a/src/H5HGprivate.h b/src/H5HGprivate.h index a7d7a80..1c609e2 100644 --- a/src/H5HGprivate.h +++ b/src/H5HGprivate.h @@ -18,9 +18,6 @@ #ifndef _H5HGprivate_H #define _H5HGprivate_H -/* Include package's public header */ -#include "H5HGpublic.h" - /* Private headers needed by this file. */ #include "H5Fprivate.h" /* File access */ diff --git a/src/H5HGpublic.h b/src/H5HGpublic.h deleted file mode 100644 index fcec593..0000000 --- a/src/H5HGpublic.h +++ /dev/null @@ -1,31 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* - * Programmer: Robb Matzke - * Friday, March 27, 1998 - */ -#ifndef _H5HGpublic_H -#define _H5HGpublic_H - -/* Public headers needed by this file */ -#include "H5public.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h index 4001ef1..7a53b25 100644 --- a/src/H5HLprivate.h +++ b/src/H5HLprivate.h @@ -24,9 +24,6 @@ #ifndef _H5HLprivate_H #define _H5HLprivate_H -/* Include package's public header */ -#include "H5HLpublic.h" - /* Private headers needed by this file. */ #include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ diff --git a/src/H5HLpublic.h b/src/H5HLpublic.h deleted file mode 100644 index 143bb78..0000000 --- a/src/H5HLpublic.h +++ /dev/null @@ -1,37 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/*------------------------------------------------------------------------- - * - * Created: H5HLpublic.h - * Jul 16 1997 - * Robb Matzke - * - * Purpose: Public declarations for the H5HL (local heap) package. - * - *------------------------------------------------------------------------- - */ -#ifndef _H5HLpublic_H -#define _H5HLpublic_H - -/* Public headers needed by this file */ -#include "H5public.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/Makefile.am b/src/Makefile.am index 7889e10..ffdf844 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -136,7 +136,7 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers H5Epubgen.h H5Epublic.h H5ESpublic.h H5Fpublic.h \ H5FDpublic.h H5FDcore.h H5FDdirect.h \ H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h \ - H5FDmulti.h H5FDsec2.h H5FDstdio.h \ + H5FDmulti.h H5FDsec2.h H5FDstdio.h H5FDwindows.h \ H5Gpublic.h H5Ipublic.h H5Lpublic.h \ H5MMpublic.h H5Opublic.h H5Ppublic.h \ H5PLextern.h H5PLpublic.h \ diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index a03b60a..1596ea7 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -76,18 +76,6 @@ endif () ############################################################################## #----------------------------------------------------------------------------- -# Add file(s) to CMake Install -#----------------------------------------------------------------------------- -install ( - FILES - ${H5_TOOLS_LIB_HDRS} - DESTINATION - ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT - toolsheaders -) - -#----------------------------------------------------------------------------- # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) -- cgit v0.12 From b24259ed8cdb273273f82c2b3f3a2dcac60b32ba Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 29 Oct 2018 14:24:08 -0500 Subject: Add files and changes to cross compile with CrayLinuxEnvironment and run ctest tests with a batch job on knl compute nodes. --- bin/batch/knl_H5detect.sl.in.cmake | 20 ++++++++++++++++++++ bin/batch/knl_ctestSP.sl | 28 ++++++++++++++++++++++++++++ config/toolchain/crayle.cmake | 20 ++++++++++++++++++++ src/CMakeLists.txt | 6 +++--- 4 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 bin/batch/knl_H5detect.sl.in.cmake create mode 100644 bin/batch/knl_ctestSP.sl create mode 100644 config/toolchain/crayle.cmake diff --git a/bin/batch/knl_H5detect.sl.in.cmake b/bin/batch/knl_H5detect.sl.in.cmake new file mode 100644 index 0000000..39a3ef3 --- /dev/null +++ b/bin/batch/knl_H5detect.sl.in.cmake @@ -0,0 +1,20 @@ +#!/bin/bash + +#SBATCH -p knl -C quad +#SBATCH --nodes=1 +#SBATCH -t 00:10:00 +#SBATCH --mail-type=BEGIN,END,FAIL +#SBATCH --mail-user=@sandia.gov +#SBATCH --export=ALL +#SBATCH --job-name=knl_h5detect + + +# Inputs: Build directory, output file name, executable file name (username/email if available). +PROGNAME=H5detect +OUTPUT=H5Tinit.c + +CMD="@HDF5_BINARY_DIR@/bin/${PROGNAME} @HDF5_GENERATED_SOURCE_DIR@/${OUTPUT}" +echo "Run $CMD" +srun -n 1 $CMD +echo "Done running $CMD" + diff --git a/bin/batch/knl_ctestSP.sl b/bin/batch/knl_ctestSP.sl new file mode 100644 index 0000000..56da347 --- /dev/null +++ b/bin/batch/knl_ctestSP.sl @@ -0,0 +1,28 @@ +#!/bin/bash + +#SBATCH -p knl -C quad,flat +#SBATCH --nodes=1 +#SBATCH -t 01:00:00 +#SBATCH --mail-type=BEGIN,END,FAIL +##SBATCH --mail-user=@sandia.gov +#SBATCH --export=ALL +#SBATCH --job-name=h5_ctestS + +module load cmake +module load craype-hugepages4M + +cd build +CMD="ctest . -E TEST_PAR|H5DIFF|PERFORM -C Release -j 32 -T test" + +echo "Run $CMD. Test output will be in build/ctestS.out" +$CMD >& ctestS.out +echo "Done running $CMD" + + +#run parallel tests except t_cache_image test +CMD="ctest . -R TEST_PAR|PH5DIFF|PERFORM -E t_cache_image -C Release -T test" + +echo "Run $CMD. Test output will be in build/ctestP.out" +$CMD >& ctestP.out +echo "Done running $CMD" + diff --git a/config/toolchain/crayle.cmake b/config/toolchain/crayle.cmake new file mode 100644 index 0000000..a83147b --- /dev/null +++ b/config/toolchain/crayle.cmake @@ -0,0 +1,20 @@ +# Uncomment the following to use cross-compiling +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_COMPILER_VENDOR "CrayLinuxEnvironment") + +set(CMAKE_C_COMPILER cc) +set(CMAKE_Fortran_COMPILER ftn) + +# the following is used if cross-compiling +set(CMAKE_CROSSCOMPILING_EMULATOR "") + +# option to use pre-generated H5Tinit.c file +set(HDF5_USE_PREGEN OFF) +# directory where H5Tinit.c file will be found +#set(HDF5_USE_PREGEN_DIR "/lscratch1/lknox/HDF5_1_10_4/CMake-hdf5-1.10.4") + +# option to generate H5Tinit.c by running H5detect on knl compute node during build +set(HDF5_BATCH_H5DETECT ON) +set(HDF5_BATCH_CMD "sbatch") +set(HDF5_BATCH_H5DETECT_SCRIPT "knl_H5detect.sl") +set(MPIEXEC_EXECUTABLE "srun") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 311f8b4..a1bab5c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -943,13 +943,13 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) if (HDF5_BATCH_H5DETECT) configure_file ( - ${HDF5_SOURCE_DIR}/bin/batch/${HDF5_DETECT_BATCH_SCRIPT}.in - ${HDF5_BINARY_DIR}/${HDF5_DETECT_BATCH_SCRIPT} ESCAPE_QUOTES @ONLY + ${HDF5_SOURCE_DIR}/bin/batch/${HDF5_BATCH_H5DETECT_SCRIPT}.in.cmake + ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} ESCAPE_QUOTES @ONLY ) add_custom_command ( OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c COMMAND ${HDF5_BATCH_CMD} - ARGS ${HDF5_BATCH_H5DETECT_SCRIPT} + ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} DEPENDS H5detect WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} ) -- cgit v0.12 From c9273522e9a7e946802d8545b2532f9129b459a9 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 29 Oct 2018 12:59:25 -0700 Subject: Updated RELEASE.txt to reflect HDFFV-10609 work (H5Xpkg.h files being incorrectly installed). --- release_docs/RELEASE.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 5b56252..73bb149 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -118,6 +118,7 @@ New Features as public and installed them. They are private and will no longer be installed. + HDF5 library private package files (H5Xpkg.h) H5Edefin.h H5Einit.h H5Eterm.h @@ -130,7 +131,7 @@ New Features h5tools_utils.h h5trav.h - (DER - 2018/10/26, HDFFV-10614) + (DER - 2018/10/26, HDFFV-10614, 10609) - Autotools installs now install H5FDwindows.h -- cgit v0.12 From f031cc7b7a11c783e16cd928f534ca0197e61522 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 29 Oct 2018 16:17:10 -0500 Subject: Add script to run tests with sbatch when not cross compiling. Add new files to MANIFEST. --- MANIFEST | 4 ++++ bin/batch/sbatch_ctestSP.sl | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 bin/batch/sbatch_ctestSP.sl diff --git a/MANIFEST b/MANIFEST index 5733a23..716972d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -92,6 +92,9 @@ ./bin/timekeeper _DO_NOT_DISTRIBUTE_ ./bin/trace ./bin/yodconfigure +./bin/batch/knl_ctestSP.sl +./bin/batch/knl_H5detect.sl.in.cmake +./bin/batch/sbatch_ctestSP.sl ./bin/pkgscrpts/h5rmflags _DO_NOT_DISTRIBUTE_ ./bin/pkgscrpts/makeHDF5BinaryTarfiles.pl _DO_NOT_DISTRIBUTE_ ./bin/pkgscrpts/makeInternalREADME.pl _DO_NOT_DISTRIBUTE_ @@ -3156,6 +3159,7 @@ ./java/lib/ext/slf4j-simple-1.7.25.jar # CMake-specific Files +./config/toolchain/crayle.cmake ./config/toolchain/GCC.cmake ./config/toolchain/intel.cmake diff --git a/bin/batch/sbatch_ctestSP.sl b/bin/batch/sbatch_ctestSP.sl new file mode 100644 index 0000000..56da347 --- /dev/null +++ b/bin/batch/sbatch_ctestSP.sl @@ -0,0 +1,28 @@ +#!/bin/bash + +#SBATCH -p knl -C quad,flat +#SBATCH --nodes=1 +#SBATCH -t 01:00:00 +#SBATCH --mail-type=BEGIN,END,FAIL +##SBATCH --mail-user=@sandia.gov +#SBATCH --export=ALL +#SBATCH --job-name=h5_ctestS + +module load cmake +module load craype-hugepages4M + +cd build +CMD="ctest . -E TEST_PAR|H5DIFF|PERFORM -C Release -j 32 -T test" + +echo "Run $CMD. Test output will be in build/ctestS.out" +$CMD >& ctestS.out +echo "Done running $CMD" + + +#run parallel tests except t_cache_image test +CMD="ctest . -R TEST_PAR|PH5DIFF|PERFORM -E t_cache_image -C Release -T test" + +echo "Run $CMD. Test output will be in build/ctestP.out" +$CMD >& ctestP.out +echo "Done running $CMD" + -- cgit v0.12 From 12e929e1eccfe249b9a75a67c3f15cc4d1d534bc Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 29 Oct 2018 16:06:22 -0700 Subject: Fixed VOL example to use a platform-independent format specifier for size_t. --- examples/h5_vol_external_log_native.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/h5_vol_external_log_native.c b/examples/h5_vol_external_log_native.c index d6e44db..d3a5dbd 100644 --- a/examples/h5_vol_external_log_native.c +++ b/examples/h5_vol_external_log_native.c @@ -131,7 +131,7 @@ visit_cb(hid_t oid, const char *name, if(H5Iget_type(oid) == H5I_GROUP) { len = H5VLget_driver_name(oid, n, 50); - printf ("Visiting GROUP VOL name = %s %zd\n", n, len); + printf ("Visiting GROUP VOL name = %s %lu\n", n, (unsigned long)len); } if(H5Iget_type(oid) == H5I_DATASET) printf("visiting dataset\n"); @@ -184,29 +184,29 @@ int main(int argc, char **argv) { file_id = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl); len = H5VLget_driver_name(file_id, name, 25); - printf ("FILE VOL name = %s %zd\n", name, len); + printf ("FILE VOL name = %s %lu\n", name, (unsigned long)len); group_id = H5Gcreate2(file_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); len = H5VLget_driver_name(group_id, name, 50); - printf ("GROUP VOL name = %s %zd\n", name, len); + printf ("GROUP VOL name = %s %lu\n", name, (unsigned long)len); int_id = H5Tcopy(H5T_NATIVE_INT); H5Tcommit2(file_id, "int", int_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT COMMIT name = %s %zd\n", name, len); + printf ("DT COMMIT name = %s %lu\n", name, (unsigned long)len); H5Tclose(int_id); int_id = H5Topen2(file_id, "int", H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT OPEN name = %s %zd\n", name, len); + printf ("DT OPEN name = %s %lu\n", name, (unsigned long)len); H5Tclose(int_id); int_id = H5Oopen(file_id,"int",H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT OOPEN name = %s %zd\n", name, len); + printf ("DT OOPEN name = %s %lu\n", name, (unsigned long)len); len = H5Fget_name(file_id, name, 50); - printf("name = %zd %s\n", len, name); + printf("name = %lu %s\n", (unsigned long)len, name); data = malloc (sizeof(int)*nelem); for(i=0;i Date: Tue, 30 Oct 2018 09:53:20 -0700 Subject: Updated MANIFEST file. --- MANIFEST | 1 - 1 file changed, 1 deletion(-) diff --git a/MANIFEST b/MANIFEST index 5733a23..dd379de 100644 --- a/MANIFEST +++ b/MANIFEST @@ -650,7 +650,6 @@ ./src/H5FSmodule.h ./src/H5FSpkg.h ./src/H5FSprivate.h -./src/H5FSpublic.h ./src/H5FSsection.c ./src/H5FSstat.c ./src/H5FStest.c -- cgit v0.12 From 7a5e632c0dd6735269728328aa63a040e0d72e6e Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 30 Oct 2018 10:32:17 -0700 Subject: Cleaned up VOL example. --- examples/h5_vol_external_log_native.c | 145 +++++++++++++++------------------- 1 file changed, 62 insertions(+), 83 deletions(-) diff --git a/examples/h5_vol_external_log_native.c b/examples/h5_vol_external_log_native.c index d3a5dbd..26bae30 100644 --- a/examples/h5_vol_external_log_native.c +++ b/examples/h5_vol_external_log_native.c @@ -52,63 +52,63 @@ static const H5VL_class_t H5VL_log_g = { NULL, NULL, { /* attribute_cls */ - NULL, //H5VL_log_attr_create, /* create */ - NULL, //H5VL_log_attr_open, /* open */ - NULL, //H5VL_log_attr_read, /* read */ - NULL, //H5VL_log_attr_write, /* write */ - NULL, //H5VL_log_attr_get, /* get */ - NULL, //H5VL_log_attr_specific, /* specific */ - NULL, //H5VL_log_attr_optional, /* optional */ - NULL //H5VL_log_attr_close /* close */ + NULL, /* H5VL_log_attr_create, */ /* create */ + NULL, /* H5VL_log_attr_open, */ /* open */ + NULL, /* H5VL_log_attr_read, */ /* read */ + NULL, /* H5VL_log_attr_write, */ /* write */ + NULL, /* H5VL_log_attr_get, */ /* get */ + NULL, /* H5VL_log_attr_specific, */ /* specific */ + NULL, /* H5VL_log_attr_optional, */ /* optional */ + NULL /* H5VL_log_attr_close */ /* close */ }, { /* dataset_cls */ H5VL_log_dataset_create, /* create */ H5VL_log_dataset_open, /* open */ H5VL_log_dataset_read, /* read */ H5VL_log_dataset_write, /* write */ - NULL, //H5VL_log_dataset_get, /* get */ - NULL, //H5VL_log_dataset_specific, /* specific */ - NULL, //H5VL_log_dataset_optional, /* optional */ + NULL, /* H5VL_log_dataset_get, */ /* get */ + NULL, /* H5VL_log_dataset_specific, */ /* specific */ + NULL, /* H5VL_log_dataset_optional, */ /* optional */ H5VL_log_dataset_close /* close */ }, { /* datatype_cls */ H5VL_log_datatype_commit, /* commit */ H5VL_log_datatype_open, /* open */ H5VL_log_datatype_get, /* get_size */ - NULL, //H5VL_log_datatype_specific, /* specific */ - NULL, //H5VL_log_datatype_optional, /* optional */ + NULL, /* H5VL_log_datatype_specific, */ /* specific */ + NULL, /* H5VL_log_datatype_optional, */ /* optional */ H5VL_log_datatype_close /* close */ }, { /* file_cls */ - H5VL_log_file_create, /* create */ - H5VL_log_file_open, /* open */ - H5VL_log_file_get, /* get */ - NULL, //H5VL_log_file_specific, /* specific */ - NULL, //H5VL_log_file_optional, /* optional */ - H5VL_log_file_close /* close */ + H5VL_log_file_create, /* create */ + H5VL_log_file_open, /* open */ + H5VL_log_file_get, /* get */ + NULL, /* H5VL_log_file_specific, */ /* specific */ + NULL, /* H5VL_log_file_optional, */ /* optional */ + H5VL_log_file_close /* close */ }, { /* group_cls */ - H5VL_log_group_create, /* create */ - NULL, //H5VL_log_group_open, /* open */ - NULL, //H5VL_log_group_get, /* get */ - NULL, //H5VL_log_group_specific, /* specific */ - NULL, //H5VL_log_group_optional, /* optional */ - H5VL_log_group_close /* close */ + H5VL_log_group_create, /* create */ + NULL, /* H5VL_log_group_open, */ /* open */ + NULL, /* H5VL_log_group_get, */ /* get */ + NULL, /* H5VL_log_group_specific, */ /* specific */ + NULL, /* H5VL_log_group_optional, */ /* optional */ + H5VL_log_group_close /* close */ }, { /* link_cls */ - NULL, //H5VL_log_link_create, /* create */ - NULL, //H5VL_log_link_copy, /* copy */ - NULL, //H5VL_log_link_move, /* move */ - NULL, //H5VL_log_link_get, /* get */ - NULL, //H5VL_log_link_specific, /* specific */ - NULL, //H5VL_log_link_optional, /* optional */ + NULL, /* H5VL_log_link_create, */ /* create */ + NULL, /* H5VL_log_link_copy, */ /* copy */ + NULL, /* H5VL_log_link_move, */ /* move */ + NULL, /* H5VL_log_link_get, */ /* get */ + NULL, /* H5VL_log_link_specific, */ /* specific */ + NULL, /* H5VL_log_link_optional, */ /* optional */ }, { /* object_cls */ - H5VL_log_object_open, /* open */ - NULL, //H5VL_log_object_copy, /* copy */ - NULL, //H5VL_log_object_get, /* get */ - H5VL_log_object_specific, /* specific */ - NULL, //H5VL_log_object_optional, /* optional */ + H5VL_log_object_open, /* open */ + NULL, /* H5VL_log_object_copy, */ /* copy */ + NULL, /* H5VL_log_object_get, */ /* get */ + H5VL_log_object_specific, /* specific */ + NULL, /* H5VL_log_object_optional, */ /* optional */ }, { NULL, @@ -123,8 +123,7 @@ typedef struct H5VL_log_t { } H5VL_log_t; static herr_t -visit_cb(hid_t oid, const char *name, - const H5O_info_t *oinfo, void *udata) +visit_cb(hid_t oid, const char *name, const H5O_info_t *oinfo, void *udata) { ssize_t len; char n[25]; @@ -139,9 +138,11 @@ visit_cb(hid_t oid, const char *name, printf("visiting datatype\n"); return 1; -} /* end h5_verify_cached_stabs_cb() */ +} -int main(int argc, char **argv) { +int +main(int argc, char **argv) +{ const char file_name[]="large_dataset.h5"; const char group_name[]="/Group"; const char dataset_name[]="Data"; @@ -184,33 +185,33 @@ int main(int argc, char **argv) { file_id = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl); len = H5VLget_driver_name(file_id, name, 25); - printf ("FILE VOL name = %s %lu\n", name, (unsigned long)len); + printf("FILE VOL name = %s %lu\n", name, (unsigned long)len); group_id = H5Gcreate2(file_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); len = H5VLget_driver_name(group_id, name, 50); - printf ("GROUP VOL name = %s %lu\n", name, (unsigned long)len); + printf("GROUP VOL name = %s %lu\n", name, (unsigned long)len); int_id = H5Tcopy(H5T_NATIVE_INT); H5Tcommit2(file_id, "int", int_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT COMMIT name = %s %lu\n", name, (unsigned long)len); + printf("DT COMMIT name = %s %lu\n", name, (unsigned long)len); H5Tclose(int_id); int_id = H5Topen2(file_id, "int", H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT OPEN name = %s %lu\n", name, (unsigned long)len); + printf("DT OPEN name = %s %lu\n", name, (unsigned long)len); H5Tclose(int_id); int_id = H5Oopen(file_id,"int",H5P_DEFAULT); len = H5VLget_driver_name(int_id, name, 50); - printf ("DT OOPEN name = %s %lu\n", name, (unsigned long)len); + printf("DT OPEN name = %s %lu\n", name, (unsigned long)len); len = H5Fget_name(file_id, name, 50); printf("name = %lu %s\n", (unsigned long)len, name); - data = malloc (sizeof(int)*nelem); - for(i=0;i Date: Tue, 30 Oct 2018 14:44:54 -0700 Subject: Removed a couple of extraneous commas from VOL example. --- examples/h5_vol_external_log_native.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/h5_vol_external_log_native.c b/examples/h5_vol_external_log_native.c index 26bae30..616214d 100644 --- a/examples/h5_vol_external_log_native.c +++ b/examples/h5_vol_external_log_native.c @@ -101,14 +101,14 @@ static const H5VL_class_t H5VL_log_g = { NULL, /* H5VL_log_link_move, */ /* move */ NULL, /* H5VL_log_link_get, */ /* get */ NULL, /* H5VL_log_link_specific, */ /* specific */ - NULL, /* H5VL_log_link_optional, */ /* optional */ + NULL /* H5VL_log_link_optional, */ /* optional */ }, { /* object_cls */ H5VL_log_object_open, /* open */ NULL, /* H5VL_log_object_copy, */ /* copy */ NULL, /* H5VL_log_object_get, */ /* get */ H5VL_log_object_specific, /* specific */ - NULL, /* H5VL_log_object_optional, */ /* optional */ + NULL /* H5VL_log_object_optional, */ /* optional */ }, { NULL, -- cgit v0.12 From d1d2cf776d4f7b809e3cc1bda1a001ea147dfa89 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Tue, 30 Oct 2018 16:53:09 -0500 Subject: Fix for HDFFV-10554 use_append_chunks in swmr use case test failure Fix the timing issue of the test by moving the open/close of the test file for the writer to use_append_chunk.c and use_append_mchunks.c. --- test/use.h | 2 +- test/use_append_chunk.c | 67 ++++++++++++++++++++++++++++++++++------------ test/use_append_mchunks.c | 68 +++++++++++++++++++++++++++++++++++------------ test/use_common.c | 32 +++++----------------- 4 files changed, 109 insertions(+), 60 deletions(-) diff --git a/test/use.h b/test/use.h index 0885cc5..54d9b26 100644 --- a/test/use.h +++ b/test/use.h @@ -58,6 +58,6 @@ int setup_parameters(int argc, char * const argv[]); void show_parameters(void); void usage(const char *prog); int create_uc_file(void); -int write_uc_file(hbool_t tosend); +int write_uc_file(hbool_t tosend, hid_t fid); int read_uc_file(hbool_t towait); diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c index 005eb51..7dda732 100644 --- a/test/use_append_chunk.c +++ b/test/use_append_chunk.c @@ -124,6 +124,9 @@ main(int argc, char *argv[]) int ret_value = 0; int child_ret_value; hbool_t send_wait = FALSE; + hid_t fapl = -1; /* File access property list */ + hid_t fid = -1; /* File ID */ + char *name; /* Test file name */ /* initialization */ if (setup_parameters(argc, argv) < 0){ @@ -182,29 +185,59 @@ main(int argc, char *argv[]) /* ============= */ /* this process continues to launch the writer */ printf("%d: continue as the writer process\n", mypid); - if (write_uc_file(send_wait) < 0){ - fprintf(stderr, "write_uc_file encountered error\n"); - Hgoto_error(1); + + name = UC_opts.filename; + + /* Set file access proeprty list */ + if((fapl = h5_fileaccess()) < 0) + Hgoto_error(1); + + if(UC_opts.use_swmr) + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) + Hgoto_error(1); + + /* Open the file */ + if((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0) { + fprintf(stderr, "H5Fopen failed\n"); + Hgoto_error(1); + } + + if(write_uc_file(send_wait, fid) < 0) { + fprintf(stderr, "write_uc_file encountered error\n"); + Hgoto_error(1); } /* ================================================ */ /* If readwrite, collect exit code of child process */ /* ================================================ */ if (UC_opts.launch == UC_READWRITE){ - if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0){ - HDperror("waitpid"); - Hgoto_error(1); - } - if (WIFEXITED(child_status)){ - if ((child_ret_value=WEXITSTATUS(child_status)) != 0){ - printf("%d: child process exited with non-zero code (%d)\n", - mypid, child_ret_value); - Hgoto_error(2); - } - } else { - printf("%d: child process terminated abnormally\n", mypid); - Hgoto_error(2); - } + if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0){ + HDperror("waitpid"); + Hgoto_error(1); + } + + /* Close the file */ + if(H5Fclose(fid) < 0) { + fprintf(stderr, "Failed to close file id\n"); + Hgoto_error(1); + } + + /* Close the property list */ + if(H5Pclose(fapl) < 0) { + fprintf(stderr, "Failed to property list\n"); + Hgoto_error(1); + } + + if (WIFEXITED(child_status)){ + if ((child_ret_value=WEXITSTATUS(child_status)) != 0){ + printf("%d: child process exited with non-zero code (%d)\n", + mypid, child_ret_value); + Hgoto_error(2); + } + } else { + printf("%d: child process terminated abnormally\n", mypid); + Hgoto_error(2); + } } done: diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c index 9ee37cb..2dc7bdb 100644 --- a/test/use_append_mchunks.c +++ b/test/use_append_mchunks.c @@ -117,6 +117,9 @@ main(int argc, char *argv[]) int ret_value = 0; int child_ret_value; hbool_t send_wait = 0; + hid_t fapl = -1; /* File access property list */ + hid_t fid = -1; /* File ID */ + char *name; /* Test file name */ /* initialization */ if (setup_parameters(argc, argv) < 0){ @@ -175,29 +178,60 @@ main(int argc, char *argv[]) /* ============= */ /* this process continues to launch the writer */ printf("%d: continue as the writer process\n", mypid); - if (write_uc_file(send_wait) < 0){ - fprintf(stderr, "write_uc_file encountered error\n"); - Hgoto_error(1); + + name = UC_opts.filename; + + /* Set the file access property list */ + if((fapl = h5_fileaccess()) < 0) + Hgoto_error(1); + + if(UC_opts.use_swmr) + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) + Hgoto_error(1); + + /* Open the file */ + if((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0) { + fprintf(stderr, "H5Fopen failed\n"); + Hgoto_error(1); + } + + if(write_uc_file(send_wait, fid) < 0) { + fprintf(stderr, "write_uc_file encountered error\n"); + Hgoto_error(1); } + /* ================================================ */ /* If readwrite, collect exit code of child process */ /* ================================================ */ if (UC_opts.launch == UC_READWRITE){ - if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0){ - perror("waitpid"); - Hgoto_error(1); - } - if (WIFEXITED(child_status)){ - if ((child_ret_value=WEXITSTATUS(child_status)) != 0){ - printf("%d: child process exited with non-zero code (%d)\n", - mypid, child_ret_value); - Hgoto_error(2); - } - } else { - printf("%d: child process terminated abnormally\n", mypid); - Hgoto_error(2); - } + if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0){ + perror("waitpid"); + Hgoto_error(1); + } + + /* Close the file */ + if(H5Fclose(fid) < 0) { + fprintf(stderr, "Failed to close file id\n"); + Hgoto_error(1); + } + + /* Close the property list */ + if(H5Pclose(fapl) < 0) { + fprintf(stderr, "Failed to property list\n"); + Hgoto_error(1); + } + + if (WIFEXITED(child_status)){ + if ((child_ret_value=WEXITSTATUS(child_status)) != 0){ + printf("%d: child process exited with non-zero code (%d)\n", + mypid, child_ret_value); + Hgoto_error(1); + } + } else { + printf("%d: child process terminated abnormally\n", mypid); + Hgoto_error(2); + } } done: diff --git a/test/use_common.c b/test/use_common.c index 5aa6692..164480f 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -252,13 +252,10 @@ int create_uc_file(void) * * Return: 0 succeed; -1 fail. */ -int write_uc_file(hbool_t tosend) +int write_uc_file(hbool_t tosend, hid_t fid) { - hid_t fid; /* File ID for new HDF5 file */ hid_t dsid; /* dataset ID */ - hid_t fapl; /* File access property list */ hid_t dcpl; /* Dataset creation property list */ - char *name; UC_CTYPE *buffer, *bufptr; /* data buffer */ hsize_t cz=UC_opts.chunksize; /* Chunk size */ hid_t f_sid; /* dataset file space id */ @@ -270,19 +267,6 @@ int write_uc_file(hbool_t tosend) hsize_t start[3] = {0,0,0}, count[3]; /* Hyperslab selection values */ hsize_t i, j, k; - name = UC_opts.filename; - - /* Open the file */ - if((fapl = h5_fileaccess()) < 0) - return -1; - if(UC_opts.use_swmr) - if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) - return -1; - if((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0){ - fprintf(stderr, "H5Fopen failed\n"); - return -1; - } - if(tosend) /* Send a message that H5Fopen is complete--releasing the file lock */ h5_send_message(WRITER_MESSAGE, NULL, NULL); @@ -427,14 +411,6 @@ int write_uc_file(hbool_t tosend) fprintf(stderr, "Failed to close file space\n"); return -1; } - if (H5Pclose(fapl) < 0){ - fprintf(stderr, "Failed to property list\n"); - return -1; - } - if (H5Fclose(fid) < 0){ - fprintf(stderr, "Failed to close file id\n"); - return -1; - } return 0; } @@ -645,6 +621,12 @@ int read_uc_file(hbool_t towait) } } + /* Close the file */ + if(H5Fclose(fid) < 0) { + fprintf(stderr, "H5Fclose failed\n"); + return -1; + } + if (nreadererr) return -1; else -- cgit v0.12 From b72e926ed0c981d14d5219b32042c3d0b938d1e1 Mon Sep 17 00:00:00 2001 From: Songyu Lu Date: Wed, 31 Oct 2018 09:54:08 -0500 Subject: A trivial change to reformat a comment. The purpose is simply to try out Git. --- src/H5Dchunk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 30a9a3b..22dc05a 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2784,8 +2784,8 @@ done: /*------------------------------------------------------------------------- * Function: H5D__chunk_hash_val * - * Purpose: To calculate an index based on the dataset's scaled coordinates and - * sizes of the faster dimensions. + * Purpose: To calculate an index based on the dataset's scaled + * coordinates and sizes of the faster dimensions. * * Return: Hash value index * -- cgit v0.12 From 4f62c084f1b0502bc984edd8ce380bea22518bd3 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Thu, 1 Nov 2018 12:03:34 -0500 Subject: Fixed fprintf to HDfprintf in the following routines: 1) read_uc_file() in use_common.c 2) main() of use_append_chunk.c and use_append_mchunks.c --- test/use_append_chunk.c | 60 ++++++++++++------------- test/use_append_mchunks.c | 54 +++++++++++----------- test/use_common.c | 112 +++++++++++++++++++++++----------------------- 3 files changed, 113 insertions(+), 113 deletions(-) diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c index 7dda732..fb906b6 100644 --- a/test/use_append_chunk.c +++ b/test/use_append_chunk.c @@ -130,7 +130,7 @@ main(int argc, char *argv[]) /* initialization */ if (setup_parameters(argc, argv) < 0){ - Hgoto_error(1); + Hgoto_error(1); } /* Determine the need to send/wait message file*/ @@ -148,20 +148,20 @@ main(int argc, char *argv[]) /* Create file */ /* ============*/ if (UC_opts.launch != UC_READER){ - printf("Creating skeleton data file for test...\n"); - if (create_uc_file() < 0){ - fprintf(stderr, "***encounter error\n"); - Hgoto_error(1); - }else - printf("File created.\n"); + HDprintf("Creating skeleton data file for test...\n"); + if (create_uc_file() < 0){ + HDfprintf(stderr, "***encounter error\n"); + Hgoto_error(1); + }else + HDprintf("File created.\n"); } if (UC_opts.launch==UC_READWRITE){ - /* fork process */ - if((childpid = HDfork()) < 0) { - HDperror("fork"); - Hgoto_error(1); - }; + /* fork process */ + if((childpid = HDfork()) < 0) { + HDperror("fork"); + Hgoto_error(1); + }; }; mypid = HDgetpid(); @@ -169,22 +169,22 @@ main(int argc, char *argv[]) /* launch reader */ /* ============= */ if (UC_opts.launch != UC_WRITER){ - /* child process launch the reader */ - if(0 == childpid) { - printf("%d: launch reader process\n", mypid); - if (read_uc_file(send_wait) < 0){ - fprintf(stderr, "read_uc_file encountered error\n"); - exit(1); - } - exit(0); - } + /* child process launch the reader */ + if(0 == childpid) { + HDprintf("%d: launch reader process\n", mypid); + if (read_uc_file(send_wait) < 0){ + HDfprintf(stderr, "read_uc_file encountered error\n"); + exit(1); + } + exit(0); + } } /* ============= */ /* launch writer */ /* ============= */ /* this process continues to launch the writer */ - printf("%d: continue as the writer process\n", mypid); + HDprintf("%d: continue as the writer process\n", mypid); name = UC_opts.filename; @@ -198,12 +198,12 @@ main(int argc, char *argv[]) /* Open the file */ if((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0) { - fprintf(stderr, "H5Fopen failed\n"); + HDfprintf(stderr, "H5Fopen failed\n"); Hgoto_error(1); } if(write_uc_file(send_wait, fid) < 0) { - fprintf(stderr, "write_uc_file encountered error\n"); + HDfprintf(stderr, "write_uc_file encountered error\n"); Hgoto_error(1); } @@ -218,24 +218,24 @@ main(int argc, char *argv[]) /* Close the file */ if(H5Fclose(fid) < 0) { - fprintf(stderr, "Failed to close file id\n"); + HDfprintf(stderr, "Failed to close file id\n"); Hgoto_error(1); } /* Close the property list */ if(H5Pclose(fapl) < 0) { - fprintf(stderr, "Failed to property list\n"); + HDfprintf(stderr, "Failed to close the property list\n"); Hgoto_error(1); } if (WIFEXITED(child_status)){ if ((child_ret_value=WEXITSTATUS(child_status)) != 0){ - printf("%d: child process exited with non-zero code (%d)\n", + HDprintf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value); Hgoto_error(2); } } else { - printf("%d: child process terminated abnormally\n", mypid); + HDprintf("%d: child process terminated abnormally\n", mypid); Hgoto_error(2); } } @@ -243,9 +243,9 @@ main(int argc, char *argv[]) done: /* Print result and exit */ if (ret_value != 0){ - printf("Error(s) encountered\n"); + HDprintf("Error(s) encountered\n"); }else{ - printf("All passed\n"); + HDprintf("All passed\n"); } return(ret_value); diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c index 2dc7bdb..da7e2b3 100644 --- a/test/use_append_mchunks.c +++ b/test/use_append_mchunks.c @@ -123,7 +123,7 @@ main(int argc, char *argv[]) /* initialization */ if (setup_parameters(argc, argv) < 0){ - Hgoto_error(1); + Hgoto_error(1); } /* Determine the need to send/wait message file*/ @@ -141,20 +141,20 @@ main(int argc, char *argv[]) /* Create file */ /* ============*/ if (UC_opts.launch != UC_READER){ - printf("Creating skeleton data file for test...\n"); + HDprintf("Creating skeleton data file for test...\n"); if (create_uc_file() < 0){ - fprintf(stderr, "***encounter error\n"); + HDfprintf(stderr, "***encounter error\n"); Hgoto_error(1); }else - printf("File created.\n"); + HDprintf("File created.\n"); } if (UC_opts.launch==UC_READWRITE){ - /* fork process */ - if((childpid = fork()) < 0) { - perror("fork"); - Hgoto_error(1); - }; + /* fork process */ + if((childpid = fork()) < 0) { + perror("fork"); + Hgoto_error(1); + }; }; mypid = getpid(); @@ -162,22 +162,22 @@ main(int argc, char *argv[]) /* launch reader */ /* ============= */ if (UC_opts.launch != UC_WRITER){ - /* child process launch the reader */ - if(0 == childpid) { - printf("%d: launch reader process\n", mypid); - if (read_uc_file(send_wait) < 0){ - fprintf(stderr, "read_uc_file encountered error\n"); - exit(1); - } - exit(0); - } + /* child process launch the reader */ + if(0 == childpid) { + HDprintf("%d: launch reader process\n", mypid); + if (read_uc_file(send_wait) < 0){ + HDfprintf(stderr, "read_uc_file encountered error\n"); + exit(1); + } + exit(0); + } } /* ============= */ /* launch writer */ /* ============= */ /* this process continues to launch the writer */ - printf("%d: continue as the writer process\n", mypid); + HDprintf("%d: continue as the writer process\n", mypid); name = UC_opts.filename; @@ -191,12 +191,12 @@ main(int argc, char *argv[]) /* Open the file */ if((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0) { - fprintf(stderr, "H5Fopen failed\n"); + HDfprintf(stderr, "H5Fopen failed\n"); Hgoto_error(1); } if(write_uc_file(send_wait, fid) < 0) { - fprintf(stderr, "write_uc_file encountered error\n"); + HDfprintf(stderr, "write_uc_file encountered error\n"); Hgoto_error(1); } @@ -212,24 +212,24 @@ main(int argc, char *argv[]) /* Close the file */ if(H5Fclose(fid) < 0) { - fprintf(stderr, "Failed to close file id\n"); + HDfprintf(stderr, "Failed to close file id\n"); Hgoto_error(1); } /* Close the property list */ if(H5Pclose(fapl) < 0) { - fprintf(stderr, "Failed to property list\n"); + HDfprintf(stderr, "Failed to close the property list\n"); Hgoto_error(1); } if (WIFEXITED(child_status)){ if ((child_ret_value=WEXITSTATUS(child_status)) != 0){ - printf("%d: child process exited with non-zero code (%d)\n", + HDprintf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value); Hgoto_error(1); } } else { - printf("%d: child process terminated abnormally\n", mypid); + HDprintf("%d: child process terminated abnormally\n", mypid); Hgoto_error(2); } } @@ -237,9 +237,9 @@ main(int argc, char *argv[]) done: /* Print result and exit */ if (ret_value != 0){ - printf("Error(s) encountered\n"); + HDprintf("Error(s) encountered\n"); }else{ - printf("All passed\n"); + HDprintf("All passed\n"); } return(ret_value); diff --git a/test/use_common.c b/test/use_common.c index 164480f..3ecb2e1 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -447,7 +447,7 @@ int read_uc_file(hbool_t towait) /* Before reading, wait for the message that H5Fopen is complete--file lock is released */ if(towait && h5_wait_message(WRITER_MESSAGE) < 0) { - fprintf(stderr, "Cannot find writer message file...failed\n"); + HDfprintf(stderr, "Cannot find writer message file...failed\n"); return -1; } @@ -457,19 +457,19 @@ int read_uc_file(hbool_t towait) if((fapl = h5_fileaccess()) < 0) return -1; if((fid = H5Fopen(name, H5F_ACC_RDONLY | (UC_opts.use_swmr ? H5F_ACC_SWMR_READ : 0), fapl)) < 0){ - fprintf(stderr, "H5Fopen failed\n"); + HDfprintf(stderr, "H5Fopen failed\n"); return -1; } if (H5Pclose(fapl) < 0){ - fprintf(stderr, "Failed to property list\n"); + HDfprintf(stderr, "Failed to property list\n"); return -1; } /* Open the dataset of the program name */ if((dsid = H5Dopen2(fid, progname_g, H5P_DEFAULT)) < 0){ - fprintf(stderr, "H5Dopen2 failed\n"); - return -1; + HDfprintf(stderr, "H5Dopen2 failed\n"); + return -1; } /* allocate space for data buffer 1 X dims[1] X dims[2] of UC_CTYPE */ @@ -477,8 +477,8 @@ int read_uc_file(hbool_t towait) memdims[1] = UC_opts.dims[1]; memdims[2] = UC_opts.dims[2]; if ((buffer=(UC_CTYPE*)HDmalloc((size_t)memdims[1]*(size_t)memdims[2]*sizeof(UC_CTYPE)))==NULL) { - fprintf(stderr, "malloc: failed\n"); - return -1; + HDfprintf(stderr, "malloc: failed\n"); + return -1; }; /* @@ -488,31 +488,31 @@ int read_uc_file(hbool_t towait) f_sid = H5Dget_space(dsid); /* Get filespace handle first. */ rank = H5Sget_simple_extent_ndims(f_sid); if (rank != UC_RANK){ - fprintf(stderr, "rank(%d) of dataset does not match\n", rank); - return -1; + HDfprintf(stderr, "rank(%d) of dataset does not match\n", rank); + return -1; } if (H5Sget_simple_extent_dims(f_sid, dims, NULL) < 0){ - fprintf(stderr, "H5Sget_simple_extent_dims got error\n"); - return -1; + HDfprintf(stderr, "H5Sget_simple_extent_dims got error\n"); + return -1; } - printf("dataset rank %d, dimensions %llu x %llu x %llu\n", - rank, (unsigned long long)(dims[0]), (unsigned long long)(dims[1]), - (unsigned long long)(dims[2])); + HDprintf("dataset rank %d, dimensions %llu x %llu x %llu\n", + rank, (unsigned long long)(dims[0]), (unsigned long long)(dims[1]), + (unsigned long long)(dims[2])); /* verify that file space dims are as expected and are consistent with memory space dims */ if (dims[1] != memdims[1] || dims[2] != memdims[2]){ - fprintf(stderr, "dataset dimension is not as expected. Got dims=(%llu,%llu,%llu)\n", - (unsigned long long)dims[0], (unsigned long long)dims[1], + HDfprintf(stderr, "dataset dimension is not as expected. Got dims=(%llu,%llu,%llu)\n", + (unsigned long long)dims[0], (unsigned long long)dims[1], (unsigned long long)dims[2]); - fprintf(stderr, "But memdims=(%llu,%llu,%llu)\n", - (unsigned long long)memdims[0], (unsigned long long)memdims[1], + HDfprintf(stderr, "But memdims=(%llu,%llu,%llu)\n", + (unsigned long long)memdims[0], (unsigned long long)memdims[1], (unsigned long long)memdims[2]); - return -1; + return -1; } /* setup mem-space for buffer */ if ((m_sid=H5Screate_simple(rank, memdims, NULL))<0){ - fprintf(stderr, "H5Screate_simple for memory failed\n"); - return -1; + HDfprintf(stderr, "H5Screate_simple for memory failed\n"); + return -1; }; /* Read 1 plane at a time whenever the dataset grows larger @@ -526,22 +526,22 @@ int read_uc_file(hbool_t towait) /* print progress message according to if new planes are availalbe */ if (nplane_old < dims[0]) { if (nonewplane){ - /* end the previous message */ - printf("\n"); - nonewplane=0; + /* end the previous message */ + HDprintf("\n"); + nonewplane=0; } - printf("reading planes %llu to %llu\n", (unsigned long long)nplane_old, + HDprintf("reading planes %llu to %llu\n", (unsigned long long)nplane_old, (unsigned long long)dims[0]); }else{ if (nonewplane){ - printf("."); + HDprintf("."); if (nonewplane>=30){ - fprintf(stderr, "waited too long for new plane, quit.\n"); + HDfprintf(stderr, "waited too long for new plane, quit.\n"); return -1; } }else{ - /* print mesg only the first time; dots still no new plane */ - printf("no new planes to read "); + /* print mesg only the first time; dots still no new plane */ + HDprintf("no new planes to read "); } nonewplane++; /* pause for a second */ @@ -551,41 +551,41 @@ int read_uc_file(hbool_t towait) /* read planes between last old nplanes and current extent */ /* Get the dataset's dataspace */ if((f_sid = H5Dget_space(dsid)) < 0){ - fprintf(stderr, "H5Dget_space failed\n"); - return -1; + HDfprintf(stderr, "H5Dget_space failed\n"); + return -1; } start[0]=nplane; /* Choose the next plane to read */ if(H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, start, NULL, count, NULL) < 0){ - fprintf(stderr, "H5Sselect_hyperslab failed\n"); - return -1; + HDfprintf(stderr, "H5Sselect_hyperslab failed\n"); + return -1; } /* Read the plane from the dataset */ if(H5Dread(dsid, UC_DATATYPE, m_sid, f_sid, H5P_DEFAULT, buffer) < 0){ - fprintf(stderr, "H5Dread failed\n"); - return -1; + HDfprintf(stderr, "H5Dread failed\n"); + return -1; } /* compare read data with expected data value which is nplane */ bufptr = buffer; nerrs=0; for (j=0; j Date: Thu, 1 Nov 2018 15:00:40 -0500 Subject: Fixed exit() to HDexit() in use_append_chunk.c and use_append_mchunks.c --- test/use_append_chunk.c | 4 ++-- test/use_append_mchunks.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c index fb906b6..4e8c672 100644 --- a/test/use_append_chunk.c +++ b/test/use_append_chunk.c @@ -174,9 +174,9 @@ main(int argc, char *argv[]) HDprintf("%d: launch reader process\n", mypid); if (read_uc_file(send_wait) < 0){ HDfprintf(stderr, "read_uc_file encountered error\n"); - exit(1); + HDexit(1); } - exit(0); + HDexit(0); } } diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c index da7e2b3..0414628 100644 --- a/test/use_append_mchunks.c +++ b/test/use_append_mchunks.c @@ -167,9 +167,9 @@ main(int argc, char *argv[]) HDprintf("%d: launch reader process\n", mypid); if (read_uc_file(send_wait) < 0){ HDfprintf(stderr, "read_uc_file encountered error\n"); - exit(1); + HDexit(1); } - exit(0); + HDexit(0); } } -- cgit v0.12