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

Add local configuration

parent cc9f5d4c
......@@ -54,14 +54,22 @@ 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))
self.__memory = int(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))
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