From 44412b9de5765d2f68da23faa09b679452fc7fe4 Mon Sep 17 00:00:00 2001 From: mnt Date: Mon, 11 Sep 2017 13:13:06 +0300 Subject: [PATCH] Adapt multithread test to work on arbitrary nb of CPU cores - another attempt --- tests/multithread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/multithread.py b/tests/multithread.py index a3c10c5..06bf12c 100644 --- a/tests/multithread.py +++ b/tests/multithread.py @@ -10,7 +10,7 @@ salome.salome_init() theStudy = salome.myStudy cpu_count = multiprocessing.cpu_count() -divider = cpu_count/2. +divider = min(4, cpu_count)/2. print "Running test on workstation with %d available cores" % cpu_count -- 2.39.2