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
23 MAKE="make --no-print-directory"
27 basedir=`echo $arg | sed 's/-basedir=//'`
30 srcdir=`echo $arg | sed 's/-srcdir=//'`
33 have_fortran=`echo $arg | sed 's/-fort=//'`
39 margs=`echo $arg | sed 's/-margs=//'`
48 summaryfile=`echo A$arg | sed 's/A-summaryfile=//'`
55 echo "runtests [-checkonly] [-margs='...']"
56 echo "run tests in this directory. If -checkonly set, just run"
57 echo "the differences check (do NO rerun the test programs)."
58 echo "If -margs is used, these options are passed to mpirun."
59 echo "If -small is used, the examples are built, run, and deleted."
63 if test -n "$arg" ; then
64 echo "runtests: Unknown argument ($arg)"
70 # Load basic procedures
71 . ${srcdir}/../runbase
73 # If the programs are not available, run make.
74 if [ ! -x coll1 -a $makeeach = 0 -a $runtests = 1 ] ; then
78 mpirun=" ${basedir}/bin/smpirun -platform ${srcdir}/../../../../examples/msg/small_platform_with_routers.xml -hostfile ${srcdir}/../../hostfile --log=root.thres:critical"
80 if [ $runtests = 1 ] ; then
81 echo '**** Testing MPI Collective routines ****'
83 RunTest barrier 4 "*** Barrier Test ***" "" "barrier-0.out"
85 RunTest bcast_mpich 4 "*** Broadcast Test ***" "" "bcast-0.out bcast-1.out bcast-2.out bcast-3.out"
87 RunTest bcastvec 4 "*** Broadcast Datatype Test ***" "" "bcastvec-0.out bcastvec-1.out bcastvec-2.out bcastvec-3.out"
90 #TODO : handle MPI_BOTTOM to allow som operations to use absolute addresses
109 #smpi does not handle non commutative operations, removed
112 #smpi does not handle non commutative operations, removed
115 #weird manipulations of ranks in split, and comms -> deadlock, removed
120 # coll13 is very picky about arguments
125 # Some implementations (e.g., IBM's) forget to handle the np = 1 case.
126 #RunTest longuser 1 "*** longuser (np == 1) ***"
128 cp longuser longuser1
129 RunTest longuser1 1 '*** longuser (np == 1) ***'
133 #testfiles="$testfiles allredmany.out"
134 #rm -f allredmany.out
136 #echo '**** allredmany ****'
137 #echo '*** allredmany ***' >> allredmany.out
139 ## Run several times to try and catch timing/race conditions in managing
140 ## the flood of one-way messages.
141 #while [ $cnt -lt 20 ] ; do
142 # echo "*** allredmany run $cnt ***" >> allredmany.out
143 # $mpirun -np 2 $args allredmany >> allredmany.out 2>&1
144 # cnt=`expr $cnt + 1`
146 #echo '*** allredmany ***' >> allredmany.out
150 #uses MPI_Dims_create, MPI_Cart_create ... removed
151 RunTest allred 4 "*** Allred ***"
153 RunTest allred2 4 "*** Allred2 ***"
154 #uses MPI_Dims_create, MPI_Cart_create ... removed
155 #RunTest scatterv 4 "*** Scatterv ***"
157 RunTest scattern 4 "*** Scattern ***"
159 #fails, more debug needed to understand
160 #RunTest redscat 4 "*** Reduce_scatter ***"
162 RunTest alltoallv_mpich 4 "*** Alltoallv ***"
163 echo "runtests: fortran ($have_fortran)"
165 # Run Fortran tests ONLY if Fortran available
166 if [ $have_fortran -eq "1" ] ; then
169 RunTest allredf 4 "*** Testing allreduce from Fortran ***"
171 RunTest assocf 4 "*** Testing allreduce from Fortran (2) ***"
173 RunTest bcastlog 4 "*** Testing logical datatype in BCAST ***"
174 #buggy test, not available in original test, removed
175 #RunTest allgatherf 2 "*** Testing allgather from Fortran ***"
176 echo "END OF FORTRAN TESTS"
181 testfiles=`echo *.out`
182 if test "$testfiles" = "*.out" ; then
183 echo "No output files remain from previous test!"
188 echo '*** Checking for differences from expected output ***'
189 CheckAllOutput coll.diff