From 5e2dc6c9f9cfaeff5791afdbd5da33c767620138 Mon Sep 17 00:00:00 2001 From: marcel Date: Thu, 3 Aug 2017 10:15:54 +0200 Subject: [PATCH] [add] improved submit functions --- pylot/core/util/widgets.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index ecb57d37..0d9ca9c5 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -2927,7 +2927,7 @@ class Submit2Grid(QWidget): self.setDefaultCommand() def setDefaultCommand(self): - default_command = 'qsub -l low -cwd -q "TARGET_MACHINE" -pe mpi-fu NCORES' + default_command = 'qsub -l low -cwd -q TARGET_MACHINE -pe mpi-fu NCORES' self.textedit.setText(default_command) def start(self, pp_export): @@ -2941,12 +2941,11 @@ class Submit2Grid(QWidget): outfile.close() def execute_script(self): - command = self.textedit.text().strip() - command += ' ' - command += self.script_fn - pid = subprocess.Popen(command) - print('exec. command: {}'.format(command)) - print('Spawned autoPyLoT process with pid {}'.format(pid)) + command = self.textedit.text().strip().split(' ') + command.append(self.script_fn) + p = subprocess.Popen(command) + print('exec. command: {}'.format(str(command))) + print('Spawned autoPyLoT process with pid {}'.format(p.pid)) class SubmitLocal(QWidget): @@ -2969,7 +2968,7 @@ class SubmitLocal(QWidget): def execute_command(self, pp_export): command = self.script_fn command.append(pp_export) - print('exec. command: {}'.format(command)) + print('exec. command: {}'.format(str(command))) p = subprocess.Popen(command) print('Spawned autoPyLoT process with pid {}'.format(p.pid))