fixed lib to use new config file
This commit is contained in:
parent
d66b41c686
commit
a6dac1eceb
|
@ -22,7 +22,7 @@ for option in ['IMKL_ROOT','ACML_ROOT','LAPACK_ROOT','FFTW_ROOT','F90']:
|
||||||
compilers = ['ifort','gfortran']
|
compilers = ['ifort','gfortran']
|
||||||
if options['F90'] not in compilers:
|
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)))
|
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 = {
|
compileCommand = {
|
||||||
'gfortran': 'gnu95 --f90flags="-fPIC -fno-range-check -xf95-cpp-input -std=f2008 -fall-intrinsics'+\
|
'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(),
|
' -DSpectral -fdefault-real-8 -fdefault-double-8 -DFLOAT=8 -DINT=4 -I%s/lib"'%damaskEnv.rootDir(),
|
||||||
|
|
|
@ -19,9 +19,12 @@ class Environment():
|
||||||
def rootDir(self):
|
def rootDir(self):
|
||||||
return os.path.normpath(os.path.join(os.path.realpath(__file__),'../../../'))
|
return os.path.normpath(os.path.join(os.path.realpath(__file__),'../../../'))
|
||||||
|
|
||||||
|
|
||||||
def get_options(self):
|
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:
|
for line in file:
|
||||||
l = line.strip()
|
l = line.strip()
|
||||||
if not (l.startswith('#') or l == ''):
|
if not (l.startswith('#') or l == ''):
|
||||||
|
|
Loading…
Reference in New Issue