[bugfix] fixed some bugs resulting from restructuring of serial/parallel picking

This commit is contained in:
2018-07-12 15:56:34 +02:00
parent 319343499b
commit 3b52b7a28f
3 changed files with 20 additions and 18 deletions
+6 -2
View File
@@ -118,8 +118,12 @@ def gen_Pool(ncores=0):
"""
import multiprocessing
if ncores == 0:
ncores = multiprocessing.cpu_count()
ncores_max = multiprocessing.cpu_count()
if ncores == 0 or ncores > ncores_max:
ncores = ncores_max
if ncores > ncores_max:
print('Reduced number of requested CPU slots to available number: {}'.format(ncores))
print('gen_Pool: Generated multiprocessing Pool with {} cores\n'.format(ncores))