/[escript]/trunk/scons/meerkat_options.py
ViewVC logotype

Contents of /trunk/scons/meerkat_options.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6799 - (show annotations)
Mon Mar 25 05:53:58 2019 UTC (4 weeks, 1 day ago) by aellery
File MIME type: text/x-python
File size: 3207 byte(s)
I have rewritten the solverbuddy. Briefly:

1. The remaining AMG code has been removed from PASO.
2. If Trilinos is available, escript will now use it by default.
3. eScript will use a direct solver by default, (if one is available,) when solving 2 dimensional problems and an iterative solver, by default, when solving 3 dimensional problems. This can be changed by a user by manually specifying which solver to use.
4. There is a new option available, setHermitian(), that allows a user to specify when a coefficient matrix is Hermitian.
5. Symmetry information is always passed onto the Trilinos solver when this information is relevant.
6. All tests have been updated, when relevant, to reflect these changes.
7. I fixed a couple of undocumented bugs.


1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2018 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 #
15 ##############################################################################
16
17 # This is a template configuration file for escript on Debian/GNU Linux.
18 # Refer to README_FIRST for usage instructions.
19
20 openmp = True
21 # umfpack = True
22 # silo = True
23 # cuda = True
24 # mpi = 'OPENMPI'
25 verbose = True
26 #debug = True
27 #trilinos = True
28 # paso = False
29 # parmetis = True
30 # visit = True
31 #werror = False
32 # cxx = 'clang++'
33
34 python = 3
35
36 ##############################################################################
37 escript_opts_version = 203
38
39 import os
40 import subprocess
41
42 #boost_prefix=['/home/adam/Documents/zzz/boost_1_68_0/','/home/adam/Documents/zzz/boost_1_68_0/stage/lib']
43
44 cxx_extra += " -fmessage-length=80 -fdiagnostics-color=always "
45
46 netcdf = 4
47 mpi_libs = ['mpi_cxx', 'mpi']
48 parmetis_libs = ['parmetis', 'metis']
49 silo_libs = ['siloh5', 'hdf5_openmpi']
50 umfpack_libs = ['umfpack', 'blas', 'amd']
51
52 lapack_prefix = ['/usr/include/atlas', '/usr/lib/atlas-base']
53 d_mpi_path = '/usr/include/openmpi'
54 mpi_prefix = os.path.split(os.path.realpath(d_mpi_path))[0]
55 parmetis_prefix = ['/usr/include','/usr/lib']
56 umfpack_prefix = ['/usr/include/suitesparse', '/usr/lib']
57
58 visit_prefix = ['/usr/local/visit/2.13.2/linux-x86_64/libsim/V2/include/','/usr/local/visit/2.13.2/linux-x86_64/libsim/V2/lib/']
59
60 trilinos_prefix =['/usr/local/trilinos/include/','/usr/local/trilinos/lib/']
61
62
63 p = subprocess.Popen(["ld","--verbose"], stdout=subprocess.PIPE)
64 out,err = p.communicate()
65 spath = [x[13:-3] for x in out.split() if 'SEARCH_DIR' in x]
66 p2name = ''
67 p3name = ''
68 for name in spath:
69 try:
70 l=os.listdir(name)
71 p2res=[x for x in l if x.startswith('libboost_python-py2') and x.endswith('.so')]
72 p3res=[x for x in l if x.startswith('libboost_python-py3') and x.endswith('.so')]
73 if len(p2name)==0 and len(p2res)>0:
74 p2name=p2res[-1]
75 if len(p3name)==0 and len(p3res)>0:
76 p3name=p3res[-1]
77 except OSError:
78 pass
79
80 # boost-python library/libraries to link against
81 if python == 2:
82 boost_libs = [p2name[3:-3]]
83 pythoncmd = '/usr/bin/python'
84 else:
85 boost_libs = [p3name[3:-3]]
86 pythoncmd = '/usr/bin/python3'
87
88 #boost_libs = [p2name[3:-3], 'boost_numpy27']
89 # boost_libs = ['boost_python27', 'boost_numpy27']
90
91 # this can be used by options files importing us
92 boost_py2_libs = [p2name[3:-3]]
93 boost_py3_libs = [p3name[3:-3]]
94
95 from site_init import getdebbuildflags
96 # Now we add the debian build flags
97 debstuff = getdebbuildflags()
98 if len(debstuff) > 0:
99 print("Building with the following additional flags from debian: "+str(debstuff))
100 for i in debstuff:
101 k=i[0]
102 v=i[1]
103 try:
104 exec(k+"+=' "+v+"'")
105 except NameError:
106 exec(k+"='"+v+"'")
107
108 mathjax_path='/usr/share/javascript/mathjax/MathJax.js'

  ViewVC Help
Powered by ViewVC 1.1.26