From: mnt Date: Mon, 11 Sep 2017 10:13:06 +0000 (+0300) Subject: Adapt multithread test to work on arbitrary nb of CPU cores - another attempt X-Git-Tag: V8_4_0a2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5221eac7516702ea760cf565a0e90fb8cf96c31e;p=plugins%2Fblsurfplugin.git Adapt multithread test to work on arbitrary nb of CPU cores - another attempt --- 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