Skip to content
Snippets Groups Projects
Commit 59de8e33 authored by Jaime Arias's avatar Jaime Arias
Browse files

fix: benchmarks script

parent 5c823c04
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,8 @@ optlp="./tools/${platform}/optlp" ...@@ -12,7 +12,8 @@ optlp="./tools/${platform}/optlp"
# results folder # results folder
output_folder="./results" output_folder="./results"
# folder with the models models_folder="./models" # folder with the models
models_folder="./models"
# create a folder if it doesn't exist # create a folder if it doesn't exist
function create_folder { function create_folder {
...@@ -41,7 +42,7 @@ function run_sog { ...@@ -41,7 +42,7 @@ function run_sog {
local output=$3 local output=$3
local timeout=$4 local timeout=$4
timeout "$timeout" $sog --input-net "$model" --bound "$bound" --output-folder "$output" || echo -e "\ntimeout ${timeout}" timeout "$timeout" $sogMBT --input-net "$model" --bound "$bound" --output-folder "$output" || echo -e "\ntimeout ${timeout}"
} }
# run optlp <lts> <output> <timeout> # run optlp <lts> <output> <timeout>
...@@ -71,18 +72,21 @@ function run_benchmark { ...@@ -71,18 +72,21 @@ function run_benchmark {
instance_name="$(basename -- $file)" instance_name="$(basename -- $file)"
# run sogMBT # run sogMBT
output_sog_file="${output}/${instance_name}.sogMBT.txt" output_sogMBT_file="${output}/${instance_name}.sogMBT.txt"
if [[ ! -f "${output_sog_file}" ]]; then if [[ ! -f "${output_sogMBT_file}" ]]; then
echo "running sogMBT (SOG bound ${bound} - timeout ${timeout}): ${file}.net" echo "running sogMBT (SOG bound ${bound} - timeout ${timeout}): ${file}.net"
run_sog "${file}.net" "$bound" "$output" "${timeout}" >"${output_sog_file}" run_sog "${file}.net" "$bound" "$output" "${timeout}" >"${output_sogMBT_file}"
fi fi
# run optlp # run optlp
# output_optlp_file="${output}/${instance_name}.optlp.txt" sog_file="${output}/${instance_name}_sog.dot"
# if [[ ! -f "${output_optlp_file}" ]]; then output_optlp_file="${output}/${instance_name}.optlp.txt"
# echo "running optlp (timeout ${timeout}): ${file}.dll" if [[ -f "${output_optlp_file}" ]]; then
# run echo "running optlp (timeout ${timeout}): ${sog_file}"
# fi run_optlp "${sog_file}" "${output}" "${timeout}" >"${output_optlp_file}"
else
echo "skipping optlp (sogMBT timeout)"
fi
done done
} }
...@@ -119,7 +123,7 @@ fi ...@@ -119,7 +123,7 @@ fi
# use "all" for run all the experiments # use "all" for run all the experiments
if [ "$MODEL" = "all" ]; then if [ "$MODEL" = "all" ]; then
MODEL=$(find "$models_folder" -mindepth 1 -type d -exec basename {} \;) MODEL=$(find "${models_folder}" -mindepth 1 -type d -exec basename {} \;)
fi fi
# run benchmark # run benchmark
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment