/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1374 by gross, Tue Jan 8 09:37:55 2008 UTC revision 1560 by ksteube, Wed May 21 05:55:30 2008 UTC
# Line 31  tools_prefix="/usr" Line 31  tools_prefix="/usr"
31  #      #    
32  #    get the installation prefix  #    get the installation prefix
33  #  #
34  prefix = ARGUMENTS.get('prefix', '/usr')  prefix = ARGUMENTS.get('prefix', sys.prefix )
35    
36  # We may also need to know where python's site-packages subdirectory lives  # We may also need to know where python's site-packages subdirectory lives
37  python_version = 'python%s.%s'%(sys.version_info[0],sys.version_info[1])  python_version = 'python%s.%s'%(sys.version_info[0],sys.version_info[1])
# Line 238  opts.AddOptions( Line 238  opts.AddOptions(
238    PathOption('amd_path', 'Path to AMD includes', amd_path_default),    PathOption('amd_path', 'Path to AMD includes', amd_path_default),
239    PathOption('amd_lib_path', 'Path to AMD libs', amd_lib_path_default),    PathOption('amd_lib_path', 'Path to AMD libs', amd_lib_path_default),
240    ('amd_libs', 'AMD libraries to link with', amd_libs_default),    ('amd_libs', 'AMD libraries to link with', amd_libs_default),
241    # ParMETIS
242      ('parmetis_path', 'Path to ParMETIS includes', ''),
243      ('parmetis_lib_path', 'Path to ParMETIS library', ''),
244      ('parmetis_lib', 'ParMETIS library to link with', []),
245  # TRILINOS  # TRILINOS
246    PathOption('trilinos_path', 'Path to TRILINOS includes', None),    PathOption('trilinos_path', 'Path to TRILINOS includes', None),
247    PathOption('trilinos_lib_path', 'Path to TRILINOS libs', None),    PathOption('trilinos_lib_path', 'Path to TRILINOS libs', None),
# Line 291  opts.AddOptions( Line 295  opts.AddOptions(
295    
296  if IS_WINDOWS_PLATFORM:  if IS_WINDOWS_PLATFORM:
297        env = Environment(tools = ['default', 'msvc'], options = opts)        env = Environment(tools = ['default', 'msvc'], options = opts)
298          #env = Environment(tools = ['default', 'intelc'], options = opts)
299  else:  else:
300     if os.uname()[4]=='ia64':     if socket.gethostname().split('.')[0] == 'service0':
301          env = Environment(tools = ['default', 'intelc'], options = opts)
302       elif os.uname()[4]=='ia64':
303        env = Environment(tools = ['default', 'intelc'], options = opts)        env = Environment(tools = ['default', 'intelc'], options = opts)
304        if env['CXX'] == 'icpc':        if env['CXX'] == 'icpc':
305           env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py           env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py
# Line 351  except KeyError: Line 358  except KeyError:
358    
359  try:  try:
360     tmp = os.environ['LD_LIBRARY_PATH']     tmp = os.environ['LD_LIBRARY_PATH']
    print tmp  
361     env['ENV']['LD_LIBRARY_PATH'] = tmp     env['ENV']['LD_LIBRARY_PATH'] = tmp
362  except KeyError:  except KeyError:
363     pass     pass
# Line 452  except KeyError: Line 458  except KeyError:
458     useMPI = None     useMPI = None
459  # ========= set compiler flags ===========================================  # ========= set compiler flags ===========================================
460    
 # Can't use MPI and OpenMP simultaneously at this time  
 if useMPI:  
     omp_flags=''  
     omp_flags_debug=''  
   
461  if dodebug:  if dodebug:
462      try:      try:
463        flags = env['cc_flags_debug'] + ' ' + omp_flags_debug        flags = env['cc_flags_debug'] + ' ' + omp_flags_debug
# Line 721  try: Line 722  try:
722     epydoc_path = env['epydoc_path']     epydoc_path = env['epydoc_path']
723  except KeyError:  except KeyError:
724     epydoc_path = None     epydoc_path = None
725    # =============== ParMETIS =======================================
726    try:
727       parmetis_path = env['parmetis_path']
728       parmetis_lib_path = env['parmetis_lib_path']
729       parmetis_lib = env['parmetis_lib']
730    except KeyError:
731       parmetis_path = ''
732       parmetis_lib_path = ''
733       parmetis_lib = ''
734    
735    if useMPI and os.path.isdir(parmetis_lib_path):
736       env.Append(CPPDEFINES = [ 'PARMETIS' ])
737       env.Append(CXXDEFINES = [ 'PARMETIS' ])
738       env.Append(CPPPATH = [parmetis_path])
739       env.Append(LIBPATH = [parmetis_lib_path])
740       env.Append(LIBS = parmetis_lib)
741  # =============== PAPI =======================================  # =============== PAPI =======================================
742  try:  try:
743     includes = env['papi_path']     includes = env['papi_path']
# Line 738  except KeyError: Line 755  except KeyError:
755     papi_libs = None     papi_libs = None
756  # ============= set mpi =====================================  # ============= set mpi =====================================
757  if useMPI:  if useMPI:
758     env.Append(CPPDEFINES=['PASO_MPI',])     env.Append(CPPDEFINES=['PASO_MPI', 'MPI_NO_CPPBIND'])
759     try:     try:
760        includes = env['mpi_path']        includes = env['mpi_path']
761        env.Append(CPPPATH = [includes,])        env.Append(CPPPATH = [includes,])
# Line 851  try: Line 868  try:
868     global_revision = re.sub(":.*", "", global_revision[0])     global_revision = re.sub(":.*", "", global_revision[0])
869     global_revision = re.sub("[^0-9]", "", global_revision)     global_revision = re.sub("[^0-9]", "", global_revision)
870  except:  except:
871     global_revision = "0"     global_revision="-1"
872       print "Warning: unable to recover global revsion number."
873    if global_revision == "": global_revision="0"
874    print "Revision number is %s."%global_revision
875  env.Append(CPPDEFINES = "SVN_VERSION="+global_revision)  env.Append(CPPDEFINES = "SVN_VERSION="+global_revision)
876    
877  # Python install - esys __init__.py  # Python install - esys __init__.py

Legend:
Removed from v.1374  
changed lines
  Added in v.1560

  ViewVC Help
Powered by ViewVC 1.1.26