mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 11:15:43 -05:00
Added skeleton for bench makefile
This commit is contained in:
parent
f1a9245953
commit
4cde71cce2
2 changed files with 34 additions and 0 deletions
27
bench/Makefile
Normal file
27
bench/Makefile
Normal 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
7
bench/run_prover
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CMD="$0"
|
||||||
|
FILE="$1"
|
||||||
|
LOG="$2"
|
||||||
|
|
||||||
|
sleep 1
|
||||||
Loading…
Add table
Reference in a new issue