Subversion Repositories slepc-dev

Rev

Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
808 dsic.upv.es!antodo 1
import os
2
import sys
3
 
912 dsic.upv.es!antodo 4
import petscconf
5
import check
808 dsic.upv.es!antodo 6
 
912 dsic.upv.es!antodo 7
def Check(conf):
808 dsic.upv.es!antodo 8
 
899 dsic.upv.es!antodo 9
  functions = ['laev2','gehrd','lanhs','lange','getri','hseqr','trexc','trevc','geevx','ggevx']
808 dsic.upv.es!antodo 10
 
912 dsic.upv.es!antodo 11
  if petscconf.SCALAR == 'real':
808 dsic.upv.es!antodo 12
    functions += ['orghr','syevr','sygvd']
912 dsic.upv.es!antodo 13
    if petscconf.PRECISION == 'double':
808 dsic.upv.es!antodo 14
      prefix = 'd'
15
    else:
16
      prefix = 's'
17
  else:
18
    functions += ['unghr','heevr','hegvd']
912 dsic.upv.es!antodo 19
    if petscconf.PRECISION == 'double':
808 dsic.upv.es!antodo 20
      prefix = 'z'
21
    else:
22
      prefix = 'c'
23
 
24
  missing = []
25
  conf.write('SLEPC_MISSING_LAPACK =')
899 dsic.upv.es!antodo 26
 
808 dsic.upv.es!antodo 27
  for i in functions:
28
    f =  '#if defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_UNDERSCORE)\n'
29
    f += prefix + i + '_\n'
30
    f += '#elif defined(PETSC_HAVE_FORTRAN_CAPS)\n'
816 dsic.upv.es!antodo 31
    f += prefix.upper() + i.upper() + '\n'
808 dsic.upv.es!antodo 32
    f += '#else\n'
33
    f += prefix + i + '\n'
34
    f += '#endif\n'
35
 
912 dsic.upv.es!antodo 36
    if not check.Link([f],[],[]):
808 dsic.upv.es!antodo 37
      missing.append(prefix + i)
38
      conf.write(' -DSLEPC_MISSING_LAPACK_' + i.upper())
899 dsic.upv.es!antodo 39
 
40
 
912 dsic.upv.es!antodo 41
  if petscconf.PRECISION == 'double':
899 dsic.upv.es!antodo 42
    functions = ['dlamch','dstevr']
43
  else:
44
    functions = ['slamch','sstevr']
45
 
46
  for i in functions:
47
    f =  '#if defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_UNDERSCORE)\n'
48
    f += i + '_\n'
49
    f += '#elif defined(PETSC_HAVE_FORTRAN_CAPS)\n'
50
    f += i.upper() + '\n'
51
    f += '#else\n'
52
    f += i + '\n'
53
    f += '#endif\n'
54
 
912 dsic.upv.es!antodo 55
    if not check.Link([f],[],[]):
899 dsic.upv.es!antodo 56
      missing.append(i)
57
      conf.write(' -DSLEPC_MISSING_LAPACK_' + i.upper())
58
 
808 dsic.upv.es!antodo 59
  conf.write('\n')
60
  return missing