Mercurial > repos > icfp2012
annotate tuning.sh @ 67:ff8d7b4499f5 default tip
Submission prep
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 16 Jul 2012 04:48:50 -0700 |
parents | 397089dccb32 |
children |
rev | line source |
---|---|
57
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #!/bin/sh |
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 echo $@ >> tuningresults.txt |
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 echo >> tuningresults.txt |
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 |
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 for file in maps/contest1.map maps/contest2.map maps/contest3.map maps/contest4.map maps/contest5.map maps/contest6.map maps/contest7.map maps/contest8.map; do |
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 /usr/bin/time -f %E -o tuntiming.txt bin/lifter $@ < $file 2>tunout.txt |
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 text=`tail -n 6 tunout.txt` |
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 score=`echo $text | sed 's/.*score: \([0-9]*\).*/\1/'` |
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 time=`cat tuntiming.txt` |
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 echo "$file: $score ($time)"; |
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 echo "$file: $score ($time)" >> tuningresults.txt |
397089dccb32
Compile with -O2. Add tuning parameters and tuning results script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 done |