refactor and add more benchmarks scripts
This commit is contained in:
parent
d8e757f9ab
commit
b7e9245f26
@ -1,14 +1,19 @@
|
||||
|
||||
if [ $1 ] && [ $1 == "clear" ]; then
|
||||
rm -f *~
|
||||
rm -f ../*~
|
||||
rm -f school/*.log school/*~
|
||||
rm -f ../school/*.log ../school/*~
|
||||
rm -f city/*.log city/*~
|
||||
rm -f ../city/*.log ../city/*~
|
||||
rm -f workshop_attrs/*.log workshop_attrs/*~
|
||||
rm -f ../workshop_attrs/*.log ../workshop_attrs/*~
|
||||
fi
|
||||
|
||||
function prepare_new_run
|
||||
{
|
||||
YAP=~/bin/$SHORTNAME-$SOLVER
|
||||
|
||||
LOG_FILE=$SOLVER.log
|
||||
#LOG_FILE=results`date "+ %H:%M:%S %d-%m-%Y"`.
|
||||
|
||||
rm -f $LOG_FILE
|
||||
rm -f ignore.$LOG_FILE
|
||||
|
||||
cp ~/bin/yap $YAP
|
||||
}
|
||||
|
||||
|
||||
|
||||
function run_solver
|
||||
{
|
||||
@ -38,3 +43,35 @@ open("$LOG_FILE", 'append', S), format(S, '$constraint: ~15+ ', []), close(S).
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
|
||||
function clear_log_files
|
||||
{
|
||||
rm -f *~
|
||||
rm -f ../*~
|
||||
rm -f school/*.log school/*~
|
||||
rm -f ../school/*.log ../school/*~
|
||||
rm -f city/*.log city/*~
|
||||
rm -f ../city/*.log ../city/*~
|
||||
rm -f workshop_attrs/*.log workshop_attrs/*~
|
||||
rm -f ../workshop_attrs/*.log ../workshop_attrs/*~
|
||||
echo all done!
|
||||
}
|
||||
|
||||
|
||||
|
||||
function write_header
|
||||
{
|
||||
echo -n "************************************" >> $LOG_FILE
|
||||
echo "************************************" >> $LOG_FILE
|
||||
echo "results for solver $1" >> $LOG_FILE
|
||||
echo -n "************************************" >> $LOG_FILE
|
||||
echo "************************************" >> $LOG_FILE
|
||||
}
|
||||
|
||||
|
||||
if [ $1 ] && [ $1 == "clean" ]; then
|
||||
clear_log_files
|
||||
fi
|
||||
|
||||
|
||||
|
@ -5,13 +5,18 @@ source ../benchs.sh
|
||||
|
||||
SOLVER="bp"
|
||||
|
||||
YAP=~/bin/$SHORTNAME-$SOLVER
|
||||
|
||||
LOG_FILE=$SOLVER.log
|
||||
#LOG_FILE=results`date "+ %H:%M:%S %d-%m-%Y"`.
|
||||
|
||||
rm -f $LOG_FILE
|
||||
rm -f ignore.$LOG_FILE
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver city1000 $2
|
||||
run_solver city5000 $2
|
||||
run_solver city10000 $2
|
||||
run_solver city50000 $2
|
||||
run_solver city100000 $2
|
||||
run_solver city500000 $2
|
||||
run_solver city1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "bp(shedule=seq_fixed) " seq_fixed
|
||||
|
||||
|
@ -5,13 +5,18 @@ source ../benchs.sh
|
||||
|
||||
SOLVER="cbp"
|
||||
|
||||
YAP=~/bin/$SHORTNAME-$SOLVER
|
||||
|
||||
LOG_FILE=$SOLVER.log
|
||||
#LOG_FILE=results`date "+ %H:%M:%S %d-%m-%Y"`.
|
||||
|
||||
rm -f $LOG_FILE
|
||||
rm -f ignore.$LOG_FILE
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver city1000 $2
|
||||
run_solver city5000 $2
|
||||
run_solver city10000 $2
|
||||
run_solver city50000 $2
|
||||
run_solver city100000 $2
|
||||
run_solver city500000 $2
|
||||
run_solver city1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "cbp(shedule=seq_fixed) " seq_fixed
|
||||
|
||||
|
@ -4,22 +4,3 @@ NETWORK="'../../examples/city'"
|
||||
SHORTNAME="city"
|
||||
QUERY="is_joe_guilty(X)"
|
||||
|
||||
|
||||
function run_all_graphs
|
||||
{
|
||||
cp ~/bin/yap $YAP
|
||||
echo -n "**********************************" >> $LOG_FILE
|
||||
echo "**********************************" >> $LOG_FILE
|
||||
echo "results for solver $1" >> $LOG_FILE
|
||||
echo -n "**********************************" >> $LOG_FILE
|
||||
echo "**********************************" >> $LOG_FILE
|
||||
run_solver city_5 $2
|
||||
#run_solver city_1000 $2
|
||||
#run_solver city_5000 $2
|
||||
#run_solver city_10000 $2
|
||||
#run_solver city_50000 $2
|
||||
#run_solver city_100000 $2
|
||||
#run_solver city_500000 $2
|
||||
#run_solver city_1000000 $2
|
||||
}
|
||||
|
||||
|
@ -5,13 +5,18 @@ source ../benchs.sh
|
||||
|
||||
SOLVER="fove"
|
||||
|
||||
YAP=~/bin/$SHORTNAME-$SOLVER
|
||||
|
||||
LOG_FILE=$SOLVER.log
|
||||
#LOG_FILE=results`date "+ %H:%M:%S %d-%m-%Y"`.
|
||||
|
||||
rm -f $LOG_FILE
|
||||
rm -f ignore.$LOG_FILEE
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver city1000 $2
|
||||
run_solver city5000 $2
|
||||
run_solver city10000 $2
|
||||
run_solver city50000 $2
|
||||
run_solver city100000 $2
|
||||
run_solver city500000 $2
|
||||
run_solver city1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "fove "
|
||||
|
||||
|
@ -5,13 +5,18 @@ source ../benchs.sh
|
||||
|
||||
SOLVER="hve"
|
||||
|
||||
YAP=~/bin/$SHORTNAME-$SOLVER
|
||||
|
||||
LOG_FILE=$SOLVER.log
|
||||
#LOG_FILE=results`date "+ %H:%M:%S %d-%m-%Y"`.
|
||||
|
||||
rm -f $LOG_FILE
|
||||
rm -f ignore.$LOG_FILE
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver city1000 $2
|
||||
run_solver city5000 $2
|
||||
run_solver city10000 $2
|
||||
run_solver city50000 $2
|
||||
run_solver city100000 $2
|
||||
run_solver city500000 $2
|
||||
run_solver city1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "hve(elim_heuristic=min_neighbors) " min_neighbors
|
||||
|
||||
|
@ -5,7 +5,18 @@ source ../benchs.sh
|
||||
|
||||
SOLVER="bp"
|
||||
|
||||
YAP=~/bin/$SHORTNAME-$SOLVER
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver pop1000 $2
|
||||
run_solver pop5000 $2
|
||||
run_solver pop10000 $2
|
||||
run_solver pop50000 $2
|
||||
run_solver pop100000 $2
|
||||
run_solver pop500000 $2
|
||||
run_solver pop1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "bp(shedule=seq_fixed) " seq_fixed
|
||||
|
||||
|
@ -5,7 +5,18 @@ source ../benchs.sh
|
||||
|
||||
SOLVER="cbp"
|
||||
|
||||
YAP=~/bin/$SHORTNAME-$SOLVER
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver pop1000 $2
|
||||
run_solver pop5000 $2
|
||||
run_solver pop10000 $2
|
||||
run_solver pop50000 $2
|
||||
run_solver pop100000 $2
|
||||
run_solver pop500000 $2
|
||||
run_solver pop1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "cbp(shedule=seq_fixed) " seq_fixed
|
||||
|
||||
|
@ -5,8 +5,19 @@ source ../benchs.sh
|
||||
|
||||
SOLVER="fove"
|
||||
|
||||
YAP=~/bin/$SHORTNAME-$SOLVER
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver pop1000 $2
|
||||
run_solver pop5000 $2
|
||||
run_solver pop10000 $2
|
||||
run_solver pop50000 $2
|
||||
run_solver pop100000 $2
|
||||
run_solver pop500000 $2
|
||||
run_solver pop1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "fove "
|
||||
|
||||
|
||||
|
@ -5,7 +5,18 @@ source ../benchs.sh
|
||||
|
||||
SOLVER="hve"
|
||||
|
||||
YAP=~/bin/$SHORTNAME-$SOLVER
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver pop1000 $2
|
||||
run_solver pop000 $2
|
||||
run_solver pop10000 $2
|
||||
run_solver pop50000 $2
|
||||
run_solver pop100000 $2
|
||||
run_solver pop500000 $2
|
||||
run_solver pop1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "hve(elim_heuristic=min_neighbors) " min_neighbors
|
||||
|
||||
|
@ -4,30 +4,3 @@ NETWORK="'../../examples/workshop_attrs'"
|
||||
SHORTNAME="wa"
|
||||
QUERY="series(X)"
|
||||
|
||||
|
||||
function run_all_graphs
|
||||
{
|
||||
LOG_FILE=$SOLVER.log
|
||||
#LOG_FILE=results`date "+ %H:%M:%S %d-%m-%Y"`.
|
||||
|
||||
rm -f $LOG_FILE
|
||||
rm -f ignore.$LOG_FILE
|
||||
|
||||
cp ~/bin/yap $YAP
|
||||
|
||||
echo -n "**********************************" >> $LOG_FILE
|
||||
echo "**********************************" >> $LOG_FILE
|
||||
echo "results for solver $1" >> $LOG_FILE
|
||||
echo -n "**********************************" >> $LOG_FILE
|
||||
echo "**********************************" >> $LOG_FILE
|
||||
#run_solver pop_10 $2
|
||||
run_solver pop_1000 $2
|
||||
run_solver pop_5000 $2
|
||||
run_solver pop_10000 $2
|
||||
run_solver pop_50000 $2
|
||||
run_solver pop_100000 $2
|
||||
run_solver pop_500000 $2
|
||||
run_solver pop_1000000 $2
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user