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
9f1ab449
Commit
9f1ab449
authored
Oct 05, 2010
by
Betoule Marc
Browse files
bug correction for empty param list in cross_prod
parent
baea1871
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
pipelet/launchers.py
pipelet/launchers.py
+4
-1
pipelet/multiplex.py
pipelet/multiplex.py
+7
-2
No files found.
pipelet/launchers.py
View file @
9f1ab449
...
...
@@ -285,7 +285,10 @@ def launch_ccali(pipe, n, address=('127.0.0.1',5000), authkey='secret', job_dir=
import
re
l
=
subprocess
.
Popen
([
'qjob'
,
'-wide'
,
'-nh'
],
stdout
=
subprocess
.
PIPE
).
communicate
()[
0
]
existing_process
=
re
.
findall
(
'%s([0-9]*)'
%
job_name
,
l
)
starting_num
=
max
([
int
(
p
)
for
p
in
existing_process
])
+
1
try
:
starting_num
=
max
([
int
(
p
)
for
p
in
existing_process
])
+
1
except
:
starting_num
=
0
for
i
in
range
(
starting_num
,
starting_num
+
n
):
name
=
'%s%d'
%
(
job_name
,
i
)
jobfile
=
get_log_file
(
pipe
,
name
+
'.job'
)
...
...
pipelet/multiplex.py
View file @
9f1ab449
...
...
@@ -40,8 +40,13 @@ def cross_prod(*args):
return
zip
(
*
args
)
l1
=
args
[
0
]
l2
=
cross_prod
(
*
(
args
[
1
:]))
for
a
in
l1
:
res
.
extend
([(
a
,)
+
b
for
b
in
l2
])
if
l1
and
l2
:
for
a
in
l1
:
res
.
extend
([(
a
,)
+
b
for
b
in
l2
])
elif
l1
:
res
.
extend
(
zip
(
l1
))
elif
l2
:
res
.
extend
(
l2
)
return
res
def
union
(
*
args
):
...
...
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