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 7try: 8 from shutil import which # novermin 9except ImportError: 10 from distutils.spawn import find_executable as which 11ifort_lib_dir=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(which('ifort')))),'compiler','lib','intel64') 12mpich_install_dir='/nfs/gce/projects/petsc/soft/gcc-7.4.0-ifort-19.0.3/mpich-3.3.2' 13mpich_lib_dir=os.path.join(mpich_install_dir,'lib') 14 15configure_options = [ 16 '--package-prefix-hash='+petsc_hash_pkgs, 17 # cannot use download-mpich with fortranlib-autodetect=0 so disabling 18 #'--with-cc=gcc', 19 #'--with-fc=ifort', 20 #'--with-cxx=g++', 21 #'--download-mpich=1', 22 #'--download-mpich-pm=gforker', 23 '--with-mpi-dir='+mpich_install_dir, 24 'LIBS=-L'+ifort_lib_dir+' -lifport -lifcoremt_pic -limf -lsvml -lm -lipgo -lirc -lpthread -L'+mpich_lib_dir+' -lmpifort -lmpi', 25 26 'COPTFLAGS=-g -O', 27 'FOPTFLAGS=-g -O', 28 'CXXOPTFLAGS=-g -O', 29 30 '--with-scalar-type=complex', 31 '--download-hdf5', 32 '--with-zlib=1', 33 '--download-kokkos=1', 34 '--download-kokkos-kernels=1', 35 '--download-fblaslapack=1' 36 ] 37 38if __name__ == '__main__': 39 import sys,os 40 sys.path.insert(0,os.path.abspath('config')) 41 import configure 42 configure.petsc_configure(configure_options) 43