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

Diff of /branches/amg_from_3530/SConstruct

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

revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC revision 1374 by gross, Tue Jan 8 09:37:55 2008 UTC
# Line 20  import sys, os, re Line 20  import sys, os, re
20  if sys.path.count('scons')==0: sys.path.append('scons')  if sys.path.count('scons')==0: sys.path.append('scons')
21  import scons_extensions  import scons_extensions
22    
23    # We may also need to know where python's site-packages subdirectory lives
24    python_version = 'python%s.%s'%(sys.version_info[0],sys.version_info[1])
25    
26  #===============================================================  #===============================================================
27    
28  tools_prefix="/usr"  tools_prefix="/usr"
# Line 32  prefix = ARGUMENTS.get('prefix', '/usr') Line 35  prefix = ARGUMENTS.get('prefix', '/usr')
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])
   
38  # Install as a standard python package in /usr/lib64 if available, else in /usr/lib  # Install as a standard python package in /usr/lib64 if available, else in /usr/lib
39  if os.path.isdir(  prefix+"/lib64/"+python_version+"/site-packages"):  if os.path.isdir(  prefix+"/lib64/"+python_version+"/site-packages"):
40     sys_dir_packages =  prefix+"/lib64/"+python_version+"/site-packages/esys"     sys_dir_packages =  prefix+"/lib64/"+python_version+"/site-packages/esys"
# Line 301  Help(opts.GenerateHelpText(env)) Line 303  Help(opts.GenerateHelpText(env))
303  if env['bounds_check']:  if env['bounds_check']:
304     env.Append(CPPDEFINES = [ 'BOUNDS_CHECK' ])     env.Append(CPPDEFINES = [ 'BOUNDS_CHECK' ])
305     env.Append(CXXDEFINES = [ 'BOUNDS_CHECK' ])     env.Append(CXXDEFINES = [ 'BOUNDS_CHECK' ])
306       bounds_check = env['bounds_check']
307    else:
308       bounds_check = 0
309    
310  #=================================================================================================  #=================================================================================================
311  #  #
# Line 346  except KeyError: Line 351  except KeyError:
351    
352  try:  try:
353     tmp = os.environ['LD_LIBRARY_PATH']     tmp = os.environ['LD_LIBRARY_PATH']
354       print tmp
355     env['ENV']['LD_LIBRARY_PATH'] = tmp     env['ENV']['LD_LIBRARY_PATH'] = tmp
356  except KeyError:  except KeyError:
357     pass     pass
# Line 446  except KeyError: Line 452  except KeyError:
452     useMPI = None     useMPI = None
453  # ========= set compiler flags ===========================================  # ========= set compiler flags ===========================================
454    
455    # Can't use MPI and OpenMP simultaneously at this time
456    if useMPI:
457        omp_flags=''
458        omp_flags_debug=''
459    
460  if dodebug:  if dodebug:
461      try:      try:
462        flags = env['cc_flags_debug'] + ' ' + omp_flags_debug        flags = env['cc_flags_debug'] + ' ' + omp_flags_debug
# Line 475  try: Line 486  try:
486  except:  except:
487       pass       pass
488    
489    # ============= Remember what options were used in the compile =====================================
490    if not IS_WINDOWS_PLATFORM:
491      env.Execute("/bin/rm -f " + libinstall + "/Compiled.with.*")
492      if dodebug:       env.Execute("touch " + libinstall + "/Compiled.with.debug")
493      if useMPI:        env.Execute("touch " + libinstall + "/Compiled.with.mpi")
494      if omp_flags != '':   env.Execute("touch " + libinstall + "/Compiled.with.OpenMP")
495      if bounds_check:  env.Execute("touch " + libinstall + "/Compiled.with.bounds_check")
496    
497  # ============= set mkl (but only of no MPI) =====================================  # ============= set mkl (but only of no MPI) =====================================
498  if not useMPI:  if not useMPI:
499     try:     try:
# Line 486  if not useMPI: Line 505  if not useMPI:
505     try:     try:
506        lib_path = env['mkl_lib_path']        lib_path = env['mkl_lib_path']
507        env.Append(LIBPATH = [lib_path,])        env.Append(LIBPATH = [lib_path,])
508          env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
509     except KeyError:     except KeyError:
510        pass        pass
511    
# Line 507  if not useMPI: Line 527  if not useMPI:
527     try:     try:
528        lib_path = env['scsl_lib_path']        lib_path = env['scsl_lib_path']
529        env.Append(LIBPATH = [lib_path,])        env.Append(LIBPATH = [lib_path,])
530          env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
531     except KeyError:     except KeyError:
532        pass        pass
533        
# Line 624  try: Line 645  try:
645  except KeyError:  except KeyError:
646     blas_libs = [ ]     blas_libs = [ ]
647    
648  # ========== netcdf (currently not supported with mpi) ====================================  # ========== netcdf ====================================
649  if useMPI:  try:
650     useNetCDF = 'no'     useNetCDF = env['useNetCDF']
651  else:  except KeyError:
652     try:     useNetCDF = 'yes'
653        useNetCDF = env['useNetCDF']     pass
    except KeyError:  
       useNetCDF = 'yes'  
       pass  
