diff --git a/CONFIG b/CONFIG index e3955baca..3a28c2b96 100644 --- a/CONFIG +++ b/CONFIG @@ -1,8 +1,10 @@ -MSC_ROOT=/opt/MSC -MARC_VERSION=2015 +# "set syntax" needed only for tcsh (but works with bash etc) -DAMASK_NUM_THREADS=4 +set MSC_ROOT=/opt/MSC +set MARC_VERSION=2015 -ABAQUS_VERSION=6.14-5 +set DAMASK_NUM_THREADS=4 + +set ABAQUS_VERSION=6.14-5 #Set DAMASK_BIN if not $DAMASK_ROOT/bin #DAMASK_BIN diff --git a/lib/damask/environment.py b/lib/damask/environment.py index d9c59a22d..b0256e05d 100644 --- a/lib/damask/environment.py +++ b/lib/damask/environment.py @@ -1,7 +1,7 @@ # -*- coding: UTF-8 no BOM -*- -import os,subprocess,shlex +import os,subprocess,shlex,re class Environment(): __slots__ = [ \ @@ -23,10 +23,10 @@ class Environment(): def get_options(self): with open(self.relPath(self.rootDir()+'/CONFIG')) as configFile: for line in configFile: - l = line.strip() + l = re.sub('^set ', '', line).strip() if l and not l.startswith('#'): - items = l.split('=') + ['',''] - if items[1] != '': # nothing specified + items = l.split('=') + if len(items) == 2: self.options[items[0].upper()] = items[1] def isAvailable(self,software,Nneeded =-1):