Skip to content

Commit 640fa31

Browse files
Amine Aziz-Alaouinojhan
authored andcommitted
[irace] put results in in a directory
1 parent ccc79d6 commit 640fa31

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

eo/contrib/irace/run_algo.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ algo="$@"
1313
# You most probably want to run on release builds.
1414
exe="./release/fastga"
1515

16+
outdir="results"
17+
mkdir -p ${outdir}
18+
1619
i=1 # Loop counter.
1720
for 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
4043
done
4144

42-
echo "Done $((${#problems[@]}*${runs})) runs"
45+
echo "Done $((${#problems[@]}*${runs})) runs, results in ${outdir}"

eo/contrib/irace/run_expe.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ for algo in "${algos[@]}" ; do
1919
i=$((i+1))
2020
done
2121

22+
echo "Done"

0 commit comments

Comments
 (0)