File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ algo="$@"
1313# You most probably want to run on release builds.
1414exe=" ./release/fastga"
1515
16+ outdir=" results"
17+ mkdir -p ${outdir}
18+
1619i=1 # Loop counter.
1720for pb in " ${problems[@]} " ; do # Iterate over the problems array.
1821 for seed in $( seq ${runs} ) ; do # Iterates over runs/seeds.
@@ -25,18 +28,18 @@ for pb in "${problems[@]}" ; do # Iterate over the problems array.
2528 # echo ${cmd} # Print the command.
2629
2730 # Progress print.
28- echo " problem ${pb} , run ${seed} "
31+ echo -n " problem ${pb} , run ${seed} "
2932
3033 # Actually start the command.
31- ${cmd} > " ${name} .dat" 2> " ${name} .log"
34+ ${cmd} > " ${outdir} / ${ name} .dat" 2> " ${outdir} / ${name} .log"
3235
3336 # Check for the most common problem in the log file.
34- cat " ${name} .log" | grep " illogical performance"
37+ cat " ${outdir} / ${ name} .log" | grep " illogical performance"
3538
3639 perc=$( echo " scale=2;${i} /(${# problems[@]} *${runs} )*100" | bc)
37- echo -e " ${perc} %\n "
40+ echo -e " -- ${perc} %"
3841 i=$(( i+ 1 ))
3942 done
4043done
4144
42- echo " Done $(( ${# problems[@]} * ${runs} )) runs"
45+ echo " Done $(( ${# problems[@]} * ${runs} )) runs, results in ${outdir} "
Original file line number Diff line number Diff line change @@ -19,3 +19,4 @@ for algo in "${algos[@]}" ; do
1919 i=$(( i+ 1 ))
2020done
2121
22+ echo " Done"
You can’t perform that action at this time.
0 commit comments