Commit 5856819d authored by Laurent EL SHAFEY's avatar Laurent EL SHAFEY
Browse files

Add hostname support to qsub

parent 2f551ecc
......@@ -34,7 +34,7 @@ def makedirs_safe(fulldir):
else: raise
def qsub(command, queue=None, cwd=True, name=None, deps=[], stdout='',
stderr='', env=[], array=None, context='grid', mem_free=None):
stderr='', env=[], array=None, context='grid', mem_free=None, hostname=None):
"""Submits a shell job to a given grid queue
Keyword parameters:
......@@ -96,6 +96,11 @@ def qsub(command, queue=None, cwd=True, name=None, deps=[], stdout='',
If set, it asks the queue for a node with a minimum amount of free memory
(cf. qsub -l mem_free=<...>)
hostname
If set, it asks the queue to use only a subset of the available nodes
Symbols: | for OR, & for AND, ! for NOT, etc.
(cf. qsub -l hostname=<...>)
Returns a list of job ids assigned to this job (integers)
"""
......@@ -106,6 +111,8 @@ def qsub(command, queue=None, cwd=True, name=None, deps=[], stdout='',
if mem_free: scmd += ['-l', 'mem_free=%s' % mem_free]
if hostname: scmd += ['-l', 'hostname=%s' % hostname]
if cwd: scmd += ['-cwd']
if name: scmd += ['-N', name]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment