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

Diff of /branches/cookbookdev/SConstruct

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

revision 1248 by phornby, Tue Aug 14 05:20:39 2007 UTC revision 1339 by ksteube, Wed Nov 7 01:53:12 2007 UTC
# Line 49  dir_packages = os.path.join(source_root, Line 49  dir_packages = os.path.join(source_root,
49  dir_examples = os.path.join(source_root,"examples")  dir_examples = os.path.join(source_root,"examples")
50  dir_libraries = os.path.join(source_root,"lib")  dir_libraries = os.path.join(source_root,"lib")
51    
52    print "Source root is : ",source_root
53  print " Default packages local installation:    ", dir_packages  print " Default packages local installation:    ", dir_packages
54  print " Default library local installation  ", dir_libraries  print " Default library local installation  ", dir_libraries
55  print " Default example local  installation:    ", dir_examples  print " Default example local  installation:    ", dir_examples
# Line 75  if not os.path.isfile(options_file) : Line 76  if not os.path.isfile(options_file) :
76    
77  if not options_file :  if not options_file :
78     import socket     import socket
79     from string import ascii_letters,digits     hostname = re.sub("[^0-9a-zA-Z]", "_", socket.gethostname().split('.')[0])
    hostname=""  
    for s in socket.gethostname().split('.')[0]:  
       if s in ascii_letters+digits:  
          hostname+=s  
       else:  
          hostname+="_"  
