From 96b03841e88768be25248ae1e684b7432ee564f3 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 23 Oct 2013 08:38:14 +0000 Subject: [PATCH] redefined macro for intel compiler, should work with windows (but Nicolo had some problems) made configure verbose --- code/compilation_info.f90 | 6 +++--- code/configure | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/code/compilation_info.f90 b/code/compilation_info.f90 index 28b5093b2..4aa70347b 100644 --- a/code/compilation_info.f90 +++ b/code/compilation_info.f90 @@ -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,*) diff --git a/code/configure b/code/configure index a5860ab60..213a5deaf 100755 --- a/code/configure +++ b/code/configure @@ -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)