[add] improved submit functions

This commit is contained in:
Marcel Paffrath 2017-08-03 10:15:54 +02:00
parent 20b31a1c5c
commit 5e2dc6c9f9

View File

@ -2927,7 +2927,7 @@ class Submit2Grid(QWidget):
self.setDefaultCommand() self.setDefaultCommand()
def setDefaultCommand(self): 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) self.textedit.setText(default_command)
def start(self, pp_export): def start(self, pp_export):
@ -2941,12 +2941,11 @@ class Submit2Grid(QWidget):
outfile.close() outfile.close()
def execute_script(self): def execute_script(self):
command = self.textedit.text().strip() command = self.textedit.text().strip().split(' ')
command += ' ' command.append(self.script_fn)
command += self.script_fn p = subprocess.Popen(command)
pid = subprocess.Popen(command) print('exec. command: {}'.format(str(command)))
print('exec. command: {}'.format(command)) print('Spawned autoPyLoT process with pid {}'.format(p.pid))
print('Spawned autoPyLoT process with pid {}'.format(pid))
class SubmitLocal(QWidget): class SubmitLocal(QWidget):
@ -2969,7 +2968,7 @@ class SubmitLocal(QWidget):
def execute_command(self, pp_export): def execute_command(self, pp_export):
command = self.script_fn command = self.script_fn
command.append(pp_export) command.append(pp_export)
print('exec. command: {}'.format(command)) print('exec. command: {}'.format(str(command)))
p = subprocess.Popen(command) p = subprocess.Popen(command)
print('Spawned autoPyLoT process with pid {}'.format(p.pid)) print('Spawned autoPyLoT process with pid {}'.format(p.pid))