1 |
libinstall = None |
2 |
incinstall = None |
3 |
|
4 |
Import('*') |
5 |
|
6 |
import os |
7 |
import string |
8 |
paso_env = Environment(ENV = os.environ) |
9 |
|
10 |
paso_path = str(esysroot) + '/paso/src' |
11 |
solvers_path = str(esysroot) + '/paso/src/Solvers' |
12 |
mmio_path = str(esysroot) + '/tools/mmio/inc' |
13 |
|
14 |
cpp_path = [paso_path, |
15 |
solvers_path, |
16 |
mmio_path, |
17 |
python_path, |
18 |
boost_path] |
19 |
|
20 |
paso_env.Replace(CC = cc) |
21 |
paso_env.Replace(CCFLAGS = cc_flags) |
22 |
if len(mkl_libs) >0: paso_env.Append(CCFLAGS=' -DMKL') |
23 |
if len(mkl_path) >0: cpp_path.append(mkl_path) |
24 |
if len(scsl_libs)>0 : paso_env.Append(CCFLAGS=' -DSCSL') |
25 |
if len(scsl_path)>0: cpp_path.append(scsl_path) |
26 |
if len(umfpack_libs)>0 : paso_env.Append(CCFLAGS=' -DUMFPACK') |
27 |
if len(umfpack_path)>0: cpp_path.append(umfpack_path) |
28 |
paso_env.Replace(CPPPATH = cpp_path) |
29 |
paso_env.Replace(ARFLAGS = ar_flags) |
30 |
|
31 |
lib = 'paso' |
32 |
|
33 |
incs = ['Common.h', |
34 |
'MKL.h', |
35 |
'Options.h', |
36 |
'Paso.h', |
37 |
'SCSL.h', |
38 |
'SystemMatrix.h', |
39 |
'SystemMatrixPattern.h', |
40 |
'PasoUtil.h', |
41 |
'Solvers/Solver.h'] |
42 |
|
43 |
sources = ['Options_getPackage.c', |
44 |
'Options_getSolver.c', |
45 |
'Options_setDefaults.c', |
46 |
'Paso.c', |
47 |
'solve.c', |
48 |
'SystemMatrix_borrowNormalization.c', |
49 |
'SystemMatrix.c', |
50 |
'SystemMatrix_copy.c', |
51 |
'SystemMatrix_getSubmatrix.c', |
52 |
'SystemMatrix_getSystemMatrixTypeId.c', |
53 |
'SystemMatrix_loadMM.c', |
54 |
'SystemMatrix_MatrixVector.c', |
55 |
'SystemMatrix_nullifyRowsAndCols.c', |
56 |
'SystemMatrixPattern.c', |
57 |
'SystemMatrixPattern_getSubpattern.c', |
58 |
'SystemMatrixPattern_mis.c', |
59 |
'SystemMatrixPattern_unrollBlocks.c', |
60 |
'SystemMatrix_saveHB.c', |
61 |
'SystemMatrix_saveMM.c', |
62 |
'SystemMatrix_setValues.c', |
63 |
'PasoUtil.c', |
64 |
'MKL.c', |
65 |
'SCSL.c', |
66 |
'SCSL_direct.c', |
67 |
'SCSL_iterative.c', |
68 |
'Solvers/BiCGStab.c', |
69 |
'Solvers/GMRES.c', |
70 |
'Solvers/PCG.c', |
71 |
'Solvers/Solver_applyBlockDiagonalMatrix.c', |
72 |
'Solvers/Solver.c', |
73 |
'Solvers/Solver_ILU.c', |
74 |
'Solvers/Solver_RILU.c', |
75 |
'Solvers/Solver_jacobi.c', |
76 |
'Solvers/Solver_preconditioner.c', |
77 |
'Solvers/Solver_SchurComplement.c'] |
78 |
|
79 |
paso_lib = paso_env.StaticLibrary(lib, sources) |
80 |
|
81 |
Default(paso_env.Install(incdir, incs)) |
82 |
Default(paso_env.Install(incdir2, incs)) |
83 |
if incinstall != None: |
84 |
Default(paso_env.Install(incinstall, incs)) |
85 |
|
86 |
Default(paso_env.Install(libdir, paso_lib)) |
87 |
Default(paso_env.Install(libdir2, paso_lib)) |
88 |
if libinstall != None: |
89 |
Default(paso_env.Install(libinstall, paso_lib)) |