Commit 2c1823f6 authored by Maxime Manno's avatar Maxime Manno 🍜

Add Slurm config and python path

parent 1e4f9cf4
......@@ -68,6 +68,13 @@ class Component(object):
try:
self.__memory = re.match( r'.*\s?mem=(\d+\w)\s?.*', self.batch_options).group(1)
except: pass
elif type.lower() == "slurm" :
try:
self.__cpu = int(re.match( r'.*-c\s+(\w+)\s+(\d+)\s?.*', self.batch_options).group(2))
except: pass
try:
self.__memory = re.match( r'.*--mem=(\d+\S+)\s?.*', self.batch_options).group(1)
except: pass
def get_cpu(self):
return self.__cpu
......
......@@ -210,7 +210,7 @@ class PythonFunction(ScriptFunction):
- `cmd_format` -- String template used to generate command string.
"""
PYTHON_VERSION = 'python{0}.{1}'.format(sys.version_info[0], sys.version_info[1])
PYTHON_TEMPLATE = '''#!/usr/bin/env {0}
PYTHON_TEMPLATE = '''#!/tools/python/3.4.3/bin/python3.4
import pickle
import {{0}}
......
Markdown is supported
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