2 # This version puts the output from each program into a separate file.
3 # -mvhome is needed for the ANL SP, and is ignored by others
7 STOPFILE=${MPITEST_STOPTEST:-"$HOME/.stopmpichtests"}
9 MAKE="make --no-print-directory"
13 # Set mpirun to the name/path of the mpirun program
21 MAKE="make --no-print-directory"
25 basedir=`echo $arg | sed 's/-basedir=//'`
28 srcdir=`echo $arg | sed 's/-srcdir=//'`
31 have_fortran=`echo $arg | sed 's/-fort=//'`
37 margs=`echo $arg | sed 's/-margs=//'`
46 summaryfile=`echo A$arg | sed 's/A-summaryfile=//'`
53 echo "runtests [-checkonly] [-margs='...']"
54 echo "run tests in this directory. If -checkonly set, just run"
55 echo "the differences check (do NO rerun the test programs)."
56 echo "If -margs is used, these options are passed to mpirun."
57 echo "If -small is used, the examples are built, run, and deleted."
61 if test -n "$arg" ; then
62 echo "runtests: Unknown argument ($arg)"
68 # Load basic procedures
69 . ${srcdir}/../runbase
71 # If the programs are not available, run make.
72 if [ ! -x coll1 -a $makeeach = 0 -a $runtests = 1 ] ; then
76 mpirun=" ${basedir}/bin/smpirun -platform ${srcdir}/../../../../examples/msg/small_platform_with_routers.xml -hostfile ${srcdir}/../../hostfile --log=root.thres:critical"
78 if [ $runtests = 1 ] ; then
79 echo '**** Testing MPI Collective routines ****'
81 RunTest barrier 4 "*** Barrier Test ***" "" "barrier-0.out"
83 RunTest bcast_mpich 4 "*** Broadcast Test ***" "" "bcast-0.out bcast-1.out bcast-2.out bcast-3.out"
85 RunTest bcastvec 4 "*** Broadcast Datatype Test ***" "" "bcastvec-0.out bcastvec-1.out bcastvec-2.out bcastvec-3.out"
88 #TODO : handle MPI_BOTTOM to allow som operations to use absolute addresses
107 #smpi does not handle non commutative operations, removed
110 #smpi does not handle non commutative operations, removed
113 #weird manipulations of ranks in split, and comms -> deadlock, removed
118 # coll13 is very picky about arguments
123 # Some implementations (e.g., IBM's) forget to handle the np = 1 case.
124 #RunTest longuser 1 "*** longuser (np == 1) ***"
126 cp longuser longuser1
127 RunTest longuser1 1 '*** longuser (np == 1) ***'
131 #testfiles="$testfiles allredmany.out"
132 #rm -f allredmany.out
134 #echo '**** allredmany ****'
135 #echo '*** allredmany ***' >> allredmany.out
137 ## Run several times to try and catch timing/race conditions in managing
138 ## the flood of one-way messages.
139 #while [ $cnt -lt 20 ] ; do
140 # echo "*** allredmany run $cnt ***" >> allredmany.out
141 # $mpirun -np 2 $args allredmany >> allredmany.out 2>&1
142 # cnt=`expr $cnt + 1`
144 #echo '*** allredmany ***' >> allredmany.out
148 #uses MPI_Dims_create, MPI_Cart_create ... removed
149 RunTest allred 4 "*** Allred ***"
151 RunTest allred2 4 "*** Allred2 ***"
152 #uses MPI_Dims_create, MPI_Cart_create ... removed
153 #RunTest scatterv 4 "*** Scatterv ***"
155 RunTest scattern 4 "*** Scattern ***"
157 #fails, more debug needed to understand
158 RunTest redscat 4 "*** Reduce_scatter ***"
160 RunTest alltoallv_mpich 4 "*** Alltoallv ***"
161 echo "runtests: fortran ($have_fortran)"
163 # Run Fortran tests ONLY if Fortran available
164 if [ $have_fortran -eq "1" ] ; then
167 RunTest allredf 4 "*** Testing allreduce from Fortran ***"
169 RunTest assocf 4 "*** Testing allreduce from Fortran (2) ***"
171 RunTest bcastlog 4 "*** Testing logical datatype in BCAST ***"
172 #buggy test, not available in original test, removed
173 #RunTest allgatherf 2 "*** Testing allgather from Fortran ***"
174 echo "END OF FORTRAN TESTS"
179 testfiles=`echo *.out`
180 if test "$testfiles" = "*.out" ; then
181 echo "No output files remain from previous test!"
186 echo '*** Checking for differences from expected output ***'
187 CheckAllOutput coll.diff