Skip to content

Commit

Permalink
[irace] put results in in a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Amine Aziz-Alaoui authored and nojhan committed Jan 19, 2021
1 parent ccc79d6 commit 640fa31
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions eo/contrib/irace/run_algo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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}"
1 change: 1 addition & 0 deletions eo/contrib/irace/run_expe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ for algo in "${algos[@]}" ; do
i=$((i+1))
done

echo "Done"

0 comments on commit 640fa31

Please sign in to comment.