evaluate: Create just as many threads as needed.

When using 'par-for-each', we'd spawn the whole thread pool of (ice-9
futures), with one thread per core.  Using 'n-par-for-each' allows us to
spawn just as many threads as needed.

* src/cuirass/scripts/evaluate.scm (cuirass-evaluate): Use
'n-par-for-each' instead of 'par-for-each'.
This commit is contained in:
Ludovic Courtès 2022-05-25 18:04:20 +02:00
parent 0e61131dd5
commit 578488b5ec
1 changed files with 2 additions and 1 deletions

View File

@ -116,7 +116,8 @@ registered in database."
;; speeds up the evaluation as the evaluations can be performed
;; concurrently. It also decreases the amount of memory needed
;; per evaluation process.
(par-for-each
(n-par-for-each
(min (length systems) (current-processor-count))
(lambda (system inferior)
(with-store store
(inferior-evaluation store inferior