diff --git a/pylot/core/pick/autopick.py b/pylot/core/pick/autopick.py index 3a925666..30d93ba4 100644 --- a/pylot/core/pick/autopick.py +++ b/pylot/core/pick/autopick.py @@ -64,8 +64,11 @@ def autopickevent(data, param, iplot=0, fig_dict=None, fig_dict_wadatijack=None, print('iPlot Flag active: NO MULTIPROCESSING possible.') return all_onsets + # rename str for ncores in case ncores == 0 (use all cores) + ncores_str = ncores if ncores != 0 else 'all available' + print('Autopickstation: Distribute autopicking for {} ' - 'stations on {} cores.'.format(len(input_tuples), ncores)) + 'stations on {} cores.'.format(len(input_tuples), ncores_str)) pool = gen_Pool(ncores) result = pool.map(call_autopickstation, input_tuples) diff --git a/pylot/core/util/utils.py b/pylot/core/util/utils.py index ba691424..ff405e8d 100644 --- a/pylot/core/util/utils.py +++ b/pylot/core/util/utils.py @@ -72,6 +72,8 @@ def gen_Pool(ncores=0): if ncores == 0: ncores = multiprocessing.cpu_count() + print('gen_Pool: Generated multiprocessing Pool with {} cores\n'.format(ncores)) + pool = multiprocessing.Pool(ncores) return pool