Added skeleton for bench makefile

This commit is contained in:
Guillaume Bury 2014-11-05 13:17:55 +01:00
parent f1a9245953
commit 4cde71cce2
2 changed files with 34 additions and 0 deletions

27
bench/Makefile Normal file
View file

@ -0,0 +1,27 @@
SOLVER =../sat_solve.native
OPTIONS =-t 30s -s 1G
CMD = $(SOLVER) $(OPTIONS)
LOGDIR := logs
LOG := $(shell date +'$(LOGDIR)/sat_%Y-%m-%d-%H%M')
CNF := $(shell find ./ -name "*.cnf" -type f)
DONE := $(CNF:.cnf=.done)
all: $(LOG) $(DONE)
@find ./ -name "*.done" -type f -delete
@echo "All done."
$(LOG):
@mkdir -p $(LOGDIR)
@touch $(LOG)
@echo "Log file : $(LOG)"
@echo "Date : `date +'%H:%M %d-%m-%Y'`" | tee -a $(LOG)
@echo "Command : '$(CMD)'" | tee -a $(LOG)
@echo "Commit : `git rev-parse HEAD`" | tee -a $(LOG)
%.done : %.cnf $(LOG)
@./run_prover "$(CMD)" "$*" "$(LOG)"
@touch $*.done
clean:
@find ./ -name "*.done" -type f -delete

7
bench/run_prover Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
CMD="$0"
FILE="$1"
LOG="$2"
sleep 1