80     tmp = os.path.join("scons",hostname+"_options.py")     tmp = os.path.join("scons",hostname+"_options.py")
81    
82     if os.path.isfile(tmp) :     if os.path.isfile(tmp) :
# Line 141  python_lib_default="python%s.%s"%(sys.ve Line 136  python_lib_default="python%s.%s"%(sys.ve
136  boost_path_default=os.path.join(tools_prefix,'include')  boost_path_default=os.path.join(tools_prefix,'include')
137  boost_lib_path_default=os.path.join(tools_prefix,'lib')  boost_lib_path_default=os.path.join(tools_prefix,'lib')
138  boost_lib_default=['boost_python']  boost_lib_default=['boost_python']
139    
140  #==========================================================================  #==========================================================================
141  #  #
142  #    check if netCDF is installed on the system:  #    check if netCDF is installed on the system:
143  #  #
144  netCDF_path_default=os.path.join(tools_prefix,'include','netcdf-3')  netCDF_path_default=os.path.join(tools_prefix,'include','netcdf-3')
145  netCDF_lib_path_default=os.path.join(tools_prefix,'lib','netcdf-3')  netCDF_lib_path_default=os.path.join(tools_prefix,'lib')
146    
147  if os.path.isdir(netCDF_path_default) and os.path.isdir(netCDF_lib_path_default):  if os.path.isdir(netCDF_path_default) and os.path.isdir(netCDF_lib_path_default):
148       useNetCDF_default='yes'       useNetCDF_default='yes'
# Line 159  else: Line 155  else:
155    
156  #==========================================================================  #==========================================================================
157  #  #
158    #  MPI:
159    #
160    if IS_WINDOWS_PLATFORM:
161       useMPI_default='no'
162       mpi_path_default=None
163       mpi_lib_path_default=None
164       mpi_libs_default=[]
165       mpi_run_default=None
166    else:
167       useMPI_default='no'
168       mpi_root='/usr/local'
169       mpi_path_default=os.path.join(mpi_root,'include')
170       mpi_lib_path_default=os.path.join(mpi_root,'lib')
171       mpi_libs_default=[ 'mpich' , 'pthread', 'rt' ]
172       mpi_run_default='mpiexec -np 1'
173    #
174    #==========================================================================
175    #
176  #    compile:  #    compile:
177  #  #
178  cc_flags_default='-O3 -std=c99 -ffast-math -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'  cc_flags_default='-O3 -std=c99 -ffast-math -fpic -Wno-unknown-pragmas -ansi'
179  cc_flags_debug_default='-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'  cc_flags_debug_default='-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas -ansi'
180  cxx_flags_default='--no-warn -ansi'  cxx_flags_default='--no-warn -ansi'
181  cxx_flags_debug_default='--no-warn -ansi -DDOASSERT'  cxx_flags_debug_default='--no-warn -ansi -DDOASSERT'
182    
183  #==============================================================================================      #==============================================================================================    
184  # Default options and options help text  # Default options and options help text
185  # These are defaults and can be overridden using command line arguments or an options file.  # These are defaults and can be overridden using command line arguments or an options file.
# Line 191  opts.AddOptions( Line 206  opts.AddOptions(
206    ('api_doxygen', 'name of the doxygen api docs directory',prefix+"/release/doc/doxygen"),    ('api_doxygen', 'name of the doxygen api docs directory',prefix+"/release/doc/doxygen"),
207  # Compilation options  # Compilation options
208    BoolOption('dodebug', 'Do you want a debug build?', 'no'),    BoolOption('dodebug', 'Do you want a debug build?', 'no'),
209      BoolOption('bounds_check', 'Do you want extra array bounds checking?', 'no'),
210    ('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/<hostname>_options.py)", options_file),    ('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/<hostname>_options.py)", options_file),
211    ('cc_defines','C/C++ defines to use', None),    ('cc_defines','C/C++ defines to use', None),
212    ('cc_flags','C compiler flags to use (Release build)', cc_flags_default),    ('cc_flags','C compiler flags to use (Release build)', cc_flags_default),
213    ('cc_flags_debug', 'C compiler flags to use (Debug build)', cc_flags_debug_default),    ('cc_flags_debug', 'C compiler flags to use (Debug build)', cc_flags_debug_default),
214    ('cxx_flags', 'C++ compiler flags to use (Release build)', cxx_flags_default),    ('cxx_flags', 'C++ compiler flags to use (Release build)', cxx_flags_default),
215    ('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', cxx_flags_debug_default),    ('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', cxx_flags_debug_default),
216      ('omp_flags', 'OpenMP compiler flags to use (Release build)', ''),
217      ('omp_flags_debug', 'OpenMP compiler flags to use (Debug build)', ''),
218    ('ar_flags', 'Static library archiver flags to use', None),    ('ar_flags', 'Static library archiver flags to use', None),
219    ('sys_libs', 'System libraries to link with', None),    ('sys_libs', 'System libraries to link with', None),
220    ('tar_flags','flags for zip files','-c -z'),    ('tar_flags','flags for zip files','-c -z'),
# Line 218  opts.AddOptions( Line 236  opts.AddOptions(
236    PathOption('amd_path', 'Path to AMD includes', amd_path_default),    PathOption('amd_path', 'Path to AMD includes', amd_path_default),
237    PathOption('amd_lib_path', 'Path to AMD libs', amd_lib_path_default),    PathOption('amd_lib_path', 'Path to AMD libs', amd_lib_path_default),
238    ('amd_libs', 'AMD libraries to link with', amd_libs_default),    ('amd_libs', 'AMD libraries to link with', amd_libs_default),
239    # TRILINOS
240      PathOption('trilinos_path', 'Path to TRILINOS includes', None),
241      PathOption('trilinos_lib_path', 'Path to TRILINOS libs', None),
242      ('trilinos_libs', 'TRILINOS libraries to link with', None),
243  # BLAS  # BLAS
244    PathOption('blas_path', 'Path to BLAS includes', None),    PathOption('blas_path', 'Path to BLAS includes', None),
245    PathOption('blas_lib_path', 'Path to BLAS libs', None),    PathOption('blas_lib_path', 'Path to BLAS libs', None),
# Line 245  opts.AddOptions( Line 267  opts.AddOptions(
267    PathOption('papi_path', 'Path to PAPI includes', None),    PathOption('papi_path', 'Path to PAPI includes', None),
268    PathOption('papi_lib_path', 'Path to PAPI libs', None),    PathOption('papi_lib_path', 'Path to PAPI libs', None),
269    ('papi_libs', 'PAPI libraries to link with', None),    ('papi_libs', 'PAPI libraries to link with', None),
270      ('papi_instrument_solver', 'use PAPI in Solver.c to instrument each iteration of the solver', None),
271  # MPI  # MPI
272    BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),    BoolOption('useMPI', 'Compile parallel version using MPI', useMPI_default),
273      ('MPICH_IGNORE_CXX_SEEK', 'name of macro to ignore MPI settings of C++ SEEK macro (for MPICH)' , 'MPICH_IGNORE_CXX_SEEK'),
274      PathOption('mpi_path', 'Path to MPI includes', mpi_path_default),
275      ('mpi_run', 'mpirun name' , mpi_run_default),
276      PathOption('mpi_lib_path', 'Path to MPI libs (needs to be added to the LD_LIBRARY_PATH)',mpi_lib_path_default),
277      ('mpi_libs', 'MPI libraries to link with (needs to be shared!)', mpi_libs_default)
278  )  )
279  #=================================================================================================  #=================================================================================================
280  #  #
# Line 270  else: Line 298  else:
298        env = Environment(tools = ['default'], options = opts)        env = Environment(tools = ['default'], options = opts)
299  Help(opts.GenerateHelpText(env))  Help(opts.GenerateHelpText(env))
300    
301    if env['bounds_check']:
302       env.Append(CPPDEFINES = [ 'BOUNDS_CHECK' ])
303       env.Append(CXXDEFINES = [ 'BOUNDS_CHECK' ])
304    
305  #=================================================================================================  #=================================================================================================
306  #  #
307  #     Initialise Scons Build Environment  #     Initialise Scons Build Environment
# Line 286  try: Line 318  try:
318     omp_num_threads = os.environ['OMP_NUM_THREADS']     omp_num_threads = os.environ['OMP_NUM_THREADS']
319  except KeyError:  except KeyError:
320     omp_num_threads = 1     omp_num_threads = 1
321    env['ENV']['OMP_NUM_THREADS'] = omp_num_threads
322    
323    try:
324       path = os.environ['PATH']
325       env['ENV']['PATH'] = path
326    except KeyError:
327       omp_num_threads = 1
328    
329  env['ENV']['OMP_NUM_THREADS'] = omp_num_threads  env['ENV']['OMP_NUM_THREADS'] = omp_num_threads
330    
331    
332    # Copy some variables from the system environment to the build environment
333  try:  try:
334     env['ENV']['DISPLAY'] = os.environ['DISPLAY']     env['ENV']['DISPLAY'] = os.environ['DISPLAY']
335     env['ENV']['XAUTHORITY'] = os.environ['XAUTHORITY']     env['ENV']['XAUTHORITY'] = os.environ['XAUTHORITY']
336       home_temp = os.environ['HOME']   # MPICH2's mpd needs $HOME to find $HOME/.mpd.conf
337       env['ENV']['HOME'] = home_temp
338  except KeyError:  except KeyError:
339     pass     pass
340    
# Line 333  try: Line 376  try:
376     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)
377     if IS_WINDOWS_PLATFORM :     if IS_WINDOWS_PLATFORM :
378        env.PrependENVPath('PATH', libinstall)        env.PrependENVPath('PATH', libinstall)
379          env.PrependENVPath('PATH', env['boost_lib_path'])
380  except KeyError:  except KeyError:
381     libinstall = None     libinstall = None
382  try:  try:
383     pyinstall = env['pyinstall'] # all targets will install into pyinstall/esys but PYTHONPATH points at straight pyinstall so you go import esys.escript etc     pyinstall = env['pyinstall'] # all targets will install into pyinstall/esys but PYTHONPATH points at straight pyinstall so you go import esys.escript etc
384  except KeyError:  except KeyError:
385     pyinstall = None     pyinstall = None
386    
387    try:
388       cc_defines = env['cc_defines']
389       env.Append(CPPDEFINES = cc_defines)
390    except KeyError:
391       pass
392    try:
393       flags = env['ar_flags']
394       env.Append(ARFLAGS = flags)
395    except KeyError:
396       ar_flags = None
397    try:
398       sys_libs = env['sys_libs']
399    except KeyError:
400       sys_libs = []
401    
402    try:
403       tar_flags = env['tar_flags']
404       env.Replace(TARFLAGS = tar_flags)
405    except KeyError:
406       pass
407    
408  try:  try:
409     exinstall = env['exinstall']     exinstall = env['exinstall']
410  except KeyError:  except KeyError:
# Line 355  try: Line 421  try:
421     sys_exinstall = env['sys_exinstall']     sys_exinstall = env['sys_exinstall']
422  except KeyError:  except KeyError:
423     sys_exinstall = None     sys_exinstall = None
424    
425    # ====================== debugging ===================================
426  try:  try:
427     dodebug = env['dodebug']     dodebug = env['dodebug']
428  except KeyError:  except KeyError:
429     dodebug = None     dodebug = None
430    
431    # === switch on omp ===================================================
432  try:  try:
433     useMPI = env['useMPI']    omp_flags = env['omp_flags']
434  except KeyError:  except KeyError:
435     useMPI = None    omp_flags = ''
436    
437  try:  try:
438     cc_defines = env['cc_defines']    omp_flags_debug = env['omp_flags_debug']
    env.Append(CPPDEFINES = cc_defines)  
