From 449c66c70f3208f46ee494799c8d4ddcbabb204a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 14 Jan 2014 19:32:55 +0000 Subject: [PATCH] did some testing... --- code/Makefile | 10 +++++----- configure | 2 +- installation/compile_CoreModule.py | 10 ++++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/code/Makefile b/code/Makefile index 0e9ca95b5..ca23e4010 100644 --- a/code/Makefile +++ b/code/Makefile @@ -12,7 +12,7 @@ SHELL = /bin/sh # ./configure --enable-threads --enable-sse2 --enable-shared # make # make install -# + set FFTWROOT in your envinronment +# + set FFTW_ROOT in your envinronment # We essentially look for two library files "lib/libfftw3_threads" and "lib/libfftw3", # Uses linux threads to parallelize fftw3 # @@ -26,10 +26,10 @@ SHELL = /bin/sh # PORTABLE = TRUE (FALSE): decision, if executable is optimized for the machine on which it was built. # OPTIMIZATION = DEFENSIVE (OFF,AGGRESSIVE,ULTRA): Optimization mode: O2, O0, O3 + further options for most files, O3 + further options for all files # OPENMP = TRUE (FALSE): OpenMP multiprocessor support -# FFTWROOT = root path -# IMKLROOT = root path -# ACMLROOT = root path -# LAPACKROOT = root path +# FFTW_ROOT = root path +# IMKL_ROOT = root path +# ACML_ROOT = root path +# LAPACK_ROOT = root path # PREFIX = arbitrary prefix (before compilername) # OPTION = arbitrary option (just before file to compile) # SUFFIX = arbitrary suffix (after file to compile) diff --git a/configure b/configure index f78263239..28d12ea04 100755 --- a/configure +++ b/configure @@ -77,7 +77,7 @@ with open('installation/options','r') as f: if items[0] == 'FFTW_ROOT': line = '%s=%s\n'%(items[0],options.fftwdir) if items[0] == 'MSC_ROOT': line = '%s=%s\n'%(items[0],options.marcdir) for blastype in blastypes: - if options.blastype == blastype and items[0] == '%sROOT_'%type: + if options.blastype == blastype and items[0] == '%s_ROOT'%blastype: line = '%s=%s\n'%(items[0],options.blasdir) for spectralOption in options.spectraloptions: [key,value] = re.split('[= ]',spectralOption)[0:2] diff --git a/installation/compile_CoreModule.py b/installation/compile_CoreModule.py index bce96f37d..50c3b8abb 100755 --- a/installation/compile_CoreModule.py +++ b/installation/compile_CoreModule.py @@ -35,8 +35,8 @@ if options['IMKL_ROOT'] != '' and options['F90'] != 'gfortran': lib_lapack = '-L%s/lib/intel64 -I%s/include -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lm'%(options['IMKL_ROOT'],options['IMKL_ROOT']) elif options['ACML_ROOT'] != '': lib_lapack = '-L%s/%s64/lib -lacml'%(options['ACML_ROOT'],options['F90']) -elif lapackroot != '': - lib_lapack = '-L%s -llapack'%(options['LAPACK_ROOT']) +elif options['LAPACK_ROOT'] != '': + lib_lapack = '-L%s/lib -L%s/lib64-llapack'%(options['LAPACK_ROOT'],options['LAPACK_ROOT']) os.chdir(codeDir) # needed for compilation with gfortran and f2py try: @@ -55,7 +55,6 @@ except OSError, e: #' --overwrite-signature --no-lower prec.f90 DAMASK_spectral_interface.f90 math.f90 mesh.f90,...' ########################################################################### cmd = 'f2py damask.core.pyf' +\ - ' --build-dir %s'%codeDir +\ ' -c --no-lower --fcompiler=%s'%(compileCommand) +\ ' prec.f90'+\ ' DAMASK_spectral_interface.f90'+\ @@ -78,7 +77,10 @@ except subprocess.CalledProcessError: except OSError: print ('f2py not found') -os.rename(os.path.join(codeDir,'core.so'), os.path.join(damaskEnv.relPath('lib/damask'),'core.so')) +try: + os.rename(os.path.join(codeDir,'core.so'), os.path.join(damaskEnv.relPath('lib/damask'),'core.so')) +except: + pass modules = glob.glob('*.mod') for module in modules: