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
6 #top_srcdir=/home/degomme/Downloads/mpich-test
7 #srcdir=/home/degomme/Downloads/mpich-test/coll
9 STOPFILE=${MPITEST_STOPTEST:-"$HOME/.stopmpichtests"}
11 MAKE="make --no-print-directory"
15 # Set mpirun to the name/path of the mpirun program
22 MAKE="make --no-print-directory"
26 basedir=`echo $arg | sed 's/-basedir=//'`
29 srcdir=`echo $arg | sed 's/-srcdir=//'`
35 margs=`echo $arg | sed 's/-margs=//'`
44 summaryfile=`echo A$arg | sed 's/A-summaryfile=//'`
51 echo "runtests [-checkonly] [-margs='...']"
52 echo "run tests in this directory. If -checkonly set, just run"
53 echo "the differences check (do NO rerun the test programs)."
54 echo "If -margs is used, these options are passed to mpirun."
55 echo "If -small is used, the examples are built, run, and deleted."
59 if test -n "$arg" ; then
60 echo "runtests: Unknown argument ($arg)"
66 # Load basic procedures
67 . ${srcdir}/../runbase
69 # If the programs are not available, run make.
70 if [ ! -x coll1 -a $makeeach = 0 -a $runtests = 1 ] ; then
74 mpirun=" ${basedir}/bin/smpirun -platform ${srcdir}/../../../../examples/msg/small_platform_with_routers.xml -hostfile ${srcdir}/../../hostfile --log=root.thres:critical"
76 if [ $runtests = 1 ] ; then
77 echo '**** Testing MPI Collective routines ****'
79 RunTest barrier 4 "*** Barrier Test ***" "" "barrier-0.out"
81 RunTest bcast_mpich 4 "*** Broadcast Test ***" "" "bcast-0.out bcast-1.out bcast-2.out bcast-3.out"
83 RunTest bcastvec 4 "*** Broadcast Datatype Test ***" "" "bcastvec-0.out bcastvec-1.out bcastvec-2.out bcastvec-3.out"
86 #TODO : handle MPI_BOTTOM to allow som operations to use absolute addresses
105 #smpi does not handle non commutative operations, removed
108 #smpi does not handle non commutative operations, removed
111 #weird manipulations of ranks in split, and comms -> deadlock, removed
116 # coll13 is very picky about arguments
121 # Some implementations (e.g., IBM's) forget to handle the np = 1 case.
122 #RunTest longuser 1 "*** longuser (np == 1) ***"
124 cp longuser longuser1
125 RunTest longuser1 1 '*** longuser (np == 1) ***'
129 #testfiles="$testfiles allredmany.out"
130 #rm -f allredmany.out
132 #echo '**** allredmany ****'
133 #echo '*** allredmany ***' >> allredmany.out
135 ## Run several times to try and catch timing/race conditions in managing
136 ## the flood of one-way messages.
137 #while [ $cnt -lt 20 ] ; do
138 # echo "*** allredmany run $cnt ***" >> allredmany.out
139 # $mpirun -np 2 $args allredmany >> allredmany.out 2>&1
140 # cnt=`expr $cnt + 1`
142 #echo '*** allredmany ***' >> allredmany.out
146 #uses MPI_Dims_create, MPI_Cart_create ... removed
147 #RunTest allred 4 "*** Allred ***"
149 RunTest allred2 4 "*** Allred2 ***"
150 #uses MPI_Dims_create, MPI_Cart_create ... removed
151 #RunTest scatterv 4 "*** Scatterv ***"
153 RunTest scattern 4 "*** Scattern ***"
155 #fails, more debug needed to understand
156 #RunTest redscat 4 "*** Reduce_scatter ***"
158 RunTest alltoallv_mpich 4 "*** Alltoallv ***"
161 # Run Fortran tests ONLY if Fortran available
165 RunTest allredf 4 "*** Testing allreduce from Fortran ***"
167 RunTest assocf 4 "*** Testing allreduce from Fortran (2) ***"
169 RunTest bcastlog 4 "*** Testing logical datatype in BCAST ***"
170 echo "END OF FORTRAN TESTS"
175 testfiles=`echo *.out`
176 if test "$testfiles" = "*.out" ; then
177 echo "No output files remain from previous test!"
182 echo '*** Checking for differences from expected output ***'
183 CheckAllOutput coll.diff