/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 6248 by caltinay, Thu Jun 2 04:13:21 2016 UTC revision 6249 by caltinay, Thu Jun 2 04:37:00 2016 UTC
# Line 348  env.Append(CCFLAGS = env['cc_flags']) Line 348  env.Append(CCFLAGS = env['cc_flags'])
348  # add system libraries  # add system libraries
349  env.AppendUnique(LIBS = env['sys_libs'])  env.AppendUnique(LIBS = env['sys_libs'])
350    
 # set defaults for launchers if not otherwise specified  
 if env['prelaunch'] == 'default':  
     if env['mpi'] == 'INTELMPI' and env['openmp']:  
         env['prelaunch'] = "export I_MPI_PIN_DOMAIN=omp"  
     elif env['mpi'] == 'OPENMPI':  
         # transform comma-separated list to '-x a -x b -x c ...'  
         env['prelaunch'] = "EE=$(echo -x %e|sed -e 's/,/ -x /g')"  
     elif env['mpi'] == 'MPT':  
         env['prelaunch'] = "export MPI_NUM_MEMORY_REGIONS=0"  
     elif env['mpi'] == 'MPICH2':  
         env['prelaunch'] = "mpdboot -n %n -r ssh -f %f"  
     else:  
         env['prelaunch'] = ""  
   
 if env['launcher'] == 'default':  
     if env['mpi'] == 'INTELMPI':  
         env['launcher'] = "mpirun -hostfile %f -n %N -ppn %p %b"  
     elif env['mpi'] == 'OPENMPI':  
         env['launcher'] = "mpirun ${AGENTOVERRIDE} --gmca mpi_warn_on_fork 0 ${EE} --host %h --cpus-per-rank %t -np %N %b"  
         #newer OpenMPI version:  
         #env['launcher'] = "mpirun ${AGENTOVERRIDE} --gmca mpi_warn_on_fork 0 ${EE} --host %h --map-by node:pe=%t -bind-to core -np %N %b"  
     elif env['mpi'] == 'MPT':  
         env['launcher'] = "mpirun %h -np %p %b"  
     elif env['mpi'] == 'MPICH':  
         env['launcher'] = "mpirun -machinefile %f -np %N %b"  
     elif env['mpi'] == 'MPICH2':  
         env['launcher'] = "mpiexec -genvlist %e -np %N %b"  
     else:  
         env['launcher'] = "%b"  
   
 if env['postlaunch'] == 'default':  
     if env['mpi'] == 'MPICH2':  
         env['postlaunch'] = "mpdallexit"  
     else:  
         env['postlaunch'] = ""  
   
351  # determine svn revision  # determine svn revision
352  global_revision=ARGUMENTS.get('SVN_VERSION', None)  global_revision=ARGUMENTS.get('SVN_VERSION', None)
353  if global_revision:  if global_revision:
# Line 510  env=checkOptionalLibraries(env) Line 474  env=checkOptionalLibraries(env)
474  ######## PDFLaTeX (for documentation)  ######## PDFLaTeX (for documentation)
475  env=checkPDFLatex(env)  env=checkPDFLatex(env)
476    
477    # set defaults for launchers if not otherwise specified
478    if env['prelaunch'] == 'default':
479        if env['mpi'] == 'INTELMPI' and env['openmp']:
480            env['prelaunch'] = "export I_MPI_PIN_DOMAIN=omp"
481        elif env['mpi'] == 'OPENMPI':
482            # transform comma-separated list to '-x a -x b -x c ...'
483            env['prelaunch'] = "EE=$(echo -x %e|sed -e 's/,/ -x /g')"
484        elif env['mpi'] == 'MPT':
485            env['prelaunch'] = "export MPI_NUM_MEMORY_REGIONS=0"
486        elif env['mpi'] == 'MPICH2':
487            env['prelaunch'] = "mpdboot -n %n -r ssh -f %f"
488        else:
489            env['prelaunch'] = ""
490    
491    if env['launcher'] == 'default':
492        if env['mpi'] == 'INTELMPI':
493            env['launcher'] = "mpirun -hostfile %f -n %N -ppn %p %b"
494        elif env['mpi'] == 'OPENMPI':
495            # default to OpenMPI version 1.10 or higher
496            env['launcher'] = "mpirun ${AGENTOVERRIDE} --gmca mpi_warn_on_fork 0 ${EE} --host %h --map-by node:pe=%t -bind-to core -np %N %b"
497            if 'orte_version' in env:
498                major,minor,point = [int(i) for i in env['orte_version'].split('.')]
499                if major == 1 and minor < 10:
500                    env['launcher'] = "mpirun ${AGENTOVERRIDE} --gmca mpi_warn_on_fork 0 ${EE} --host %h --cpus-per-rank %t -np %N %b"
501        elif env['mpi'] == 'MPT':
502            env['launcher'] = "mpirun %h -np %p %b"
503        elif env['mpi'] == 'MPICH':
504            env['launcher'] = "mpirun -machinefile %f -np %N %b"
505        elif env['mpi'] == 'MPICH2':
506            env['launcher'] = "mpiexec -genvlist %e -np %N %b"
507        else:
508            env['launcher'] = "%b"
509    
510    if env['postlaunch'] == 'default':
511        if env['mpi'] == 'MPICH2':
512            env['postlaunch'] = "mpdallexit"
513        else:
514            env['postlaunch'] = ""
515    
516  # dependency sanity checks  # dependency sanity checks
517    
518  if len(env['domains']) == 0:  if len(env['domains']) == 0:
# Line 682  def print_summary(): Line 685  def print_summary():
685      else:      else:
686          print("           numpy:  YES (without headers)")          print("           numpy:  YES (without headers)")
687      if env['usempi']:      if env['usempi']:
688          print("             MPI:  YES (flavour: %s)"%env['mpi'])          if 'orte_version' in env:
689                print("             MPI:  %s (Version %s)"%(env['mpi'], env['orte_version']))
690            else:
691                print("             MPI:  YES (flavour: %s)"%env['mpi'])
692      else:      else:
693          print("             MPI:  NO")          print("             MPI:  NO")
694      if env['parmetis']:      if env['parmetis']:

Legend:
Removed from v.6248  
changed lines
  Added in v.6249

  ViewVC Help
Powered by ViewVC 1.1.26