439  except KeyError:  except KeyError:
440     pass    omp_flags_debug = ''
441    
442    # ========= use mpi? =====================================================
443    try:
444       useMPI = env['useMPI']
445    except KeyError:
446       useMPI = None
447    # ========= set compiler flags ===========================================
448    
449  if dodebug:  if dodebug:
   if useMPI:  
     try:  
       flags = env['cc_flags_debug_MPI']  
       env.Append(CCFLAGS = flags)  
     except KeyError:  
       pass  
   else:  
450      try:      try:
451        flags = env['cc_flags_debug']        flags = env['cc_flags_debug'] + ' ' + omp_flags_debug
452        env.Append(CCFLAGS = flags)        env.Append(CCFLAGS = flags)
453      except KeyError:      except KeyError:
454        pass        pass
455  else:  else:
   if useMPI:  
456     try:     try:
457       flags = env['cc_flags_MPI']        flags = env['cc_flags'] + ' ' + omp_flags
      env.Append(CCFLAGS = flags)  
    except KeyError:  
       pass  
   else:  
    try:  
       flags = env['cc_flags']  
458        env.Append(CCFLAGS = flags)        env.Append(CCFLAGS = flags)
459     except KeyError:     except KeyError:
460        pass        pass
461  if dodebug:  if dodebug:
    if useMPI:  
      try:  
         flags = env['cxx_flags_debug_MPI']  
         env.Append(CXXFLAGS = flags)  
      except KeyError:  
         pass  
    else:  
