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

Diff of /trunk/paso/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 192 by jgs, Mon Nov 21 04:52:14 2005 UTC revision 682 by robwdcock, Mon Mar 27 02:43:09 2006 UTC
# Line 1  Line 1 
 libinstall = None  
   
1  Import('*')  Import('*')
2    
3  import os  local_env=env.Copy()
 import string  
   
 paso_path = str(esysroot) + '/paso/src'  
 scsl_path = str(esysroot) + '/paso/src/SCSL'  
 solvers_path = str(esysroot) + '/paso/src/Solvers'  
 mmio_path = str(esysroot) + '/tools/mmio/inc'  
   
 cpp_path = [paso_path,  
             scsl_path,  
             solvers_path,  
             mmio_path,  
             python_path,  
             boost_path]  
   
 lib = 'paso'  
 sources = ['Options_getPackage.c',  
            'Options_getSolver.c',  
            'Options_setDefaults.c',  
            'Paso.c',  
            'solve.c',  
            'SystemMatrix_borrowNormalization.c',  
            'SystemMatrix.c',  
            'SystemMatrix_copy.c',  
            'SystemMatrix_getSubmatrix.c',  
            'SystemMatrix_getSystemMatrixTypeId.c',  
            'SystemMatrix_loadMM.c',  
            'SystemMatrix_MatrixVector.c',  
            'SystemMatrix_nullifyRowsAndCols.c',  
            'SystemMatrixPattern.c',  
            'SystemMatrixPattern_getSubpattern.c',  
            'SystemMatrixPattern_mis.c',  
            'SystemMatrixPattern_unrollBlocks.c',  
            'SystemMatrix_saveHB.c',  
            'SystemMatrix_saveMM.c',  
            'SystemMatrix_setValues.c',  
            'Util.c',  
            'SCSL/SCSL.c',  
            'SCSL/SCSL_direct.c',  
            'SCSL/SCSL_iterative.c',  
            'Solvers/BiCGStab.c',  
            'Solvers/GMRES.c',  
            'Solvers/PCG.c',  
            'Solvers/Solver_applyBlockDiagonalMatrix.c',  
            'Solvers/Solver.c',  
            'Solvers/Solver_ILU.c',  
            'Solvers/Solver_jacobi.c',  
            'Solvers/Solver_preconditioner.c',  
            'Solvers/Solver_SchurComplement.c']  
   
 paso_env = Environment(ENV = os.environ)  
   
 paso_env.Replace(CC = 'icc')  
 paso_env.Replace(CCFLAGS = cc_flags)  
 paso_env.Replace(CPPPATH = cpp_path)  
4    
5  paso_lib = paso_env.StaticLibrary(lib, sources)  src_dir = local_env.Dir('.').srcnode().abspath
 paso_env.Install(libdir, paso_lib)  
6    
7  if libinstall != None:  import os
8    paso_env.Install(libinstall, paso_lib)  filenames = os.listdir(src_dir)
9    sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
10    headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
11    # Filter unused sources
12    sources.remove('SystemMatrixPattern_reduceBandwidth.c') # FIXME: Should this file be removed?
13    
14    # Paso has additional source in the Solvers sub-directory. Append these to the list
15    solver_filenames = os.listdir(src_dir+'/Solvers');
16    sources += ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
17    solver_headers = ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.h']]
18    
19    if mkl_libs:
20       local_env.Append(CPPDEFINES=['MKL',])
21       local_env.Append(LIBS = mkl_libs)
22    if scsl_libs:
23       local_env.Append(CPPDEFINES=['SCSL',])
24       local_env.Append(LIBS = scsl_libs)
25    if umf_libs:
26       local_env.Append(CPPDEFINES=['UMFPACK',])
27       local_env.Append(LIBS = umf_libs)
28    if papi_libs:
29       local_env.Append(CPPDEFINES=['PAPI',])
30       local_env.Append(LIBS = papi_libs)
31    
32    lib_name = 'paso'
33    
34    lib = local_env.StaticLibrary(lib_name, sources)
35    
36    include_path = Dir(lib_name, incinstall)
37    solvers_include_path = Dir('Solvers', include_path)
38    
39    local_env.Install(include_path, headers )
40    local_env.Install(solvers_include_path, solver_headers )
41    local_env.Install(libinstall, lib)
42    

Legend:
Removed from v.192  
changed lines
  Added in v.682

  ViewVC Help
Powered by ViewVC 1.1.26