diff --git a/code/setup/compile_SpectralSolver.py b/code/setup/compile_SpectralSolver.py index ed64211d3..592ac12e5 100755 --- a/code/setup/compile_SpectralSolver.py +++ b/code/setup/compile_SpectralSolver.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -import os,string +import os,string,subprocess from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP import damask @@ -33,10 +33,12 @@ parser.add_option('-c', '--compile', dest='spectralCompile', action='store_true' help='compiles the spectral solver [%default]') parser.add_option('-o', '--options', dest='makeOptions', action='extend', type='string', \ metavar="KEY=VALUE", \ - help='comma-separated list of options passed to Makefile when compiling spectral code %default') -parser.set_defaults(spectralCompile = True) -parser.set_defaults(makeOptions = ['F90=ifort']) + help='comma-separated list of options passed to Makefile when compiling spectral code') +parser.set_defaults(spectralCompile = False) +parser.set_defaults(makeOptions = ['F90='+{True:'ifort',False:'gfortran'}[\ + subprocess.call(['which', 'ifort'],\ + stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0]]) (options, args) = parser.parse_args() damaskEnv = damask.Environment('../../') # script location relative to root diff --git a/code/setup/symlink_Code.py b/code/setup/symlink_Code.py index 51ae09558..dd2b393ec 100755 --- a/code/setup/symlink_Code.py +++ b/code/setup/symlink_Code.py @@ -13,17 +13,11 @@ baseDir = damaskEnv.relPath('code/') for dir in bin_link: for file in bin_link[dir]: - print baseDir - print dir - print file src = os.path.abspath(os.path.join(baseDir,dir,file)) - print src - os.path.exists(src) if os.path.exists(src): sym_link = os.path.abspath(os.path.join(damaskEnv.binDir(),\ {True: dir, False:os.path.splitext(file)[0]}[file == ''])) - if os.path.lexists(sym_link): - os.remove(sym_link) + if os.path.lexists(sym_link): os.remove(sym_link) os.symlink(src,sym_link) print sym_link,'-->',src diff --git a/processing/setup/compile_CoreModule.py b/processing/setup/compile_CoreModule.py index eef2700e5..3f3f06139 100755 --- a/processing/setup/compile_CoreModule.py +++ b/processing/setup/compile_CoreModule.py @@ -40,7 +40,7 @@ Sets up the pre and post processing tools of DAMASK compilers = ['intel','ifort','intel32','gfortran','gnu95'] parser.add_option('--F90', '--f90', dest='compiler', type='string', \ - help='name of F90 compiler') + help='name of F90 [%default]') parser.set_defaults(compiler = {True:'ifort',False:'gfortran'}[\ subprocess.call(['which', 'ifort'],\ stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0])