654            
655  if useNetCDF == 'yes':  if useNetCDF == 'yes':
656     try:     try:
# Line 651  if useNetCDF == 'yes': Line 669  if useNetCDF == 'yes':
669     try:     try:
670        lib_path = env['netCDF_lib_path']        lib_path = env['netCDF_lib_path']
671        env.Append(LIBPATH = [ lib_path, ])        env.Append(LIBPATH = [ lib_path, ])
672          env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
673        if IS_WINDOWS_PLATFORM :        if IS_WINDOWS_PLATFORM :
674           env.PrependENVPath('PATH', lib_path)           env.PrependENVPath('PATH', lib_path)
675     except KeyError:     except KeyError:
# Line 668  except KeyError: Line 687  except KeyError:
687  try:  try:
688     lib_path = env['boost_lib_path']     lib_path = env['boost_lib_path']
689     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
690       env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
691     if IS_WINDOWS_PLATFORM :     if IS_WINDOWS_PLATFORM :
692        env.PrependENVPath('PATH', lib_path)        env.PrependENVPath('PATH', lib_path)
693  except KeyError:  except KeyError:
# Line 684  except KeyError: Line 704  except KeyError:
704     pass     pass
705  try:  try:
706     lib_path = env['python_lib_path']     lib_path = env['python_lib_path']
707       env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
708     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
709  except KeyError:  except KeyError:
710     pass     pass
# Line 827  try: Line 848  try:
848     svn_pipe = os.popen("svnversion -n .")     svn_pipe = os.popen("svnversion -n .")
849     global_revision = svn_pipe.readlines()     global_revision = svn_pipe.readlines()
850     svn_pipe.close()     svn_pipe.close()
851     global_revision = re.sub("[^0-9]", "", global_revision[0])     global_revision = re.sub(":.*", "", global_revision[0])
852       global_revision = re.sub("[^0-9]", "", global_revision)
853  except:  except:
854     global_revision = "0"     global_revision = "0"
855  env.Append(CPPDEFINES = "SVN_VERSION="+global_revision)  env.Append(CPPDEFINES = "SVN_VERSION="+global_revision)
# Line 870  Export(["IS_WINDOWS_PLATFORM", "env", "i Line 892  Export(["IS_WINDOWS_PLATFORM", "env", "i
892  # End initialisation section  # End initialisation section
893  # Begin configuration section  # Begin configuration section
894  # adds this file and the scons option directore to the source tar  # adds this file and the scons option directore to the source tar
895  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') ]
896  release_testfiles=[env.File('README_TESTS'),]  release_testfiles=[env.File('README_TESTS'),]
897  env.Zip(src_zipfile, release_srcfiles)  env.Zip(src_zipfile, release_srcfiles)
898  env.Zip(test_zipfile, release_testfiles)  env.Zip(test_zipfile, release_testfiles)

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

  ViewVC Help
Powered by ViewVC 1.1.26