Skip to content

Commit

Permalink
Merge pull request #454 from JakeNarkizian/master
Browse files Browse the repository at this point in the history
Ported GridEngine terabyte fix and shm processors from JobTree (resolves #409)
  • Loading branch information
hannes-ucsc committed Oct 9, 2015
2 parents 5dc0412 + 9cda8c3 commit 5531bfa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/toil/batchSystems/gridengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

class MemoryString:
def __init__(self, string):
if string[-1] == 'K' or string[-1] == 'M' or string[-1] == 'G':
if string[-1] == 'K' or string[-1] == 'M' or string[-1] == 'G' or string[-1] == 'T':
self.unit = string[-1]
self.val = float(string[:-1])
else:
Expand All @@ -54,6 +54,8 @@ def byteVal(self):
return self.val * 1048576
elif self.unit == 'G':
return self.val * 1073741824
elif self.unit == 'T':
return self.val * 1099511627776

def __cmp__(self, other):
return cmp(self.bytes, other.bytes)
Expand All @@ -76,7 +78,8 @@ def prepareQsub(cpu, mem, jobID):
if len(reqline) > 0:
qsubline.extend(["-hard", "-l", ",".join(reqline)])
if cpu is not None and math.ceil(cpu) > 1:
qsubline.extend(["-pe", "smp", str(int(math.ceil(cpu)))])
peConfig = os.getenv('TOIL_GRIDENGINE_PE') or "shm"
qsubline.extend(["-pe", peConfig, str(int(math.ceil(cpu)))])
return qsubline


Expand Down

0 comments on commit 5531bfa

Please sign in to comment.