462       try:       try:
463          flags = env['cxx_flags_debug']          flags = env['cxx_flags_debug']
464          env.Append(CXXFLAGS = flags)          env.Append(CXXFLAGS = flags)
465       except KeyError:       except KeyError:
466          pass          pass
467  else:  else:
    if useMPI:  
      try:  
         flags = env['cxx_flags_MPI']  
         env.Append(CXXFLAGS = flags)  
      except KeyError:  
         pass  
    else:  
468       try:       try:
469          flags = env['cxx_flags']          flags = env['cxx_flags']
470          env.Append(CXXFLAGS = flags)          env.Append(CXXFLAGS = flags)
471       except KeyError:       except KeyError:
472          pass          pass
473  try:  try:
474     flags = env['ar_flags']       if env['CC'] == 'gcc': env.Append(CCFLAGS = "-pedantic-errors -Wno-long-long")
475     env.Append(ARFLAGS = flags)  except:
476  except KeyError:       pass
    ar_flags = None  
 try:  
    sys_libs = env['sys_libs']  
 except KeyError:  
    sys_libs = []  
   
 try:  
    tar_flags = env['tar_flags']  
    env.Replace(TARFLAGS = tar_flags)  
 except KeyError:  
    pass  
477    
478  try:  # ============= set mkl (but only of no MPI) =====================================
479     includes = env['mkl_path']  if not useMPI:
480     env.Append(CPPPATH = [includes,])     try:
481  except KeyError:        includes = env['mkl_path']
482     pass        env.Append(CPPPATH = [includes,])
483       except KeyError:
484          pass
485    
486  try:     try:
487     lib_path = env['mkl_lib_path']        lib_path = env['mkl_lib_path']
488     env.Append(LIBPATH = [lib_path,])        env.Append(LIBPATH = [lib_path,])
489  except KeyError:     except KeyError:
490     pass        pass
491    
 if useMPI:  
    mkl_libs = []  
 else:  
