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

Diff of /branches/diaplayground/SConstruct

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

revision 3506 by jfenwick, Wed May 11 01:59:45 2011 UTC revision 3508 by lgao, Fri May 13 04:15:29 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    
570    boomeramg_inc_path=''
571    boomeramg_lib_path=''
572    if env['boomeramg']:
573        boomeramg_inc_path,boomeramg_lib_path=findLibWithHeader(env, env['boomeramg_libs'], 'HYPRE.h', env['boomeramg_prefix'], lang='c')
574        env.AppendUnique(CPPPATH = [boomeramg_inc_path])
575        env.AppendUnique(LIBPATH = [boomeramg_lib_path])
576        # Note that we do not add the libs since they are only needed for the
577        # weipa library and tools.
578        env.AppendUnique(LIBS = env['boomeramg_libs'])
579        env.PrependENVPath(LD_LIBRARY_PATH_KEY, boomeramg_lib_path)
580        env.Append(CPPDEFINES = ['BOOMERAMG'])
581    
582  ######## ParMETIS (optional)  ######## ParMETIS (optional)
583    
584  if not env['usempi']: env['parmetis'] = False  if not env['usempi']: env['parmetis'] = False
# Line 620  else: Line 641  else:
641      print("          LAPACK:  DISABLED")      print("          LAPACK:  DISABLED")
642  d_list=[]  d_list=[]
643  e_list=[]  e_list=[]
644  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':
645      if env[i]: e_list.append(i)      if env[i]: e_list.append(i)
646      else: d_list.append(i)      else: d_list.append(i)
647  for i in e_list:  for i in e_list:
# Line 713  buildvars.write("mpi_lib_path=%s\n"%mpi_ Line 734  buildvars.write("mpi_lib_path=%s\n"%mpi_
734  buildvars.write("lapack=%s\n"%env['lapack'])  buildvars.write("lapack=%s\n"%env['lapack'])
735  buildvars.write("pyvisi=%d\n"%env['pyvisi'])  buildvars.write("pyvisi=%d\n"%env['pyvisi'])
736  buildvars.write("vsl_random=%d"%int(env['vsl_random']))  buildvars.write("vsl_random=%d"%int(env['vsl_random']))
737  for i in 'netcdf','parmetis','papi','mkl','umfpack','silo','visit':  for i in 'netcdf','parmetis','papi','mkl','umfpack','boomeramg','silo','visit':
738      buildvars.write("%s=%d\n"%(i, int(env[i])))      buildvars.write("%s=%d\n"%(i, int(env[i])))
739      if env[i]:      if env[i]:
740          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.3508

  ViewVC Help
Powered by ViewVC 1.1.26