[change] try set ncores flag explicitly (WIP)

This commit is contained in:
Marcel Paffrath 2017-08-18 13:18:21 +02:00
parent 8a024b66e0
commit 4faf007e0b
2 changed files with 9 additions and 1 deletions

View File

@ -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()

View File

@ -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):