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

Diff of /branches/inv2jf/SConstruct

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

revision 5250 by caltinay, Mon Nov 10 04:05:11 2014 UTC revision 5391 by caltinay, Tue Dec 16 06:59:58 2014 UTC
# Line 115  vars.AddVariables( Line 115  vars.AddVariables(
115    ListVariable('domains', 'Which domains to build', 'all',\    ListVariable('domains', 'Which domains to build', 'all',\
116                 ['dudley','finley','ripley','speckley']),                 ['dudley','finley','ripley','speckley']),
117  # Advanced settings  # Advanced settings
118      ('launcher', 'Launcher command (e.g. mpirun)', 'default'),
119      ('prelaunch', 'Command to execute before launcher (e.g. mpdboot)', 'default'),
120      ('postlaunch', 'Command to execute after launcher (e.g. mpdexit)', 'default'),
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', ''),
123    # To enable passing function pointers through python    # To enable passing function pointers through python
124    BoolVariable('iknowwhatimdoing', 'Allow non-standard C', False),    BoolVariable('iknowwhatimdoing', 'Allow non-standard C', False),
125    # An option for specifying the compiler tools (see windows branch)    # An option for specifying the compiler tools
126    ('tools_names', 'Compiler tools to use', ['default']),    ('tools_names', 'Compiler tools to use', ['default']),
127    ('env_export', 'Environment variables to be passed to tools',[]),    ('env_export', 'Environment variables to be passed to tools',[]),
128    EnumVariable('forcelazy', 'For testing use only - set the default value for autolazy', 'leave_alone', allowed_values=('leave_alone', 'on', 'off')),    EnumVariable('forcelazy', 'For testing use only - set the default value for autolazy', 'leave_alone', allowed_values=('leave_alone', 'on', 'off')),
# Line 192  if env['cuda']: Line 195  if env['cuda']:
195          env['NVCC'] = env['nvcc']          env['NVCC'] = env['nvcc']
196      env.Tool('nvcc')      env.Tool('nvcc')
197    
198    if 'dudley' in env['domains']:
199        env['domains'].append('finley')
200    
201  # create dictionary which will be populated with info for buildvars file  # create dictionary which will be populated with info for buildvars file
202  env['buildvars']={}  env['buildvars']={}
203  # 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 340  env.Append(CCFLAGS = env['cc_flags']) Line 346  env.Append(CCFLAGS = env['cc_flags'])
346  # add system libraries  # add system libraries
347  env.AppendUnique(LIBS = env['sys_libs'])  env.AppendUnique(LIBS = env['sys_libs'])
348    
349    # set defaults for launchers if not otherwise specified
350    if env['prelaunch'] == 'default':
351        if env['mpi'] == 'INTELMPI' and env['openmp']:
352            env['prelaunch'] = "export I_MPI_PIN_DOMAIN=omp"
353        elif env['mpi'] == 'OPENMPI':
354            # transform comma-separated list to '-x a -x b -x c ...'
355            env['prelaunch'] = "EE=$(echo %e|sed -e 's/,/ -x /g')"
356        elif env['mpi'] == 'MPT':
357            env['prelaunch'] = "export MPI_NUM_MEMORY_REGIONS=0"
358        elif env['mpi'] == 'MPICH2':
359            env['prelaunch'] = "mpdboot -n %n -r ssh -f %f"
360        else:
361            env['prelaunch'] = ""
362    
363    if env['launcher'] == 'default':
364        if env['mpi'] == 'INTELMPI':
365            env['launcher'] = "mpirun -hostfile %f -n %N -ppn %p %b"
366        elif env['mpi'] == 'OPENMPI':
367            env['launcher'] = "mpirun --gmca mpi_warn_on_fork 0 -x ${EE} --host %h -bynode -bind-to-core --cpus-per-rank %t -np %N %b"
368        elif env['mpi'] == 'MPT':
369            env['launcher'] = "mpirun %h -np %p %b"
370        elif env['mpi'] == 'MPICH':
371            env['launcher'] = "mpirun -machinefile %f -np %N %b"
372        elif env['mpi'] == 'MPICH2':
373            env['launcher'] = "mpiexec -genvlist %e -np %N %b"
374        else:
375            env['launcher'] = "%b"
376    
377    if env['postlaunch'] == 'default':
378        if env['mpi'] == 'MPICH2':
379            env['postlaunch'] = "mpdallexit"
380        else:
381            env['postlaunch'] = ""
382    
383  # determine svn revision  # determine svn revision
384  global_revision=ARGUMENTS.get('SVN_VERSION', None)  global_revision=ARGUMENTS.get('SVN_VERSION', None)
385  if global_revision:  if global_revision:
# Line 465  env=checkOptionalModules(env) Line 505  env=checkOptionalModules(env)
505  ######## optional dependencies (netCDF, PAPI, MKL, UMFPACK, Lapack, Silo, ...)  ######## optional dependencies (netCDF, PAPI, MKL, UMFPACK, Lapack, Silo, ...)
506  env=checkOptionalLibraries(env)  env=checkOptionalLibraries(env)
507    
508    #use gmsh info to set some defines
509    if env['gmsh'] == 's':
510        env.Append(CPPDEFINES=['GMSH'])
511    elif env['gmsh'] == 'm':
512        env.Append(CPPDEFINES=['GMSH','GMSH_MPI'])
513    
514  ######## PDFLaTeX (for documentation)  ######## PDFLaTeX (for documentation)
515  env=checkPDFLatex(env)  env=checkPDFLatex(env)
516    
# Line 543  env.SConscript(dirs = ['paso/profiling'] Line 589  env.SConscript(dirs = ['paso/profiling']
589    
590  write_buildvars(env)  write_buildvars(env)
591    
592    write_launcher(env)
593    
594  ################### Targets to build and install libraries ###################  ################### Targets to build and install libraries ###################
595    
596  target_init = env.Command(os.path.join(env['pyinstall'],'__init__.py'), None, Touch('$TARGET'))  target_init = env.Command(os.path.join(env['pyinstall'],'__init__.py'), None, Touch('$TARGET'))
# Line 688  def print_summary(): Line 736  def print_summary():
736          print("         CppUnit:  YES")          print("         CppUnit:  YES")
737      else:      else:
738          print("         CppUnit:  NO")          print("         CppUnit:  NO")
739        if env['gmshpy']:
740            gmshpy=" + python module"
741        else:
742            gmshpy=""
743      if env['gmsh']=='m':      if env['gmsh']=='m':
744          print("            gmsh:  YES, MPI-ENABLED")          print("            gmsh:  YES, MPI-ENABLED"+gmshpy)
745      elif env['gmsh']=='s':      elif env['gmsh']=='s':
746          print("            gmsh:  YES")          print("            gmsh:  YES"+gmshpy)
747      else:      else:
748          print("            gmsh:  NO")          if env['gmshpy']:
749                print("            gmsh:  python module only")
750            else:
751                print("            gmsh:  NO")
752      print(    "            gzip:  " + ("YES" if env['compressed_files'] else "NO"))      print(    "            gzip:  " + ("YES" if env['compressed_files'] else "NO"))
753    
754      if ((fatalwarning != '') and (env['werror'])):      if ((fatalwarning != '') and (env['werror'])):

Legend:
Removed from v.5250  
changed lines
  Added in v.5391

  ViewVC Help
Powered by ViewVC 1.1.26