diff --git a/configure b/configure index eb710e85b..ad45839e2 100755 --- a/configure +++ b/configure @@ -42,20 +42,18 @@ if compiler == None: compiler ={True:'ifort',False:'gfortran'}[\ #--- default option values -------------------------------------------------------------------------- BLAS_order = ['IMKL','ACML','LAPACK'] -defaults={'F90':compiler,\ - 'FFTW_ROOT':'/usr/local',\ - 'MSC_ROOT' :'/msc',\ - 'HDF5_ROOT':'/usr/local',\ - 'DAMASK_NUM_THREADS':4,\ - 'blasType':'LAPACK',\ - 'blasRoot':{'LAPACK':'/usr',\ - 'ACML' :'/opt/acml5.3.1',\ - 'IMKL' :{True:'/opt/intel/composerxe/mkl',False:os.getenv('MKLROOT')}\ - [os.getenv('MKLROOT')==None]},\ +defaults={'F90':compiler, + 'FFTW_ROOT':'/usr/local', + 'MSC_ROOT' :'/msc', + 'HDF5_ROOT':'/usr/local', + 'DAMASK_NUM_THREADS':4, + 'blasType':'LAPACK', + 'blasRoot':{'LAPACK':'/usr', + 'ACML' :'/opt/acml5.3.1', + 'IMKL' :{True:os.getenv('MKLROOT'), False:'/opt/intel/composerxe/mkl'}\ + [os.getenv('MKLROOT') != None]}, 'spectralOptions':{}} -print 'defaults at start',defaults - #--- if local config file exists, read, otherwise assume global config file ------------------------ if os.path.isfile(os.path.join(os.getenv('HOME'),'.damask/damask.conf')): configFile = os.path.join(os.getenv('HOME'),'.damask/damask.conf') @@ -86,21 +84,21 @@ except IOError: pass -parser.add_option('--with-fc', dest='compiler', type='string', metavar='string', \ +parser.add_option('--with-fc', dest='compiler', type='string', metavar='string', help='F90 compiler [%default]') -parser.add_option('--with-fftw-dir', dest='fftwRoot', type='string', metavar='string', \ +parser.add_option('--with-fftw-dir', dest='fftwRoot', type='string', metavar='string', help='root directory of FFTW [%default]') -parser.add_option('--with-msc-dir', dest='mscRoot', type='string', metavar='string', \ +parser.add_option('--with-msc-dir', dest='mscRoot', type='string', metavar='string', help='root directory of MSC.Marc/Mentat [%default]') -parser.add_option('--with-HDF5-dir', dest='hdf5Root', type='string', metavar='string', \ +parser.add_option('--with-HDF5-dir', dest='hdf5Root', type='string', metavar='string', help='root directory of HDF5 [%default]') -parser.add_option('--with-OMP-threads', dest='threads', type='int', metavar='int',\ +parser.add_option('--with-OMP-threads', dest='threads', type='int', metavar='int', help='number of openMP threads [%default]') -parser.add_option('--with-blas-type', dest='blasType', type='string', metavar='string', \ +parser.add_option('--with-blas-type', dest='blasType', type='string', metavar='string', help='type of BLAS/LAPACK library [%default]') -parser.add_option('--with-blas-dir', dest='blasRoot', type='string', metavar='string', \ +parser.add_option('--with-blas-dir', dest='blasRoot', type='string', metavar='string', help='root directory of BLAS/LAPACK library [%default]') -parser.add_option('--with-spectral-options', dest='spectraloptions', type='string', action='extend', metavar='', \ +parser.add_option('--with-spectral-options', dest='spectraloptions', type='string', action='extend', metavar='', help='options for compilation of spectral solver') parser.set_defaults(compiler = defaults['F90']) @@ -143,7 +141,7 @@ if not subprocess.call(['which', options.compiler],stdout=subprocess.PIPE, stder print('Compiler Warning: executable %s not found!'%options.compiler) fftwLocations =[os.path.join(options.fftwRoot,'lib'),os.path.join(options.fftwRoot,'lib64')] -for lib in ['libfftw3.so','libfftw3.a',\ +for lib in ['libfftw3.so','libfftw3.a', 'libfftw3_threads.so','libfftw3_threads.a']: if (not os.path.isfile(os.path.join(fftwLocations[0],lib))) and \ (not os.path.isfile(os.path.join(fftwLocations[1],lib))): @@ -169,12 +167,13 @@ elif options.blasType == 'ACML': print('ACML Warning: %s not found in %s!'%(lib,blasLocationParallel)) elif options.blasType == 'IMKL': blasLocation=os.path.join(options.blasRoot,'lib/intel64') - for lib in ['libmkl_core.so','libmkl_core.a',\ - 'libmkl_sequential.so','libmkl_sequential.a',\ - 'libmkl_intel_thread.so','libmkl_intel_thread.a',\ - 'libmkl_intel_lp64.so','libmkl_intel_lp64.a',\ - 'libmkl_gnu_thread.so','libmkl_gnu_thread.a',\ - 'libmkl_gf_lp64.so','libmkl_gf_lp64.a']: + for lib in ['libmkl_core.so','libmkl_core.a', + 'libmkl_sequential.so','libmkl_sequential.a', + 'libmkl_intel_thread.so','libmkl_intel_thread.a', + 'libmkl_intel_lp64.so','libmkl_intel_lp64.a', + 'libmkl_gnu_thread.so','libmkl_gnu_thread.a', + 'libmkl_gf_lp64.so','libmkl_gf_lp64.a', + ]: if not os.path.isfile(os.path.join(blasLocation,lib)): print('IMKL Warning: %s not found in %s!'%(lib,blasLocation)) else: