/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 2729 by jfenwick, Thu Oct 22 01:45:28 2009 UTC revision 2787 by jfenwick, Fri Nov 27 05:03:09 2009 UTC
# Line 161  adder( Line 161  adder(
161    ('blas_path', 'Path to BLAS includes', '/usr/include/suitesparse'),    ('blas_path', 'Path to BLAS includes', '/usr/include/suitesparse'),
162    ('blas_lib_path', 'Path to BLAS libs', usr_lib),    ('blas_lib_path', 'Path to BLAS libs', usr_lib),
163    ('blas_libs', 'BLAS libraries to link with', ['blas']),    ('blas_libs', 'BLAS libraries to link with', ['blas']),
164    #Lapack options
165      BoolVariable('uselapack','switch on/off use of Lapack','no'),
166      ('lapack_path', 'Path to Lapack includes','/usr/include'),
167      ('lapack_lib_path', 'Path to Lapack libs', usr_lib),
168      ('lapack_libs', 'Lapack libraries to link with', []),
169      ('lapack_type', '{clapack,mkl}','clapack'),
170  # An option for specifying the compiler tools set (see windows branch).  # An option for specifying the compiler tools set (see windows branch).
171    ('tools_names', 'allow control over the tools in the env setup', ['intelc']),    ('tools_names', 'allow control over the tools in the env setup', ['intelc']),
172  # finer control over library building, intel aggressive global optimisation  # finer control over library building, intel aggressive global optimisation
# Line 543  if env['usemkl']: Line 549  if env['usemkl']:
549  if env['usemkl'] and not conf.CheckCHeader('mkl_solver.h'): env['usemkl'] = 0  if env['usemkl'] and not conf.CheckCHeader('mkl_solver.h'): env['usemkl'] = 0
550  if env['usemkl'] and not conf.CheckFunc('pardiso'): env['usemkl'] = 0  if env['usemkl'] and not conf.CheckFunc('pardiso'): env['usemkl'] = 0
551    
552    
553  # Add MKL to environment env if it was found  # Add MKL to environment env if it was found
554  if env['usemkl']:  if env['usemkl']:
555    env = conf.Finish()    env = conf.Finish()
# Line 603  if env['usesilo']: Line 610  if env['usesilo']:
610    env.AppendUnique(LIBPATH = [env['silo_lib_path']])    env.AppendUnique(LIBPATH = [env['silo_lib_path']])
611    env.Append(CPPDEFINES = ['HAVE_SILO'])    env.Append(CPPDEFINES = ['HAVE_SILO'])
612    
613    ########### Lapack (optional) ##################################
614    
615    
616    if env['uselapack']:
617        env.AppendUnique(CPPDEFINES='USE_LAPACK')
618        env.AppendUnique(CPPPATH = [env['lapack_path']])
619        env.AppendUnique(LIBPATH =[env['lapack_lib_path']])
620    
621        env.Append(LIBPATH = '/usr/lib/atlas')
622        env.Append(LIBS = [env['lapack_libs']])
623        if env['lapack_type']=='mkl':
624           if not env['usemkl']:
625            env['uselapack']=0
626            print "mkl_lapack requires mkl"
627           else:
628            env.AppendUnique(CPPDEFINES='MKL_LAPACK')
629          
630    
631    
632  ############ Add the compiler flags ############################  ############ Add the compiler flags ############################
633    
634  # Enable debug by choosing either cc_debug or cc_optim  # Enable debug by choosing either cc_debug or cc_optim
# Line 726  if env['useparmetis']: print " Using Par Line 752  if env['useparmetis']: print " Using Par
752  else: print "   Not using ParMETIS (requires MPI)"  else: print "   Not using ParMETIS (requires MPI)"
753  if env['usepapi']: print "  Using PAPI"  if env['usepapi']: print "  Using PAPI"
754  else: print "   Not using PAPI"  else: print "   Not using PAPI"
755    if env['uselapack']: print "    Using Lapack"
756    else: print "   Not using Lapack"
757  if env['usedebug']: print " Compiling for debug"  if env['usedebug']: print " Compiling for debug"
758  else: print "   Not compiling for debug"  else: print "   Not compiling for debug"
759  print " Installing in", prefix  print " Installing in", prefix
# Line 792  env.Alias('remember_options', remember_l Line 820  env.Alias('remember_options', remember_l
820  ############### Record python interpreter version ##############  ############### Record python interpreter version ##############
821    
822  if not IS_WINDOWS_PLATFORM:  if not IS_WINDOWS_PLATFORM:
823    
824    versionstring="Python "+str(sys.version_info[0])+"."+str(sys.version_info[1])+"."+str(sys.version_info[2])    versionstring="Python "+str(sys.version_info[0])+"."+str(sys.version_info[1])+"."+str(sys.version_info[2])
825      if sys.version_info[4] >0 : versionstring+="rc%s"%sys.version_info[4]
826    os.system("echo "+versionstring+" > "+os.path.join(env['libinstall'],"pyversion"))    os.system("echo "+versionstring+" > "+os.path.join(env['libinstall'],"pyversion"))
827    
828  ############## Populate the buildvars file #####################  ############## Populate the buildvars file #####################
# Line 829  else: Line 859  else:
859      out+="n"      out+="n"
860  buildvars.write(out+"\n")  buildvars.write(out+"\n")
861  buildvars.write("mpi_flavour="+env['mpi_flavour']+'\n')  buildvars.write("mpi_flavour="+env['mpi_flavour']+'\n')
862    buildvars.write("lapack=")
863    if env['uselapack']:
864       buildvars.write('y')
865    else:
866       buildvars.write('n')
867    buildvars.write('\n')
868  buildvars.close()  buildvars.close()
869    
870    

Legend:
Removed from v.2729  
changed lines
  Added in v.2787

  ViewVC Help
Powered by ViewVC 1.1.26