Commit 897515ed authored by Céline Noirot's avatar Céline Noirot
Browse files

debug int conversion of memory

parent a0212bea
......@@ -54,20 +54,19 @@ class Component(object):
self.__cpu=None
self.__memory=None
type, options, limit_submission = self.config_reader.get_batch()
print (type)
if type.lower() == "sge" :
try:
self.__cpu = int(re.match( r'.*-pe\s+(\w+)\s+(\d+)\s?.*', self.batch_options).group(2))
except: pass
try:
self.__memory = int(re.match( r'.*-l\s+mem=(\d+\S+)\s?.*', self.batch_options).group(1))
self.__memory = re.match( r'.*-l\s+mem=(\d+\S+)\s?.*', self.batch_options).group(1)
except: pass
elif type.lower() == "local" :
try:
self.__cpu = int(re.match( r'.*cpu=(\d+)\s?.*', self.batch_options).group(1))
except: pass
try:
self.__memory = int(re.match( r'.*\s+mem=(\d+\S+)\s?.*', self.batch_options).group(1))
self.__memory = re.match( r'.*\s+mem=(\d+\S+)\s?.*', self.batch_options).group(1)
except: pass
def get_cpu(self):
......
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