/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 5123 by sshaw, Thu Aug 28 07:02:11 2014 UTC revision 5183 by caltinay, Tue Sep 30 05:55:37 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 131  vars.AddVariables( Line 135  vars.AddVariables(
135    ('SVN_VERSION', 'Do not use from options file', -2),    ('SVN_VERSION', 'Do not use from options file', -2),
136    ('pythoncmd', 'which python to compile with','python'),    ('pythoncmd', 'which python to compile with','python'),
137    ('usepython3', 'Is this a python3 build? (experimental)', False),    ('usepython3', 'Is this a python3 build? (experimental)', False),
138      ('longindices', 'use long indices (for very large matrices)', False),
139    ('pythonlibname', 'Name of the python library to link. (This is found automatically for python2.X.)', ''),    ('pythonlibname', 'Name of the python library to link. (This is found automatically for python2.X.)', ''),
140    ('pythonlibpath', 'Path to the python library. (You should not need to set this unless your python has moved)',''),    ('pythonlibpath', 'Path to the python library. (You should not need to set this unless your python has moved)',''),
141    ('pythonincpath','Path to python include files. (You should not need to set this unless your python has moved',''),    ('pythonincpath','Path to python include files. (You should not need to set this unless your python has moved',''),
# Line 183  if len(vars.UnknownVariables())>0: Line 188  if len(vars.UnknownVariables())>0:
188          print("Unknown option '%s'" % k)          print("Unknown option '%s'" % k)
189      Exit(1)      Exit(1)
190    
191    if env['cuda']:
192        if env['nvcc'] != 'default':
193            env['NVCC'] = env['nvcc']
194        env.Tool('nvcc')
195    
196  # create dictionary which will be populated with info for buildvars file  # create dictionary which will be populated with info for buildvars file
197  env['buildvars']={}  env['buildvars']={}
198  # 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 284  if env['omp_ldflags'] == 'default': env[
284  if env['cxx_extra'] != '': env.Append(CXXFLAGS = env['cxx_extra'])  if env['cxx_extra'] != '': env.Append(CXXFLAGS = env['cxx_extra'])
285  if env['ld_extra']  != '': env.Append(LINKFLAGS = env['ld_extra'])  if env['ld_extra']  != '': env.Append(LINKFLAGS = env['ld_extra'])
286    
287  if env['BADPYTHONMACROS']: env.Append(CXXFLAGS = ' -DBADPYTHONMACROS')  if env['nvccflags'] != 'default':
288        env['NVCCFLAGS'] = env['nvccflags']
289        env['SHNVCCFLAGS'] = env['nvccflags'] + ' -shared'
290    
291    if env['BADPYTHONMACROS']:
292        env.Append(CPPDEFINES = ['BADPYTHONMACROS'])
293    
294    if env['longindices']:
295        env.Append(CPPDEFINES = ['ESYS_INDEXTYPE_LONG'])
296    
297  if env['usepython3']:  if env['usepython3']:
298      env.Append(CPPDEFINES=['ESPYTHON3'])      env.Append(CPPDEFINES=['ESPYTHON3'])
# Line 436  env=checkPython(env) Line 454  env=checkPython(env)
454  ######## boost & boost-python (required)  ######## boost & boost-python (required)
455  env=checkBoost(env)  env=checkBoost(env)
456    
457    ######## NVCC version (optional)
458    if env['cuda']:
459        env=checkCudaVersion(env)
460    
461  ######## numpy (required) and numpy headers (optional)  ######## numpy (required) and numpy headers (optional)
462  env=checkNumpy(env)  env=checkNumpy(env)
463    
# Line 499  env.SConscript(dirs = ['paso/src'], vari Line 521  env.SConscript(dirs = ['paso/src'], vari
521  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)
522  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)
523    
524    env.SConscript(dirs = ['cusplibrary'])
525    
526  #This will pull in the escriptcore/py_src and escriptcore/test  #This will pull in the escriptcore/py_src and escriptcore/test
527  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)
528  #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 571  env.Alias('install_dudley', ['build_dudl
571  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'])
572  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'])
573    
574  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'])
575  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'])
576    
577  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 669  def print_summary():
669          print("          LAPACK:  YES (flavour: %s)"%env['lapack'])          print("          LAPACK:  YES (flavour: %s)"%env['lapack'])
670      else:      else:
671          print("          LAPACK:  DISABLED")          print("          LAPACK:  DISABLED")
672        if env['cuda']:
673            print("            CUDA:  YES (nvcc: %s)"%env['nvcc_version'])
674        else:
675            print("            CUDA:  DISABLED")
676      d_list=[]      d_list=[]
677      e_list=[]      e_list=[]
678      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.5123  
changed lines
  Added in v.5183

  ViewVC Help
Powered by ViewVC 1.1.26