1#!/usr/bin/env python 2 3import os 4petsc_hash_pkgs=os.path.join(os.getenv('HOME'),'petsc-hash-pkgs') 5 6# find the ifort libs location 7import os 8import distutils.spawn 9ifort_lib_dir=os.path.join(os.path.dirname(os.path.dirname(distutils.spawn.find_executable('ifort'))),'lib','intel64') 10mpich_install_dir='/homes/petsc/soft/linux-Ubuntu_14.04-x86_64/mpich-3.2-gcc-ifc' 11mpich_lib_dir=os.path.join(mpich_install_dir,'lib') 12 13configure_options = [ 14 '--package-prefix-hash='+petsc_hash_pkgs, 15 # cannot use download-mpich with fortranlib-autodetect=0 so disabling 16 #'--with-cc=gcc', 17 #'--with-fc=ifort', 18 #'--with-cxx=g++', 19 #'--download-mpich=1', 20 #'--download-mpich-pm=gforker', 21 '--with-mpi-dir='+mpich_install_dir, 22 23 'LIBS=-L'+ifort_lib_dir+' -lifcore -ldl -limf -lirc -L'+mpich_lib_dir+' -lmpifort -lmpi', 24 25 'COPTFLAGS=-g -O', 26 'FOPTFLAGS=-g -O', 27 'CXXOPTFLAGS=-g -O', 28 29 '--with-scalar-type=complex', 30 '--download-hdf5', 31 '--with-zlib=1', 32 '--download-fblaslapack=1' 33 ] 34 35if __name__ == '__main__': 36 import sys,os 37 sys.path.insert(0,os.path.abspath('config')) 38 import configure 39 configure.petsc_configure(configure_options) 40