[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Fri, 18 Nov 2022 10:39:46 -0500 (EST) |
branch: master
commit f030486c234730ef6f4add74e4f514c3989b771f
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed May 25 18:04:20 2022 +0200
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'.
---
src/cuirass/scripts/evaluate.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/cuirass/scripts/evaluate.scm b/src/cuirass/scripts/evaluate.scm
index 9c9e7a9..fa341fa 100644
--- a/src/cuirass/scripts/evaluate.scm
+++ b/src/cuirass/scripts/evaluate.scm
@@ -110,7 +110,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)
(with-store store
(inferior-evaluation store profile