[irace] put results in in a directory
This commit is contained in:
parent
ccc79d68f4
commit
640fa31fb5
2 changed files with 9 additions and 5 deletions
|
|
@ -13,6 +13,9 @@ algo="$@"
|
||||||
# You most probably want to run on release builds.
|
# You most probably want to run on release builds.
|
||||||
exe="./release/fastga"
|
exe="./release/fastga"
|
||||||
|
|
||||||
|
outdir="results"
|
||||||
|
mkdir -p ${outdir}
|
||||||
|
|
||||||
i=1 # Loop counter.
|
i=1 # Loop counter.
|
||||||
for pb in "${problems[@]}" ; do # Iterate over the problems array.
|
for pb in "${problems[@]}" ; do # Iterate over the problems array.
|
||||||
for seed in $(seq ${runs}) ; do # Iterates over runs/seeds.
|
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.
|
# echo ${cmd} # Print the command.
|
||||||
|
|
||||||
# Progress print.
|
# Progress print.
|
||||||
echo "problem ${pb}, run ${seed}"
|
echo -n "problem ${pb}, run ${seed}"
|
||||||
|
|
||||||
# Actually start the command.
|
# 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.
|
# 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)
|
perc=$(echo "scale=2;${i}/(${#problems[@]}*${runs})*100" | bc)
|
||||||
echo -e "${perc}%\n"
|
echo -e " -- ${perc}%"
|
||||||
i=$((i+1))
|
i=$((i+1))
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Done $((${#problems[@]}*${runs})) runs"
|
echo "Done $((${#problems[@]}*${runs})) runs, results in ${outdir}"
|
||||||
|
|
|
||||||
|
|
@ -19,3 +19,4 @@ for algo in "${algos[@]}" ; do
|
||||||
i=$((i+1))
|
i=$((i+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Done"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue