summaryrefslogtreecommitdiffstats
path: root/testpar/testpflush.sh.in
blob: be0dcb398fdf192c18b2a349af52550f4ca6769e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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://www.hdfgroup.org/licenses.
# 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