Subversion Repositories slepc-dev

Rev

Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1234 Rev 1238
Line 13... Line 13...
  log.Println('Checking PRIMME library...')
  log.Println('Checking PRIMME library...')
 
 
  if petscconf.PRECISION == 'single':
  if petscconf.PRECISION == 'single':
    sys.exit('ERROR: PRIMME does not support single precision.')
    sys.exit('ERROR: PRIMME does not support single precision.')
 
 
  functions = ['primme_set_method','primme_Free','primme_initialize']
  functions_base = ['primme_set_method','primme_Free','primme_initialize']
  if petscconf.SCALAR == 'real':
 
    functions += ['dprimme']
 
    include = 'DPRIMME'
 
    if not libs:
 
      libs = ['-ldprimme']
 
  else:
 
    functions += ['zprimme']
 
    include = 'ZPRIMME'
 
    if not libs:
 
      libs = ['-lzprimme']
 
   
 
  if directory:
  if directory:
    dirs = [directory]
    dirs = [directory]
  else:
  else:
    dirs = check.GenerateGuesses('Primme')
    dirs = check.GenerateGuesses('Primme')
 
 
 
  include = 'PRIMMESRC/COMMONSRC'
 
  if not libs:
 
    libs = ['-lprimme']
 
  if petscconf.SCALAR == 'real':
 
    functions = functions_base + ['dprimme']
 
  else:
 
    functions = functions_base + ['zprimme']
 
 
  for d in dirs:
  for d in dirs:
    if d:
    if d:
      l = ['-L' + d] + libs
      l = ['-L' + d] + libs
      f = ['-I' + d + '/' + include]
      f = ['-I' + d + '/' + include]
Line 43... Line 40...
      conf.write('SLEPC_HAVE_PRIMME = -DSLEPC_HAVE_PRIMME\n')
      conf.write('SLEPC_HAVE_PRIMME = -DSLEPC_HAVE_PRIMME\n')
      conf.write('PRIMME_LIB =' + str.join(' ', l) + '\n')
      conf.write('PRIMME_LIB =' + str.join(' ', l) + '\n')
      conf.write('PRIMME_FLAGS =' + str.join(' ', f) + '\n')
      conf.write('PRIMME_FLAGS =' + str.join(' ', f) + '\n')
      return l+f
      return l+f
 
 
    log.Println('ERROR: Unable to link with PRIMME library')
  log.Println('ERROR: Unable to link with PRIMME library')
    print 'ERROR: In directories',dirs
  print 'ERROR: In directories',dirs
    print 'ERROR: With flags',libs,
  print 'ERROR: With flags',libs,
    log.Exit('')
  log.Exit('')