/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 3463 by caltinay, Mon Feb 7 02:09:57 2011 UTC revision 3511 by lgao, Tue May 17 23:56:13 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 103  vars.AddVariables( Line 106  vars.AddVariables(
106    ('visit_prefix', 'Prefix/Paths to VisIt installation', default_prefix),    ('visit_prefix', 'Prefix/Paths to VisIt installation', default_prefix),
107    ('visit_libs', 'VisIt libraries to link with', ['simV2']),    ('visit_libs', 'VisIt libraries to link with', ['simV2']),
108    BoolVariable('pyvisi', 'Enable pyvisi (deprecated, requires VTK module)', False),    BoolVariable('pyvisi', 'Enable pyvisi (deprecated, requires VTK module)', False),
109      BoolVariable('vsl_random', 'Use VSL from intel for random data', False),
110  # Advanced settings  # Advanced settings
111    #dudley_assemble_flags = -funroll-loops      to actually do something    #dudley_assemble_flags = -funroll-loops      to actually do something
112    ('dudley_assemble_flags', 'compiler flags for some dudley optimisations', ''),    ('dudley_assemble_flags', 'compiler flags for some dudley optimisations', ''),
# Line 312  for key in 'OMP_NUM_THREADS', 'ESCRIPT_N Line 316  for key in 'OMP_NUM_THREADS', 'ESCRIPT_N
316          env['ENV'][key] = 1          env['ENV'][key] = 1
317    
318  env_export=env['env_export']  env_export=env['env_export']
319  env_export.extend(['ESCRIPT_NUM_THREADS','ESCRIPT_HOSTFILE','DISPLAY','XAUTHORITY','PATH','HOME'])  env_export.extend(['ESCRIPT_NUM_THREADS','ESCRIPT_HOSTFILE','DISPLAY','XAUTHORITY','PATH','HOME','TMPDIR','TEMP','TMP'])
320    
321  for key in set(env_export):  for key in set(env_export):
322      try:      try:
# Line 526  if env['silo']: Line 530  if env['silo']:
530      # weipa library and tools.      # weipa library and tools.
531      #env.AppendUnique(LIBS = [env['silo_libs']])      #env.AppendUnique(LIBS = [env['silo_libs']])
532    
533    ######## VSL random numbers (optional)
534    if env['vsl_random']:
535        env.Append(CPPDEFINES = ['MKLRANDOM'])
536    
537  ######## VisIt (optional)  ######## VisIt (optional)
538    
539  visit_inc_path=''  visit_inc_path=''
# Line 553  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 615  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','pyvisi':  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 626  if env['gmsh']: Line 653  if env['gmsh']:
653      print("            gmsh:  FOUND")      print("            gmsh:  FOUND")
654  else:  else:
655      print("            gmsh:  NOT FOUND")      print("            gmsh:  NOT FOUND")
656    print("      vsl_random:  %s"%env['vsl_random'])
657        
658  if ((fatalwarning != '') and (env['werror'])):  if ((fatalwarning != '') and (env['werror'])):
659      print("  Treating warnings as errors")      print("  Treating warnings as errors")
660  else:  else:
# Line 705  buildvars.write("mpi_inc_path=%s\n"%mpi_ Line 734  buildvars.write("mpi_inc_path=%s\n"%mpi_
734  buildvars.write("mpi_lib_path=%s\n"%mpi_lib_path)  buildvars.write("mpi_lib_path=%s\n"%mpi_lib_path)
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  for i in 'netcdf','parmetis','papi','mkl','umfpack','silo','visit':  buildvars.write("vsl_random=%d"%int(env['vsl_random']))
738    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.3463  
changed lines
  Added in v.3511

  ViewVC Help
Powered by ViewVC 1.1.26