From 600db53653ca9e8e26d2aee8a85bd4d58f2dc755 Mon Sep 17 00:00:00 2001 From: Guillaume Raffy Date: Fri, 6 Dec 2013 10:41:50 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20289=20-=20ajouter=20un=20m=C3=A9canisme?= =?UTF-8?q?=20qui=20emp=C3=AAche=20la=20saturation=20de=20la=20m=C3=A9moir?= =?UTF-8?q?e=20sur=20un=20noeud=20:=20ajout=20de=20l'affichage=20de=20l'ut?= =?UTF-8?q?ilisation=20m=C3=A9moire=20des=20jobs.=20Ce=20n'est=20pas=20enc?= =?UTF-8?q?ore=20peaufin=C3=A9=20mais=20l'essentiel=20est=20l=C3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ClusterController/Job.py | 12 +++++++++++- SunGridEngine/SgeConfig.py | 7 +++++-- 2 files changed, 16 insertions(+), 3 deletions(-) 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) +