|
| 1 | + |
| 2 | +############################################################################## |
| 3 | +# |
| 4 | +# Copyright (c) 2003-2020 by The University of Queensland |
| 5 | +# http://www.uq.edu.au |
| 6 | +# |
| 7 | +# Primary Business: Queensland, Australia |
| 8 | +# Licensed under the Apache License, version 2.0 |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Development until 2012 by Earth Systems Science Computational Center (ESSCC) |
| 12 | +# Development 2012-2013 by School of Earth Sciences |
| 13 | +# Development from 2014 by Centre for Geoscience Computing (GeoComp) |
| 14 | +# Development from 2019 by School of Earth and Environmental Sciences |
| 15 | +# |
| 16 | +############################################################################## |
| 17 | + |
| 18 | +# This is a template configuration file for escript on Debian/GNU Linux. |
| 19 | +# Refer to README_FIRST for usage instructions. |
| 20 | + |
| 21 | +escript_opts_version = 203 |
| 22 | +#cxx_extra = '-Wno-literal-suffix' |
| 23 | +openmp = True |
| 24 | +#mpi = 'OPENMPI' |
| 25 | + |
| 26 | +import os |
| 27 | + |
| 28 | +mpi_prefix=['/usr/lib/x86_64-linux-gnu/openmpi/include/','/usr/lib/x86_64-linux-gnu/openmpi/lib/'] |
| 29 | +mpi_libs = ['mpi_cxx', 'mpi', 'open-rte', 'open-pal'] |
| 30 | +netcdf = 4 |
| 31 | +umfpack = True |
| 32 | +umfpack_prefix = ['/usr/include/suitesparse', '/usr/lib'] |
| 33 | +umfpack_libs = ['umfpack', 'blas', 'amd'] |
| 34 | +lapack_prefix = ['/usr/include/x86_64-linux-gnu/', '/usr/lib/x86_64-linux-gnu/'] |
| 35 | +#silo = True |
| 36 | +silo_libs = ['siloh5', 'hdf5_openmpi'] |
| 37 | +dudley_assemble_flags = '-funroll-loops' |
| 38 | +pythoncmd="/usr/bin/python3" |
| 39 | +pythonlibname = 'python3.9' |
| 40 | +pythonlibpath = '/usr/lib/x86_64-linux-gnu/' |
| 41 | +pythonincpath = '/usr/include/python3.9' |
| 42 | + |
| 43 | +import subprocess |
| 44 | +import os |
| 45 | +p = subprocess.Popen(["ld","--verbose"], stdout=subprocess.PIPE) |
| 46 | +out,err = p.communicate() |
| 47 | +spath = [x[13:-3] for x in out.decode().split() if 'SEARCH_DIR' in x] |
| 48 | +p2name = '' |
| 49 | +p3name = '' |
| 50 | +for name in spath: |
| 51 | + try: |
| 52 | + l=os.listdir(name) |
| 53 | + p2res=[x for x in l if x.startswith('libboost_python2') and x.endswith('.so')] |
| 54 | + p3res=[x for x in l if x.startswith('libboost_python3') and x.endswith('.so')] |
| 55 | + if len(p2name)==0 and len(p2res)>0: |
| 56 | + p2name=p2res[-1] |
| 57 | + if len(p3name)==0 and len(p3res)>0: |
| 58 | + p3name=p3res[-1] |
| 59 | + except OSError: |
| 60 | + pass |
| 61 | + |
| 62 | + |
| 63 | +# boost-python library/libraries to link against |
| 64 | +boost_libs = [p3name[3:-3]] |
| 65 | + |
| 66 | +# this can be used by options files importing us |
| 67 | +boost_py2_libs = [p2name[3:-3]] |
| 68 | +boost_py3_libs = [p3name[3:-3]] |
| 69 | + |
| 70 | +from site_init import getdebbuildflags |
| 71 | +# Now we add the debian build flags |
| 72 | +debstuff = getdebbuildflags() |
| 73 | +if len(debstuff) > 0: |
| 74 | + print("Building with the following additional flags from debian: "+str(debstuff)) |
| 75 | +for i in debstuff: |
| 76 | + k=i[0] |
| 77 | + v=i[1] |
| 78 | + try: |
| 79 | + exec(k+"+=' "+v+"'") |
| 80 | + except NameError: |
| 81 | + exec(k+"='"+v+"'") |
| 82 | + |
| 83 | +mathjax_path='/usr/share/javascript/mathjax/MathJax.js' |
| 84 | + |
| 85 | +mumps_libs=['cmumps','dmumps','smumps','zmumps','mumps_common','lapack','metis'] |
| 86 | +mumps_prefix=['/usr/include','/usr/lib/x86_64-linux-gnu/'] |
0 commit comments