Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
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
Michiel Cottaar
fslpy
Commits
fac47610
Commit
fac47610
authored
5 years ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
BUG: use _prepareArgs to unpack input arguments
parent
09b60b2f
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
fsl/utils/fslsub.py
+8
-5
8 additions, 5 deletions
fsl/utils/fslsub.py
with
8 additions
and
5 deletions
fsl/utils/fslsub.py
+
8
−
5
View file @
fac47610
...
@@ -55,7 +55,7 @@ import importlib
...
@@ -55,7 +55,7 @@ import importlib
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
def
submit
(
command
,
def
submit
(
*
command
,
minutes
=
None
,
minutes
=
None
,
queue
=
None
,
queue
=
None
,
architecture
=
None
,
architecture
=
None
,
...
@@ -70,9 +70,12 @@ def submit(command,
...
@@ -70,9 +70,12 @@ def submit(command,
flags
=
False
,
flags
=
False
,
multi_threaded
=
None
,
multi_threaded
=
None
,
verbose
=
False
):
verbose
=
False
):
"""
Submits a given command to the cluster
"""
Submits a given command to the cluster
You can pass the command and arguments as a single string, or as a regular or unpacked sequence.
:arg command: sing
le
string with the job command
:arg command: s
tr
ing
or regular/unpacked sequence of
string
s
with the job command
:arg minutes: Estimated job length in minutes, used to auto-set
:arg minutes: Estimated job length in minutes, used to auto-set
queue name
queue name
:arg queue: Explicitly sets the queue name
:arg queue: Explicitly sets the queue name
...
@@ -101,7 +104,7 @@ def submit(command,
...
@@ -101,7 +104,7 @@ def submit(command,
:return: string of submitted job id
:return: string of submitted job id
"""
"""
from
fsl.utils.run
import
runfsl
from
fsl.utils.run
import
runfsl
,
_prepareArgs
base_cmd
=
[
'
fsl_sub
'
]
base_cmd
=
[
'
fsl_sub
'
]
...
@@ -132,7 +135,7 @@ def submit(command,
...
@@ -132,7 +135,7 @@ def submit(command,
base_cmd
.
append
(
'
-s
'
)
base_cmd
.
append
(
'
-s
'
)
base_cmd
.
extend
(
multi_threaded
)
base_cmd
.
extend
(
multi_threaded
)
base_cmd
.
app
end
(
command
)
base_cmd
.
ext
end
(
_prepareArgs
(
command
)
)
return
runfsl
(
*
base_cmd
).
strip
()
return
runfsl
(
*
base_cmd
).
strip
()
...
...
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