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
22 MAKE="make --no-print-directory"
26 basedir=`echo $arg | sed 's/-basedir=//'`
29 srcdir=`echo $arg | sed 's/-srcdir=//'`
32 have_fortran=`echo $arg | sed 's/-fort=//'`
35 have_selector=`echo $arg | sed 's/-selector=//'`
41 margs=`echo $arg | sed 's/-margs=//'`
50 summaryfile=`echo A$arg | sed 's/A-summaryfile=//'`
57 echo "runtests [-checkonly] [-margs='...']"
58 echo "run tests in this directory. If -checkonly set, just run"
59 echo "the differences check (do NO rerun the test programs)."
60 echo "If -margs is used, these options are passed to mpirun."
61 echo "If -small is used, the examples are built, run, and deleted."
65 if test -n "$arg" ; then
66 echo "runtests: Unknown argument ($arg)"
72 # Load basic procedures
73 . ${srcdir}/../runbase
75 # If the programs are not available, run make.
76 if [ ! -x coll1 -a $makeeach = 0 -a $runtests = 1 ] ; then
80 selector=${have_selector:+--cfg=smpi/coll_selector:$have_selector}
82 mpirun=" ${basedir}/bin/smpirun -platform ${srcdir}/../../../../examples/msg/small_platform_with_routers.xml -hostfile ${srcdir}/../../hostfile --log=root.thres:critical $selector "
84 if [ $runtests = 1 ] ; then
85 echo '**** Testing MPI Collective routines ****'
87 RunTest barrier 4 "*** Barrier Test ***" "" "barrier-0.out"
89 RunTest bcast_mpich 4 "*** Broadcast Test ***" "" "bcast-0.out bcast-1.out bcast-2.out bcast-3.out"
91 RunTest bcastvec 4 "*** Broadcast Datatype Test ***" "" "bcastvec-0.out bcastvec-1.out bcastvec-2.out bcastvec-3.out"
94 #TODO : handle MPI_BOTTOM to allow som operations to use absolute addresses
117 #weird manipulations of ranks in split, and comms -> deadlock, removed
122 # coll13 is very picky about arguments
127 # Some implementations (e.g., IBM's) forget to handle the np = 1 case.
128 #RunTest longuser 1 "*** longuser (np == 1) ***"
130 cp longuser longuser1
131 RunTest longuser1 1 '*** longuser (np == 1) ***'
135 #testfiles="$testfiles allredmany.out"
136 #rm -f allredmany.out
138 #echo '**** allredmany ****'
139 #echo '*** allredmany ***' >> allredmany.out
141 ## Run several times to try and catch timing/race conditions in managing
142 ## the flood of one-way messages.
143 #while [ $cnt -lt 20 ] ; do
144 # echo "*** allredmany run $cnt ***" >> allredmany.out
145 # $mpirun -np 2 $args allredmany >> allredmany.out 2>&1
146 # cnt=`expr $cnt + 1`
148 #echo '*** allredmany ***' >> allredmany.out
153 RunTest allred 4 "*** Allred ***"
155 RunTest allred2 4 "*** Allred2 ***"
156 #uses MPI_Dims_create, MPI_Cart_create ... removed
157 #RunTest scatterv 4 "*** Scatterv ***"
159 RunTest scattern 4 "*** Scattern ***"
161 RunTest redscat 4 "*** Reduce_scatter ***"
163 RunTest alltoallv_mpich 4 "*** Alltoallv ***"
164 echo "runtests: fortran ($have_fortran)"
166 # Run Fortran tests ONLY if Fortran available
167 if [ $have_fortran -eq "1" ] ; then
170 RunTest allredf 4 "*** Testing allreduce from Fortran ***"
172 RunTest assocf 4 "*** Testing allreduce from Fortran (2) ***"
174 RunTest bcastlog 4 "*** Testing logical datatype in BCAST ***"
175 #buggy test, not available in original test, removed
176 #RunTest allgatherf 2 "*** Testing allgather from Fortran ***"
177 echo "END OF FORTRAN TESTS"
182 testfiles=`echo *.out`
183 if test "$testfiles" = "*.out" ; then
184 echo "No output files remain from previous test!"
189 echo '*** Checking for differences from expected output ***'
190 CheckAllOutput coll.diff