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 if [ $have_selector -eq "" ] ; then
83 selector="--cfg=smpi/coll_selector:$have_selector"
86 mpirun=" ${basedir}/bin/smpirun -platform ${srcdir}/../../../../examples/msg/small_platform_with_routers.xml -hostfile ${srcdir}/../../hostfile --log=root.thres:critical $selector "
88 if [ $runtests = 1 ] ; then
89 echo '**** Testing MPI Collective routines ****'
91 RunTest barrier 4 "*** Barrier Test ***" "" "barrier-0.out"
93 RunTest bcast_mpich 4 "*** Broadcast Test ***" "" "bcast-0.out bcast-1.out bcast-2.out bcast-3.out"
95 RunTest bcastvec 4 "*** Broadcast Datatype Test ***" "" "bcastvec-0.out bcastvec-1.out bcastvec-2.out bcastvec-3.out"
98 #TODO : handle MPI_BOTTOM to allow som operations to use absolute addresses
121 #weird manipulations of ranks in split, and comms -> deadlock, removed
126 # coll13 is very picky about arguments
131 # Some implementations (e.g., IBM's) forget to handle the np = 1 case.
132 #RunTest longuser 1 "*** longuser (np == 1) ***"
134 cp longuser longuser1
135 RunTest longuser1 1 '*** longuser (np == 1) ***'
139 #testfiles="$testfiles allredmany.out"
140 #rm -f allredmany.out
142 #echo '**** allredmany ****'
143 #echo '*** allredmany ***' >> allredmany.out
145 ## Run several times to try and catch timing/race conditions in managing
146 ## the flood of one-way messages.
147 #while [ $cnt -lt 20 ] ; do
148 # echo "*** allredmany run $cnt ***" >> allredmany.out
149 # $mpirun -np 2 $args allredmany >> allredmany.out 2>&1
150 # cnt=`expr $cnt + 1`
152 #echo '*** allredmany ***' >> allredmany.out
157 RunTest allred 4 "*** Allred ***"
159 RunTest allred2 4 "*** Allred2 ***"
160 #uses MPI_Dims_create, MPI_Cart_create ... removed
161 #RunTest scatterv 4 "*** Scatterv ***"
163 RunTest scattern 4 "*** Scattern ***"
165 RunTest redscat 4 "*** Reduce_scatter ***"
167 RunTest alltoallv_mpich 4 "*** Alltoallv ***"
168 echo "runtests: fortran ($have_fortran)"
170 # Run Fortran tests ONLY if Fortran available
171 if [ $have_fortran -eq "1" ] ; then
174 RunTest allredf 4 "*** Testing allreduce from Fortran ***"
176 RunTest assocf 4 "*** Testing allreduce from Fortran (2) ***"
178 RunTest bcastlog 4 "*** Testing logical datatype in BCAST ***"
179 #buggy test, not available in original test, removed
180 #RunTest allgatherf 2 "*** Testing allgather from Fortran ***"
181 echo "END OF FORTRAN TESTS"
186 testfiles=`echo *.out`
187 if test "$testfiles" = "*.out" ; then
188 echo "No output files remain from previous test!"
193 echo '*** Checking for differences from expected output ***'
194 CheckAllOutput coll.diff