3 # Copyright (C) 2011 Sebastian Pop <sebpop@gmail.com>.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details. A copy of this license
13 # can be downloaded from http://www.gnu.org/copyleft/gpl.html
15 # This file is sourced at the beginning of every benchmark in the
16 # go.sh script. It sets the CONFIG and FLAGS variables and outputs
17 # their values to the LOG file.
24 loop-interchange-block
)
25 FLAGS
="-O3 -funroll-loops -fpeel-loops -ffast-math -march=native -floop-interchange -floop-block"
28 FLAGS
="-O2 -march=native"
31 FLAGS
="-O3 -funroll-loops -fpeel-loops -ffast-math -march=native -flto -fwhole-program -flto-partition=none"
34 FLAGS
="-Ofast -march=native"
37 FLAGS
="-O3 -funroll-loops -fpeel-loops -ffast-math -march=native"
41 echo "Config $config not handled."
50 now
=`date +"%Y_%m_%d_%H_%M_%S"`
51 tag
="${bmk}_${config}_${now}"
55 echo "config file: $config" > $log
56 echo "FLAGS=$FLAGS" >> $log
66 for i
in `seq 1 $#`; do
75 procs
=`cat /proc/cpuinfo | grep "processor" | sort | tail -1 | cut -d ':' -f2 | sed -e 's/ //g'`
76 procs
=`echo "$procs + 1" | bc`