Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
first commit to add the mpich-test suite to smpi tesh suite. Obviously all tests...
[simgrid.git] / teshsuite / smpi / mpich-test / context / runtests
1 #! /bin/sh
2 #
3 # Run some of the tests.  If any arguments are provided, pass them to the
4 # test programs.
5 #
6 # -mvhome is needed for the ANL SP, and is ignored by others
7 args=
8 device=
9 MPICH_VERSION=
10 STOPFILE=${MPITEST_STOPTEST:-"$HOME/.stopmpichtests"}
11 MAKE="make --no-print-directory"
12
13 #
14 # Set mpirun to the name/path of the mpirun program
15 #FindMPIRUN
16 #
17 #
18 test_mpi2=1
19 runtests=1
20 quiet=0
21 makeeach=0
22 writesummaryfile=no
23 MAKE="make --no-print-directory"
24 for arg in "$@" ; do
25     case $arg in 
26     -basedir=* )
27         basedir=`echo $arg | sed 's/-basedir=//'`
28         ;; 
29     -srcdir=* )
30         srcdir=`echo $arg | sed 's/-srcdir=//'`
31         ;; 
32         -checkonly )
33         runtests=0
34         ;;
35         -margs=*)
36         margs=`echo $arg | sed 's/-margs=//'`
37         args="$args $margs"
38         ;;
39         -summaryfile=*)
40         writesummaryfile=yes
41         summaryfile=`echo A$arg | sed 's/A-summaryfile=//'`
42         ;;
43         -small)
44         makeeach=1
45         ;;
46         -quiet)
47         shift
48         quiet=1
49         ;;
50         -help|-u)
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."
56         exit 1
57         ;;
58         *)
59         if test -n "$arg" ; then
60             echo "runtests: Unknown argument ($arg)"
61             exit 1
62         fi
63         ;;
64     esac
65 done
66
67 #
68 # Load basic procedures
69 . ${srcdir}/../runbase
70
71 # If the programs are not available, run make.
72 if [ ! -x attrerr -a $makeeach = 0 -a $runtests = 1 ] ; then
73     $MAKE
74 fi
75 mpirun=" ${basedir}/bin/smpirun -platform ${srcdir}/../../../../examples/msg/small_platform_with_routers.xml -hostfile ${srcdir}/../../hostfile  --log=root.thres:critical"
76 testfiles=""
77 if [ $runtests = 1 ] ; then
78
79 #
80 # Run Fortran tests ONLY if Fortran available
81 if [ 0 = 1 ] ; then 
82     RunTest attrtest 2 "*** Testing attributes from Fortran ***"
83
84     if [ $test_mpi2 = 1 ] ; then
85        RunTest commnamesf 1 "*** Testing Communicator Names from Fortran ***"
86     fi
87 fi
88 #uses attr, not implemented
89 #RunTest attrt 2 "*** Testing attributes ***"
90 #fails
91 RunTest attrerr 1 "*** Testing attributes (2) ***"
92
93 #fails with unions, excludes or intersections, need debug in smpi to work -> left, but wrong
94 RunTest grouptest_mpich 4 "*** Testing Groups ***"
95
96 RunTest groupcreate 4 "*** Testing Group creation ***"
97
98 #uses MPI_Intercomm_create
99 #RunTest ictest 4 "*** Testing Intercommunicators ***"
100
101 RunTest icdup 3 "*** Testing dup of an intercommunicator ***"
102
103 #
104 # ictest2 relies on a inconsistency in the standard, to wit, that the
105 # leader in both groups can be the same process.  This seems to be
106 # essential in a dynamic setting, since the only process both groups can
107 # access may be the single parent process (other than using client/server
108 # intercommunicator creating routines, with the parent providing the common
109 # information).
110 #
111 #testfiles="$testfiles ictest2.out"
112 #rm -f ictest2.out
113 #MakeExe ictest2
114 #echo '*** Testing Intercommunicators (2) ***'
115 #echo '*** Testing Intercommunicators (2) ***' >> ictest2.out
116 #$mpirun $args -np 4 ictest2 $* >> ictest2.out 2>&1
117 #echo '*** Testing Intercommunicators (2) ***' >> ictest2.out
118 #CleanExe ictest2
119 #uses MPI_Comm_test_inter and MPI_Intercomm_create
120 #RunTest ictest3 4 "*** Testing Intercommunicators (3) ***"
121
122 if [ 0 = 1 ] ; then
123
124     RunTest commnames 2 "*** Testing Communicator Names ***"
125 fi
126 else
127     # Just run checks
128     testfiles=`echo *.out`
129 fi
130
131 echo '*** Checking for differences from expected output ***'
132 CheckAllOutput context.diff
133 exit 0
134
135
136