src/benchmark/benchmark
changeset 986 e997802b855c
parent 742 235fd36336b7
equal deleted inserted replaced
2:2d2e663d06db 3:a180d1b08f8b
     1 #!/bin/bash
     1 #!/bin/bash
     2 
     2 
     3 function runtest () # prefix, prog, args
     3 function runtest () # prefix, prog, args
     4 {
     4 {
     5     echo $1 1>&2
     5     echo $1 1>&2
     6     $2 $3 $4 $5 $6 $7 $8 $9;
     6     $2 $3 $4 $5 $6 $7 $8 $9 >/dev/null;
     7     for ((i=1;i<=5;i++))
     7     for ((i=1;i<=3;i++))
     8       do
     8       do
     9       $2 $3 $4 $5 $6 $7 $8 $9;
     9       $2 $3 $4 $5 $6 $7 $8 $9;
    10     done |
    10     done |
    11     awk '{print "'$1'",$0}'
    11     awk '{print "'$1'",$0}'
    12 }
    12 }
    16     echo $1 1>&2
    16     echo $1 1>&2
    17     make clean >/dev/null
    17     make clean >/dev/null
    18     make CXX="$2" CXXFLAGS="$3"  >/dev/null
    18     make CXX="$2" CXXFLAGS="$3"  >/dev/null
    19     {
    19     {
    20 	runtest HCUBE19 hcube 19
    20 	runtest HCUBE19 hcube 19
       
    21 	runtest BFS13-5000 hcube 13 5000
       
    22 	runtest BFS10-50000 hcube 10 50000
    21 	runtest GRBENCH graph-bench
    23 	runtest GRBENCH graph-bench
    22     } | awk "{print \$0, \"$1\"}"
    24     } | awk "{print \$0, \"$1\"}"
    23 }
    25 }
    24 
    26 
    25 runalltest "gcc-3.3 -O2"                 g++ "-O2"
    27 runalltest "gcc-3.3 -O2"                 g++ "-O2"
    29 
    31 
    30 runalltest "gcc-3.4 -O2"                 g++-3.4 "-O2"
    32 runalltest "gcc-3.4 -O2"                 g++-3.4 "-O2"
    31 runalltest "gcc-3.4 -O2-march=pentium-m" g++-3.4 "-O2 -march=pentium-m"
    33 runalltest "gcc-3.4 -O2-march=pentium-m" g++-3.4 "-O2 -march=pentium-m"
    32 runalltest "gcc-3.4 -O3"                 g++-3.4 "-O3"
    34 runalltest "gcc-3.4 -O3"                 g++-3.4 "-O3"
    33 runalltest "gcc-3.4 -O3-march=pentium-m" g++-3.4 "-O3 -march=pentium-m"
    35 runalltest "gcc-3.4 -O3-march=pentium-m" g++-3.4 "-O3 -march=pentium-m"
       
    36          
       
    37 runalltest "icc -O2"                 icc "-O2"
       
    38 runalltest "icc -O2-march=pentium-m" icc "-O2 -march=pentium-m"
       
    39 runalltest "icc -O3"                 icc "-O3"
       
    40 runalltest "icc -O3-march=pentium-m" icc "-O3 -march=pentium-m"
    34 
    41