root / benchmark / run.sh

Revision 43, 3.4 kB (checked in by pernet, 1 year ago)

Updating the benchmark section to make it work with fflas-ffpack

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3TEST_NAME=`date '+%F-%Hh%M'`
4ARCH_NAME=`uname -p`
5CURRENT_PATH=`pwd`
6
7if test "$ARCH_NAME"="unknown"; then
8    echo "Enter the architecture name:"
9    read ARCH_NAME
10fi;
11
12TARGET_PATH="${CURRENT_PATH}/Target/${ARCH_NAME}"
13TEST_PATH="${TARGET_PATH}/${TEST_NAME}"
14TEST_SRC_PATH="${CURRENT_PATH}/test-src"
15
16DOING_COMPILATION="yes"
17NEW_ARCH="yes"
18
19
20
21if test -d ${TARGET_PATH}; then
22    NEW_ARCH="no"
23    echo "The $ARCH_NAME architecture has been already tested."
24    while [ "$answer" != "yes" -a  "$answer" != "no"  ]; do
25      echo -n "Do you want to perform another test? yes/no : "
26      read answer
27    done
28    if test  "$answer" = "no"; then
29        echo "You cancelled this script ! Bye Bye ..."
30        exit
31    else
32        answer=" "
33        while [ "$answer" != "yes" -a  "$answer" != "no"  ]; do
34            echo -n "Do you want to recompile the sources? yes/no : "
35            read answer
36        done
37        if test  "$answer" = "no"; then
38            DOING_COMPILATION="no"
39        else
40            DOING_COMPILATION="yes"
41        fi
42    fi   
43    mkdir $-P ${TEST_PATH}
44else
45    mkdir -p ${TARGET_PATH}
46    mkdir -p ${TEST_PATH}
47fi
48 
49echo
50
51if test "${DOING_COMPILATION}" = "yes"; then
52
53    echo "Launching compilation..."
54    echo " errors will be redirected to ${TARGET_PATH}/compilation.log"
55    echo
56
57    if test -f ${TARGET_PATH}/compilation.log; then
58        rm ${TARGET_PATH}/compilation.log
59    fi
60   
61    export TARGET_PATH
62
63## Launch GOTO test compilation
64    BIN_PATH="${TARGET_PATH}/GOTO"
65    if test -d ${BIN_PATH}; then
66        rm -rf "${BIN_PATH}/*"
67    else
68        mkdir -p ${BIN_PATH}
69    fi
70    export BIN_PATH
71    cd  ${CURRENT_PATH}/src/FFLAS_FFPACK
72    echo "Compiling FFLAS_FFPACK with GOTO..."
73    echo "Compiling FFLAS_FFPACK with GOTO..." >> ${TARGET_PATH}/compilation.log
74    make -k GOTO_LINK=true && echo "compilation done" && echo
75    cd  ${CURRENT_PATH}/src/BLAS_LAPACK
76    echo "Compiling BLAS_LAPACK with GOTO..."
77    echo "Compiling BLAS_LAPACK with GOTO..."  >> ${TARGET_PATH}/compilation.log
78    make -k GOTO_LINK=true && echo "compilation done" && echo
79   
80   
81## Launch ATLAS test compilation
82    BIN_PATH="${TARGET_PATH}/ATLAS"
83    if test -d ${BIN_PATH}; then
84        rm -rf "${BIN_PATH}/*"
85    else
86        mkdir -p ${BIN_PATH}
87    fi
88    export BIN_PATH
89    cd  ${CURRENT_PATH}/src/FFLAS_FFPACK 
90    echo "Compiling FFLAS_FFPACK with ATLAS..."
91    echo "Compiling FFLAS_FFPACK with ATLAS..."  >> ${TARGET_PATH}/compilation.log
92   make -k ATLAS_LINK=true && echo "compilation done" && echo
93    cd  ${CURRENT_PATH}/src/BLAS_LAPACK
94    echo "Compiling BLAS_LAPACK with ATLAS..."
95    echo "Compiling BLAS_LAPACK with ATLAS..."  >> ${TARGET_PATH}/compilation.log
96    make -k ATLAS_LINK=true && echo "compilation done" && echo
97else
98    echo "Skipping compilation..."
99    echo
100fi
101
102
103## launch testing phase
104echo "Launching test..."
105echo
106export TEST_SRC_PATH
107export TEST_PATH
108
109## Run GOTO test
110BIN_PATH="${TARGET_PATH}/GOTO"
111TEST_PATH="${TARGET_PATH}/${TEST_NAME}/GOTO"
112mkdir -p ${TEST_PATH}
113export TEST_PATH
114export BIN_PATH
115echo "running FFLAS_FFPACK tests with GOTO..."
116${TEST_SRC_PATH}/mesure-FFLAS_FFPACK.sh
117echo "running BLAS_LAPACK tests with GOTO..."
118${TEST_SRC_PATH}/mesure-BLAS_LAPACK.sh
119
120
121## Run ATLAS test
122BIN_PATH="${TARGET_PATH}/ATLAS"
123TEST_PATH="${TARGET_PATH}/${TEST_NAME}/ATLAS"
124mkdir -p ${TEST_PATH}
125export TEST_PATH
126export BIN_PATH
127echo "running FFLAS_FFPACK tests with ATLAS..."
128${TEST_SRC_PATH}/mesure-FFLAS_FFPACK.sh
129echo "running BLAS_LAPACK tests with ATLAS..."
130${TEST_SRC_PATH}/mesure-BLAS_LAPACK.sh
Note: See TracBrowser for help on using the browser.