/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 6508 by jfenwick, Mon Feb 20 03:36:51 2017 UTC revision 6509 by jfenwick, Thu Mar 2 07:36:17 2017 UTC
# Line 54  if not os.path.isfile(options_file): Line 54  if not os.path.isfile(options_file):
54    
55  default_prefix='/usr'  default_prefix='/usr'
56  mpi_flavours=('no', 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI')  mpi_flavours=('no', 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI')
57    netcdf_flavours = ('no', 'off', 'none', 'False', # Must be last of the false alternatives
58                       'yes', 'on', 'True', '3', # Must be last of the version 3 alternatives
59                       '4')
60  all_domains = ['dudley','finley','ripley','speckley']  all_domains = ['dudley','finley','ripley','speckley']
61    
62  #Note that scons construction vars the the following purposes:  #Note that scons construction vars the the following purposes:
# Line 94  vars.AddVariables( Line 97  vars.AddVariables(
97    ('mpi_libs', 'MPI shared libraries to link with', ['mpi']),    ('mpi_libs', 'MPI shared libraries to link with', ['mpi']),
98    BoolVariable('cuda', 'Enable GPU code with CUDA (requires thrust)', False),    BoolVariable('cuda', 'Enable GPU code with CUDA (requires thrust)', False),
99    ('cuda_prefix', 'Prefix/Paths to NVidia CUDA installation', default_prefix),    ('cuda_prefix', 'Prefix/Paths to NVidia CUDA installation', default_prefix),
100    BoolVariable('netcdf', 'Enable netCDF file support', False),    EnumVariable('netcdf', 'Enable netCDF file support', False, allowed_values=netcdf_flavours),
101    ('netcdf_prefix', 'Prefix/Paths of netCDF installation', default_prefix),    ('netcdf_prefix', 'Prefix/Paths of netCDF installation', default_prefix),
102    ('netcdf_libs', 'netCDF libraries to link with', ['netcdf_c++', 'netcdf']),    ('netcdf_libs', 'netCDF libraries to link with', 'DEFAULT'),
103    BoolVariable('parmetis', 'Enable ParMETIS (requires MPI)', False),    BoolVariable('parmetis', 'Enable ParMETIS (requires MPI)', False),
104    ('parmetis_prefix', 'Prefix/Paths of ParMETIS installation', default_prefix),    ('parmetis_prefix', 'Prefix/Paths of ParMETIS installation', default_prefix),
105    ('parmetis_libs', 'ParMETIS libraries to link with', ['parmetis', 'metis']),    ('parmetis_libs', 'ParMETIS libraries to link with', ['parmetis', 'metis']),
# Line 170  env = Environment(tools = ['default'], o Line 173  env = Environment(tools = ['default'], o
173  def mkclang(env):  def mkclang(env):
174      env['CXX']='clang++'      env['CXX']='clang++'
175    
176    # Covert env['netcdf'] into one of False, 3, 4
177    # Also choose default values for libraries
178    pos1=netcdf_flavours.index('False')
179    pos2=netcdf_flavours.index('3')
180    mypos=netcdf_flavours.index(env['netcdf'])
181    if 0 <= mypos <=pos1:
182        env['netcdf']=False
183    elif pos1 < mypos <= pos2:
184        env['netcdf']=3
185        if env['netcdf_libs']=='DEFAULT':
186            env['netcdf_libs']=['netcdf_c++', 'netcdf']
187    else:   # netcdf4
188        env['netcdf']=4
189        if env['netcdf_libs']=='DEFAULT':
190            env['netcdf_libs']=['netcdf_c++4']
191        
192  if env['tools_names'] != ['default']:  if env['tools_names'] != ['default']:
193      zz=env['tools_names']      zz=env['tools_names']
194      if 'clang' in zz:      if 'clang' in zz:
# Line 751  def print_summary(): Line 770  def print_summary():
770      else:      else:
771          print("   Direct solver:  NONE")          print("   Direct solver:  NONE")
772      print("         domains:  %s"%(", ".join(env['domains'])))      print("         domains:  %s"%(", ".join(env['domains'])))
773        if env['netcdf']==4:
774            print("          netcdf:  YES (4 + 3)")
775        elif env['netcdf']==3:
776            print("          netcdf:  YES (3)")
777        else:
778            print("          netcdf:  NO")
779      e_list=[]      e_list=[]
780      for i in 'weipa','debug','openmp','boomeramg','cppunit','gdal','mkl',\      for i in ('weipa','debug','openmp','boomeramg','cppunit','gdal','mkl',
781               'netcdf','papi','pyproj','scipy','silo','sympy','umfpack','visit':               'papi','pyproj','scipy','silo','sympy','umfpack','visit'):
782          if env[i]: e_list.append(i)          if env[i]: e_list.append(i)
783          else: d_list.append(i)          else: d_list.append(i)
784    

Legend:
Removed from v.6508  
changed lines
  Added in v.6509

  ViewVC Help
Powered by ViewVC 1.1.26