Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
modify .std files to comply, as fortran ones were outputing weird things
[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
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 have_fortran=0
33 check_at_once=1
34 MAKE="make --no-print-directory"
35 for arg in "$@" ; do
36     case $arg in 
37     -basedir=* )
38         basedir=`echo $arg | sed 's/-basedir=//'`
39         ;; 
40     -srcdir=* )
41         srcdir=`echo $arg | sed 's/-srcdir=//'`
42         ;; 
43         -fort=* )
44         have_fortran=`echo $arg | sed 's/-fort=//'`
45         ;;
46         -checkonly)
47         runtests=0
48         ;;
49         -margs=*)
50         margs=`echo $arg | sed 's/-margs=//'`
51         args="$args $margs"
52         ;;
53         -summaryfile=*)
54         writesummaryfile=yes
55         summaryfile=`echo A$arg | sed 's/A-summaryfile=//'`
56         ;;
57         -echo)
58         set -x
59         ;;
60         -small)
61         makeeach=1
62         ;;
63         -quiet)
64         shift
65         quiet=1
66         ;;
67         -atend)
68         check_at_once=0
69         ;;
70         -help|-u)
71         echo "runtests [-checkonly] [-margs='...'] [-atend]"
72         echo "run tests in this directory.  If -checkonly set, just run"
73         echo "the differences check (do NO rerun the test programs)."
74         echo "If -margs is used, these options are passed to mpirun."
75         echo "If -small is used, the examples are built, run, and deleted."
76         echo "If -atend is used, the success of the tests is checked only"
77         echo "at the end of the test rather than also after each test."
78         exit 1
79         ;;
80         *)
81         if test -n "$arg" ; then
82             echo "Passing remaining arguments to programs ($*)"
83             break
84         fi
85         ;;
86     esac
87 done
88 mpirun=" ${basedir}/bin/smpirun -platform ${srcdir}/../../../../examples/msg/small_platform_with_routers.xml -hostfile ${srcdir}/../../hostfile  --log=root.thres:critical"
89 # If the programs are not available, run make.
90 if [ ! -x sendrecv -a $makeeach = 0 -a $runtests = 1 ] ; then
91     $MAKE default
92 fi
93
94 testfiles=""
95 if [ $runtests = 1 ] ; then
96 echo '**** Testing MPI Profiling routines ****'
97 #just a test for  MPI_Pcontrol, which is not implemented
98 RunTest ptest 1 "**** Testing MPI_Pcontrol ****"
99
100 RunTest colluses 4 "**** Testing for PMPI in Allreduce ****"
101
102 else
103     # Just run checks
104     testfiles=`echo *.out`
105     if test "$testfiles" = "*.out" ; then
106         echo "No output files remain from previous test!"
107         exit 1
108     fi
109 fi
110 #
111 echo '*** Checking for differences from expected output ***'
112 CheckAllOutput profile.diff
113 exit 0
114
115
116