guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Ludovic Courtès
Date: Wed, 25 May 2022 12:06:05 -0400 (EDT)

branch: wip-bug-55441
commit 578488b5ecb96c516634c5886b512796dd82f4c3
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 8b7d1bf..160a4d2 100644
--- a/src/cuirass/scripts/evaluate.scm
+++ b/src/cuirass/scripts/evaluate.scm
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]