#!/usr/bin/env python import os,re,subprocess,sys import damask ######################################################## # MAIN ######################################################## parser = OptionParser(option_class=extendableOption, usage='%prog options', description = """ Sets up the pre and post processing tools of DAMASK """ + string.replace('$Id$','\n','\\n') ) compilers = ['ifort','gfortran'] parser.add_option('--with-fc', dest='compiler', type='string', \ help='name of F90 [%default]') parser.add_option('--with-blas-lapack-dir', dest='fftwroot', type='string', \ help='root location of FFTW [%default]') parser.add_option('--with-blas-lapack-type', dest='lapackroot', type='string', \ help='root location of LAPACK [%default]') parser.add_option('--with-spectral-options', dest='lapackroot', type='string', \ help='root location of LAPACK [%default]') (options,filenames) = parser.parse_args() # changing dirs and compiler in makefile compiler ={True:'ifort',False:'gfortran'}[\ subprocess.call(['which', 'ifort'],\ stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0]