diff --git a/ClusterController/Job.py b/ClusterController/Job.py index 6dd5cb6..84b7e53 100644 --- a/ClusterController/Job.py +++ b/ClusterController/Job.py @@ -106,4 +106,14 @@ class Job: """ returns true if this job is waiting in the queue for whatever reason """ - return self.m_stateFlags & JobStateFlags.QUEUED \ No newline at end of file + return self.m_stateFlags & JobStateFlags.QUEUED + def getRequestedRamPerCore( self ): + """ + requested RAM per core in bytes + """ + return self.m_requestedRamPerCore + def setRequestedRamPerCore( self, requestedRam ): + """ + requestedRam : requested RAM per core in bytes + """ + self.m_requestedRamPerCore=requestedRam \ No newline at end of file diff --git a/SunGridEngine/SgeConfig.py b/SunGridEngine/SgeConfig.py index 58d20ce..a8106e1 100755 --- a/SunGridEngine/SgeConfig.py +++ b/SunGridEngine/SgeConfig.py @@ -67,7 +67,7 @@ class SgeConfig: for strAttrDef in strSgeConfigString.split(","): #print strAttrDef if len(strAttrDef) != 0: - matchObj = re.match( "^(?P[^=]+)=(?P.*)$", strAttrDef ) + matchObj = re.match( "^\s*(?P[^=]+)=(?P.*)$", strAttrDef ) #print matchObj.group("attrName") self.m_attrs[ matchObj.group("attrName") ] = matchObj.group("attrValue") def asFormat1String( self ): @@ -91,5 +91,8 @@ class SgeConfig: iAttr+=1 #print strSgeConfigString return strResult - + def dump( self ): + for (k,v) in self.m_attrs.iteritems(): + print "['%s']='%s'" % (k,v) +