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

Diff of /branches/dirac/SConstruct

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

revision 792 by gross, Fri Jul 28 10:37:16 2006 UTC revision 817 by ksteube, Sat Aug 26 03:08:52 2006 UTC
# Line 22  import sys, os Line 22  import sys, os
22  if sys.path.count('scons')==0: sys.path.append('scons')  if sys.path.count('scons')==0: sys.path.append('scons')
23  import scons_extensions  import scons_extensions
24    
25    # check if UMFPACK is installed on the system:
26    if os.path.isdir('/opt/UMFPACK/Include') and os.path.isdir('/opt/UMFPACK/Lib'):
27       umf_path_default='/opt/UMFPACK/Include'
28       umf_lib_path_default='/opt/UMFPACK/Lib'
29       umf_libs_default=['umfpack']
30    else:
31       umf_path_default=None
32       umf_lib_path_default=None
33       umf_libs_default=None
34    
35    if os.path.isdir('/opt/AMD/Include') and os.path.isdir('/opt/AMD/Lib'):
36       amd_path_default='/opt/AMD/Include'
37       amd_lib_path_default='/opt/AMD/Lib'
38       amd_libs_default=['amd']
39    else:
40       amd_path_default=None
41       amd_lib_path_default=None
42       amd_libs_default=None
43    
44    if os.path.isdir('/opt/UFconfig'):
45       ufc_path_default='/opt/UFconfig'
46    else:
47       ufc_path_default=None
48    
49  # Default options and options help text  # Default options and options help text
50  # 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.
51  # if the options_file or ARGUMENTS do not exist then the ones listed as default here are used  # if the options_file or ARGUMENTS do not exist then the ones listed as default here are used
# Line 79  opts.AddOptions( Line 103  opts.AddOptions(
103    ('scsl_libs', 'SCSL libraries to link with', None),    ('scsl_libs', 'SCSL libraries to link with', None),
104    ('scsl_libs_MPI', 'SCSL libraries to link with for MPI build', None),    ('scsl_libs_MPI', 'SCSL libraries to link with for MPI build', None),
105  # UMFPACK  # UMFPACK
106    PathOption('umf_path', 'Path to UMF includes', None),    PathOption('ufc_path', 'Path to UFconfig includes', ufc_path_default),
107    PathOption('umf_lib_path', 'Path to UMF libs', None),    PathOption('umf_path', 'Path to UMFPACK includes', umf_path_default),
108    ('umf_libs', 'UMF libraries to link with', None),    PathOption('umf_lib_path', 'Path to UMFPACK libs', umf_lib_path_default),
109      ('umf_libs', 'UMFPACK libraries to link with', umf_libs_default),
110    # AMD (used by UMFPACK)
111      PathOption('amd_path', 'Path to AMD includes', amd_path_default),
112      PathOption('amd_lib_path', 'Path to AMD libs', amd_lib_path_default),
113      ('amd_libs', 'AMD libraries to link with', amd_libs_default),
114    # BLAS
115      PathOption('blas_path', 'Path to BLAS includes', None),
116      PathOption('blas_lib_path', 'Path to BLAS libs', None),
117      ('blas_libs', 'BLAS libraries to link with', None),
118  # Python  # Python
119  # locations of include files for python  # locations of include files for python
120    PathOption('python_path', 'Path to Python includes', '/usr/include/python%s.%s'%(sys.version_info[0],sys.version_info[1])),    PathOption('python_path', 'Path to Python includes', '/usr/include/python%s.%s'%(sys.version_info[0],sys.version_info[1])),
# Line 190  try: Line 223  try:
223     env.Append(CPPDEFINES = cc_defines)     env.Append(CPPDEFINES = cc_defines)
224  except KeyError:  except KeyError:
225     pass     pass
226    
227    if 'shake71' == socket.gethostname().split('.')[0]:
228      if useMPI:
229        env['CC'] = 'mpicc'
230        env['CXX'] = 'mpiCC'
231    
232  if dodebug:  if dodebug:
233    if useMPI:    if useMPI:
234      try:      try:
# Line 270  try: Line 309  try:
309  except KeyError:  except KeyError:
310     pass     pass
311    
312  try:  if useMPI:
    mkl_libs = env['mkl_libs']  
 except KeyError:  
