fixed lib to use new config file

This commit is contained in:
Martin Diehl 2014-01-24 13:15:01 +00:00
parent d66b41c686
commit a6dac1eceb
2 changed files with 6 additions and 3 deletions

View File

@ -22,7 +22,7 @@ for option in ['IMKL_ROOT','ACML_ROOT','LAPACK_ROOT','FFTW_ROOT','F90']:
compilers = ['ifort','gfortran']
if options['F90'] not in compilers:
sys.exit('compiler "F90" (in installation/options or as Shell variable) has to be one out of: %s'%(', '.join(compilers)))
print 'Argument List:', str(sys.argv)
compileCommand = {
'gfortran': 'gnu95 --f90flags="-fPIC -fno-range-check -xf95-cpp-input -std=f2008 -fall-intrinsics'+\
' -DSpectral -fdefault-real-8 -fdefault-double-8 -DFLOAT=8 -DINT=4 -I%s/lib"'%damaskEnv.rootDir(),

View File

@ -19,9 +19,12 @@ class Environment():
def rootDir(self):
return os.path.normpath(os.path.join(os.path.realpath(__file__),'../../../'))
def get_options(self):
with open(self.relPath('installation/options')) as file:
if os.path.isfile(os.path.join(os.getenv('HOME'),'.damask/damask.conf')):
configFile = os.path.join(os.getenv('HOME'),'.damask/damask.conf')
else:
configFile = '/etc/damask.conf'
with open(self.relPath(configFile)) as file:
for line in file:
l = line.strip()
if not (l.startswith('#') or l == ''):