/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/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 3585 by caltinay, Wed Sep 7 06:16:08 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 576  if env['parmetis']: Line 598  if env['parmetis']:
598    
599  try:  try:
600      import subprocess      import subprocess
601      p=subprocess.Popen(['gmsh', '-version'], stderr=subprocess.PIPE)      p=subprocess.Popen(['gmsh', '-info'], stderr=subprocess.PIPE)
602      p.poll()      _,e=p.communicate()
603      env['gmsh']=True      if e.split().count("MPI"):
604            env['gmsh']='m'
605        else:
606            env['gmsh']='s'
607  except OSError:  except OSError:
608      env['gmsh']=False      env['gmsh']=False
609    
# Line 620  else: Line 645  else:
645      print("          LAPACK:  DISABLED")      print("          LAPACK:  DISABLED")
646  d_list=[]  d_list=[]
647  e_list=[]  e_list=[]
648  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':
649      if env[i]: e_list.append(i)      if env[i]: e_list.append(i)
650      else: d_list.append(i)      else: d_list.append(i)
651  for i in e_list:  for i in e_list:
652      print("%16s:  YES"%i)      print("%16s:  YES"%i)
653  for i in d_list:  for i in d_list:
654      print("%16s:  DISABLED"%i)      print("%16s:  DISABLED"%i)
655  if env['gmsh']:  if env['gmsh']=='m':
656        print("            gmsh:  FOUND, MPI-ENABLED")
657    elif env['gmsh']=='s':
658      print("            gmsh:  FOUND")      print("            gmsh:  FOUND")
659  else:  else:
660      print("            gmsh:  NOT FOUND")      print("            gmsh:  NOT FOUND")
# Line 712  buildvars.write("mpi_inc_path=%s\n"%mpi_ Line 739  buildvars.write("mpi_inc_path=%s\n"%mpi_
739  buildvars.write("mpi_lib_path=%s\n"%mpi_lib_path)  buildvars.write("mpi_lib_path=%s\n"%mpi_lib_path)
740  buildvars.write("lapack=%s\n"%env['lapack'])  buildvars.write("lapack=%s\n"%env['lapack'])
741  buildvars.write("pyvisi=%d\n"%env['pyvisi'])  buildvars.write("pyvisi=%d\n"%env['pyvisi'])
742  buildvars.write("vsl_random=%d"%int(env['vsl_random']))  buildvars.write("vsl_random=%d\n"%int(env['vsl_random']))
743  for i in 'netcdf','parmetis','papi','mkl','umfpack','silo','visit':  for i in 'netcdf','parmetis','papi','mkl','umfpack','boomeramg','silo','visit':
744      buildvars.write("%s=%d\n"%(i, int(env[i])))      buildvars.write("%s=%d\n"%(i, int(env[i])))
745      if env[i]:      if env[i]:
746          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.3585

  ViewVC Help
Powered by ViewVC 1.1.26