/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1705 by ksteube, Thu Aug 14 05:56:40 2008 UTC revision 1753 by ksteube, Sun Sep 7 22:01:23 2008 UTC
# Line 31  hostname = re.sub("[^0-9a-zA-Z]", "_", s Line 31  hostname = re.sub("[^0-9a-zA-Z]", "_", s
31  tmp = os.path.join("scons",hostname+"_options.py")  tmp = os.path.join("scons",hostname+"_options.py")
32  options_file = ARGUMENTS.get('options_file', tmp)  options_file = ARGUMENTS.get('options_file', tmp)
33  if not os.path.isfile(options_file): options_file = False  if not os.path.isfile(options_file): options_file = False
34    else: print "Options file is", options_file
35    
36  # Load options file and command-line arguments  # Load options file and command-line arguments
37  opts = Options(options_file, ARGUMENTS)  opts = Options(options_file, ARGUMENTS)
# Line 99  opts.AddOptions( Line 100  opts.AddOptions(
100    ('mkl_lib_path', 'Path to MKL libs', '/sw/sdev/cmkl/10.0.2.18/lib/em64t'),    ('mkl_lib_path', 'Path to MKL libs', '/sw/sdev/cmkl/10.0.2.18/lib/em64t'),
101    ('mkl_libs', 'MKL libraries to link with', ['mkl_solver', 'mkl_em64t', 'guide', 'pthread']),    ('mkl_libs', 'MKL libraries to link with', ['mkl_solver', 'mkl_em64t', 'guide', 'pthread']),
102  # UMFPACK  # UMFPACK
103    BoolOption('useumfpack', 'switch on/off the usage of UMFPACK', 'yes'),    BoolOption('useumfpack', 'switch on/off the usage of UMFPACK', 'no'),
104    ('ufc_path', 'Path to UFconfig includes', '/usr/include/suitesparse'),    ('ufc_path', 'Path to UFconfig includes', '/usr/include/suitesparse'),
105    ('umf_path', 'Path to UMFPACK includes', '/usr/include/suitesparse'),    ('umf_path', 'Path to UMFPACK includes', '/usr/include/suitesparse'),
106    ('umf_lib_path', 'Path to UMFPACK libs', usr_lib),    ('umf_lib_path', 'Path to UMFPACK libs', usr_lib),
# Line 185  if not env["useopenmp"]: Line 186  if not env["useopenmp"]:
186    
187  if env['omp_optim'] == "" and env['omp_debug'] == "": env["useopenmp"] = 0  if env['omp_optim'] == "" and env['omp_debug'] == "": env["useopenmp"] = 0
188    
189    Execute(Delete(env['libinstall'] + "/Compiled.with.debug"))
190    Execute(Delete(env['libinstall'] + "/Compiled.with.mpi"))
191    Execute(Delete(env['libinstall'] + "/Compiled.with.openmp"))
192    if not env['useMPI']: Execute(Delete(env['libinstall'] + "/pythonMPI"))
193    
194  ############ Copy environment variables into scons env #########  ############ Copy environment variables into scons env #########
195    
196  try: env['ENV']['OMP_NUM_THREADS'] = os.environ['OMP_NUM_THREADS']  try: env['ENV']['OMP_NUM_THREADS'] = os.environ['OMP_NUM_THREADS']
# Line 233  def clone_env(env): Line 239  def clone_env(env):
239  env.Append(CPPPATH      = [Dir('include')])  env.Append(CPPPATH      = [Dir('include')])
240    
241  # Add cc option -L<Escript>/trunk/lib  # Add cc option -L<Escript>/trunk/lib
242  env.Append(LIBPATH      = [Dir('lib')])  env.Append(LIBPATH      = [Dir(env['libinstall'])])
243    
244  env.Append(CPPDEFINES = ['ESCRIPT_EXPORTS', 'FINLEY_EXPORTS'])  env.Append(CPPDEFINES = ['ESCRIPT_EXPORTS', 'FINLEY_EXPORTS'])
245    
# Line 532  remember_list = [] Line 538  remember_list = []
538    
539  if env['usedebug']:  if env['usedebug']:
540    remember_list += env.Command(env['libinstall'] + "/Compiled.with.debug", None, Touch('$TARGET'))    remember_list += env.Command(env['libinstall'] + "/Compiled.with.debug", None, Touch('$TARGET'))
 else:  
   remember_list += env.Command(env['libinstall'] + "/Compiled.with.debug", None, Delete('$TARGET'))  
541    
542  if env['usempi']:  if env['usempi']:
543    remember_list += env.Command(env['libinstall'] + "/Compiled.with.mpi", None, Touch('$TARGET'))    remember_list += env.Command(env['libinstall'] + "/Compiled.with.mpi", None, Touch('$TARGET'))
 else:  
   remember_list += env.Command(env['libinstall'] + "/Compiled.with.mpi", None, Delete('$TARGET'))  
544    
545  if env['omp_optim'] != '':  if env['omp_optim'] != '':
546    remember_list += env.Command(env['libinstall'] + "/Compiled.with.openmp", None, Touch('$TARGET'))    remember_list += env.Command(env['libinstall'] + "/Compiled.with.openmp", None, Touch('$TARGET'))
 else:  
   remember_list += env.Command(env['libinstall'] + "/Compiled.with.openmp", None, Delete('$TARGET'))  
547    
548  env.Alias('remember_options', remember_list)  env.Alias('remember_options', remember_list)
549    

Legend:
Removed from v.1705  
changed lines
  Added in v.1753

  ViewVC Help
Powered by ViewVC 1.1.26