3 # Run some of the tests. If any arguments are provided, pass them to the
6 # -mvhome is needed for the ANL SP, and is ignored by others
10 STOPFILE=${MPITEST_STOPTEST:-"$HOME/.stopmpichtests"}
11 MAKE="make --no-print-directory"
14 # Set mpirun to the name/path of the mpirun program
24 MAKE="make --no-print-directory"
28 basedir=`echo $arg | sed 's/-basedir=//'`
31 srcdir=`echo $arg | sed 's/-srcdir=//'`
34 have_fortran=`echo $arg | sed 's/-fort=//'`
40 margs=`echo $arg | sed 's/-margs=//'`
45 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)"
72 # Load basic procedures
73 . ${srcdir}/../runbase
75 # If the programs are not available, run make.
76 if [ ! -x attrerr -a $makeeach = 0 -a $runtests = 1 ] ; then
79 mpirun=" ${basedir}/bin/smpirun -platform ${srcdir}/../../../../examples/msg/small_platform_with_routers.xml -hostfile ${srcdir}/../../hostfile --log=root.thres:critical"
81 if [ $runtests = 1 ] ; then
84 # Run Fortran tests ONLY if Fortran available
86 RunTest attrtest 2 "*** Testing attributes from Fortran ***"
88 if [ $test_mpi2 = 1 ] ; then
89 RunTest commnamesf 1 "*** Testing Communicator Names from Fortran ***"
92 #uses attr, not implemented
93 #RunTest attrt 2 "*** Testing attributes ***"
94 #fails, uses MPI_Attr_get, et MPI_Attr_put
95 #RunTest attrerr 1 "*** Testing attributes (2) ***"
97 #TODO : fails with unions, excludes or intersections, need debug in smpi to work
98 #RunTest grouptest_mpich 4 "*** Testing Groups ***"
100 RunTest groupcreate 4 "*** Testing Group creation ***"
102 #uses MPI_Intercomm_create
103 #RunTest ictest 4 "*** Testing Intercommunicators ***"
105 RunTest icdup 3 "*** Testing dup of an intercommunicator ***"
108 # ictest2 relies on a inconsistency in the standard, to wit, that the
109 # leader in both groups can be the same process. This seems to be
110 # essential in a dynamic setting, since the only process both groups can
111 # access may be the single parent process (other than using client/server
112 # intercommunicator creating routines, with the parent providing the common
115 #testfiles="$testfiles ictest2.out"
118 #echo '*** Testing Intercommunicators (2) ***'
119 #echo '*** Testing Intercommunicators (2) ***' >> ictest2.out
120 #$mpirun $args -np 4 ictest2 $* >> ictest2.out 2>&1
121 #echo '*** Testing Intercommunicators (2) ***' >> ictest2.out
123 #uses MPI_Comm_test_inter and MPI_Intercomm_create
124 #RunTest ictest3 4 "*** Testing Intercommunicators (3) ***"
126 #if [ $have_fortran -eq "1" ] ; then
127 # RunTest commnamesf 2 "*** Testing Communicator Names ***"
131 # testfiles=`echo *.out`
134 echo '*** Checking for differences from expected output ***'
135 CheckAllOutput context.diff