492     try:     try:
493        mkl_libs = env['mkl_libs']        mkl_libs = env['mkl_libs']
494     except KeyError:     except KeyError:
495        mkl_libs = []        mkl_libs = []
496    else:
497         mkl_libs = []
498    
499  try:  # ============= set scsl (but only of no MPI) =====================================
500     includes = env['scsl_path']  if not useMPI:
501     env.Append(CPPPATH = [includes,])     try:
502  except KeyError:        includes = env['scsl_path']
503     pass        env.Append(CPPPATH = [includes,])
504       except KeyError:
505          pass
506    
507  try:     try:
508     lib_path = env['scsl_lib_path']        lib_path = env['scsl_lib_path']
509     env.Append(LIBPATH = [lib_path,])        env.Append(LIBPATH = [lib_path,])
510  except KeyError:     except KeyError:
511     pass        pass
512      
513       try:
514          scsl_libs = env['scsl_libs']
515       except KeyError:
516          scsl_libs = [ ]
517    
518  if useMPI:  else:
519    try:      scsl_libs =  []
     scsl_libs = env['scsl_libs_MPI']  
   except KeyError:  
     scsl_libs = []  
 else:  
   try:  
     scsl_libs = env['scsl_libs']  
   except KeyError:  
     scsl_libs = []  
520    
521  try:  # ============= set TRILINOS (but only with MPI) =====================================
522     includes = env['umf_path']  if useMPI:
523     env.Append(CPPPATH = [includes,])     try:
524  except KeyError:        includes = env['trilinos_path']
525     pass        env.Append(CPPPATH = [includes,])
526       except KeyError:
527          pass
528    
529  try:     try:
530     lib_path = env['umf_lib_path']        lib_path = env['trilinos_lib_path']
531     env.Append(LIBPATH = [lib_path,])        env.Append(LIBPATH = [lib_path,])
532  except KeyError:     except KeyError:
533     pass        pass
534    
535  if useMPI:     try:
536      umf_libs = []        trilinos_libs = env['trilinos_libs']
537       except KeyError:
538          trilinos_libs = []
539  else:  else:
540         trilinos_libs = []
541    
542    
543    # ============= set umfpack (but only without MPI) =====================================
544    umf_libs=[ ]
545    if not useMPI:
546       try:
547          includes = env['umf_path']
548          env.Append(CPPPATH = [includes,])
549       except KeyError:
550          pass
551    
552       try:
553          lib_path = env['umf_lib_path']
554          env.Append(LIBPATH = [lib_path,])
555       except KeyError:
556          pass
557    
558     try:     try:
559        umf_libs = env['umf_libs']        umf_libs = env['umf_libs']
560          umf_libs+=umf_libs
561     except KeyError:     except KeyError:
562        umf_libs = []        pass
563    
564  try:     try:
565     includes = env['ufc_path']        includes = env['ufc_path']
566     env.Append(CPPPATH = [includes,])        env.Append(CPPPATH = [includes,])
567  except KeyError:     except KeyError:
568     pass        pass
569    
570  try:     try:
571     includes = env['amd_path']        includes = env['amd_path']
572     env.Append(CPPPATH = [includes,])        env.Append(CPPPATH = [includes,])
573  except KeyError:     except KeyError:
574     pass        pass
575    
576  try:     try:
577     lib_path = env['amd_lib_path']        lib_path = env['amd_lib_path']
578     env.Append(LIBPATH = [lib_path,])        env.Append(LIBPATH = [lib_path,])
579  except KeyError:     except KeyError:
580     pass        pass
581    
 if useMPI:  
     amd_libs = []  
 else:  
582     try:     try:
583        amd_libs = env['amd_libs']        amd_libs = env['amd_libs']
584          umf_libs+=amd_libs
585       except KeyError:
586          pass
587    
588    # ============= set TRILINOS (but only with MPI) =====================================
589    if useMPI:
590       try:
591          includes = env['trilinos_path']
592          env.Append(CPPPATH = [includes,])
593       except KeyError:
594          pass
595    
596       try:
597          lib_path = env['trilinos_lib_path']
598          env.Append(LIBPATH = [lib_path,])
599       except KeyError:
600          pass
601    
602       try:
603          trilinos_libs = env['trilinos_libs']
604     except KeyError:     except KeyError:
605        amd_libs = []        trilinos_libs = []
606    else:
607         trilinos_libs = []
608    
609    # ============= set blas =====================================
610  try:  try:
611     includes = env['blas_path']     includes = env['blas_path']
612     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
# Line 542  except KeyError: Line 622  except KeyError:
622  try:  try:
623     blas_libs = env['blas_libs']     blas_libs = env['blas_libs']
624  except KeyError:  except KeyError:
625     blas_libs = []     blas_libs = [ ]
   
 try:  
    useNetCDF = env['useNetCDF']  
 except KeyError:  
    useNetCDF = 'yes'  
    pass  
