diff options
author | Enrico Tassi <Enrico.Tassi@inria.fr> | 2013-12-20 17:57:45 +0100 |
---|---|---|
committer | Enrico Tassi <Enrico.Tassi@inria.fr> | 2014-01-05 16:55:58 +0100 |
commit | 49692186bc73ff26fc008ca7cc58620a76bbd582 (patch) | |
tree | 6fb84813cbafe616e3174678c0e39d4974122200 /kernel | |
parent | 738440cdf663f5d2cb4d8e4f186b1accb9dac81d (diff) |
Paral-ITP: cleanup of command line flags and more conservative default
-async-proofs off
the system behaves as in 8.4
-async-proofs lazy
proofs are delayed (when possible) but never processed in parallel
-async-proofs on
proofs are processed in parallel (when possible). The number of
workers is 1, can be changed with -async-proofs-j. Extra options to
the worker process can be given with -async-proofs-worker-flags.
The default for batch compilation used to be "lazy", now it is "off".
The "lazy" default was there to test the machinery, but it makes very
little sense in a batch scenario. If you process things sequentially,
you'd better do them immediately instead of accumulating everything in
memory until the end of the file and only then force all lazy computations.
The default for -ideslave was and still is "on". It becomes dynamically
"lazy" on a per task (proof) basis if the worker dies badly.
Note that by passing "-async-proofs on" to coqc one can produce a .vo
exploiting multiple workers. But this is rarely profitable given
that master-to-worker communication is inefficient (i.e. it really
depends on the size of proofs v.s. size of system state).
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/reduction.ml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/reduction.ml b/kernel/reduction.ml index f7805459f..5397e42f9 100644 --- a/kernel/reduction.ml +++ b/kernel/reduction.ml @@ -246,6 +246,12 @@ let in_whnf (t,stk) = let steps = ref 0 +let slave_process = + let rec f = ref (fun () -> + match !Flags.async_proofs_mode with + | Flags.APonParallel n -> let b = n > 0 in f := (fun () -> b); !f () + | _ -> f := (fun () -> false); !f ()) in + fun () -> !f () (* Conversion between [lft1]term1 and [lft2]term2 *) let rec ccnv cv_pb l2r infos lft1 lft2 term1 term2 cuniv = @@ -255,7 +261,7 @@ let rec ccnv cv_pb l2r infos lft1 lft2 term1 term2 cuniv = and eqappr cv_pb l2r infos (lft1,st1) (lft2,st2) cuniv = Util.check_for_interrupt (); incr steps; - if !steps = 10000 && !Flags.coq_slave_mode > 0 then begin + if !steps = 10000 && slave_process () then begin Thread.yield (); steps := 0; end; |