1#!/usr/bin/env python3 2 3import os 4petsc_hash_pkgs=os.path.join(os.getenv('HOME'),'petsc-hash-pkgs') 5 6# This test is done on grind.mcs.anl.gov. It uses ILP64 MKL/BLAS packaged 7# with MATLAB. 8 9# Note: regular BLAS [with 32-bit integers] conflict with 10# MATLAB BLAS - hence requiring -known-64-bit-blas-indices=1 11 12# Note: MATLAB build requires PETSc shared libraries 13 14# Some versions of MATLAB [R2013a] conflicted with -lgfortan - so the following workaround worked. 15# export LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/4.6/libgfortran.so 16 17# find MATLAB location 18import os 19from shutil import which 20matlab_dir=os.path.dirname(os.path.dirname(which('matlab'))) 21 22if __name__ == '__main__': 23 import sys 24 import os 25 sys.path.insert(0, os.path.abspath('config')) 26 import configure 27 configure_options = [ 28 '--package-prefix-hash='+petsc_hash_pkgs, 29 '--download-mpich=1', # /usr/bin/mpicc does not resolve '__gcov_merge_add'? and gcc-4.4 gives gcov errors 30 '--with-display=140.221.10.20:0.0', # for MATLAB example with graphics 31 '--with-blaslapack-dir='+matlab_dir, 32 '--with-matlab=1', 33# matlab-engine is deprecated, no longer needed but still allowed 34 '--with-matlab-engine=1', 35 '--with-shared-libraries=1', 36 '-known-64-bit-blas-indices=1', 37 '--with-ssl=0', 38 '--with-coverage=1', 39 '--with-strict-petscerrorcode', 40 ] 41 configure.petsc_configure(configure_options) 42