313     mkl_libs = ''     mkl_libs = ''
314    else:
315       try:
316          mkl_libs = env['mkl_libs']
317       except KeyError:
318          mkl_libs = ''
319    
320  try:  try:
321     includes = env['scsl_path']     includes = env['scsl_path']
322     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
323  except KeyError:  except KeyError:
324     pass     pass
325    
326  try:  try:
327     lib_path = env['scsl_lib_path']     lib_path = env['scsl_lib_path']
328     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
329  except KeyError:  except KeyError:
330     pass     pass
331    
332  if useMPI:    if useMPI:  
333    try:    try:
334      scsl_libs = env['scsl_libs_MPI']      scsl_libs = env['scsl_libs_MPI']
# Line 294  else: Line 339  else:
339      scsl_libs = env['scsl_libs']      scsl_libs = env['scsl_libs']
340    except KeyError:    except KeyError:
341      scsl_libs = ''      scsl_libs = ''
342    
343  try:  try:
344     includes = env['umf_path']     includes = env['umf_path']
345     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
346  except KeyError:  except KeyError:
347     pass     pass
348    
349  try:  try:
350     lib_path = env['umf_lib_path']     lib_path = env['umf_lib_path']
351     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
352  except KeyError:  except KeyError:
353     pass     pass
354    
355    if useMPI:  
356        umf_libs = ''
357    else:
358       try:
359          umf_libs = env['umf_libs']
360       except KeyError:
361          umf_libs = ''
362    
363  try:  try:
364     umf_libs = env['umf_libs']     includes = env['ufc_path']
365       env.Append(CPPPATH = [includes,])
366  except KeyError:  except KeyError:
367     umf_libs = ''     pass
368    
369    try:
370       includes = env['amd_path']
371       env.Append(CPPPATH = [includes,])
372    except KeyError:
373       pass
374    
375    try:
376       lib_path = env['amd_lib_path']
377       env.Append(LIBPATH = [lib_path,])
378    except KeyError:
379       pass
380    
381    if useMPI:  
382        amd_libs = ''
383    else:
384       try:
385          amd_libs = env['amd_libs']
386       except KeyError:
387          amd_libs = ''
388    
389    try:
390       includes = env['blas_path']
391       env.Append(CPPPATH = [includes,])
392    except KeyError:
393       pass
394    
395    try:
396       lib_path = env['blas_lib_path']
397       env.Append(LIBPATH = [lib_path,])
398    except KeyError:
399       pass
400    
401    try:
402       blas_libs = env['blas_libs']
403    except KeyError:
404       blas_libs = ''
405    
406  try:  try:
407     includes = env['boost_path']     includes = env['boost_path']
408     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
# Line 410  env.Alias('release_src',[ src_zipfile, s Line 505  env.Alias('release_src',[ src_zipfile, s
505  env.Alias('release_tests',[ test_zipfile, test_tarfile])  env.Alias('release_tests',[ test_zipfile, test_tarfile])
506  env.Alias('release_examples',[ examples_zipfile, examples_tarfile])  env.Alias('release_examples',[ examples_zipfile, examples_tarfile])
507  env.Alias('api_epydoc',api_epydoc)  env.Alias('api_epydoc',api_epydoc)
508  env.Alias('docs',[ 'release_examples', guide_pdf, guide_html_index, api_epydoc])  env.Alias('guide_pdf', guide_pdf)
509    env.Alias('docs',[ 'release_examples', 'guide_pdf', guide_html_index, api_epydoc])
510  env.Alias('release', ['release_src', 'release_tests', 'docs'])  env.Alias('release', ['release_src', 'release_tests', 'docs'])
511  env.Alias('build_tests')    # target to build all C++ tests  env.Alias('build_tests')    # target to build all C++ tests
512  env.Alias('build_py_tests') # target to build all python tests  env.Alias('build_py_tests') # target to build all python tests
# Line 424  init_target = env.Command(pyinstall+'/__ Line 520  init_target = env.Command(pyinstall+'/__
520  env.Alias(init_target)  env.Alias(init_target)
521    
522  # Allow sconscripts to see the env  # Allow sconscripts to see the env
523  Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs",  Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs",
524      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",
525          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile",          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile",
526          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])

Legend:
Removed from v.792  
changed lines
  Added in v.817

  ViewVC Help
Powered by ViewVC 1.1.26