update the experiments config

- feat add a template in target-runner to change the problem
- loop over irace runs for each problem
This commit is contained in:
Johann Dreo 2021-01-23 16:34:28 +01:00
commit 2fe6d03c8a
5 changed files with 26 additions and 42 deletions

View file

@ -1,19 +1,27 @@
#!/bin/bash
if [[ $# != 1 ]] ; then
echo "ERROR: build dir not indicated"
exit 1
fi
outdir="$(date --iso-8601=minutes)_results_irace"
mkdir ${outdir}
cd ${outdir}
cd $1
pwd
for p in $(seq 0 18) ; do
echo -n "Problem ${p}... "
res="results_problem_${p}"
mkdir ${res}
cd ${res}
# Fore some reason, irace absolutely need those files...
cp ../irace-config/example.scen .
cp ../irace-config/target-runner .
cp ../irace-config/default.instances .
# Fore some reason, irace absolutely need those files...
cp ../../irace-config/example.scen .
cp ../../irace-config/default.instances .
cp ../../release/fastga .
cat ../../irace-config/target-runner | sed "s/{{PROBLEM}}/${p}/" > ./target-runner
chmod u+x target-runner
# Generate the parameter list file.
./fastga -h > fastga.param 2>/dev/null
/usr/lib/R/site-library/irace/bin/irace --scenario example.scen 2>&1 | tee irace.log
# Generate the parameter list file.
./fastga -h > fastga.param 2>/dev/null
# /usr/lib/R/site-library/irace/bin/irace --scenario example.scen 2>&1 | tee irace.log
/usr/lib/R/site-library/irace/bin/irace --scenario example.scen &> irace.log
cd ..
echo " done"
done