Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linuxbin
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
linuxbin
Commits
6a2ac91a
Commit
6a2ac91a
authored
4 years ago
by
Papeleux Luc
Browse files
Options
Downloads
Patches
Plain Diff
add PYTHONEXE in launch
parent
35faff47
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
launch.py
+17
-15
17 additions, 15 deletions
launch.py
with
17 additions
and
15 deletions
launch.py
+
17
−
15
View file @
6a2ac91a
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment