/[escript]/trunk/paso/src/SConscript
ViewVC logotype

Contents of /trunk/paso/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2078 - (show annotations)
Thu Nov 20 16:10:10 2008 UTC (10 years, 8 months ago) by phornby
File size: 2714 byte(s)
Two changes.

1. Move blocktimer from escript to esysUtils.
2. Make it possible to link to paso as a DLL or .so.

Should have no effect on 'nix's

In respect of 1., blocktimer had begun to spring up everywhere, so
for the moment I thought it best to move it to the only other library that
pops up all over the place.

In respect of 2., paso needed to be a DLL in order to use the windows intelc /fast
option, which does aggressive multi-file optimisations. Even in its current form, it either
vectorises or parallelises  hundreds more loops in the esys system than appear in the pragmas.

In achieving 2. I have not been too delicate in adding

PASO_DLL_API

declarations to the .h files in paso/src. Only toward the end of the process of
the conversion, when the number of linker errors dropped below 20, say, did I choosy about what
functions in a header I declared PASO_DLL_API. As a result, there are likely to be many routines
declared as external functions symbols that are in fact internal to the paso DLL. 
Why is this an issue?  It prevents the intelc compiler from getting aggressive on the paso module.
With pain there is sometimes gain. At least all the DLL rules in windows give good
(non-microsoft) compiler writers a chance to really shine.

So, if you should see a PASO_DLL_API on a function in a paso header file,
and think to yourself, "that function is only called in paso, why export it?", then feel free to
delete the PASO_DLL_API export declaration.

Here's hoping for no breakage.....
1
2 ########################################################
3 #
4 # Copyright (c) 2003-2008 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 SCSL.c
48 SCSL_direct.c
49 SCSL_iterative.c
50 SharedComponents.c
51 Solver.c
52 SolverFCT.c
53 SolverFCT_FluxControl.c
54 SolverFCT_reset.c
55 SolverFCT_solve.c
56 Solver_Function.c
57 Solver_GS.c
58 Solver_ILU.c
59 Solver_RILU.c
60 Solver_AMG.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_nullifyRowsAndCols.c
71 SparseMatrix_saveHB.c
72 SparseMatrix_setValues.c
73 SystemMatrix.c
74 SystemMatrixPattern.c
75 SystemMatrixPattern_unrollBlocks.c
76 SystemMatrix_MatrixVector.c
77 SystemMatrix_borrowNormalization.c
78 SystemMatrix_getSystemMatrixTypeId.c
79 SystemMatrix_loadMM.c
80 SystemMatrix_nullifyRows.c
81 SystemMatrix_nullifyRowsAndCols.c
82 SystemMatrix_rowSum.c
83 SystemMatrix_saveHB.c
84 SystemMatrix_saveMM.c
85 SystemMatrix_setValues.c
86 TFQMR.c
87 MINRES.c
88 UMFPACK.c
89 mmio.c
90 performance.c
91 solve.c
92 """.split()
93 headers = """
94 Common.h
95 Coupler.h
96 Distribution.h
97 Functions.h
98 MKL.h
99 Options.h
100 Paso.h
101 PasoUtil.h
102 Paso_MPI.h
103 Pattern.h
104 Pattern_coupling.h
105 SCSL.h
106 SharedComponents.h
107 Solver.h
108 SolverFCT.h
109 SparseMatrix.h
110 SystemMatrix.h
111 SystemMatrixPattern.h
112 UMFPACK.h
113 mmio.h
114 mpi_C.h
115 performance.h
116 """.split()
117
118 if IS_WINDOWS_PLATFORM :
119 local_env.Append(CPPDEFINES = ['PASO_EXPORTS'])
120
121 if local_env['share_paso'] :
122 lib = local_env.SharedLibrary(lib_name, sources)
123 else:
124 lib = local_env.StaticLibrary(lib_name, sources)
125
126 env.Alias('target_paso_a', lib)
127
128 include_path = Dir('paso', local_env['incinstall'])
129 solvers_include_path = Dir('Solvers', include_path)
130
131 tmp1 = local_env.Install(include_path, headers )
132 env.Alias('target_install_paso_headers', [tmp1])
133
134 tmp2 = local_env.Install(local_env['libinstall'], lib)
135 env.Alias('target_install_paso_a', [tmp2])
136

  ViewVC Help
Powered by ViewVC 1.1.26