Skip to content
Snippets Groups Projects
Commit 6a2ac91a authored by Papeleux Luc's avatar Papeleux Luc
Browse files

add PYTHONEXE in launch

parent 35faff47
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ class LaunchJob(ParametricJob):
TextPRM(self.pars, 'MAIL_ADDR', 'e-mail address (reports)', os.getenv('USER'))
TextPRM(self.pars, 'SMTP_SERV', 'SMTP email server', 'smtp.ulg.ac.be')
TextPRM(self.pars, 'PYTHONEXE', 'Python executable', sys.executable)
mtfExe = os.path.abspath(os.path.dirname(__file__))+os.sep+'Metafor'
if (not isUnix()):
mtfExe = mtfExe+'.exe'
......@@ -78,19 +79,20 @@ class LaunchJob(ParametricJob):
# Actions
PRMAction(self.actions, 'a', self.pars['MAIL_ADDR'])
PRMAction(self.actions, 'b', self.pars['EXEC_NAME'])
PRMAction(self.actions, 'c', self.pars['TEST_NAME'])
PRMAction(self.actions, 'c', self.pars['TEST_DIR'])
PRMAction(self.actions, 'd', self.pars['OUTFILE'])
PRMAction(self.actions, 'e', self.pars['ALGORITHM'])
PRMAction(self.actions, 'f', self.pars['RESTART_STEP'])
PRMAction(self.actions, 'g', self.pars['MULTITEST'])
PRMAction(self.actions, 'h', self.pars['NICE_VALUE'])
PRMAction(self.actions, 'i', self.pars['AFFINITY'])
PRMAction(self.actions, 'j', self.pars['NB_TASKS'])
PRMAction(self.actions, 'k', self.pars['NB_THREADS'])
PRMAction(self.actions, 'b', self.pars['PYTHONEXE'])
PRMAction(self.actions, 'c', self.pars['EXEC_NAME'])
PRMAction(self.actions, 'd', self.pars['TEST_NAME'])
PRMAction(self.actions, 'd', self.pars['TEST_DIR'])
PRMAction(self.actions, 'e', self.pars['OUTFILE'])
PRMAction(self.actions, 'f', self.pars['ALGORITHM'])
PRMAction(self.actions, 'g', self.pars['RESTART_STEP'])
PRMAction(self.actions, 'h', self.pars['MULTITEST'])
PRMAction(self.actions, 'i', self.pars['NICE_VALUE'])
PRMAction(self.actions, 'j', self.pars['AFFINITY'])
PRMAction(self.actions, 'k', self.pars['NB_TASKS'])
PRMAction(self.actions, 'l', self.pars['NB_THREADS'])
PRMAction(self.actions, 'm', self.pars['RUNMETHOD'])
# At parameters
PRMAction(self.actions, 'n', self.pars['AT_TIME'])
......@@ -309,7 +311,7 @@ class LaunchJob(ParametricJob):
if self.launchGui:
#self.launchGui.outFile=outfile
# starting process (unable to renice it => nice in battery)
prog = 'python'
prog = self.pars['PYTHONEXE'].val
# python args -u : unbuffered output (to have output synchronized to output)
# -i : force a prompt event even if stdin is not a terminal (else it is not possible to write cmds to python)
arg = ['-u', '-i']
......@@ -320,7 +322,7 @@ class LaunchJob(ParametricJob):
else:
#cmd = self.getNiceCmd(int(self.pars['NICE_VALUE'].val))
#cmd = cmd + ['python']
cmd = ['python']
cmd = [self.pars['PYTHONEXE'].val]
if isUnix(): # shell=False && sans close_fds = True (ca freeze)
#Add mtfdir to LD_LIBRARY_PATH to allow launch to find mt*.so
if 'LD_LIBRARY_PATH' in os.environ:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment