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

Diff of /branches/inv2jf/SConstruct

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

revision 5265 by caltinay, Mon Nov 10 04:05:11 2014 UTC revision 5266 by caltinay, Mon Nov 17 06:45:01 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 340  env.Append(CCFLAGS = env['cc_flags']) Line 343  env.Append(CCFLAGS = env['cc_flags'])
343  # add system libraries  # add system libraries
344  env.AppendUnique(LIBS = env['sys_libs'])  env.AppendUnique(LIBS = env['sys_libs'])
345    
346    # set defaults for launchers if not otherwise specified
347    if env['prelaunch'] == 'default':
348        if env['mpi'] == 'INTELMPI' and env['openmp']:
349            env['prelaunch'] = "export I_MPI_PIN_DOMAIN=omp"
350        elif env['mpi'] == 'OPENMPI':
351            # transform comma-separated list to '-x a -x b -x c ...'
352            env['prelaunch'] = "EE=$(echo %e|sed -e 's/,/ -x /g')"
353        elif env['mpi'] == 'MPT':
354            env['prelaunch'] = "export MPI_NUM_MEMORY_REGIONS=0"
355        elif env['mpi'] == 'MPICH2':
356            env['prelaunch'] = "mpdboot -n %n -r ssh -f %f"
357        else:
358            env['prelaunch'] = ""
359    
360    if env['launcher'] == 'default':
361        if env['mpi'] == 'INTELMPI':
362            env['launcher'] = "mpirun -hostfile %f -n %N -ppn %p %b"
363        elif env['mpi'] == 'OPENMPI':
364            env['launcher'] = "mpirun --gmca mpi_warn_on_fork 0 -x ${EE} --host %h -np %N %b"
365        elif env['mpi'] == 'MPT':
366            env['launcher'] = "mpirun %h -np %p %b"
367        elif env['mpi'] == 'MPICH':
368            env['launcher'] = "mpirun -machinefile %f -np %N %b"
369        elif env['mpi'] == 'MPICH2':
370            env['launcher'] = "mpiexec -genvlist %e -np %N %b"
371        else:
372            env['launcher'] = "%b"
373    
374    if env['postlaunch'] == 'default':
375        if env['mpi'] == 'MPICH2':
376            env['postlaunch'] = "mpdallexit"
377        else:
378            env['postlaunch'] = ""
379    
380  # determine svn revision  # determine svn revision
381  global_revision=ARGUMENTS.get('SVN_VERSION', None)  global_revision=ARGUMENTS.get('SVN_VERSION', None)
382  if global_revision:  if global_revision:
# Line 543  env.SConscript(dirs = ['paso/profiling'] Line 580  env.SConscript(dirs = ['paso/profiling']
580    
581  write_buildvars(env)  write_buildvars(env)
582    
583    write_launcher(env)
584    
585  ################### Targets to build and install libraries ###################  ################### Targets to build and install libraries ###################
586    
587  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'))

Legend:
Removed from v.5265  
changed lines
  Added in v.5266

  ViewVC Help
Powered by ViewVC 1.1.26