removed debug statements from symlink_Code.py, added autodetection for fortran compiler and disabled compiling on default
This commit is contained in:
parent
1496c62258
commit
d715ec769b
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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])
|
||||
|
|
Loading…
Reference in New Issue