1
0

Avoid running Chisel in parallel in the same directory

It looks like Chisel fails when I try to run it in parallel.  This adds a lock
file to ensure that only a single Chisel instance is running at a time when
running the regressions.
This commit is contained in:
Palmer Dabbelt 2016-01-30 20:56:36 -08:00
parent 00465b15c3
commit e18759642f

View File

@ -73,12 +73,12 @@ stamps/tools.stamp: stamps/submodules.stamp
# Builds the various simulators # Builds the various simulators
stamps/$(CONFIG)/%-ndebug.stamp: stamps/submodules.stamp stamps/tools.stamp stamps/$(CONFIG)/%-ndebug.stamp: stamps/submodules.stamp stamps/tools.stamp
mkdir -p $(dir $@) mkdir -p $(dir $@)
$(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-ndebug.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) +flock -x $(dir $@)/chisel-lock $(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-ndebug.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV))
touch $@ touch $@
stamps/$(CONFIG)/%-debug.stamp: stamps/submodules.stamp stamps/tools.stamp stamps/$(CONFIG)/%-debug.stamp: stamps/submodules.stamp stamps/tools.stamp
mkdir -p $(dir $@) mkdir -p $(dir $@)
$(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-debug.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) debug +flock -x $(dir $@)/chisel-lock $(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-debug.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) debug
touch $@ touch $@
# Runs tests on one of the simulators # Runs tests on one of the simulators