626    
627    # ========== netcdf (currently not supported with mpi) ====================================
628    if useMPI:
629       useNetCDF = 'no'
630    else:
631       try:
632          useNetCDF = env['useNetCDF']
633       except KeyError:
634          useNetCDF = 'yes'
635          pass
636        
637  if useNetCDF == 'yes':  if useNetCDF == 'yes':
638     try:     try:
639        netCDF_libs = env['netCDF_libs']        netCDF_libs = env['netCDF_libs']
# Line 575  else: Line 659  else:
659     print "Warning: Installation is not configured with netCDF. Some I/O function may not be available."     print "Warning: Installation is not configured with netCDF. Some I/O function may not be available."
660     netCDF_libs=[ ]     netCDF_libs=[ ]
661    
662    # ====================== boost ======================================
663  try:  try:
664     includes = env['boost_path']     includes = env['boost_path']
665     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
# Line 591  try: Line 676  try:
676     boost_lib = env['boost_lib']     boost_lib = env['boost_lib']
677  except KeyError:  except KeyError:
678     boost_lib = None     boost_lib = None
679    # ====================== python ======================================
680  try:  try:
681     includes = env['python_path']     includes = env['python_path']
682     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
# Line 605  try: Line 691  try:
691     python_lib = env['python_lib']     python_lib = env['python_lib']
692  except KeyError:  except KeyError:
693     python_lib = None     python_lib = None
694    # =============== documentation =======================================
695  try:  try:
696     doxygen_path = env['doxygen_path']     doxygen_path = env['doxygen_path']
697  except KeyError:  except KeyError:
# Line 613  try: Line 700  try:
700     epydoc_path = env['epydoc_path']     epydoc_path = env['epydoc_path']
701  except KeyError:  except KeyError:
702     epydoc_path = None     epydoc_path = None
703    # =============== PAPI =======================================
704    try:
705       includes = env['papi_path']
706       env.Append(CPPPATH = [includes,])
707    except KeyError:
708       pass
709    try:
710       lib_path = env['papi_lib_path']
711       env.Append(LIBPATH = [lib_path,])
712    except KeyError:
713       pass
714    try:
715       papi_libs = env['papi_libs']
716    except KeyError:
717       papi_libs = None
718    # ============= set mpi =====================================
719    if useMPI:
720       env.Append(CPPDEFINES=['PASO_MPI',])
721       try:
722          includes = env['mpi_path']
723          env.Append(CPPPATH = [includes,])
724       except KeyError:
725          pass
726       try:
727          lib_path = env['mpi_lib_path']
728          env.Append(LIBPATH = [lib_path,])
729          env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
730       except KeyError:
731          pass
732       try:
733          mpi_libs = env['mpi_libs']
734       except KeyError:
735          mpi_libs = []
736    
737       try:
738          mpi_run = env['mpi_run']
739       except KeyError:
740          mpi_run = ''
741    
742       try:
743           mpich_ignore_cxx_seek=env['MPICH_IGNORE_CXX_SEEK']
744           env.Append(CPPDEFINES = [ mpich_ignore_cxx_seek ] )
745       except KeyError:
746          pass
747    else:
748      mpi_libs=[]
749      mpi_run = mpi_run_default
750    # =========== zip files ===========================================
751  try:  try:
752     includes = env['papi_path']     includes = env['papi_path']
753     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
# Line 627  try: Line 762  try:
762     papi_libs = env['papi_libs']     papi_libs = env['papi_libs']
763  except KeyError:  except KeyError:
764     papi_libs = None     papi_libs = None
765    try:
766       papi_instrument_solver = env['papi_instrument_solver']
767    except KeyError:
768       papi_instrument_solver = None
769    
770    
771    # ============= and some helpers =====================================
772    try:
773       doxygen_path = env['doxygen_path']
774    except KeyError:
775       doxygen_path = None
776    try:
777       epydoc_path = env['epydoc_path']
778    except KeyError:
779       epydoc_path = None
780  try:  try:
781     src_zipfile = env.File(env['src_zipfile'])     src_zipfile = env.File(env['src_zipfile'])
782  except KeyError:  except KeyError:
# Line 676  except KeyError: Line 824  except KeyError:
824     api_doxygen = None     api_doxygen = None
825    
826  try:  try:
827     svn_pipe = os.popen("svn info | grep '^Revision'")     svn_pipe = os.popen("svnversion -n .")
828     rev = svn_pipe.readlines()     global_revision = svn_pipe.readlines()
829     svn_pipe.close()     svn_pipe.close()
830     svn_version = re.sub("[^0-9]", "", rev[0])     global_revision = re.sub(":.*", "", global_revision[0])
831       global_revision = re.sub("[^0-9]", "", global_revision)
832  except:  except:
833     svn_version = "0"     global_revision = "0"
834  env.Append(CPPDEFINES = "SVN_VERSION="+svn_version)  env.Append(CPPDEFINES = "SVN_VERSION="+global_revision)
835    
836  # Python install - esys __init__.py  # Python install - esys __init__.py
837  init_target = env.Command(pyinstall+'/__init__.py', None, Touch('$TARGET'))  init_target = env.Command(pyinstall+'/__init__.py', None, Touch('$TARGET'))
# Line 714  env.Alias('all_tests', ['run_tests', 'py Line 863  env.Alias('all_tests', ['run_tests', 'py
863    
864    
865  # Allow sconscripts to see the env  # Allow sconscripts to see the env
866  Export(["env", "incinstall", "libinstall", "pyinstall", "exinstall", "dodebug",  Export(["IS_WINDOWS_PLATFORM", "env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "blas_libs", "netCDF_libs", "useNetCDF", "mpi_run",
         "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs",  
         "netCDF_libs",  
867      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",
868          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile",          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile", "trilinos_libs", "mpi_libs", "papi_instrument_solver",
869          "src_tarfile", "examples_tarfile", "examples_zipfile",          "guide_pdf", "guide_html_index", "api_epydoc", "api_doxygen", "useMPI" ])
         "guide_pdf", "guide_html_index", "api_epydoc", "api_doxygen", "useMPI"  
         ])  
