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

Diff of /branches/refine/SConstruct

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

revision 805 by gross, Thu Aug 10 06:09:02 2006 UTC revision 806 by gross, Thu Aug 10 11:58:52 2006 UTC
# Line 23  if sys.path.count('scons')==0: sys.path. Line 23  if sys.path.count('scons')==0: sys.path.
23  import scons_extensions  import scons_extensions
24    
25  # check if UMFPACK is installed on the system:  # check if UMFPACK is installed on the system:
26  if os.path.isdir('/opt/UMFPACK/Include') and os.path.isdir('/opt/UMFPACK/Lib') and os.path.isdir('/opt/AMD/Lib'):  if os.path.isdir('/opt/UMFPACK/Include') and os.path.isdir('/opt/UMFPACK/Lib'):
27     umf_path_default='/opt/UMFPACK/Include'     umf_path_default='/opt/UMFPACK/Include'
28     umf_lib_path_default='/opt/UMFPACK/Lib'     umf_lib_path_default='/opt/UMFPACK/Lib'
29     amd_lib_path_default='/opt/AMD/Lib'     umf_libs_default=['umfpack']
    umf_libs_default=['amd', 'umfpack']  
30  else:  else:
31     umf_path_default=None     umf_path_default=None
32     umf_lib_path_default=None     umf_lib_path_default=None
    amd_lib_path_default=None  
33     umf_libs_default=None     umf_libs_default=None
34  if os.path.isdir('/opt/GotoBLAS'):  
35     blas_path_default='/opt/GotoBLAS'  if os.path.isdir('/opt/AMD/Include') and os.path.isdir('/opt/AMD/Lib'):
36     blas_lib_path_default='/opt/GotoBLAS'     amd_path_default='/opt/AMD/Include'
37     blas_libs_default=['goto',]     amd_lib_path_default='/opt/AMD/Lib'
38  else:     amd_libs_default=['amd']
39     blas_path_default=None  else:
40     blas_lib_path_default=None     amd_path_default=None
41     blas_libs_default=None     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 98  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', umf_path_default),    PathOption('ufc_path', 'Path to UFconfig includes', ufc_path_default),
107    PathOption('umf_lib_path', 'Path to UMF libs', umf_lib_path_default),    PathOption('umf_path', 'Path to UMFPACK includes', umf_path_default),
108    PathOption('amd_lib_path', 'Path to UMF libs', amd_lib_path_default),    PathOption('umf_lib_path', 'Path to UMFPACK libs', umf_lib_path_default),
109    ('umf_libs', 'UMF libraries to link with', umf_libs_default),    ('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  # BLAS
115    PathOption('blas_path', 'Path to BLAS includes', blas_path_default),    PathOption('blas_path', 'Path to BLAS includes', None),
116    PathOption('blas_lib_path', 'Path to BLAS libs', blas_lib_path_default ),    PathOption('blas_lib_path', 'Path to BLAS libs', None),
117    ('blas_libs', 'BLAS libraries to link with', blas_libs_default ),    ('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 294  try: Line 303  try:
303  except KeyError:  except KeyError:
304     pass     pass
305    
306  try:  if useMPI:
    mkl_libs = env['mkl_libs']  
 except KeyError:  
307     mkl_libs = ''     mkl_libs = ''
308    else:
309       try:
310          mkl_libs = env['mkl_libs']
311       except KeyError:
312          mkl_libs = ''
313    
314  try:  try:
315     includes = env['scsl_path']     includes = env['scsl_path']
316     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
317  except KeyError:  except KeyError:
318     pass     pass
319    
320  try:  try:
321     lib_path = env['scsl_lib_path']     lib_path = env['scsl_lib_path']
322     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
323  except KeyError:  except KeyError:
324     pass     pass
325    
326  if useMPI:    if useMPI:  
327    try:    try:
328      scsl_libs = env['scsl_libs_MPI']      scsl_libs = env['scsl_libs_MPI']
# Line 331  try: Line 346  try:
346  except KeyError:  except KeyError:
347     pass     pass
348    
349    if useMPI:  
350        umf_libs = ''
351    else:
352       try:
353          umf_libs = env['umf_libs']
354       except KeyError:
355          umf_libs = ''
356    
357    try:
358       includes = env['ufc_path']
359       env.Append(CPPPATH = [includes,])
360    except KeyError:
361       pass
362    
363  try:  try:
364     lib_path = env['amd_lib_path']     includes = env['amd_path']
365     env.Append(LIBPATH = [lib_path,])     env.Append(CPPPATH = [includes,])
366  except KeyError:  except KeyError:
367     pass     pass
368    
369  try:  try:
370     umf_libs = env['umf_libs']     lib_path = env['amd_lib_path']
371       env.Append(LIBPATH = [lib_path,])
372  except KeyError:  except KeyError:
373     umf_libs = ''     pass
374    
375    if useMPI:  
376        amd_libs = ''
377    else:
378       try:
379          amd_libs = env['amd_libs']
380       except KeyError:
381          amd_libs = ''
382    
383  try:  try:
384     includes = env['blas_path']     includes = env['blas_path']
385     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
386  except KeyError:  except KeyError:
387     pass     pass
388    
389  try:  try:
390     lib_path = env['blas_lib_path']     lib_path = env['blas_lib_path']
391     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
392  except KeyError:  except KeyError:
393     pass     pass
394    
395  try:  try:
396     blas_libs = env['blas_libs']     blas_libs = env['blas_libs']
397  except KeyError:  except KeyError:
# Line 473  init_target = env.Command(pyinstall+'/__ Line 513  init_target = env.Command(pyinstall+'/__
513  env.Alias(init_target)  env.Alias(init_target)
514    
515  # Allow sconscripts to see the env  # Allow sconscripts to see the env
516  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",
517      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",
518          "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",
519          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])

Legend:
Removed from v.805  
changed lines
  Added in v.806

  ViewVC Help
Powered by ViewVC 1.1.26