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

Fix to none, if cpu and mem not available.

parent 7e2c9a19
......@@ -51,13 +51,17 @@ class Component(object):
self.version = self.version.decode()
self.batch_options = self.config_reader.get_component_batch_options(self.__class__.__name__)
# in case of SGE, parse the cpu and memory parameter
type, options, limit_submission = self.config_reader.get_batch()
if type.lower() == "sge":
if type.lower() == "sge" :
self.__cpu = int(re.match( r'.*-pe\s+(\w+)\s+(\d+)\s?.*', self.batch_options).group(2))
except: pass
self.__memory = int(re.match( r'.*-l\s+mem=(\d+\S+)\s?.*', self.batch_options))
except: pass
except: pass
def get_cpu(self):
return self.__cpu
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