/[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 618 by gross, Wed Mar 22 04:02:38 2006 UTC revision 682 by robwdcock, Mon Mar 27 02:43:09 2006 UTC
# Line 1  Line 1 
 libinstall = None  
 incinstall = None  
   
1  Import('*')  Import('*')
2    
3  import os  local_env=env.Copy()
 import string  
 paso_env = Environment(ENV = os.environ)  
4    
5  paso_path = Dir(str(esysroot) + '/paso/src')  src_dir = local_env.Dir('.').srcnode().abspath
6  solvers_path = Dir(str(esysroot) + '/paso/src/Solvers')  
7  mmio_path = Dir(str(esysroot) + '/tools/mmio/inc')  import os
8    filenames = os.listdir(src_dir)
9  cpp_path = [paso_path,  sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
10              solvers_path,  headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
11              mmio_path,  # Filter unused sources
12              python_path,  sources.remove('SystemMatrixPattern_reduceBandwidth.c') # FIXME: Should this file be removed?
13              boost_path]  
14    # Paso has additional source in the Solvers sub-directory. Append these to the list
15  paso_env.Replace(CC = cc)  solver_filenames = os.listdir(src_dir+'/Solvers');
16  paso_env.Replace(CCFLAGS = cc_flags)  sources += ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
17  if len(mkl_libs) >0: paso_env.Append(CCFLAGS=' -DMKL')  solver_headers = ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.h']]
18  if len(scsl_libs)>0 : paso_env.Append(CCFLAGS=' -DSCSL')  
19  if len(mkl_path)>0: cpp_path.append(mkl_path)  if mkl_libs:
20  if len(scsl_path)>0: cpp_path.append(scsl_path)     local_env.Append(CPPDEFINES=['MKL',])
21  if len(umfpack_path)>0: cpp_path.append(umfpack_path)     local_env.Append(LIBS = mkl_libs)
22  if len(papi_path)>0: cpp_path.append(papi_path)  if scsl_libs:
23  if len(umfpack_libs)>0 : paso_env.Append(CCFLAGS=' -DUMFPACK')     local_env.Append(CPPDEFINES=['SCSL',])
24  if len(papi_libs)>0 : paso_env.Append(CCFLAGS=' -DPAPI')     local_env.Append(LIBS = scsl_libs)
25    if umf_libs:
26  paso_env.Replace(CPPPATH = cpp_path)     local_env.Append(CPPDEFINES=['UMFPACK',])
27  paso_env.Replace(ARFLAGS = ar_flags)     local_env.Append(LIBS = umf_libs)
28    if papi_libs:
29  lib = 'paso'     local_env.Append(CPPDEFINES=['PAPI',])
30       local_env.Append(LIBS = papi_libs)
31  incs = ['Common.h',  
32          'mmio.h',  lib_name = 'paso'
33          'MKL.h',  
34          'Options.h',  lib = local_env.StaticLibrary(lib_name, sources)
35          'Paso.h',  
36          'SCSL.h',  include_path = Dir(lib_name, incinstall)
37          'SystemMatrix.h',  solvers_include_path = Dir('Solvers', include_path)
38          'SystemMatrixPattern.h',  
39          'PasoUtil.h',  local_env.Install(include_path, headers )
40          'performance.h',  local_env.Install(solvers_include_path, solver_headers )
41          'Solvers/Solver.h']  local_env.Install(libinstall, lib)
42    
 sources = ['Options_getPackage.c',  
            'Options_getSolver.c',  
            'Options_setDefaults.c',  
            'mmio.c',  
            'performance.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',  
            'PasoUtil.c',  
            'MKL.c',  
            'SCSL.c',  
            'SCSL_direct.c',  
            '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_RILU.c',  
            'Solvers/Solver_jacobi.c',  
            'Solvers/Solver_preconditioner.c',  
            'Solvers/Solver_SchurComplement.c']  
   
 paso_lib = paso_env.StaticLibrary(lib, sources)  
   
 Default(paso_env.Install(incdir, incs))  
 Default(paso_env.Install(incdir2, incs))  
 if incinstall != None:  
   Default(paso_env.Install(incinstall, incs))  
   
 Default(paso_env.Install(libdir, paso_lib))  
 Default(paso_env.Install(libdir2, paso_lib))  
 if libinstall != None:  
   Default(paso_env.Install(libinstall, paso_lib))  

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

  ViewVC Help
Powered by ViewVC 1.1.26