Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
Tsurata, Aki
CTDAS
Commits
9a86ffd0
Commit
9a86ffd0
authored
14 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
added non-blocking option for submitting next cycle
parent
dcae8161
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
da/platform/jet.py
+6
-4
6 additions, 4 deletions
da/platform/jet.py
with
6 additions
and
4 deletions
da/platform/jet.py
+
6
−
4
View file @
9a86ffd0
...
...
@@ -27,7 +27,7 @@ class JetPlatForm(PlatForm):
msg2
=
'
%s version: %s
'
%
(
self
.
Identifier
,
self
.
Version
)
;
logging
.
debug
(
msg2
)
def
GetJobTemplate
(
self
,
joboptions
=
{}):
def
GetJobTemplate
(
self
,
joboptions
=
{}
,
block
=
False
):
"""
Return the job template for a given computing system, and fill it with options from the dictionary provided as argument
"""
template
=
"""
#$ -N jobname
\n
"""
+
\
...
...
@@ -37,13 +37,15 @@ class JetPlatForm(PlatForm):
"""
#$ -S jobshell
\n
"""
+
\
"""
#$ -o joblog
\n
"""
+
\
"""
#$ -cwd
\n
"""
+
\
"""
#$ -sync y
\n
"""
+
\
"""
#$ -r n
\n
"""
+
\
"""
#$ -j y
\n
"""
if
'
depends
'
in
joboptions
:
template
+=
"""
#$ -hold_jid depends
\n
"""
if
block
:
template
+=
"""
#$ -sync y
\n
"""
# First replace from passed dictionary
for
k
,
v
in
joboptions
.
iteritems
():
while
k
in
template
:
...
...
@@ -67,9 +69,9 @@ class JetPlatForm(PlatForm):
cmd
=
[
'
qsub
'
,
jobfile
]
output
=
subprocess
.
Popen
(
cmd
,
stdout
=
subprocess
.
PIPE
).
communicate
()[
0
]
;
logging
.
info
(
output
)
retcode
=
output
.
split
()[
-
1
]
[
0
]
retcode
=
output
.
split
()[
-
1
]
msg
=
'
Job
completed with
return
code
%s
'
%
retcode
;
logging
.
debug
(
msg
)
msg
=
'
Job return
ed:
%s
'
%
retcode
;
logging
.
debug
(
msg
)
return
retcode
...
...
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