diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2021-07-06 18:21:42 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2021-07-06 18:21:42 (GMT) |
commit | 820695a78e3a277daea1bdcbb8ad54b8ee6650a5 (patch) | |
tree | fe7545305c0a77db3b9671e5a82fdffc4b2cc82e /testpar | |
parent | 9f13ecfa2e93840d1cc45dbf0bfcf8b955814931 (diff) | |
parent | 18bbd3f0a7f14adeebf8f342ed242ff191f9b7c5 (diff) | |
download | hdf5-hdf5-1_12_1.zip hdf5-hdf5-1_12_1.tar.gz hdf5-hdf5-1_12_1.tar.bz2 |
Merge remote-tracking branch 'origin/hdf5_1_12_1' into 1.12/master forhdf5-1_12_1
HDF5 1.12.1 release.
Diffstat (limited to 'testpar')
34 files changed, 676 insertions, 527 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index d88e27f..ff4446c 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -22,8 +22,9 @@ set (testphdf5_SOURCES #-- Adding test for testhdf5 add_executable (testphdf5 ${testphdf5_SOURCES}) +target_compile_options(testphdf5 PRIVATE "${HDF5_CMAKE_C_FLAGS}") target_include_directories (testphdf5 - PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" + PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" ) if (NOT BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (testphdf5 STATIC) @@ -38,10 +39,18 @@ else () endif () set_target_properties (testphdf5 PROPERTIES FOLDER test/par) -MACRO (ADD_H5P_EXE file) +#----------------------------------------------------------------------------- +# Add Target to clang-format +#----------------------------------------------------------------------------- +if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_TEST_PAR_testphdf5_FORMAT testphdf5) +endif () + +macro (ADD_H5P_EXE file) add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) + target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}") target_include_directories (${file} - PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" + PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" ) if (NOT BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (${file} STATIC) @@ -57,7 +66,14 @@ MACRO (ADD_H5P_EXE file) ) endif () set_target_properties (${file} PROPERTIES FOLDER test/par) -ENDMACRO (ADD_H5P_EXE file) + + #----------------------------------------------------------------------------- + # Add Target to clang-format + #----------------------------------------------------------------------------- + if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_TEST_PAR_${file}_FORMAT ${file}) + endif () +endmacro (ADD_H5P_EXE file) set (H5P_TESTS t_mpi diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake index 5848c60..ee69881 100644 --- a/testpar/CMakeTests.cmake +++ b/testpar/CMakeTests.cmake @@ -5,7 +5,7 @@ # 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. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake index 4d6b18c..f50ca16 100644 --- a/testpar/CMakeVFDTests.cmake +++ b/testpar/CMakeVFDTests.cmake @@ -5,7 +5,7 @@ # 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. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # @@ -30,7 +30,7 @@ set (H5P_VFD_TESTS t_pflush2 ) -if (DIRECT_VFD) +if (H5_HAVE_DIRECT) set (VFD_LIST ${VFD_LIST} direct) endif () @@ -58,9 +58,9 @@ macro (ADD_VFD_TEST vfdname resultcode) WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}/${vfdname} ) endforeach () - set_tests_properties (MPI_TEST_VFD-${vfdname}-pflush1 PROPERTIES WILL_FAIL "true") + set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush1 PROPERTIES WILL_FAIL "true") #set_property (TEST MPI_TEST_t_pflush1 PROPERTY PASS_REGULAR_EXPRESSION "PASSED") - set_tests_properties (MPI_TEST_VFD-${vfdname}-pflush2 PROPERTIES DEPENDS MPI_TEST_VFD-${vfdname}-pflush1) + set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush2 PROPERTIES DEPENDS MPI_TEST_VFD-${vfdname}-t_pflush1) endif () endmacro () diff --git a/testpar/COPYING b/testpar/COPYING deleted file mode 100644 index 6497ace..0000000 --- a/testpar/COPYING +++ /dev/null @@ -1,13 +0,0 @@ - - Copyright by The HDF Group and - The Board of Trustees of the University of Illinois. - All rights reserved. - - The files and subdirectories in this directory are 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. - diff --git a/testpar/Makefile.am b/testpar/Makefile.am index 0cdba24..eeea2f5 100644 --- a/testpar/Makefile.am +++ b/testpar/Makefile.am @@ -6,7 +6,7 @@ # 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. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. ## @@ -24,7 +24,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test # Test scripts-- # testpflush.sh: TEST_SCRIPT_PARA = testpflush.sh -SCRIPT_DEPEND = t_pflush1$(EXEEXT) t_pflush2$(EXEEXT) +SCRIPT_DEPEND = t_pflush1$(EXEEXT) t_pflush2$(EXEEXT) check_SCRIPTS = $(TEST_SCRIPT_PARA) diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 0bb5d05..9439756 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -22,7 +22,7 @@ # 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. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # @@ -114,6 +114,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ $(top_srcdir)/m4/ax_check_junit.m4 \ $(top_srcdir)/m4/ax_java_options.m4 \ $(top_srcdir)/m4/ax_jni_include_dir.m4 \ + $(top_srcdir)/m4/ax_prog_doxygen.m4 \ $(top_srcdir)/m4/ax_prog_jar.m4 \ $(top_srcdir)/m4/ax_prog_java.m4 \ $(top_srcdir)/m4/ax_prog_java_works.m4 \ @@ -471,7 +472,7 @@ am__set_b = \ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/testpflush.sh.in \ $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver \ $(top_srcdir)/config/commence.am \ - $(top_srcdir)/config/conclude.am COPYING + $(top_srcdir)/config/conclude.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ @@ -479,7 +480,7 @@ AMTAR = @AMTAR@ # H5_CFLAGS holds flags that should be used when building hdf5, # but which should not be exported to h5cc for building other programs. -# AM_CFLAGS is an automake construct which should be used by Makefiles +# AM_CFLAGS is an automake construct which should be used by Makefiles # instead of CFLAGS, as CFLAGS is reserved solely for the user to define. # This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @@ -505,6 +506,7 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_VERSION = @CC_VERSION@ CFLAGS = @CFLAGS@ +CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@ CODESTACK = @CODESTACK@ CONFIG_DATE = @CONFIG_DATE@ CONFIG_MODE = @CONFIG_MODE@ @@ -521,11 +523,54 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ -DEV_WARNINGS = @DEV_WARNINGS@ +DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@ +DIAGS = @DIAGS@ DIRECT_VFD = @DIRECT_VFD@ DLLTOOL = @DLLTOOL@ +DOXYGEN_EXAMPLES_DIRECTORY = @DOXYGEN_EXAMPLES_DIRECTORY@ +DOXYGEN_EXTERNAL_SEARCH = @DOXYGEN_EXTERNAL_SEARCH@ +DOXYGEN_HTML_EXTRA_FILES = @DOXYGEN_HTML_EXTRA_FILES@ +DOXYGEN_HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@ +DOXYGEN_HTML_FOOTER = @DOXYGEN_HTML_FOOTER@ +DOXYGEN_HTML_HEADER = @DOXYGEN_HTML_HEADER@ +DOXYGEN_INCLUDE_ALIASES = @DOXYGEN_INCLUDE_ALIASES@ +DOXYGEN_INPUT_DIRECTORY = @DOXYGEN_INPUT_DIRECTORY@ +DOXYGEN_LAYOUT_FILE = @DOXYGEN_LAYOUT_FILE@ +DOXYGEN_MACRO_EXPANSION = @DOXYGEN_MACRO_EXPANSION@ +DOXYGEN_OPTIMIZE_OUTPUT_FOR_C = @DOXYGEN_OPTIMIZE_OUTPUT_FOR_C@ +DOXYGEN_OUTPUT_DIRECTORY = @DOXYGEN_OUTPUT_DIRECTORY@ +DOXYGEN_PACKAGE = @DOXYGEN_PACKAGE@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DOXYGEN_PROJECT_BRIEF = @DOXYGEN_PROJECT_BRIEF@ +DOXYGEN_PROJECT_LOGO = @DOXYGEN_PROJECT_LOGO@ +DOXYGEN_SEARCHENGINE_URL = @DOXYGEN_SEARCHENGINE_URL@ +DOXYGEN_SERVER_BASED_SEARCH = @DOXYGEN_SERVER_BASED_SEARCH@ +DOXYGEN_VERSION_STRING = @DOXYGEN_VERSION_STRING@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ @@ -559,6 +604,7 @@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ H5_FCFLAGS = @H5_FCFLAGS@ H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ +H5_IS_DARWIN = @H5_IS_DARWIN@ H5_JAVACFLAGS = @H5_JAVACFLAGS@ H5_JAVAFLAGS = @H5_JAVAFLAGS@ H5_JNIFLAGS = @H5_JNIFLAGS@ @@ -569,6 +615,7 @@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ +HDF5_DOXYGEN = @HDF5_DOXYGEN@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF5_TESTS = @HDF5_TESTS@ @@ -581,6 +628,7 @@ HL = @HL@ HL_FOR = @HL_FOR@ HSIZE_T = @HSIZE_T@ HSSIZE_T = @HSSIZE_T@ +IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -618,6 +666,7 @@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAP_API = @MAP_API@ MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@ +MIRROR_VFD = @MIRROR_VFD@ MKDIR_P = @MKDIR_P@ MPE = @MPE@ NM = @NM@ @@ -654,6 +703,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PREADWRITE = @PREADWRITE@ PROFILING = @PROFILING@ RANLIB = @RANLIB@ +RECURSIVE_RW_LOCKS = @RECURSIVE_RW_LOCKS@ ROOT = @ROOT@ ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ @@ -677,6 +727,7 @@ TIME = @TIME@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ +USE_FILE_LOCKING = @USE_FILE_LOCKING@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ @@ -769,15 +820,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la -# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below -# has been removed. According to the official description of DESTDIR by Gnu at -# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is -# prepended to the normal and complete install path that it precedes for the -# purpose of installing in a temporary directory which is useful for building -# rpms and other packages. The '/' after ${DESTDIR} will be followed by another -# '/' at the beginning of the normal install path. When DESTDIR is empty the -# path then begins with '//', which is incorrect and causes problems at least for -# Cygwin. +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with @@ -812,7 +863,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 MPItest.h5 \ # Test scripts-- # testpflush.sh: TEST_SCRIPT_PARA = testpflush.sh -SCRIPT_DEPEND = t_pflush1$(EXEEXT) t_pflush2$(EXEEXT) +SCRIPT_DEPEND = t_pflush1$(EXEEXT) t_pflush2$(EXEEXT) check_SCRIPTS = $(TEST_SCRIPT_PARA) # Test programs. These are our main targets. @@ -843,7 +894,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) -chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) +chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1377,9 +1428,9 @@ uninstall-am: # commands that should be executed even if a file with the same name already # exists. .PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \ - build-tests check-clean check-install check-p check-s check-vfd \ - check-passthrough-vol install-doc lib progs tests uninstall-doc \ - _exec_check-s _test help + build-tests check-clean check-install check-p check-s check-vfd \ + check-passthrough-vol install-doc lib progs tests uninstall-doc \ + _exec_check-s _test help trace doxygen help: @$(top_srcdir)/bin/makehelp diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c index 7c4c027..d5b9038 100644 --- a/testpar/t_2Gio.c +++ b/testpar/t_2Gio.c @@ -1,11 +1,12 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -157,6 +158,9 @@ parse_options(int argc, char **argv) } paraprefix = *argv; break; + case 'i': /* Collective MPI-IO access with independent IO */ + dxfer_coll_type = DXFER_INDEPENDENT_IO; + break; case '2': /* Use the split-file driver with MPIO access */ /* Can use $HDF5_METAPREFIX to define the */ /* meta-file-prefix. */ @@ -255,14 +259,37 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type) if (l_facc_type == FACC_DEFAULT) return (ret_pl); - /* set Parallel access with communicator */ - ret = H5Pset_fapl_mpio(ret_pl, comm, info); - VRFY((ret >= 0), ""); - ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE); - VRFY((ret >= 0), ""); - ret = H5Pset_coll_metadata_write(ret_pl, TRUE); - VRFY((ret >= 0), ""); + if (l_facc_type == FACC_MPIO) { + /* set Parallel access with communicator */ + ret = H5Pset_fapl_mpio(ret_pl, comm, info); + VRFY((ret >= 0), ""); + ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE); + VRFY((ret >= 0), ""); + ret = H5Pset_coll_metadata_write(ret_pl, TRUE); + VRFY((ret >= 0), ""); + return (ret_pl); + } + + if (l_facc_type == (FACC_MPIO | FACC_SPLIT)) { + hid_t mpio_pl; + mpio_pl = H5Pcreate(H5P_FILE_ACCESS); + VRFY((mpio_pl >= 0), ""); + /* set Parallel access with communicator */ + ret = H5Pset_fapl_mpio(mpio_pl, comm, info); + VRFY((ret >= 0), ""); + + /* setup file access template */ + ret_pl = H5Pcreate(H5P_FILE_ACCESS); + VRFY((ret_pl >= 0), ""); + /* set Parallel access with communicator */ + ret = H5Pset_fapl_split(ret_pl, ".meta", mpio_pl, ".raw", mpio_pl); + VRFY((ret >= 0), "H5Pset_fapl_split succeeded"); + H5Pclose(mpio_pl); + return (ret_pl); + } + + /* unknown file access types */ return (ret_pl); } @@ -518,37 +545,42 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[] #define DATASETNAME "dataset" static int -MpioTest2G(MPI_Comm comm, int mpi_rank) +MpioTest2G(MPI_Comm comm) { /* * HDF5 APIs definitions */ - herr_t status; - hid_t dcpl_id; - hid_t filedataspace; - hid_t memorydataspace; - hid_t file_id, dset_id; /* file and dataset identifiers */ - hid_t plist_id; /* property list identifier */ - hid_t filespace; /* file and memory dataspace identifiers */ - int * data; /* pointer to data buffer to write */ + herr_t status; + hid_t file_id, dset_id; /* file and dataset identifiers */ + hid_t plist_id; /* property list identifier */ + hid_t filespace; /* file and memory dataspace identifiers */ + int * data; /* pointer to data buffer to write */ + size_t tot_size_bytes; + hid_t dcpl_id; + hid_t memorydataspace; + hid_t filedataspace; + size_t slice_per_process; + size_t data_size; + size_t data_size_bytes; + + hsize_t chunk[3]; + hsize_t h5_counts[3]; + hsize_t h5_offsets[3]; hsize_t shape[3] = {1024, 1024, 1152}; - size_t data_size, data_size_bytes, slice_per_process = shape[0] / 2; - size_t tot_size_bytes = sizeof(int); - hsize_t chunk[3] = {4, shape[1], shape[2]}; - hsize_t h5_counts[3] = {slice_per_process, shape[1], shape[2]}; - hsize_t h5_offsets[3] = {(size_t)mpi_rank * slice_per_process, 0, 0}; /* * MPI variables */ - int mpi_size; + int mpi_size, mpi_rank; MPI_Info info = MPI_INFO_NULL; MPI_Comm_size(comm, &mpi_size); + MPI_Comm_rank(comm, &mpi_rank); if (mpi_rank == 0) { - HDprintf("Using %d process on dataset shape [%llu, %llu, %llu]\n", mpi_size, shape[0], shape[1], - shape[2]); + HDprintf("Using %d process on dataset shape " + "[%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "]\n", + mpi_size, shape[0], shape[1], shape[2]); } /* @@ -570,11 +602,12 @@ MpioTest2G(MPI_Comm comm, int mpi_rank) /* * Create the dataspace for the dataset. */ + tot_size_bytes = sizeof(int); for (int i = 0; i < 3; i++) { tot_size_bytes *= shape[i]; } if (mpi_rank == 0) { - HDprintf("Dataset of %llu bytes\n", tot_size_bytes); + HDprintf("Dataset of %zu bytes\n", tot_size_bytes); } filespace = H5Screate_simple(3, shape, NULL); VRFY((filespace >= 0), "H5Screate_simple succeeded"); @@ -584,14 +617,17 @@ MpioTest2G(MPI_Comm comm, int mpi_rank) */ dcpl_id = H5Pcreate(H5P_DATASET_CREATE); VRFY((dcpl_id >= 0), "H5P_DATASET_CREATE"); - status = H5Pset_chunk(dcpl_id, 3, chunk); + chunk[0] = 4; + chunk[1] = shape[1]; + chunk[2] = shape[2]; + status = H5Pset_chunk(dcpl_id, 3, chunk); VRFY((status >= 0), "H5Pset_chunk succeeded"); /* * Create the dataset with default properties and close filespace. */ dset_id = H5Dcreate2(file_id, DATASETNAME, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl_id, H5P_DEFAULT); - VRFY((dset_id >= 0), "H5Dcreate succeeded"); + VRFY((dset_id >= 0), "H5Dcreate2 succeeded"); H5Sclose(filespace); /* @@ -602,6 +638,8 @@ MpioTest2G(MPI_Comm comm, int mpi_rank) status = H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_COLLECTIVE); VRFY((status >= 0), ""); + H5_CHECKED_ASSIGN(slice_per_process, size_t, (shape[0] + (hsize_t)mpi_size - 1) / (hsize_t)mpi_size, + hsize_t); data_size = slice_per_process * shape[1] * shape[2]; data_size_bytes = sizeof(int) * data_size; data = HDmalloc(data_size_bytes); @@ -611,6 +649,12 @@ MpioTest2G(MPI_Comm comm, int mpi_rank) data[i] = mpi_rank; } + h5_counts[0] = slice_per_process; + h5_counts[1] = shape[1]; + h5_counts[2] = shape[2]; + h5_offsets[0] = (size_t)mpi_rank * slice_per_process; + h5_offsets[1] = 0; + h5_offsets[2] = 0; filedataspace = H5Screate_simple(3, shape, NULL); VRFY((filedataspace >= 0), "H5Screate_simple succeeded"); @@ -638,8 +682,7 @@ MpioTest2G(MPI_Comm comm, int mpi_rank) H5Fclose(file_id); free(data); - HDprintf("Proc %d - MpioTest2G test succeeded\n", mpi_rank, data_size_bytes); - HDfflush(stdout); + HDprintf("Proc %d - MpioTest2G test succeeded\n", mpi_rank); if (mpi_rank == 0) HDremove(FILENAME[1]); @@ -4378,9 +4421,9 @@ no_collective_cause_tests(void) test_no_collective_cause_mode(TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT); test_no_collective_cause_mode(TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL); #ifdef LATER /* fletcher32 */ - /* TODO: use this instead of below TEST_FILTERS_READ when H5Dcreate and - * H5Dwrite is ready for mpio + filter feature. - */ + /* TODO: use this instead of below TEST_FILTERS_READ when H5Dcreate and + * H5Dwrite is ready for mpio + filter feature. + */ /* test_no_collective_cause_mode (TEST_FILTERS); */ test_no_collective_cause_mode_filter(TEST_FILTERS_READ); #endif /* LATER */ @@ -4827,6 +4870,9 @@ main(int argc, char **argv) h5_show_hostname(); } + if (H5dont_atexit() < 0) { + HDprintf("Failed to turn off atexit processing. Continue.\n"); + }; H5open(); /* Set the internal transition size to allow use of derived datatypes * without having to actually read or write large datasets (>2GB). @@ -4884,7 +4930,7 @@ main(int argc, char **argv) express_test = GetTestExpress(); if ((express_test == 0) && (mpi_rank < 2)) { - MpioTest2G(test_comm, mpi_rank); + MpioTest2G(test_comm); } MPI_Barrier(MPI_COMM_WORLD); diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c index 60faf68..ed99fc4 100644 --- a/testpar/t_bigio.c +++ b/testpar/t_bigio.c @@ -131,12 +131,13 @@ point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], s } if (VERBOSE_MED) { - HDprintf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total " - "datapoints=%lu\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1], - (unsigned long)(block[0] * block[1] * count[0] * count[1])); + HDprintf("start[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "count[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "stride[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "block[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "total datapoints=%" PRIuHSIZE "\n", + start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1], + block[0] * block[1] * count[0] * count[1]); k = 0; for (i = 0; i < num_points; i++) { HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]); @@ -157,15 +158,15 @@ dataset_print(hsize_t start[], hsize_t block[], B_DATATYPE *dataset) /* print the column heading */ HDprintf("%-8s", "Cols:"); for (j = 0; j < block[1]; j++) { - HDprintf("%3lu ", (unsigned long)(start[1] + j)); + HDprintf("%3" PRIuHSIZE " ", start[1] + j); } HDprintf("\n"); /* print the slab data */ for (i = 0; i < block[0]; i++) { - HDprintf("Row %2lu: ", (unsigned long)(i + start[0])); + HDprintf("Row %2" PRIuHSIZE ": ", i + start[0]); for (j = 0; j < block[1]; j++) { - HDprintf("%llu ", *dataptr++); + HDprintf("%" PRIuHSIZE " ", *dataptr++); } HDprintf("\n"); } @@ -184,10 +185,11 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], /* print it if VERBOSE_MED */ if (VERBOSE_MED) { HDprintf("verify_data dumping:::\n"); - HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1]); + HDprintf("start(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "count(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "stride(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "block(%" PRIuHSIZE ", %" PRIuHSIZE ")\n", + start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1]); HDprintf("original values:\n"); dataset_print(start, block, original); HDprintf("compared values:\n"); @@ -199,9 +201,10 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], for (j = 0; j < block[1]; j++) { if (*dataset != *original) { if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) { - HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %llu, got %llu\n", - (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]), - (unsigned long)(j + start[1]), *(original), *(dataset)); + HDprintf("Dataset Verify failed at [%" PRIuHSIZE "][%" PRIuHSIZE "]" + "(row %" PRIuHSIZE ", col %" PRIuHSIZE "): " + "expect %" PRIuHSIZE ", got %" PRIuHSIZE "\n", + i, j, i + start[0], j + start[1], *(original), *(dataset)); } dataset++; original++; @@ -1101,7 +1104,7 @@ static void single_rank_independent_io(void) { if (mpi_rank_g == 0) - HDprintf("single_rank_independent_io\n"); + HDprintf("\nSingle Rank Independent I/O\n"); if (MAIN_PROCESS) { hsize_t dims[] = {LARGE_DIM}; @@ -1220,8 +1223,6 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type) * Programmer: Unknown * July 12th, 2004 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -1247,7 +1248,7 @@ coll_chunk1(void) { const char *filename = FILENAME[0]; if (mpi_rank_g == 0) - HDprintf("coll_chunk1\n"); + HDprintf("\nCollective chunk I/O Test #1\n"); coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER); coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER); @@ -1300,7 +1301,7 @@ coll_chunk2(void) { const char *filename = FILENAME[0]; if (mpi_rank_g == 0) - HDprintf("coll_chunk2\n"); + HDprintf("\nCollective chunk I/O Test #2\n"); coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER); coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, POINT, OUT_OF_ORDER); @@ -1326,8 +1327,6 @@ coll_chunk2(void) * Programmer: Unknown * July 12th, 2004 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -1354,7 +1353,7 @@ coll_chunk3(void) { const char *filename = FILENAME[0]; if (mpi_rank_g == 0) - HDprintf("coll_chunk3\n"); + HDprintf("\nCollective chunk I/O Test #3\n"); coll_chunktest(filename, mpi_size_g, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER); coll_chunktest(filename, mpi_size_g, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER); @@ -1382,17 +1381,9 @@ coll_chunk3(void) * * Failure: -1 * - * Modifications: - * Remove invalid temporary property checkings for API_LINK_HARD and - * API_LINK_TRUE cases. - * Programmer: Jonathan Kim - * Date: 2012-10-10 - * * Programmer: Unknown * July 12th, 2004 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -1842,55 +1833,10 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap HDfree(data_origin1); } -/***************************************************************************** - * - * Function: do_express_test() - * - * Purpose: Do an MPI_Allreduce to obtain the maximum value returned - * by GetTestExpress() across all processes. Return this - * value. - * - * Envirmoment variables can be different across different - * processes. This function ensures that all processes agree - * on whether to do an express test. - * - * Return: Success: Maximum of the values returned by - * GetTestExpress() across all processes. - * - * Failure: -1 - * - * Programmer: JRM -- 4/25/06 - * - *****************************************************************************/ -static int -do_express_test(int world_mpi_rank) -{ - int express_test; - int max_express_test; - int result; - - express_test = GetTestExpress(); - - result = - MPI_Allreduce((void *)&express_test, (void *)&max_express_test, 1, MPI_INT, MPI_MAX, MPI_COMM_WORLD); - - if (result != MPI_SUCCESS) { - nerrors++; - max_express_test = -1; - if (VERBOSE_MED && (world_mpi_rank == 0)) { - HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, FUNC); - } - } - - return (max_express_test); - -} /* do_express_test() */ - int main(int argc, char **argv) { - int ExpressMode = 0; - hsize_t newsize = 1048576; + hsize_t newsize = 1048576; /* Set the bigio processing limit to be 'newsize' bytes */ hsize_t oldsize = H5_mpi_set_bigio_count(newsize); @@ -1899,9 +1845,8 @@ main(int argc, char **argv) * that we try to ensure that our bigio handling is actually * envoked and tested. */ - if (newsize != oldsize) { + if (newsize != oldsize) bigcount = newsize * 2; - } MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size_g); @@ -1912,34 +1857,25 @@ main(int argc, char **argv) * hang in the atexit post processing in which it may try to make MPI * calls. By then, MPI calls may not work. */ - if (H5dont_atexit() < 0) { + if (H5dont_atexit() < 0) HDprintf("Failed to turn off atexit processing. Continue.\n"); - }; /* set alarm. */ ALARM_ON; - ExpressMode = do_express_test(mpi_rank_g); - dataset_big_write(); MPI_Barrier(MPI_COMM_WORLD); dataset_big_read(); MPI_Barrier(MPI_COMM_WORLD); - if (ExpressMode > 0) { - if (mpi_rank_g == 0) - HDprintf("***Express test mode on. Several tests are skipped\n"); - } - else { - coll_chunk1(); - MPI_Barrier(MPI_COMM_WORLD); - coll_chunk2(); - MPI_Barrier(MPI_COMM_WORLD); - coll_chunk3(); - MPI_Barrier(MPI_COMM_WORLD); - single_rank_independent_io(); - } + coll_chunk1(); + MPI_Barrier(MPI_COMM_WORLD); + coll_chunk2(); + MPI_Barrier(MPI_COMM_WORLD); + coll_chunk3(); + MPI_Barrier(MPI_COMM_WORLD); + single_rank_independent_io(); /* turn off alarm */ ALARM_OFF; diff --git a/testpar/t_cache.c b/testpar/t_cache.c index aa6c3b6..263b467 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -1253,7 +1253,7 @@ reset_server_counters(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%ld).\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, FUNC, actual_total_reads, total_reads); } } @@ -1263,7 +1263,7 @@ reset_server_counters(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%ld).\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, FUNC, actual_total_writes, total_writes); } } @@ -1467,7 +1467,8 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n", world_mpi_rank, FUNC, target_addr); + HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC, + target_addr); } } else if (data[target_index].len != mssg_ptr->len) { @@ -1475,7 +1476,7 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: data[i].len = %Zu != mssg->len = %d.\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, FUNC, data[target_index].len, mssg_ptr->len); } } @@ -1484,7 +1485,9 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: proc %d read invalid entry. idx/base_addr = %d/%a.\n", + HDfprintf(stdout, + "%d:%s: proc %d read invalid entry. " + "idx/base_addr = %d/%" PRIuHADDR ".\n", world_mpi_rank, FUNC, mssg_ptr->src, target_index, data[target_index].base_addr); } } @@ -1653,7 +1656,8 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n", world_mpi_rank, FUNC, target_addr); + HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC, + target_addr); } } else if (data[target_index].len != mssg_ptr->len) { @@ -1661,7 +1665,7 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: data[i].len = %Zu != mssg->len = %d.\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, FUNC, data[target_index].len, mssg_ptr->len); } } @@ -1790,11 +1794,11 @@ serve_total_writes_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request total writes %ld.\n", (int)(mssg_ptr->src), total_writes); + HDfprintf(stdout, "%d request total writes %d.\n", (int)(mssg_ptr->src), total_writes); } else { - HDfprintf(stdout, "%d request total writes %ld -- FAILED.\n", (int)(mssg_ptr->src), total_writes); + HDfprintf(stdout, "%d request total writes %d -- FAILED.\n", (int)(mssg_ptr->src), total_writes); } } @@ -1860,11 +1864,11 @@ serve_total_reads_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request total reads %ld.\n", (int)(mssg_ptr->src), total_reads); + HDfprintf(stdout, "%d request total reads %d.\n", (int)(mssg_ptr->src), total_reads); } else { - HDfprintf(stdout, "%d request total reads %ld -- FAILED.\n", (int)(mssg_ptr->src), total_reads); + HDfprintf(stdout, "%d request total reads %d -- FAILED.\n", (int)(mssg_ptr->src), total_reads); } } @@ -1919,7 +1923,8 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n", world_mpi_rank, FUNC, target_addr); + HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC, + target_addr); } } else { @@ -2007,7 +2012,8 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n", world_mpi_rank, FUNC, target_addr); + HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC, + target_addr); } } else { @@ -2488,10 +2494,10 @@ datum_notify(H5C_notify_action_t action, void *thing) HDfprintf(stdout, "%d:%s: mssg.base_addr != entry_ptr->base_addr.\n", world_mpi_rank, FUNC); - HDfprintf(stdout, "%d:%s: mssg.base_addr = %a.\n", + HDfprintf(stdout, "%d:%s: mssg.base_addr = %" PRIuHADDR ".\n", world_mpi_rank, FUNC, mssg.base_addr); HDfprintf(stdout, - "%d:%s: entry_ptr->base_addr = %a.\n", + "%d:%s: entry_ptr->base_addr = %" PRIuHADDR ".\n", world_mpi_rank, FUNC, entry_ptr->base_addr); } @@ -2501,7 +2507,7 @@ datum_notify(H5C_notify_action_t action, void *thing) HDfprintf(stdout, "%d:%s: mssg.len != entry_ptr->len.\n", world_mpi_rank, FUNC); - HDfprintf(stdout, "%d:%s: mssg.len = %a.\n", + HDfprintf(stdout, "%d:%s: mssg.len = %" PRIuHADDR ".\n", world_mpi_rank, FUNC, mssg.len); } @@ -4289,15 +4295,15 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads) } } - if (!success) { + if (success) { if (reported_entry_reads != expected_entry_reads) { nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx reads mismatch (%ld/%ld).\n", world_mpi_rank, - FUNC, (long long)addr, reported_entry_reads, expected_entry_reads); + HDfprintf(stdout, "%d:%s: rep/exp entry 0x%" PRIxHADDR " reads mismatch (%d/%d).\n", + world_mpi_rank, FUNC, addr, reported_entry_reads, expected_entry_reads); } } } @@ -4386,14 +4392,14 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes) } } - if (!success) { + if (success) { if (reported_entry_writes != expected_entry_writes) { nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%ld/%ld).\n", world_mpi_rank, + HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n", world_mpi_rank, FUNC, (long long)addr, reported_entry_writes, expected_entry_writes); } } @@ -4485,8 +4491,8 @@ verify_total_reads(int expected_total_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%ld).\n", - world_mpi_rank, FUNC, reported_total_reads, expected_total_reads); + HDfprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%d).\n", world_mpi_rank, + FUNC, reported_total_reads, expected_total_reads); } } } @@ -6513,15 +6519,15 @@ trace_file_check(int metadata_write_strategy) HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, FUNC, i); if (expected_line_len == 0) { - HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC, "<EMPTY>", expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC, buffer, + HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, buffer, actual_line_len); } if (actual_line_len == 0) { - HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC, (*expected_output)[i], expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, "<EMPTY>", actual_line_len); } } @@ -6537,9 +6543,9 @@ trace_file_check(int metadata_write_strategy) if (verbose) { HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, FUNC, i); - HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC, (*expected_output)[i], expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC, buffer, + HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, buffer, actual_line_len); } } @@ -6868,28 +6874,20 @@ main(int argc, char **argv) * hang in the atexit post processing in which it may try to make MPI * calls. By then, MPI calls may not work. */ - if (H5dont_atexit() < 0) { + if (H5dont_atexit() < 0) HDprintf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank); - }; + H5open(); express_test = do_express_test(); -#if 0 /* JRM */ - express_test = 0; -#endif /* JRM */ - if (express_test) { - + if (express_test) virt_num_data_entries = EXPRESS_VIRT_NUM_DATA_ENTRIES; - } - else { - + else virt_num_data_entries = STD_VIRT_NUM_DATA_ENTRIES; - } #ifdef H5_HAVE_MPE - if (MAINPROCESS) { + if (MAINPROCESS) HDprintf(" Tests compiled for MPE.\n"); - } virt_num_data_entries = MPE_VIRT_NUM_DATA_ENTIES; #endif /* H5_HAVE_MPE */ @@ -6902,11 +6900,8 @@ main(int argc, char **argv) } if (mpi_size < 3) { - - if (MAINPROCESS) { - + if (MAINPROCESS) HDprintf(" Need at least 3 processes. Exiting.\n"); - } goto finish; } @@ -6924,27 +6919,22 @@ main(int argc, char **argv) /* setup file access property list with the world communicator */ if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) { nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, FUNC); - } } if (H5Pset_fapl_mpio(fapl, world_mpi_comm, MPI_INFO_NULL) < 0) { - nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n", world_mpi_rank, FUNC); - } } /* fix the file names */ for (u = 0; u < sizeof(FILENAME) / sizeof(FILENAME[0]) - 1; ++u) { if (h5_fixname(FILENAME[u], fapl, filenames[u], sizeof(filenames[u])) == NULL) { - nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, FUNC); - } break; } } @@ -6952,9 +6942,8 @@ main(int argc, char **argv) /* close the fapl before we set it up again */ if (H5Pclose(fapl) < 0) { nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, FUNC); - } } /* now create the fapl again, excluding the server process. */ @@ -6963,32 +6952,25 @@ main(int argc, char **argv) /* setup file access property list */ if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) { nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, FUNC); - } } if (H5Pset_fapl_mpio(fapl, file_mpi_comm, MPI_INFO_NULL) < 0) { - nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, FUNC); - } } } setup_rand(); max_nerrors = get_max_nerrors(); - if (max_nerrors != 0) { /* errors in setup -- no point in continuing */ - - if (world_mpi_rank == 0) { - + if (world_mpi_rank == 0) HDfprintf(stdout, "Errors in test initialization. Exiting.\n"); - } goto finish; } diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c index 39cfbf3..91f6e16 100644 --- a/testpar/t_cache_image.c +++ b/testpar/t_cache_image.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -3117,8 +3117,9 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) H5_FAILED(); - if (show_progress) - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", failure_mssg); + if (show_progress) { + HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + } } } @@ -3401,8 +3402,9 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) H5_FAILED(); - if (show_progress) - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", failure_mssg); + if (show_progress) { + HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + } } } @@ -3916,9 +3918,8 @@ main(int argc, char **argv) * hang in the atexit post processing in which it may try to make MPI * calls. By then, MPI calls may not work. */ - if (H5dont_atexit() < 0) { + if (H5dont_atexit() < 0) HDprintf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank); - }; H5open(); @@ -3930,11 +3931,8 @@ main(int argc, char **argv) } if (mpi_size < 2) { - - if (mpi_rank == 0) { - + if (mpi_rank == 0) HDprintf(" Need at least 2 processes. Exiting.\n"); - } goto finish; } @@ -3989,12 +3987,11 @@ main(int argc, char **argv) MPI_Barrier(MPI_COMM_WORLD); nerrs += verify_cache_image_RO(0, H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY, mpi_rank); -#if 1 nerrs += verify_cache_image_RO(1, H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, mpi_rank); nerrs += verify_cache_image_RW(0, H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY, mpi_rank); nerrs += verify_cache_image_RW(1, H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, mpi_rank); nerrs += smoke_check_1(comm, info, mpi_rank, mpi_size); -#endif + finish: /* make sure all processes are finished before final report, cleanup @@ -4003,19 +4000,14 @@ finish: MPI_Barrier(MPI_COMM_WORLD); if (mpi_rank == 0) { /* only process 0 reports */ - HDsleep(10); HDprintf("===================================\n"); - if (nerrs > 0) { + if (nerrs > 0) HDprintf("***metadata cache image tests detected %d failures***\n", nerrs); - } - else { + else HDprintf("metadata cache image tests finished with no failures\n"); - } HDprintf("===================================\n"); } - /* takedown_derived_types(); */ - /* close HDF5 library */ H5close(); diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index 8b9eb36..06f6f20 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c index 2a55ad1..651a392 100644 --- a/testpar/t_coll_chunk.c +++ b/testpar/t_coll_chunk.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/testpar/t_coll_md_read.c b/testpar/t_coll_md_read.c index 4439b0d..fd62eb6 100644 --- a/testpar/t_coll_md_read.c +++ b/testpar/t_coll_md_read.c @@ -5,7 +5,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/testpar/t_dset.c b/testpar/t_dset.c index ec1ecf7..bbd4b28 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -1627,9 +1627,6 @@ extend_writeInd(void) VRFY((mem_dataspace >= 0), ""); /* Try write to dataset2 beyond its current dim sizes. Should fail. */ - /* Temporary turn off auto error reporting */ - H5Eget_auto2(H5E_DEFAULT, &old_func, &old_client_data); - H5Eset_auto2(H5E_DEFAULT, NULL, NULL); /* create a file dataspace independently */ file_dataspace = H5Dget_space(dataset2); @@ -1638,11 +1635,13 @@ extend_writeInd(void) VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); /* write data independently. Should fail. */ - ret = H5Dwrite(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace, H5P_DEFAULT, data_array1); + H5E_BEGIN_TRY + { + ret = H5Dwrite(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace, H5P_DEFAULT, data_array1); + } + H5E_END_TRY VRFY((ret < 0), "H5Dwrite failed as expected"); - /* restore auto error reporting */ - H5Eset_auto2(H5E_DEFAULT, old_func, old_client_data); H5Sclose(file_dataspace); /* Extend dataset2 and try again. Should succeed. */ @@ -1911,20 +1910,19 @@ extend_readInd(void) VRFY((dataset2 >= 0), ""); /* Try extend dataset1 which is open RDONLY. Should fail. */ - /* first turn off auto error reporting */ - H5Eget_auto2(H5E_DEFAULT, &old_func, &old_client_data); - H5Eset_auto2(H5E_DEFAULT, NULL, NULL); file_dataspace = H5Dget_space(dataset1); VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); ret = H5Sget_simple_extent_dims(file_dataspace, dims, NULL); VRFY((ret > 0), "H5Sget_simple_extent_dims succeeded"); dims[0]++; - ret = H5Dset_extent(dataset1, dims); + H5E_BEGIN_TRY + { + ret = H5Dset_extent(dataset1, dims); + } + H5E_END_TRY VRFY((ret < 0), "H5Dset_extent failed as expected"); - /* restore auto error reporting */ - H5Eset_auto2(H5E_DEFAULT, old_func, old_client_data); H5Sclose(file_dataspace); /* Read dataset1 using BYROW pattern */ @@ -2209,9 +2207,6 @@ extend_writeAll(void) } /* Try write to dataset2 beyond its current dim sizes. Should fail. */ - /* Temporary turn off auto error reporting */ - H5Eget_auto2(H5E_DEFAULT, &old_func, &old_client_data); - H5Eset_auto2(H5E_DEFAULT, NULL, NULL); /* create a file dataspace independently */ file_dataspace = H5Dget_space(dataset2); @@ -2220,11 +2215,13 @@ extend_writeAll(void) VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); /* write data independently. Should fail. */ - ret = H5Dwrite(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace, xfer_plist, data_array1); + H5E_BEGIN_TRY + { + ret = H5Dwrite(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace, xfer_plist, data_array1); + } + H5E_END_TRY VRFY((ret < 0), "H5Dwrite failed as expected"); - /* restore auto error reporting */ - H5Eset_auto2(H5E_DEFAULT, old_func, old_client_data); H5Sclose(file_dataspace); /* Extend dataset2 and try again. Should succeed. */ @@ -2331,20 +2328,19 @@ extend_readAll(void) VRFY((dataset2 >= 0), ""); /* Try extend dataset1 which is open RDONLY. Should fail. */ - /* first turn off auto error reporting */ - H5Eget_auto2(H5E_DEFAULT, &old_func, &old_client_data); - H5Eset_auto2(H5E_DEFAULT, NULL, NULL); file_dataspace = H5Dget_space(dataset1); VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); ret = H5Sget_simple_extent_dims(file_dataspace, dims, NULL); VRFY((ret > 0), "H5Sget_simple_extent_dims succeeded"); dims[0]++; - ret = H5Dset_extent(dataset1, dims); + H5E_BEGIN_TRY + { + ret = H5Dset_extent(dataset1, dims); + } + H5E_END_TRY VRFY((ret < 0), "H5Dset_extent failed as expected"); - /* restore auto error reporting */ - H5Eset_auto2(H5E_DEFAULT, old_func, old_client_data); H5Sclose(file_dataspace); /* Read dataset1 using BYROW pattern */ @@ -3321,14 +3317,23 @@ test_actual_io_mode(int selection_mode) /* Release some resources */ ret = H5Sclose(sid); + VRFY((ret >= 0), "H5Sclose succeeded"); ret = H5Pclose(fapl); + VRFY((ret >= 0), "H5Pclose succeeded"); ret = H5Pclose(dcpl); + VRFY((ret >= 0), "H5Pclose succeeded"); ret = H5Pclose(dxpl_write); + VRFY((ret >= 0), "H5Pclose succeeded"); ret = H5Pclose(dxpl_read); + VRFY((ret >= 0), "H5Pclose succeeded"); ret = H5Dclose(dataset); + VRFY((ret >= 0), "H5Dclose succeeded"); ret = H5Sclose(mem_space); + VRFY((ret >= 0), "H5Sclose succeeded"); ret = H5Sclose(file_space); + VRFY((ret >= 0), "H5Sclose succeeded"); ret = H5Fclose(fid); + VRFY((ret >= 0), "H5Fclose succeeded"); HDfree(buffer); return; } @@ -3344,9 +3349,7 @@ void actual_io_mode_tests(void) { int mpi_size = -1; - int mpi_rank = -1; MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - MPI_Comm_size(MPI_COMM_WORLD, &mpi_rank); test_actual_io_mode(TEST_ACTUAL_IO_NO_COLLECTIVE); @@ -3985,9 +3988,9 @@ no_collective_cause_tests(void) test_no_collective_cause_mode(TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT); test_no_collective_cause_mode(TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL); #ifdef LATER /* fletcher32 */ - /* TODO: use this instead of below TEST_FILTERS_READ when H5Dcreate and - * H5Dwrite is ready for mpio + filter feature. - */ + /* TODO: use this instead of below TEST_FILTERS_READ when H5Dcreate and + * H5Dwrite is ready for mpio + filter feature. + */ /* test_no_collective_cause_mode (TEST_FILTERS); */ test_no_collective_cause_mode_filter(TEST_FILTERS_READ); #endif /* LATER */ @@ -4112,13 +4115,15 @@ dataset_atomicity(void) if (MAINPROCESS) { fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT); VRFY((fid >= 0), "H5Fopen succeeed"); - } - /* should fail */ - ret = H5Fset_mpi_atomicity(fid, TRUE); - VRFY((ret == FAIL), "H5Fset_mpi_atomicity failed"); + /* should fail */ + H5E_BEGIN_TRY + { + ret = H5Fset_mpi_atomicity(fid, TRUE); + } + H5E_END_TRY + VRFY((ret == FAIL), "H5Fset_mpi_atomicity failed"); - if (MAINPROCESS) { ret = H5Fclose(fid); VRFY((ret >= 0), "H5Fclose succeeded"); } diff --git a/testpar/t_file.c b/testpar/t_file.c index d284651..8bef7ae 100644 --- a/testpar/t_file.c +++ b/testpar/t_file.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/testpar/t_file_image.c b/testpar/t_file_image.c index 702f73a..a8251de 100644 --- a/testpar/t_file_image.c +++ b/testpar/t_file_image.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c index 10d6c27..5c0d10f 100644 --- a/testpar/t_filter_read.c +++ b/testpar/t_filter_read.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c index 37479b3..5153bce 100644 --- a/testpar/t_filters_parallel.c +++ b/testpar/t_filters_parallel.c @@ -255,8 +255,9 @@ test_write_one_chunk_filtered_dataset(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -418,8 +419,9 @@ test_write_filtered_dataset_no_overlap(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -578,8 +580,9 @@ test_write_filtered_dataset_overlap(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -746,8 +749,9 @@ test_write_filtered_dataset_single_no_selection(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -1202,8 +1206,9 @@ test_write_filtered_dataset_interleaved_write(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -1379,8 +1384,10 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(void) start[2] = (hsize_t)mpi_rank; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], start[ " - "%llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], start[2], block[0], block[1], block[2]); HDfflush(stdout); @@ -1547,8 +1554,10 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(void) start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], start[ " - "%llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], start[2], block[0], block[1], block[2]); HDfflush(stdout); @@ -1714,8 +1723,10 @@ test_write_3d_filtered_dataset_overlap(void) start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], start[ " - "%llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], start[2], block[0], block[1], block[2]); HDfflush(stdout); @@ -1900,8 +1911,9 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(void) start[1] = ((hsize_t)mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -2080,8 +2092,9 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -2279,8 +2292,9 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(void) start[1] = ((hsize_t)mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -2471,8 +2485,9 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -2687,8 +2702,9 @@ test_read_one_chunk_filtered_dataset(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -2890,8 +2906,9 @@ test_read_filtered_dataset_no_overlap(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -3094,8 +3111,9 @@ test_read_filtered_dataset_overlap(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -3324,8 +3342,9 @@ test_read_filtered_dataset_single_no_selection(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -3906,8 +3925,9 @@ test_read_filtered_dataset_interleaved_read(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -4135,8 +4155,9 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(void) start[2] = (hsize_t)mpi_rank; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -4351,8 +4372,9 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(void) start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -4574,8 +4596,9 @@ test_read_3d_filtered_dataset_overlap(void) start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -4807,8 +4830,9 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(void) start[1] = ((hsize_t)mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -5035,8 +5059,9 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -5265,8 +5290,9 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(void) start[1] = ((hsize_t)mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -5502,8 +5528,9 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -5803,8 +5830,10 @@ test_write_parallel_read_serial(void) offset[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], offset[ " - "%llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], offset[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], offset[0], offset[1], offset[2], block[0], block[1], block[2]); HDfflush(stdout); @@ -5973,8 +6002,9 @@ test_shrinking_growing_chunks(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } diff --git a/testpar/t_init_term.c b/testpar/t_init_term.c index 8492af9..1533765 100644 --- a/testpar/t_init_term.c +++ b/testpar/t_init_term.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -62,7 +62,7 @@ main(int argc, char **argv) if (MAINPROCESS) { if (0 == nerrors) - PASSED() + PASSED(); else H5_FAILED() } diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index a4bc26d..3041e77 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -129,12 +129,6 @@ zero_dim_dset(void) /* * Example of using PHDF5 to create ndatasets datasets. Each process write * a slab of array to the file. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/11/04 */ void multiple_dset_write(void) @@ -218,12 +212,6 @@ multiple_dset_write(void) } /* Example of using PHDF5 to create, write, and read compact dataset. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/11/04 */ void compact_dataset(void) @@ -353,14 +341,6 @@ compact_dataset(void) /* * Example of using PHDF5 to create, write, and read dataset and attribute * of Null dataspace. - * - * Changes: Removed the assert that mpi_size <= the SIZE #define. - * As best I can tell, this assert isn't needed here, - * and in any case, the SIZE #define is being removed - * in an update of the functions in this file to run - * with an arbitrary number of processes. - * - * JRM - 8/24/04 */ void null_dataset(void) @@ -465,14 +445,6 @@ null_dataset(void) * Actual data is _not_ written to these datasets. Dataspaces are exact * sizes(2GB, 4GB, etc.), but the metadata for the file pushes the file over * the boundary of interest. - * - * Changes: Removed the assert that mpi_size <= the SIZE #define. - * As best I can tell, this assert isn't needed here, - * and in any case, the SIZE #define is being removed - * in an update of the functions in this file to run - * with an arbitrary number of processes. - * - * JRM - 8/11/04 */ void big_dataset(void) @@ -594,16 +566,6 @@ big_dataset(void) /* Example of using PHDF5 to read a partial written dataset. The dataset does * not have actual data written to the entire raw data area and relies on the * default fill value of zeros to work correctly. - * - * Changes: Removed the assert that mpi_size <= the SIZE #define. - * As best I can tell, this assert isn't needed here, - * and in any case, the SIZE #define is being removed - * in an update of the functions in this file to run - * with an arbitrary number of processes. - * - * Also added code to free dynamically allocated buffers. - * - * JRM - 8/11/04 */ void dataset_fillvalue(void) @@ -710,15 +672,16 @@ dataset_fillvalue(void) for (i = 0; i < (int)dset_dims[0]; i++) for (j = 0; j < (int)dset_dims[1]; j++) for (k = 0; k < (int)dset_dims[2]; k++) - for (l = 0; l < (int)dset_dims[3]; l++, twdata++, trdata++) + for (l = 0; l < (int)dset_dims[3]; l++, trdata++) if (*trdata != 0) if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED) - HDprintf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", i, - j, k, l, *trdata); + HDprintf( + "Rank %d: Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", + mpi_rank, i, j, k, l, *trdata); if (err_num > MAX_ERR_REPORT && !VERBOSE_MED) - HDprintf("[more errors ...]\n"); + HDprintf("Rank %d: [more errors ...]\n", mpi_rank); if (err_num) { - HDprintf("%d errors found in check_value\n", err_num); + HDprintf("Rank %d: %d errors found in check_value\n", mpi_rank, err_num); nerrors++; } } @@ -856,12 +819,6 @@ collective_group_write_independent_group_read(void) /* Write multiple groups with a chunked dataset in each group collectively. * These groups and datasets are for testing independent read later. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/16/04 */ void collective_group_write(void) @@ -896,6 +853,7 @@ collective_group_write(void) plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist); + VRFY((fid >= 0), "H5Fcreate"); H5Pclose(plist); /* decide the hyperslab according to process number. */ @@ -909,13 +867,13 @@ collective_group_write(void) ret2 = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, chunk_origin, chunk_dims, count, chunk_dims); VRFY((memspace >= 0), "memspace"); VRFY((filespace >= 0), "filespace"); - VRFY((ret1 >= 0), "mgroup memspace selection"); - VRFY((ret2 >= 0), "mgroup filespace selection"); + VRFY((ret1 == 0), "mgroup memspace selection"); + VRFY((ret2 == 0), "mgroup filespace selection"); dcpl = H5Pcreate(H5P_DATASET_CREATE); ret1 = H5Pset_chunk(dcpl, 2, chunk_size); VRFY((dcpl >= 0), "dataset creation property"); - VRFY((ret1 >= 0), "set chunk for dataset creation property"); + VRFY((ret1 == 0), "set chunk for dataset creation property"); /* creates ngroups groups under the root group, writes chunked * datasets in parallel. */ @@ -932,10 +890,14 @@ collective_group_write(void) for (j = 0; j < size; j++) outme[(i * size) + j] = (i + j) * 1000 + mpi_rank; - H5Dwrite(did, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, outme); + ret1 = H5Dwrite(did, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, outme); + VRFY((ret1 == 0), "H5Dwrite"); - H5Dclose(did); - H5Gclose(gid); + ret1 = H5Dclose(did); + VRFY((ret1 == 0), "H5Dclose"); + + ret1 = H5Gclose(gid); + VRFY((ret1 == 0), "H5Gclose"); #ifdef BARRIER_CHECKS if (!((m + 1) % 10)) { @@ -948,7 +910,9 @@ collective_group_write(void) H5Pclose(dcpl); H5Sclose(filespace); H5Sclose(memspace); - H5Fclose(fid); + + ret1 = H5Fclose(fid); + VRFY((ret1 == 0), "H5Fclose"); HDfree(outme); } @@ -964,6 +928,7 @@ independent_group_read(void) const H5Ptest_param_t *pt; char * filename; int ngroups; + herr_t ret; pt = GetTestParameters(); filename = pt->name; @@ -975,6 +940,7 @@ independent_group_read(void) H5Pset_all_coll_metadata_ops(plist, FALSE); fid = H5Fopen(filename, H5F_ACC_RDONLY, plist); + VRFY((fid > 0), "H5Fopen"); H5Pclose(plist); /* open groups and read datasets. Odd number processes read even number @@ -989,20 +955,11 @@ independent_group_read(void) group_dataset_read(fid, mpi_rank, m); } - H5Fclose(fid); + ret = H5Fclose(fid); + VRFY((ret == 0), "H5Fclose"); } /* Open and read datasets and compare data - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * Also added code to verify the results of dynamic memory - * allocations, and to free dynamically allocated memeory - * when we are done with it. - * - * JRM - 8/16/04 */ static void group_dataset_read(hid_t fid, int mpi_rank, int m) @@ -1035,16 +992,17 @@ group_dataset_read(hid_t fid, int mpi_rank, int m) /* this is the original value */ for (i = 0; i < size; i++) - for (j = 0; j < size; j++) { + for (j = 0; j < size; j++) outdata[(i * size) + j] = (i + j) * 1000 + mpi_rank; - } /* compare the original value(outdata) to the value in file(indata).*/ ret = check_value(indata, outdata, size); VRFY((ret == 0), "check the data"); - H5Dclose(did); - H5Gclose(gid); + ret = H5Dclose(did); + VRFY((ret == 0), "H5Dclose"); + ret = H5Gclose(gid); + VRFY((ret == 0), "H5Gclose"); HDfree(indata); HDfree(outdata); @@ -1076,11 +1034,6 @@ group_dataset_read(hid_t fid, int mpi_rank, int m) * + means the group has attribute(s). * ' means the datasets in the groups have attribute(s). * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/16/04 */ void multiple_group_write(void) @@ -1164,12 +1117,6 @@ multiple_group_write(void) /* * In a group, creates NDATASETS datasets. Each process writes a hyperslab * of a data array to the file. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/16/04 */ static void write_dataset(hid_t memspace, hid_t filespace, hid_t gid) @@ -1243,12 +1190,6 @@ create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid, int counter) /* * This function is to verify the data from multiple group testing. It opens * every dataset in every group and check their correctness. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/11/04 */ void multiple_group_read(void) @@ -1323,12 +1264,6 @@ multiple_group_read(void) /* * This function opens all the datasets in a certain, checks the data using * dataset_vrfy function. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/11/04 */ static int read_dataset(hid_t memspace, hid_t filespace, hid_t gid) @@ -1456,10 +1391,8 @@ read_attribute(hid_t obj_id, int this_type, int num) if (this_type == is_group) { HDsprintf(attr_name, "Group Attribute %d", num); aid = H5Aopen(obj_id, attr_name, H5P_DEFAULT); - if (MAINPROCESS) { - H5Aread(aid, H5T_NATIVE_INT, &in_num); - vrfy_errors = dataset_vrfy(NULL, NULL, NULL, group_block, &in_num, &num); - } + H5Aread(aid, H5T_NATIVE_INT, &in_num); + vrfy_errors = dataset_vrfy(NULL, NULL, NULL, group_block, &in_num, &num); H5Aclose(aid); } else if (this_type == is_dset) { @@ -1467,10 +1400,8 @@ read_attribute(hid_t obj_id, int this_type, int num) for (i = 0; i < 8; i++) out_data[i] = i; aid = H5Aopen(obj_id, attr_name, H5P_DEFAULT); - if (MAINPROCESS) { - H5Aread(aid, H5T_NATIVE_INT, in_data); - vrfy_errors = dataset_vrfy(NULL, NULL, NULL, dset_block, in_data, out_data); - } + H5Aread(aid, H5T_NATIVE_INT, in_data); + vrfy_errors = dataset_vrfy(NULL, NULL, NULL, dset_block, in_data, out_data); H5Aclose(aid); } @@ -1479,12 +1410,6 @@ read_attribute(hid_t obj_id, int this_type, int num) /* This functions compares the original data with the read-in data for its * hyperslab part only by process ID. - * - * Changes: Modified function to use a passed in size parameter - * instead of the old SIZE #define. This should let us - * run with an arbitrary number of processes. - * - * JRM - 8/16/04 */ static int check_value(DATATYPE *indata, DATATYPE *outdata, int size) @@ -1517,12 +1442,6 @@ check_value(DATATYPE *indata, DATATYPE *outdata, int size) } /* Decide the portion of data chunk in dataset by process ID. - * - * Changes: Modified function to use a passed in size parameter - * instead of the old SIZE #define. This should let us - * run with an arbitrary number of processes. - * - * JRM - 8/11/04 */ static void @@ -1564,8 +1483,6 @@ get_slab(hsize_t chunk_origin[], hsize_t chunk_dims[], hsize_t count[], hsize_t * This function reproduces this situation. At present the test hangs * on failure. * JRM - 9/13/04 - * - * Changes: None. */ #define N 4 @@ -1809,10 +1726,6 @@ io_mode_confusion(void) * cache clients will have to construct on disk images on demand. * * JRM -- 10/13/10 - * - * Changes: - * Break it into two parts, a writer to write the file and a reader - * the correctness of the writer. AKC -- 2010/10/27 */ #define NUM_DATA_SETS 4 diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index 68445d9..a883f55 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -513,7 +513,7 @@ 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 */ @@ -583,7 +583,7 @@ 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, readdata[i], expect_val); diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c index f21726a..2a80f4a 100644 --- a/testpar/t_pflush1.c +++ b/testpar/t_pflush1.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c index 2df548b..c96233a 100644 --- a/testpar/t_pflush2.c +++ b/testpar/t_pflush2.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -187,7 +187,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 @@ -201,7 +201,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_ph5basic.c b/testpar/t_ph5basic.c index 6b2bfe3..05f2c77 100644 --- a/testpar/t_ph5basic.c +++ b/testpar/t_ph5basic.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/testpar/t_pread.c b/testpar/t_pread.c index 78659d4..cf91b31 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/testpar/t_prestart.c b/testpar/t_prestart.c index 248a4ba..384fb1b 100644 --- a/testpar/t_prestart.c +++ b/testpar/t_prestart.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -123,7 +123,7 @@ main(int argc, char **argv) if (MAINPROCESS) { if (0 == nerrors) - PASSED() + PASSED(); else H5_FAILED() } diff --git a/testpar/t_prop.c b/testpar/t_prop.c index e84a942..a3f1859 100644 --- a/testpar/t_prop.c +++ b/testpar/t_prop.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -98,10 +98,10 @@ test_plist_ed(void) int mpi_size, mpi_rank, recv_proc; hsize_t chunk_size = 16384; /* chunk size */ - double fill = 2.7f; /* Fill value */ + double fill = 2.7; /* Fill value */ size_t nslots = 521 * 2; size_t nbytes = 1048576 * 10; - double w0 = 0.5f; + double w0 = 0.5; unsigned max_compact; unsigned min_dense; hsize_t max_size[1]; /*data space maximum size */ @@ -114,26 +114,26 @@ test_plist_ed(void) TRUE, FALSE, (2 * 2048 * 1024), - 0.3f, + 0.3, (64 * 1024 * 1024), (4 * 1024 * 1024), 60000, H5C_incr__threshold, - 0.8f, - 3.0f, + 0.8, + 3.0, TRUE, (8 * 1024 * 1024), H5C_flash_incr__add_space, - 2.0f, - 0.25f, + 2.0, + 0.25, H5C_decr__age_out_with_threshold, - 0.997f, - 0.8f, + 0.997, + 0.8, TRUE, (3 * 1024 * 1024), 3, FALSE, - 0.2f, + 0.2, (256 * 2048), H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -441,3 +441,192 @@ test_plist_ed(void) ret = H5Pclose(acpl); VRFY((ret >= 0), "H5Pclose succeeded"); } + +void +external_links(void) +{ + hid_t lcpl = H5I_INVALID_HID; /* link create prop. list */ + hid_t lapl = H5I_INVALID_HID; /* link access prop. list */ + hid_t fapl = H5I_INVALID_HID; /* file access prop. list */ + hid_t gapl = H5I_INVALID_HID; /* group access prop. list */ + hid_t fid = H5I_INVALID_HID; /* file id */ + hid_t group = H5I_INVALID_HID; /* group id */ + int mpi_size, mpi_rank; + + MPI_Comm comm; + int doIO; + int i, mrc; + + herr_t ret; /* Generic return value */ + htri_t tri_status; /* tri return value */ + + const char *filename = "HDF5test.h5"; + const char *filename_ext = "HDF5test_ext.h5"; + const char *group_path = "/Base/Block/Step"; + const char *link_name = "link"; /* external link */ + char link_path[50]; + + if (VERBOSE_MED) + HDprintf("Check external links\n"); + + /* set up MPI parameters */ + MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); + MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); + + /* Check MPI communicator access properties are passed to + linked external files */ + + if (mpi_rank == 0) { + + lcpl = H5Pcreate(H5P_LINK_CREATE); + VRFY((lcpl >= 0), "H5Pcreate succeeded"); + + ret = H5Pset_create_intermediate_group(lcpl, 1); + VRFY((ret >= 0), "H5Pset_create_intermediate_group succeeded"); + + /* Create file to serve as target for external link.*/ + fid = H5Fcreate(filename_ext, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + VRFY((fid >= 0), "H5Fcreate succeeded"); + + group = H5Gcreate2(fid, group_path, lcpl, H5P_DEFAULT, H5P_DEFAULT); + VRFY((group >= 0), "H5Gcreate succeeded"); + + ret = H5Gclose(group); + VRFY((ret >= 0), "H5Gclose succeeded"); + + ret = H5Fclose(fid); + VRFY((ret >= 0), "H5Fclose succeeded"); + + fapl = H5Pcreate(H5P_FILE_ACCESS); + VRFY((fapl >= 0), "H5Pcreate succeeded"); + + /* Create a new file using the file access property list. */ + fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + VRFY((fid >= 0), "H5Fcreate succeeded"); + + ret = H5Pclose(fapl); + VRFY((ret >= 0), "H5Pclose succeeded"); + + group = H5Gcreate2(fid, group_path, lcpl, H5P_DEFAULT, H5P_DEFAULT); + VRFY((group >= 0), "H5Gcreate succeeded"); + + /* Create external links to the target files. */ + ret = H5Lcreate_external(filename_ext, group_path, group, link_name, H5P_DEFAULT, H5P_DEFAULT); + VRFY((ret >= 0), "H5Lcreate_external succeeded"); + + /* Close and release resources. */ + ret = H5Pclose(lcpl); + VRFY((ret >= 0), "H5Pclose succeeded"); + ret = H5Gclose(group); + VRFY((ret >= 0), "H5Gclose succeeded"); + ret = H5Fclose(fid); + VRFY((ret >= 0), "H5Fclose succeeded"); + } + + MPI_Barrier(MPI_COMM_WORLD); + + /* + * For the first case, use all the processes. For the second case + * use a sub-communicator to verify the correct communicator is + * being used for the externally linked files. + * There is no way to determine if MPI info is being used for the + * externally linked files. + */ + + for (i = 0; i < 2; i++) { + + if (i == 0) { + doIO = 1; + comm = MPI_COMM_WORLD; + } + else { + doIO = mpi_rank % 2; + mrc = MPI_Comm_split(MPI_COMM_WORLD, doIO, mpi_rank, &comm); + VRFY((mrc == MPI_SUCCESS), ""); + } + + if (doIO) { + fapl = H5Pcreate(H5P_FILE_ACCESS); + VRFY((fapl >= 0), "H5Pcreate succeeded"); + ret = H5Pset_fapl_mpio(fapl, comm, MPI_INFO_NULL); + VRFY((fapl >= 0), "H5Pset_fapl_mpio succeeded"); + + fid = H5Fopen(filename, H5F_ACC_RDWR, fapl); + VRFY((fid >= 0), "H5Fopen succeeded"); + + /* test opening a group that is to an external link, the external linked + file should inherit the source file's access properties */ + HDsprintf(link_path, "%s%s%s", group_path, "/", link_name); + group = H5Gopen2(fid, link_path, H5P_DEFAULT); + VRFY((group >= 0), "H5Gopen succeeded"); + ret = H5Gclose(group); + VRFY((ret >= 0), "H5Gclose succeeded"); + + /* test opening a group that is external link by setting group + creation property */ + gapl = H5Pcreate(H5P_GROUP_ACCESS); + VRFY((gapl >= 0), "H5Pcreate succeeded"); + + ret = H5Pset_elink_fapl(gapl, fapl); + VRFY((ret >= 0), "H5Pset_elink_fapl succeeded"); + + group = H5Gopen2(fid, link_path, gapl); + VRFY((group >= 0), "H5Gopen succeeded"); + + ret = H5Gclose(group); + VRFY((ret >= 0), "H5Gclose succeeded"); + + ret = H5Pclose(gapl); + VRFY((ret >= 0), "H5Pclose succeeded"); + + /* test link APIs */ + lapl = H5Pcreate(H5P_LINK_ACCESS); + VRFY((lapl >= 0), "H5Pcreate succeeded"); + + ret = H5Pset_elink_fapl(lapl, fapl); + VRFY((ret >= 0), "H5Pset_elink_fapl succeeded"); + + tri_status = H5Lexists(fid, link_path, H5P_DEFAULT); + VRFY((tri_status == TRUE), "H5Lexists succeeded"); + + tri_status = H5Lexists(fid, link_path, lapl); + VRFY((tri_status == TRUE), "H5Lexists succeeded"); + + group = H5Oopen(fid, link_path, H5P_DEFAULT); + VRFY((group >= 0), "H5Oopen succeeded"); + + ret = H5Oclose(group); + VRFY((ret >= 0), "H5Oclose succeeded"); + + group = H5Oopen(fid, link_path, lapl); + VRFY((group >= 0), "H5Oopen succeeded"); + + ret = H5Oclose(group); + VRFY((ret >= 0), "H5Oclose succeeded"); + + ret = H5Pclose(lapl); + VRFY((ret >= 0), "H5Pclose succeeded"); + + /* close the remaining resources */ + + ret = H5Pclose(fapl); + VRFY((ret >= 0), "H5Pclose succeeded"); + + ret = H5Fclose(fid); + VRFY((ret >= 0), "H5Fclose succeeded"); + + if (i == 1) { + mrc = MPI_Comm_free(&comm); + VRFY((mrc == MPI_SUCCESS), "MPI_Comm_free succeeded"); + } + } + } + + MPI_Barrier(MPI_COMM_WORLD); + + /* delete the test files */ + if (mpi_rank == 0) { + MPI_File_delete(filename, MPI_INFO_NULL); + MPI_File_delete(filename_ext, MPI_INFO_NULL); + } +} diff --git a/testpar/t_pshutdown.c b/testpar/t_pshutdown.c index 1ffc4a0..b8028a4 100644 --- a/testpar/t_pshutdown.c +++ b/testpar/t_pshutdown.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -112,7 +112,7 @@ main(int argc, char **argv) if (MAINPROCESS) { if (0 == nerrors) - PASSED() + PASSED(); else H5_FAILED() } diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index 9ef3178..027c8c9 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -5,7 +5,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -2000,8 +2000,8 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) } if ((MAINPROCESS) && (tests_skipped > 0)) { - HDfprintf(stdout, " %lld of %lld subtests skipped to expedite testing.\n", tests_skipped, - total_tests); + HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n", + tests_skipped, total_tests); } return; @@ -3913,16 +3913,16 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type) } /* end of switch(sstest_type) */ #if CONTIG_HS_DR_PIO_TEST__DEBUG if ((MAINPROCESS) && (tests_skipped > 0)) { - HDfprintf(stdout, " run/skipped/total = %lld/%lld/%lld.\n", tests_run, tests_skipped, - total_tests); + HDfprintf(stdout, " run/skipped/total = %" PRId64 "/%" PRId64 "/%" PRId64 ".\n", + tests_run, tests_skipped, total_tests); } #endif /* CONTIG_HS_DR_PIO_TEST__DEBUG */ } } if ((MAINPROCESS) && (tests_skipped > 0)) { - HDfprintf(stdout, " %lld of %lld subtests skipped to expedite testing.\n", tests_skipped, - total_tests); + HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n", + tests_skipped, total_tests); } return; diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index 7e3894f..7c2763c 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -7,7 +7,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -843,6 +843,12 @@ coll_read_test(void) VRFY((ret >= 0), "H5D contiguous irregular collective read succeed"); /* + * Free read buffers. + */ + HDfree(matrix_out); + HDfree(matrix_out1); + + /* * Close memory file and memory dataspaces. */ ret = H5Sclose(mspaceid); diff --git a/testpar/testpar.h b/testpar/testpar.h index b2f0f30..bbf9550 100644 --- a/testpar/testpar.h +++ b/testpar/testpar.h @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/testpar/testpflush.sh.in b/testpar/testpflush.sh.in index 02f0e26..be0dcb3 100644 --- a/testpar/testpflush.sh.in +++ b/testpar/testpflush.sh.in @@ -7,7 +7,7 @@ # 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. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index ca38623..e24e1e4 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -33,9 +33,6 @@ int ngroups = 512; /* number of groups to create in root int facc_type = FACC_MPIO; /*Test file access type */ int dxfer_coll_type = DXFER_COLLECTIVE_IO; -H5E_auto2_t old_func; /* previous error handler */ -void * old_client_data; /* previous error handler arg.*/ - /* other option flags */ /* FILENAME and filenames must have the same number of names. @@ -467,6 +464,8 @@ main(int argc, char **argv) AddTest("edpl", test_plist_ed, NULL, "encode/decode Property Lists", NULL); + AddTest("extlink", external_links, NULL, "test external links", NULL); + if ((mpi_size < 2) && MAINPROCESS) { HDprintf("File Image Ops daisy chain test needs at least 2 processes.\n"); HDprintf("File Image Ops daisy chain test will be skipped \n"); diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 4393f72..007fac0 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -6,7 +6,7 @@ * 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. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -97,11 +97,9 @@ enum H5TEST_COLL_CHUNK_API { #define MSPACE1_RANK 1 /* Rank of the first dataset in memory */ #define MSPACE1_DIM 27000 /* Dataset size in memory */ #define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ -#define FSPACE_DIM1 \ - 9 /* Dimension sizes of the dataset as it is stored in the file */ -#define FSPACE_DIM2 \ - 3600 /* We will read dataset back from the file to the dataset \ - in memory with these dataspace parameters. */ +#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ +#define FSPACE_DIM2 3600 +/* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */ #define MSPACE_RANK 2 #define MSPACE_DIM1 9 #define MSPACE_DIM2 3600 @@ -227,16 +225,15 @@ typedef enum { } ShapeSameTestMethods; /* Shared global variables */ -extern int dim0, dim1; /*Dataset dimensions */ -extern int chunkdim0, chunkdim1; /*Chunk dimensions */ -extern int nerrors; /*errors count */ -extern H5E_auto2_t old_func; /* previous error handler */ -extern void * old_client_data; /*previous error handler arg.*/ -extern int facc_type; /*Test file access type */ -extern int dxfer_coll_type; +extern int dim0, dim1; /*Dataset dimensions */ +extern int chunkdim0, chunkdim1; /*Chunk dimensions */ +extern int nerrors; /*errors count */ +extern int facc_type; /*Test file access type */ +extern int dxfer_coll_type; /* Test program prototypes */ void test_plist_ed(void); +void external_links(void); void zero_dim_dset(void); void test_file_properties(void); void multiple_dset_write(void); |