870    
871  # End initialisation section  # End initialisation section
872  # Begin configuration section  # Begin configuration section
873  # adds this file and the scons option directore to the source tar  # adds this file and the scons option directore to the source tar
874  release_srcfiles=[env.File('SConstruct'),]+[ env.File(x) for x in glob.glob('scons/*.py') ]  release_srcfiles=[env.File('SConstruct'),env.Dir('lib'),env.Dir('include'),]+[ env.File(x) for x in glob.glob('scons/*.py') ]
875  release_testfiles=[env.File('README_TESTS'),]  release_testfiles=[env.File('README_TESTS'),]
876  env.Zip(src_zipfile, release_srcfiles)  env.Zip(src_zipfile, release_srcfiles)
877  env.Zip(test_zipfile, release_testfiles)  env.Zip(test_zipfile, release_testfiles)
# Line 751  env.SConscript(dirs = ['modellib/py_src' Line 896  env.SConscript(dirs = ['modellib/py_src'
896  env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)  env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)
897  env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0)  env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0)
898  env.SConscript(dirs = ['pycad/py_src'], build_dir='build/$PLATFORM/pycad', duplicate=0)  env.SConscript(dirs = ['pycad/py_src'], build_dir='build/$PLATFORM/pycad', duplicate=0)
   
 # added by Ben Cumming  
899  env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0)  env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0)
900  #env.SConscript(dirs = ['../test'], build_dir='../test/build', duplicate=0)  #env.SConscript(dirs = ['../test'], build_dir='../test/build', duplicate=0)
901    

Legend:
Removed from v.1248  
changed lines
  Added in v.1339

  ViewVC Help
Powered by ViewVC 1.1.26