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(os.path.dirname(distutils.spawn.find_executable('ifort')))),'compiler','lib','intel64') 10mpich_install_dir='/nfs/gce/projects/petsc/soft/gcc-7.4.0-ifort-19.0.3/mpich-3.3.2' 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 'LIBS=-L'+ifort_lib_dir+' -lifport -lifcoremt_pic -limf -lsvml -lm -lipgo -lirc -lpthread -L'+mpich_lib_dir+' -lmpifort -lmpi', 23 24 'COPTFLAGS=-g -O', 25 'FOPTFLAGS=-g -O', 26 'CXXOPTFLAGS=-g -O', 27 28 '--with-scalar-type=complex', 29 '--download-hdf5', 30 '--with-zlib=1', 31 '--download-kokkos=1', 32 '--download-kokkos-kernels=1', 33 '--download-fblaslapack=1' 34 ] 35 36if __name__ == '__main__': 37 import sys,os 38 sys.path.insert(0,os.path.abspath('config')) 39 import configure 40 configure.petsc_configure(configure_options) 41