From 4faf007e0b87ef29cd84c2d165348ea083562817 Mon Sep 17 00:00:00 2001 From: marcel Date: Fri, 18 Aug 2017 13:18:21 +0200 Subject: [PATCH] [change] try set ncores flag explicitly (WIP) --- pylot/core/pick/autopick.py | 3 +++ pylot/core/util/widgets.py | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pylot/core/pick/autopick.py b/pylot/core/pick/autopick.py index 158704aa..56b69a7d 100644 --- a/pylot/core/pick/autopick.py +++ b/pylot/core/pick/autopick.py @@ -63,6 +63,9 @@ def autopickevent(data, param, iplot=0, fig_dict=None, ncores=0, metadata=None, print('iPlot Flag active: NO MULTIPROCESSING possible.') return all_onsets + print('Autopickstation: Distribute autopicking for {} ' + 'stations on {} cores.'.format(len(input_tuples), ncores)) + pool = gen_Pool(ncores) result = pool.map(call_autopickstation, input_tuples) pool.close() diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 77347459..62a6dd80 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -2949,7 +2949,12 @@ class Submit2Grid(QWidget): def genShellScript(self, pp_export): outfile = open(self.script_fn, 'w') outfile.write('#!/bin/sh\n\n') - outfile.write('python autoPyLoT.py -i {} \n'.format(pp_export)) + try: + ncores = int(self.textedit.text().split()[-1]) + ncores = '--ncores {}'.format(ncores) + except: + ncores = None + outfile.write('python autoPyLoT.py -i {} {}\n'.format(pp_export, ncores)) outfile.close() def execute_script(self):