added scheduler variable to runall - also allow storage of multiple runs, so we can...
[pub/astra/parallel.git] / prefix / runAll.sh
1 #!/bin/bash
2
3 #TODO: alle scheduler auswerten
4 #TODO: werte der runs behalten (kein rm-rf stats) und bei jedem weiteren run soll parseDat.py alle vorhandenen runs auswerten und das minimum nehmen.
5 #TODO: im notfall in bash auswerten, sollte python nicht einfach glob'ben k├Ânnen.
6 #TODO: remove binname in output -> nonunique info - use raw filename instead.
7
8 if [ ! -f numlist.bin ]; then
9         echo "generating numfile.bin"
10         dd if=/dev/urandom of=numlist.bin bs=1000 count=100000
11 fi
12
13 STARTTS="`date --iso-8601=minutes`"
14 SCHEDULING="static dynamic guided runtime"
15 ALGORITHMS="seq datapar recurse hillis_sum hillis_partial"
16 RUNLIST="$(seq 0 250000 1000000) $(seq 0 2500000 10000000)"
17 # $(seq 0 25000000 100000000)"
18
19 #TODO: siehe oben
20 rm -rf stats
21 echo "STARTING: stats/raw/${STARTTS}"
22 mkdir -p "stats/raw/${STARTTS}"
23
24 for sched in $SCHEDULING; do
25         echo "***** sched: ${sched} *****"
26         OMP_SCHEDULE=sched
27         ulimit -s unlimited
28         for algo in $ALGORITHMS; do
29                 echo "*** algo: ${algo} ***"
30                 for i in $RUNLIST; do
31                         if [ "$i" -eq "0" ] ; then
32                                 echo "* ignoring 0 run *"
33                         else 
34                                 build/$algo -n $i > "stats/raw/tmp" 2> /dev/null
35                                 cat "stats/raw/tmp"
36                                 mv stats/raw/tmp "stats/raw/${STARTTS}/${sched}_${algo}_n${i}"
37                         fi
38                 done
39         done
40 done
41
42 echo "stats generation does not work - exitting"
43 exit 0
44
45 cd stats
46 ./parseDat.py
47
48 echo "done - hit ENTER to exit"
49 read