diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2019-01-07 19:16:39 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2019-01-07 19:16:39 (GMT) |
commit | 257e05e1b2465a6876eec6995419b8f358e0ec84 (patch) | |
tree | dea1a753bf54e49fedf03603120d26abc24c537c /testpar | |
parent | 906479d3978adabbacb59da8ec7ffb85d0ddfc2f (diff) | |
download | hdf5-257e05e1b2465a6876eec6995419b8f358e0ec84.zip hdf5-257e05e1b2465a6876eec6995419b8f358e0ec84.tar.gz hdf5-257e05e1b2465a6876eec6995419b8f358e0ec84.tar.bz2 |
Merged the rest of the parallel flush test code.
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/Makefile.am | 12 | ||||
-rw-r--r-- | testpar/testpflush.sh.in | 64 |
2 files changed, 74 insertions, 2 deletions
diff --git a/testpar/Makefile.am b/testpar/Makefile.am index 7262ca6..a11099d 100644 --- a/testpar/Makefile.am +++ b/testpar/Makefile.am @@ -21,11 +21,19 @@ include $(top_srcdir)/config/commence.am 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) + +check_SCRIPTS = $(TEST_SCRIPT_PARA) + # Test programs. These are our main targets. # -TEST_PROG_PARA=t_mpi t_bigio testphdf5 t_cache t_cache_image t_pflush1 t_pflush2 t_pread t_pshutdown t_prestart t_init_term t_shapesame t_filters_parallel +TEST_PROG_PARA=t_mpi t_bigio testphdf5 t_cache t_cache_image t_pread t_pshutdown t_prestart t_init_term t_shapesame t_filters_parallel -check_PROGRAMS = $(TEST_PROG_PARA) +# t_pflush1 and t_pflush2 are used by testpflush.sh +check_PROGRAMS = $(TEST_PROG_PARA) t_pflush1 t_pflush2 testphdf5_SOURCES=testphdf5.c t_dset.c t_file.c t_file_image.c t_mdset.c \ t_ph5basic.c t_coll_chunk.c t_span_tree.c t_chunk_alloc.c t_filter_read.c \ diff --git a/testpar/testpflush.sh.in b/testpar/testpflush.sh.in new file mode 100644 index 0000000..02f0e26 --- /dev/null +++ b/testpar/testpflush.sh.in @@ -0,0 +1,64 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# +# +# Test script for the parallel flush test +# +# The parallel flush test uses two programs to test flush operations +# in parallel HDF5. The first program purposely exits without calling +# MPI_Finalize(), which is an error under the MPI standard and mpiexec +# in some implementations will return an error code even though all +# processes exit successfully. This script lets us swallow the error +# from the first program. +# +# True errors in the first program will be detected as errors in the +# second program, so watch out for that. +# +# Programmer: Dana Robinson +# Fall 2018 + +# The build (current) directory might be different than the source directory. +if test -z "$srcdir"; then + srcdir=. +fi + +# Turn the $$ we use to avoid Autotools munging into $ +# +# Allowing $$ to substitute in both the RUNPARALLEL string and the +# regexp is intentional. There doesn't seem to be a way around +# this using quote shenanigans. The downside is that there is a remote +# chance that the shell's pid will match a number in the RUNPARALLEL +# variable, but that seems less likely to cause problems than expecting +# library builders to specify two almost identical versions of the +# RUNPARALLEL command, one for use in scripts and one via Makefiles. +RUNPARALLELSCRIPT=`echo "@RUNPARALLEL@" | sed "s/$$/\$/g"` + +# ========================================== +# Run the first parallel flush test program +# (note that we ignore any errors here) +# ========================================== +echo "*** NOTE ***********************************************************" +echo "You may see complaints from mpiexec et al. that not all processes" +echo "called MPI_Finalize(). This is an intended characteristic of the" +echo "test and should not be considered an error." +echo "********************************************************************" +eval ${RUNPARALLELSCRIPT} ./t_pflush1 + + +# =========================================== +# Run the second parallel flush test program +# The return code of this call is the return +# code of the script. +# =========================================== +eval ${RUNPARALLELSCRIPT} ./t_pflush2 + |