]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
Adapt multithread test to work on arbitrary nb of CPU cores - another attempt V8_4_0a2
authormnt <mnt@opencascade.com>
Mon, 11 Sep 2017 10:13:06 +0000 (13:13 +0300)
committermnt <mnt@opencascade.com>
Mon, 11 Sep 2017 10:13:06 +0000 (13:13 +0300)
tests/multithread.py

index a3c10c5faae3aab11f8d793e5fef7f106b96dcec..06bf12cc3961d1bbdb1d97a587cf66b1435dfba0 100644 (file)
@@ -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