removed -c from options to compile_spectralSolver and added functionality to remove "-c" or "--compile" from command line arguments befor calling compile_spectralSolver
This commit is contained in:
parent
1cc990c7ac
commit
72418f7b60
|
@ -29,13 +29,10 @@ Writes version specific files for different MARC releases, adjustes the make fil
|
|||
""" + string.replace('$Id$','\n','\\n')
|
||||
)
|
||||
|
||||
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')
|
||||
|
||||
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]])
|
||||
|
@ -46,8 +43,7 @@ baseDir = damaskEnv.relPath('code/')
|
|||
|
||||
|
||||
# compiling spectral code
|
||||
if (options.spectralCompile):
|
||||
print 'base directory:', baseDir
|
||||
os.system('make --directory %s clean'%(baseDir))
|
||||
print 'make options:',' '.join(options.makeOptions)
|
||||
os.system('make --directory %s %s'%(baseDir,' '.join(options.makeOptions)))
|
||||
print 'base directory:', baseDir
|
||||
os.system('make --directory %s clean'%(baseDir))
|
||||
print 'make options:',' '.join(options.makeOptions)
|
||||
os.system('make --directory %s %s'%(baseDir,' '.join(options.makeOptions)))
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
${DAMASK_ROOT}/code/setup/modify_Files.py
|
||||
${DAMASK_ROOT}/code/setup/compile_SpectralSolver.py $@
|
||||
#remove -c or --compile from args an in case call compile spectral solver
|
||||
compile=0
|
||||
myArgs=''
|
||||
for args
|
||||
do
|
||||
if [ "$args" = "-c" -o "$args" = "--compile" ]
|
||||
then compile=1
|
||||
else
|
||||
myArgs="$myArgs $args"
|
||||
fi
|
||||
done
|
||||
echo $myArgs
|
||||
if [ "$compile" = 1 ]
|
||||
then echo 'Compiling spectral solver'
|
||||
${DAMASK_ROOT}/code/setup/compile_SpectralSolver.py $myArgs
|
||||
fi
|
||||
${DAMASK_ROOT}/code/setup/symlink_Code.py
|
||||
|
|
Loading…
Reference in New Issue