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 / profile / 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 top_srcdir=/home/degomme/Downloads/mpich-test
10 srcdir=/home/degomme/Downloads/mpich-test/profile
11 MPICH_VERSION=
12 STOPFILE=${MPITEST_STOPTEST:-"$HOME/.stopmpichtests"}
13 mpirun="smpirun -hostfile /home/degomme/Documents/hostfile_griffon -platform /home/degomme/Documents/griffon.xml  --log=root.thres:critical"
14 MAKE="make --no-print-directory"
15 MPIRUNMVBACK=""
16 #
17 # Load basic procedures
18 . ${top_srcdir}/runbase
19 #
20 # Set mpirun to the name/path of the mpirun program
21 #FindMPIRUN
22 if [ -z "$mpirun" ] ; then
23     echo "No mpirun in path.  Testing cannot proceed."
24     exit 1
25 fi
26 #
27 # If the programs are not available, run make.
28 runtests=1
29 makeeach=0
30 writesummaryfile=no
31 quiet=0
32 check_at_once=1
33 MAKE="make --no-print-directory"
34 for arg in "$@" ; do
35     case $arg in 
36         -checkonly)
37         runtests=0
38         ;;
39         -margs=*)
40         margs=`echo $arg | sed 's/-margs=//'`
41         args="$args $margs"
42         ;;
43         -summaryfile=*)
44         writesummaryfile=yes
45         summaryfile=`echo A$arg | sed 's/A-summaryfile=//'`
46         ;;
47         -echo)
48         set -x
49         ;;
50         -small)
51         makeeach=1
52         ;;
53         -quiet)
54         shift
55         quiet=1
56         ;;
57         -atend)
58         check_at_once=0
59         ;;
60         -help|-u)
61         echo "runtests [-checkonly] [-margs='...'] [-atend]"
62         echo "run tests in this directory.  If -checkonly set, just run"
63         echo "the differences check (do NO rerun the test programs)."
64         echo "If -margs is used, these options are passed to mpirun."
65         echo "If -small is used, the examples are built, run, and deleted."
66         echo "If -atend is used, the success of the tests is checked only"
67         echo "at the end of the test rather than also after each test."
68         exit 1
69         ;;
70         *)
71         if test -n "$arg" ; then
72             echo "Passing remaining arguments to programs ($*)"
73             break
74         fi
75         ;;
76     esac
77 done
78
79 # If the programs are not available, run make.
80 if [ ! -x sendrecv -a $makeeach = 0 -a $runtests = 1 ] ; then
81     $MAKE default
82 fi
83
84 testfiles=""
85 if [ $runtests = 1 ] ; then
86 echo '**** Testing MPI Profiling routines ****'
87 #just a test for  MPI_Pcontrol, which is not implemented
88 RunTest ptest 1 "**** Testing MPI_Pcontrol ****"
89
90 RunTest colluses 4 "**** Testing for PMPI in Allreduce ****"
91
92 else
93     # Just run checks
94     testfiles=`echo *.out`
95     if test "$testfiles" = "*.out" ; then
96         echo "No output files remain from previous test!"
97         exit 1
98     fi
99 fi
100 #
101 echo '*** Checking for differences from expected output ***'
102 CheckAllOutput profile.diff
103 exit 0
104
105
106