small changes, tests still not running
This commit is contained in:
parent
b11c64d310
commit
4648da1f32
|
@ -12,6 +12,7 @@ codeDir = damaskEnv.relPath('code/')
|
||||||
options={}
|
options={}
|
||||||
keywords=['IMKL_ROOT','ACML_ROOT','LAPACK_ROOT','FFTW_ROOT','F90']
|
keywords=['IMKL_ROOT','ACML_ROOT','LAPACK_ROOT','FFTW_ROOT','F90']
|
||||||
|
|
||||||
|
# getting options from damask.conf or, if not present, from envinronment
|
||||||
for option in keywords:
|
for option in keywords:
|
||||||
try:
|
try:
|
||||||
value = damaskEnv.options[option]
|
value = damaskEnv.options[option]
|
||||||
|
@ -20,17 +21,12 @@ for option in keywords:
|
||||||
if value is None: value = '' # env not set
|
if value is None: value = '' # env not set
|
||||||
options[option]=value
|
options[option]=value
|
||||||
|
|
||||||
|
# overwrite default options with keyword=value pair from argument list to mimic make behavior
|
||||||
for i, arg in enumerate(sys.argv):
|
for i, arg in enumerate(sys.argv):
|
||||||
for option in keywords:
|
for option in keywords:
|
||||||
print arg,option
|
|
||||||
if arg.startswith(option):
|
if arg.startswith(option):
|
||||||
print arg
|
|
||||||
if arg.endswith(option):
|
|
||||||
options[option] = sys.argv[i+1]
|
|
||||||
else:
|
|
||||||
options[option] = sys.argv[i][len(option)+1:]
|
options[option] = sys.argv[i][len(option)+1:]
|
||||||
|
|
||||||
print options
|
|
||||||
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)))
|
||||||
|
@ -46,8 +42,7 @@ compiler = {
|
||||||
compileOptions =' -DSpectral -DFLOAT=8 -DINT=4 -I%s/lib'%damaskEnv.rootDir()
|
compileOptions =' -DSpectral -DFLOAT=8 -DINT=4 -I%s/lib'%damaskEnv.rootDir()
|
||||||
|
|
||||||
# this saves the path of libraries during runtime
|
# this saves the path of libraries during runtime
|
||||||
|
LDFLAGS ='-shared -Wl,-rpath=/lib -Wl,-rpath=/usr/lib -Wl,-rpath=%s/lib'%(options['FFTW_ROOT'])
|
||||||
LDFLAGS ='-shared -Wl,-rpath,/lib -Wl,-rpath,/usr/lib -Wl,-rpath,%s/lib'%(options['FFTW_ROOT'])
|
|
||||||
|
|
||||||
# see http://cens.ioc.ee/pipermail/f2py-users/2003-December/000621.html
|
# see http://cens.ioc.ee/pipermail/f2py-users/2003-December/000621.html
|
||||||
if options['IMKL_ROOT'] != '' and options['F90'] != 'gfortran':
|
if options['IMKL_ROOT'] != '' and options['F90'] != 'gfortran':
|
||||||
|
|
Loading…
Reference in New Issue