/[escript]/branches/inv2jf/SConstruct
ViewVC logotype

Diff of /branches/inv2jf/SConstruct

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

revision 5147 by sshaw, Thu Aug 28 07:02:11 2014 UTC revision 5148 by caltinay, Mon Sep 15 01:25:23 2014 UTC
# Line 23  from site_init import * Line 23  from site_init import *
23    
24  # Version number to check for in options file. Increment when new features are  # Version number to check for in options file. Increment when new features are
25  # added or existing options changed.  # added or existing options changed.
26  REQUIRED_OPTS_VERSION=201  REQUIRED_OPTS_VERSION=202
27    
28  # MS Windows support, many thanks to PH  # MS Windows support, many thanks to PH
29  IS_WINDOWS = (os.name == 'nt')  IS_WINDOWS = (os.name == 'nt')
# Line 69  vars.AddVariables( Line 69  vars.AddVariables(
69    ('cc_debug', 'Additional C++ flags for a debug build', 'default'),    ('cc_debug', 'Additional C++ flags for a debug build', 'default'),
70    ('cxx_extra', 'Extra C++ compiler flags', ''),    ('cxx_extra', 'Extra C++ compiler flags', ''),
71    ('ld_extra', 'Extra linker flags', ''),    ('ld_extra', 'Extra linker flags', ''),
72      ('nvcc', 'Path to CUDA compiler', 'default'),
73      ('nvccflags', 'Base CUDA compiler flags', 'default'),
74    BoolVariable('werror','Treat compiler warnings as errors', True),    BoolVariable('werror','Treat compiler warnings as errors', True),
75    BoolVariable('debug', 'Compile with debug flags', False),    BoolVariable('debug', 'Compile with debug flags', False),
76    BoolVariable('openmp', 'Compile parallel version using OpenMP', False),    BoolVariable('openmp', 'Compile parallel version using OpenMP', False),
# Line 113  vars.AddVariables( Line 115  vars.AddVariables(
115    ('visit_prefix', 'Prefix/Paths to VisIt installation', default_prefix),    ('visit_prefix', 'Prefix/Paths to VisIt installation', default_prefix),
116    ('visit_libs', 'VisIt libraries to link with', ['simV2']),    ('visit_libs', 'VisIt libraries to link with', ['simV2']),
117    BoolVariable('vsl_random', 'Use VSL from intel for random data', False),    BoolVariable('vsl_random', 'Use VSL from intel for random data', False),
118      BoolVariable('cuda', 'Enable GPU code with CUDA (requires thrust)', False),
119      ('thrust_prefix', 'Prefix/Paths to NVidia thrust installation', default_prefix),
120  # Advanced settings  # Advanced settings
121    #dudley_assemble_flags = -funroll-loops      to actually do something    #dudley_assemble_flags = -funroll-loops      to actually do something
122    ('dudley_assemble_flags', 'compiler flags for some dudley optimisations', ''),    ('dudley_assemble_flags', 'compiler flags for some dudley optimisations', ''),
# Line 183  if len(vars.UnknownVariables())>0: Line 187  if len(vars.UnknownVariables())>0:
187          print("Unknown option '%s'" % k)          print("Unknown option '%s'" % k)
188      Exit(1)      Exit(1)
189    
190    if env['cuda']:
191        if env['nvcc'] != 'default':
192            env['NVCC'] = env['nvcc']
193        env.Tool('nvcc')
194    
195  # create dictionary which will be populated with info for buildvars file  # create dictionary which will be populated with info for buildvars file
196  env['buildvars']={}  env['buildvars']={}
197  # create list which will be populated with warnings if there are any  # create list which will be populated with warnings if there are any
# Line 274  if env['omp_ldflags'] == 'default': env[ Line 283  if env['omp_ldflags'] == 'default': env[
283  if env['cxx_extra'] != '': env.Append(CXXFLAGS = env['cxx_extra'])  if env['cxx_extra'] != '': env.Append(CXXFLAGS = env['cxx_extra'])
284  if env['ld_extra']  != '': env.Append(LINKFLAGS = env['ld_extra'])  if env['ld_extra']  != '': env.Append(LINKFLAGS = env['ld_extra'])
285    
286    if env['nvccflags'] != 'default':
287        env['NVCCFLAGS'] = env['nvccflags']
288        env['SHNVCCFLAGS'] = env['nvccflags'] + ' -shared'
289    
290  if env['BADPYTHONMACROS']: env.Append(CXXFLAGS = ' -DBADPYTHONMACROS')  if env['BADPYTHONMACROS']: env.Append(CXXFLAGS = ' -DBADPYTHONMACROS')
291    
292  if env['usepython3']:  if env['usepython3']:
# Line 436  env=checkPython(env) Line 449  env=checkPython(env)
449  ######## boost & boost-python (required)  ######## boost & boost-python (required)
450  env=checkBoost(env)  env=checkBoost(env)
451    
452    ######## NVCC version (optional)
453    if env['cuda']:
454        env=checkCudaVersion(env)
455    
456  ######## numpy (required) and numpy headers (optional)  ######## numpy (required) and numpy headers (optional)
457  env=checkNumpy(env)  env=checkNumpy(env)
458    
# Line 499  env.SConscript(dirs = ['paso/src'], vari Line 516  env.SConscript(dirs = ['paso/src'], vari
516  env.SConscript(dirs = ['weipa/src'], variant_dir='$BUILD_DIR/$PLATFORM/weipa', duplicate=0)  env.SConscript(dirs = ['weipa/src'], variant_dir='$BUILD_DIR/$PLATFORM/weipa', duplicate=0)
517  env.SConscript(dirs = ['escript/py_src'], variant_dir='$BUILD_DIR/$PLATFORM/escript', duplicate=0)  env.SConscript(dirs = ['escript/py_src'], variant_dir='$BUILD_DIR/$PLATFORM/escript', duplicate=0)
518    
519    env.SConscript(dirs = ['cusplibrary'])
520    
521  #This will pull in the escriptcore/py_src and escriptcore/test  #This will pull in the escriptcore/py_src and escriptcore/test
522  env.SConscript(dirs = ['escriptcore/src'], variant_dir='$BUILD_DIR/$PLATFORM/escriptcore', duplicate=0)  env.SConscript(dirs = ['escriptcore/src'], variant_dir='$BUILD_DIR/$PLATFORM/escriptcore', duplicate=0)
523  #env.SConscript(dirs = ['escript/test'], variant_dir='$BUILD_DIR/$PLATFORM/escript/test', duplicate=0)  #env.SConscript(dirs = ['escript/test'], variant_dir='$BUILD_DIR/$PLATFORM/escript/test', duplicate=0)
# Line 547  env.Alias('install_dudley', ['build_dudl Line 566  env.Alias('install_dudley', ['build_dudl
566  env.Alias('build_finley', ['install_finley_headers', 'build_finley_lib', 'build_finleycpp_lib'])  env.Alias('build_finley', ['install_finley_headers', 'build_finley_lib', 'build_finleycpp_lib'])
567  env.Alias('install_finley', ['build_finley', 'install_finley_lib', 'install_finleycpp_lib', 'install_finley_py'])  env.Alias('install_finley', ['build_finley', 'install_finley_lib', 'install_finleycpp_lib', 'install_finley_py'])
568    
569  env.Alias('build_ripley', ['install_ripley_headers', 'build_ripley_lib', 'build_ripleycpp_lib'])  env.Alias('build_ripley', ['install_cusp_headers', 'install_ripley_headers', 'build_ripley_lib', 'build_ripleycpp_lib'])
570  env.Alias('install_ripley', ['build_ripley', 'install_ripley_lib', 'install_ripleycpp_lib', 'install_ripley_py'])  env.Alias('install_ripley', ['build_ripley', 'install_ripley_lib', 'install_ripleycpp_lib', 'install_ripley_py'])
571    
572  env.Alias('build_speckley', ['install_speckley_headers', 'build_speckley_lib', 'build_speckleycpp_lib'])  env.Alias('build_speckley', ['install_speckley_headers', 'build_speckley_lib', 'build_speckleycpp_lib'])
# Line 645  def print_summary(): Line 664  def print_summary():
664          print("          LAPACK:  YES (flavour: %s)"%env['lapack'])          print("          LAPACK:  YES (flavour: %s)"%env['lapack'])
665      else:      else:
666          print("          LAPACK:  DISABLED")          print("          LAPACK:  DISABLED")
667        if env['cuda']:
668            print("            CUDA:  YES (nvcc: %s)"%env['nvcc_version'])
669        else:
670            print("            CUDA:  DISABLED")
671      d_list=[]      d_list=[]
672      e_list=[]      e_list=[]
673      for i in 'debug','openmp','boomeramg','gdal','mkl','netcdf','papi','parmetis','pyproj','scipy','silo','sympy','umfpack','visit','vsl_random':      for i in 'debug','openmp','boomeramg','gdal','mkl','netcdf','papi','parmetis','pyproj','scipy','silo','sympy','umfpack','visit','vsl_random':

Legend:
Removed from v.5147  
changed lines
  Added in v.5148

  ViewVC Help
Powered by ViewVC 1.1.26