Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
pipelet
Pipelet
Commits
8b900c58
Commit
8b900c58
authored
Feb 13, 2013
by
Betoule Marc
Browse files
Adapt ccge launcher to launch in the multiprocessing queue
parent
2970e3a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
pipelet/launchers.py
pipelet/launchers.py
+6
-2
No files found.
pipelet/launchers.py
View file @
8b900c58
...
...
@@ -460,7 +460,7 @@ EOF
'-N'
,
name
]
+
reduce
(
lambda
x
,
y
:
x
+
y
,
[[
'-l'
,
'%s=1'
%
res
]
for
res
in
ressource
],
[])
+
[
jobfile
]
subprocess
.
Popen
(
com
).
communicate
()[
0
]
def
launch_ccage_worker
(
pipe
,
n
,
address
=
(
'127.0.0.1'
,
5000
),
authkey
=
'secret'
,
log_level
=
logging
.
WARNING
,
project
=
"planck"
,
cpu_time
=
'01:00:00'
,
scratch
=
"512M"
,
mem
=
"512M"
,
ressource
=
[
'sps'
]):
def
launch_ccage_worker
(
pipe
,
n
,
address
=
(
'127.0.0.1'
,
5000
),
authkey
=
'secret'
,
log_level
=
logging
.
WARNING
,
project
=
"planck"
,
cpu_time
=
'01:00:00'
,
scratch
=
"512M"
,
mem
=
"512M"
,
ressource
=
[
'sps'
]
,
multicores
=
False
):
""" Launch n worker using job array
"""
worker_file
=
"""#! /bin/zsh -l
...
...
@@ -477,6 +477,10 @@ echo "worker returned at $(date)"
logfile
=
jobfile
.
replace
(
'job'
,
'log'
)
with
closing
(
file
(
jobfile
,
'w'
))
as
f
:
f
.
write
(
worker_file
%
(
authkey
,
logfile
))
if
multicores
:
mc
=
[
'-pe'
,
'multicores'
,
'%d'
%
multicores
]
else
:
mc
=
[]
com
=
[
'qsub'
,
'-P'
,
'P_%s'
%
project
,
'-l'
,
'fsize=%s'
%
scratch
,
...
...
@@ -485,7 +489,7 @@ echo "worker returned at $(date)"
'-t'
,
'1-%d'
%
n
,
'-o'
,
logfile
,
'-e'
,
errfile
,
'-N'
,
name
]
+
reduce
(
lambda
x
,
y
:
x
+
y
,
[[
'-l'
,
'%s=1'
%
res
]
for
res
in
ressource
],
[])
+
[
jobfile
]
'-N'
,
name
]
+
mc
+
reduce
(
lambda
x
,
y
:
x
+
y
,
[[
'-l'
,
'%s=1'
%
res
]
for
res
in
ressource
],
[])
+
[
jobfile
]
subprocess
.
Popen
(
com
).
communicate
()[
0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment