AMPI #952: update ROMIO to MPICH2-1.4.1p1
[charm.git] / src / libs / ck-libs / ampi / romio / test / rtest.in
blobc6fd30584354a73138eb7ee06202f418a24251e6
1 #! /bin/sh
3 # Run some of the tests. If any arguments are provided, pass them to the
4 # test programs.
6 # -mvhome is needed for the ANL SP, and is ignored by others
7 args=@MPIRUNARGS@
8 device=@DEVICE@
9 top_srcdir=@top_srcdir@
10 srcdir=@srcdir@
11 MPICH_VERSION=@MPICH_VERSION@
12 STOPFILE=$HOME/.stopmpichtests
13 mpirun=${MPIRUN:-"@MPIRUN@"}
14 MAKE="@MAKE@"
15 FILENAME=test
17 # Load basic procedures
18 . ${top_srcdir}/runbase
20 # Set mpirun to the name/path of the mpirun program
21 FindMPIRUN
24 test_mpi2=@HAS_MPI2@
25 runtests=1
26 quiet=0
27 makeeach=0
28 writesummaryfile=no
29 MAKE="@MAKE@"
30 for arg in "$@" ; do
31 case $arg in
32 -checkonly )
33 runtests=0
35 -margs=*)
36 margs=`echo $arg | sed 's/-margs=//'`
37 args="$args $margs"
39 -summaryfile=*)
40 writesummaryfile=yes
41 summaryfile=`echo A$arg | sed 's/A-summaryfile=//'`
43 -small)
44 makeeach=1
46 -fname=*)
47 FILENAME=`echo $arg|sed 's/-*fname=//'`
49 -quiet)
50 shift
51 quiet=1
53 -help|-u)
54 echo "runtests [-checkonly] [-margs='...']"
55 echo "run tests in this directory. If -checkonly set, just run"
56 echo "the differences check (do NO rerun the test programs)."
57 echo "If -margs is used, these options are passed to mpirun."
58 echo "If -small is used, the examples are built, run, and deleted."
59 exit 1
62 if test -n "$arg" ; then
63 echo "runtests: Unknown argument ($arg)"
64 exit 1
67 esac
68 done
70 # If the programs are not available, run make.
71 if [ ! -x simple -a $makeeach = 0 -a $runtests = 1 ] ; then
72 $MAKE default
75 testfiles=""
76 if [ $runtests = 1 ] ; then
79 RunTest simple 4 "**** Testing simple.c ****" "-fname $FILENAME"
81 RunTest async 4 "**** Testing async.c ****" "-fname $FILENAME"
83 RunTest atomicity 4 "**** Testing atomicity.out ****" "-fname $FILENAME"
85 RunTest coll_test 4 "**** Testing coll_test.out ****" "-fname $FILENAME"
87 RunTest excl 4 "**** Testing excl.c ****" "-fname $FILENAME"
89 RunTest file_info 4 "**** Testing file_info.c ****" "-fname $FILENAME"
91 RunTest i_noncontig 2 "**** Testing i_noncontig.c ****" "-fname $FILENAME"
93 RunTest noncontig 2 "**** Testing noncontig.c ****" "-fname $FILENAME"
95 RunTest noncontig_coll 2 "**** Testing noncontig_coll.c ****" "-fname $FILENAME"
97 RunTest noncontig_coll2 4 "**** Testing noncontig_coll2.c ****" "-fname $FILENAME"
99 RunTest misc 4 "**** Testing misc.c ****" "-fname $FILENAME"
101 RunTest shared_fp 4 "**** Testing shared_fp.c ****" "-fname $FILENAME"
103 RunTest split_coll 4 "**** Testing split_coll.c ****" "-fname $FILENAME"
105 RunTest psimple 4 "**** Testing psimple.c ****" "-fname $FILENAME"
107 RunTest error 1 "**** Testing error.c ****" "-fname $FILENAME"
109 RunTest status 1 "**** Testing status.c ****" "-fname $FILENAME"
112 # Run Fortran tests ONLY if Fortran available
113 if [ @HAS_FORTRAN@ = 1 ] ; then
114 RunTest fmisc 4 "**** Testing fmisc.f ****" "-fname $FILENAME"
116 RunTest fcoll_test 4 "**** Testing fcoll_test.f ****" "-fname $FILENAME"
118 RunTest pfcoll_test 4 "**** Testing pfcoll_test.f ****" "-fname $FILENAME"
121 else
122 # Just run checks
123 testfiles=`echo *.out`
126 echo '*** Checking for differences from expected output ***'
127 CheckAllOutput context.diff
128 exit 0