1 |
|
2 |
######################################################## |
3 |
# |
4 |
# Copyright (c) 2003-2010 by University of Queensland |
5 |
# Earth Systems Science Computational Center (ESSCC) |
6 |
# http://www.uq.edu.au/esscc |
7 |
# |
8 |
# Primary Business: Queensland, Australia |
9 |
# Licensed under the Open Software License version 3.0 |
10 |
# http://www.opensource.org/licenses/osl-3.0.php |
11 |
# |
12 |
######################################################## |
13 |
|
14 |
|
15 |
import os |
16 |
Import('*') |
17 |
|
18 |
local_env = clone_env(env_mpi) |
19 |
|
20 |
# And just for blocktimer cancer..... |
21 |
local_env.Append(LIBS = ['esysUtils']) |
22 |
|
23 |
lib_name = 'paso' |
24 |
|
25 |
sources = """ |
26 |
BiCGStab.c |
27 |
Coupler.c |
28 |
Distribution.c |
29 |
Functions.c |
30 |
GMRES.c |
31 |
GMRES2.c |
32 |
MKL.c |
33 |
NewtonGMRES.c |
34 |
Options_getPackage.c |
35 |
Options_getSolver.c |
36 |
Options_setDefaults.c |
37 |
PCG.c |
38 |
Paso.c |
39 |
PasoUtil.c |
40 |
Paso_MPI.c |
41 |
Pattern.c |
42 |
Pattern_getSubpattern.c |
43 |
Pattern_mis.c |
44 |
Pattern_coupling.c |
45 |
Pattern_reduceBandwidth.c |
46 |
Pattern_unrollBlocks.c |
47 |
SharedComponents.c |
48 |
Solver.c |
49 |
Transport.c |
50 |
Transport_solve.c |
51 |
FCTSolver.c |
52 |
FCTSolver_util.c |
53 |
ReactiveSolver.c |
54 |
Solver_Function.c |
55 |
Solver_GS.c |
56 |
Solver_GSMPI.c |
57 |
Solver_ILU.c |
58 |
Solver_RILU.c |
59 |
Solver_AMG.c |
60 |
Solver_AMLI.c |
61 |
Solver_SchurComplement.c |
62 |
Solver_applyBlockDiagonalMatrix.c |
63 |
Solver_jacobi.c |
64 |
Solver_preconditioner.c |
65 |
SparseMatrix.c |
66 |
SparseMatrix_MatrixVector.c |
67 |
SparseMatrix_addAbsRow.c |
68 |
SparseMatrix_addRow.c |
69 |
SparseMatrix_getSubmatrix.c |
70 |
SparseMatrix_AMGcomponents.c |
71 |
SparseMatrix_nullifyRowsAndCols.c |
72 |
SparseMatrix_saveHB.c |
73 |
SparseMatrix_setValues.c |
74 |
SystemMatrix.c |
75 |
SystemMatrixPattern.c |
76 |
SystemMatrixPattern_unrollBlocks.c |
77 |
SystemMatrix_MatrixVector.c |
78 |
SystemMatrix_borrowNormalization.c |
79 |
SystemMatrix_getSystemMatrixTypeId.c |
80 |
SystemMatrix_loadMM.c |
81 |
SystemMatrix_MIS.c |
82 |
SystemMatrix_nullifyRows.c |
83 |
SystemMatrix_nullifyRowsAndCols.c |
84 |
SystemMatrix_rowSum.c |
85 |
SystemMatrix_saveHB.c |
86 |
SystemMatrix_saveMM.c |
87 |
SystemMatrix_setValues.c |
88 |
TFQMR.c |
89 |
MINRES.c |
90 |
UMFPACK.c |
91 |
mmio.c |
92 |
performance.c |
93 |
solve.c |
94 |
""".split() |
95 |
headers = """ |
96 |
Common.h |
97 |
Coupler.h |
98 |
Distribution.h |
99 |
Functions.h |
100 |
MKL.h |
101 |
Options.h |
102 |
Paso.h |
103 |
PasoUtil.h |
104 |
Paso_MPI.h |
105 |
Pattern.h |
106 |
Pattern_coupling.h |
107 |
SharedComponents.h |
108 |
Solver.h |
109 |
Transport.h |
110 |
FCTSolver.h |
111 |
ReactiveSolver.h |
112 |
SparseMatrix.h |
113 |
SystemMatrix.h |
114 |
SystemMatrix_MIS.h |
115 |
SystemMatrixPattern.h |
116 |
UMFPACK.h |
117 |
mmio.h |
118 |
mpi_C.h |
119 |
performance.h |
120 |
""".split() |
121 |
|
122 |
if IS_WINDOWS_PLATFORM : |
123 |
local_env.Append(CPPDEFINES = ['PASO_EXPORTS']) |
124 |
|
125 |
if local_env['share_paso'] : |
126 |
lib = local_env.SharedLibrary(lib_name, sources) |
127 |
else: |
128 |
lib = local_env.StaticLibrary(lib_name, sources) |
129 |
|
130 |
env.Alias('target_paso_a', lib) |
131 |
|
132 |
include_path = Dir('paso', local_env['incinstall']) |
133 |
solvers_include_path = Dir('Solvers', include_path) |
134 |
|
135 |
tmp1 = local_env.Install(include_path, headers ) |
136 |
env.Alias('target_install_paso_headers', [tmp1]) |
137 |
|
138 |
tmp2 = local_env.Install(local_env['libinstall'], lib) |
139 |
env.Alias('target_install_paso_a', [tmp2]) |
140 |
|