redefined macro for intel compiler, should work with windows (but Nicolo had some problems)

made configure verbose
This commit is contained in:
Martin Diehl 2013-10-23 08:38:14 +00:00
parent 7b28dedfe3
commit 96b03841e8
2 changed files with 9 additions and 4 deletions

View File

@ -22,9 +22,9 @@
write(6,*) 'Compiled with ', compiler_version() !not supported by GFORTRAN 4.5 and ifort 12
write(6,*) 'With options ', compiler_options()
#endif
#ifdef _INTEL_COMPILER
write(6,'(a,i4.4,a,i8.8)') ' Compiled with Intel fortran version ', _INTEL_COMPILER,&
', build date ', _INTEL_COMPILER_BUILD_DATE
#ifdef __INTEL_COMPILER
write(6,'(a,i4.4,a,i8.8)') ' Compiled with Intel fortran version ', __INTEL_COMPILER,&
', build date ', __INTEL_COMPILER_BUILD_DATE
#endif
write(6,*) 'Compiled on ', __DATE__,' at ',__TIME__
write(6,*)

7
code/configure vendored
View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
import os,re,subprocess
import os,re,subprocess,sys
import damask
damaskEnv = damask.Environment('../') # script location relative to root
@ -9,10 +9,12 @@ baseDir = damaskEnv.relPath('code/')
compiler ={True:'ifort',False:'gfortran'}[\
subprocess.call(['which', 'ifort'],\
stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0]
print('Updating Makefile in %s:\n'%baseDir)
makefile = open(os.path.join(baseDir,'Makefile'))
content = makefile.readlines()
makefile.close()
makefile = open(os.path.join(baseDir,'Makefile'),'w')
screenOut=''
for line in content:
m = re.match(r'(FFTW|IMKL|ACML|LAPACK)ROOT\s*\?=\s*',line)
c = re.match(r'F90\s*\?=\s*',line)
@ -22,7 +24,10 @@ for line in content:
else:
substitution = ''
line = '%sROOT ?= %s\n'%(m.group(1),substitution)
screenOut+=line
if c:
line = 'F90 ?= %s\n'%compiler
screenOut+=line
makefile.write(line)
makefile.close()
print(screenOut)