[irace] put results in in a directory

This commit is contained in:
Amine Aziz-Alaoui 2021-01-19 18:42:06 +01:00 committed by nojhan
commit 640fa31fb5
2 changed files with 9 additions and 5 deletions

View file

@ -13,6 +13,9 @@ algo="$@"
# You most probably want to run on release builds.
exe="./release/fastga"
outdir="results"
mkdir -p ${outdir}
i=1 # Loop counter.
for pb in "${problems[@]}" ; do # Iterate over the problems array.
for seed in $(seq ${runs}) ; do # Iterates over runs/seeds.
@ -25,18 +28,18 @@ for pb in "${problems[@]}" ; do # Iterate over the problems array.
# echo ${cmd} # Print the command.
# Progress print.
echo "problem ${pb}, run ${seed}"
echo -n "problem ${pb}, run ${seed}"
# Actually start the command.
${cmd} > "${name}.dat" 2> "${name}.log"
${cmd} > "${outdir}/${name}.dat" 2> "${outdir}/${name}.log"
# Check for the most common problem in the log file.
cat "${name}.log" | grep "illogical performance"
cat "${outdir}/${name}.log" | grep "illogical performance"
perc=$(echo "scale=2;${i}/(${#problems[@]}*${runs})*100" | bc)
echo -e "${perc}%\n"
echo -e " -- ${perc}%"
i=$((i+1))
done
done
echo "Done $((${#problems[@]}*${runs})) runs"
echo "Done $((${#problems[@]}*${runs})) runs, results in ${outdir}"

View file

@ -19,3 +19,4 @@ for algo in "${algos[@]}" ; do
i=$((i+1))
done
echo "Done"