polishing
This commit is contained in:
parent
861dc76700
commit
b11c64d310
|
@ -10,8 +10,9 @@ baseDir = damaskEnv.relPath('installation/')
|
||||||
codeDir = damaskEnv.relPath('code/')
|
codeDir = damaskEnv.relPath('code/')
|
||||||
|
|
||||||
options={}
|
options={}
|
||||||
|
keywords=['IMKL_ROOT','ACML_ROOT','LAPACK_ROOT','FFTW_ROOT','F90']
|
||||||
|
|
||||||
for option in ['IMKL_ROOT','ACML_ROOT','LAPACK_ROOT','FFTW_ROOT','F90']:
|
for option in keywords:
|
||||||
try:
|
try:
|
||||||
value = damaskEnv.options[option]
|
value = damaskEnv.options[option]
|
||||||
except:
|
except:
|
||||||
|
@ -20,14 +21,14 @@ for option in ['IMKL_ROOT','ACML_ROOT','LAPACK_ROOT','FFTW_ROOT','F90']:
|
||||||
options[option]=value
|
options[option]=value
|
||||||
|
|
||||||
for i, arg in enumerate(sys.argv):
|
for i, arg in enumerate(sys.argv):
|
||||||
for option in ['IMKL_ROOT','ACML_ROOT','LAPACK_ROOT','FFTW_ROOT','F90']:
|
for option in keywords:
|
||||||
print arg,option
|
print arg,option
|
||||||
if arg.startswith(option):
|
if arg.startswith(option):
|
||||||
print arg
|
print arg
|
||||||
if arg.endswith(option):
|
if arg.endswith(option):
|
||||||
options[option] = sys.argv[i+1]
|
options[option] = sys.argv[i+1]
|
||||||
else:
|
else:
|
||||||
options[option] = sys.argv[i][4:]
|
options[option] = sys.argv[i][len(option)+1:]
|
||||||
|
|
||||||
print options
|
print options
|
||||||
compilers = ['ifort','gfortran']
|
compilers = ['ifort','gfortran']
|
||||||
|
@ -48,17 +49,16 @@ compileOptions =' -DSpectral -DFLOAT=8 -DINT=4 -I%s/lib'%damaskEnv.rootDir()
|
||||||
|
|
||||||
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':
|
||||||
lib_lapack = '-L%s/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -liomp5'%options['IMKL_ROOT']
|
lib_lapack = '-L%s/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -liomp5'%options['IMKL_ROOT']
|
||||||
LDFLAGS +=' -Wl,-rpath,%s/lib/intel64'%(options['IMKL_ROOT'])
|
LDFLAGS +=' -Wl,-rpath=%s/lib/intel64'%(options['IMKL_ROOT'])
|
||||||
elif options['ACML_ROOT'] != '':
|
elif options['ACML_ROOT'] != '':
|
||||||
lib_lapack = '-L%s/%s64/lib -lacml'%(options['ACML_ROOT'],options['F90'])
|
lib_lapack = '-L%s/%s64/lib -lacml'%(options['ACML_ROOT'],options['F90'])
|
||||||
LDFLAGS +=' -Wl,-rpath,%s/%s64/lib'%(options['ACML_ROOT'],options['F90'])
|
LDFLAGS +=' -Wl,-rpath=%s/%s64/lib'%(options['ACML_ROOT'],options['F90'])
|
||||||
elif options['LAPACK_ROOT'] != '':
|
elif options['LAPACK_ROOT'] != '':
|
||||||
lib_lapack = '-L%s/lib -L%s/lib64 -llapack'%(options['LAPACK_ROOT'],options['LAPACK_ROOT'])
|
lib_lapack = '-L%s/lib -L%s/lib64 -llapack'%(options['LAPACK_ROOT'],options['LAPACK_ROOT'])
|
||||||
LDFLAGS +=' -Wl,-rpath,%s/lib -Wl,-rpath,%s/lib64'%(options['LAPACK_ROOT'],options['LAPACK_ROOT'])
|
LDFLAGS +=' -Wl,-rpath=%s/lib -Wl,-rpath=%s/lib64'%(options['LAPACK_ROOT'],options['LAPACK_ROOT'])
|
||||||
|
|
||||||
# f2py does not (yet) support setting of special flags for the linker, hence they must be set via
|
# f2py does not (yet) support setting of special flags for the linker, hence they must be set via
|
||||||
# environment variable
|
# environment variable
|
||||||
|
|
Loading…
Reference in New Issue