/[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

trunk/SConstruct revision 3506 by jfenwick, Wed May 11 01:59:45 2011 UTC branches/amg_from_3530/SConstruct revision 3531 by lgao, Fri Jun 17 00:17:53 2011 UTC
# Line 93  vars.AddVariables( Line 93  vars.AddVariables(
93    BoolVariable('umfpack', 'Enable UMFPACK', False),    BoolVariable('umfpack', 'Enable UMFPACK', False),
94    ('umfpack_prefix', 'Prefix/Paths to UMFPACK installation', default_prefix),    ('umfpack_prefix', 'Prefix/Paths to UMFPACK installation', default_prefix),
95    ('umfpack_libs', 'UMFPACK libraries to link with', ['umfpack']),    ('umfpack_libs', 'UMFPACK libraries to link with', ['umfpack']),
96      BoolVariable('boomeramg', 'Enable BoomerAMG', False),
97      ('boomeramg_prefix', 'Prefix/Paths to BoomerAMG installation', default_prefix),
98      ('boomeramg_libs', 'BoomerAMG libraries to link with', ['boomeramg']),
99    EnumVariable('lapack', 'Set LAPACK flavour', 'none', allowed_values=lapack_flavours),    EnumVariable('lapack', 'Set LAPACK flavour', 'none', allowed_values=lapack_flavours),
100    ('lapack_prefix', 'Prefix/Paths to LAPACK installation', default_prefix),    ('lapack_prefix', 'Prefix/Paths to LAPACK installation', default_prefix),
101    ('lapack_libs', 'LAPACK libraries to link with', []),    ('lapack_libs', 'LAPACK libraries to link with', []),
# Line 558  if env['usempi']: Line 561  if env['usempi']:
561      if env['netcdf'] and env['mpi'] in ['MPT','OPENMPI']:      if env['netcdf'] and env['mpi'] in ['MPT','OPENMPI']:
562          env.Append(CPPDEFINES = ['MPI_INCLUDED'])          env.Append(CPPDEFINES = ['MPI_INCLUDED'])
563    
564    ######## BOOMERAMG (optional)
565    
566    #if env['boomeramg'] and env['mpi'] == 'none':
567    #    print("boomeramg requires mpi!")
568    #    Exit(1)
569    if env['mpi'] == 'none': env['boomeramg'] = False
570    
571    boomeramg_inc_path=''
572    boomeramg_lib_path=''
573    if env['boomeramg']:
574        boomeramg_inc_path,boomeramg_lib_path=findLibWithHeader(env, env['boomeramg_libs'], 'HYPRE.h', env['boomeramg_prefix'], lang='c')
575        env.AppendUnique(CPPPATH = [boomeramg_inc_path])
576        env.AppendUnique(LIBPATH = [boomeramg_lib_path])
577        # Note that we do not add the libs since they are only needed for the
578        # weipa library and tools.
579        env.AppendUnique(LIBS = env['boomeramg_libs'])
580        env.PrependENVPath(LD_LIBRARY_PATH_KEY, boomeramg_lib_path)
581        env.Append(CPPDEFINES = ['BOOMERAMG'])
582    
583  ######## ParMETIS (optional)  ######## ParMETIS (optional)
584    
585  if not env['usempi']: env['parmetis'] = False  if not env['usempi']: env['parmetis'] = False
# Line 620  else: Line 642  else:
642      print("          LAPACK:  DISABLED")      print("          LAPACK:  DISABLED")
643  d_list=[]  d_list=[]
644  e_list=[]  e_list=[]
645  for i in 'debug','openmp','netcdf','parmetis','papi','mkl','umfpack','silo','visit':  for i in 'debug','openmp','netcdf','parmetis','papi','mkl','umfpack','boomeramg','silo','visit':
646      if env[i]: e_list.append(i)      if env[i]: e_list.append(i)
647      else: d_list.append(i)      else: d_list.append(i)
648  for i in e_list:  for i in e_list:
# Line 713  buildvars.write("mpi_lib_path=%s\n"%mpi_ Line 735  buildvars.write("mpi_lib_path=%s\n"%mpi_
735  buildvars.write("lapack=%s\n"%env['lapack'])  buildvars.write("lapack=%s\n"%env['lapack'])
736  buildvars.write("pyvisi=%d\n"%env['pyvisi'])  buildvars.write("pyvisi=%d\n"%env['pyvisi'])
737  buildvars.write("vsl_random=%d"%int(env['vsl_random']))  buildvars.write("vsl_random=%d"%int(env['vsl_random']))
738  for i in 'netcdf','parmetis','papi','mkl','umfpack','silo','visit':  for i in 'netcdf','parmetis','papi','mkl','umfpack','boomeramg','silo','visit':
739      buildvars.write("%s=%d\n"%(i, int(env[i])))      buildvars.write("%s=%d\n"%(i, int(env[i])))
740      if env[i]:      if env[i]:
741          buildvars.write("%s_inc_path=%s\n"%(i, eval(i+'_inc_path')))          buildvars.write("%s_inc_path=%s\n"%(i, eval(i+'_inc_path')))

Legend:
Removed from v.3506  
changed lines
  Added in v.3531

  ViewVC Help
Powered by ViewVC 1.1.26