Subversion Repositories slepc-dev

Rev

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

Rev Author Line No. Line
1377 slepc 1
#
2
#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1672 slepc 3
#  SLEPc - Scalable Library for Eigenvalue Problem Computations
2116 eromero 4
#  Copyright (c) 2002-2010, Universidad Politecnica de Valencia, Spain
1377 slepc 5
#
1672 slepc 6
#  This file is part of SLEPc.
7
#    
8
#  SLEPc is free software: you can redistribute it and/or modify it under  the
9
#  terms of version 3 of the GNU Lesser General Public License as published by
10
#  the Free Software Foundation.
11
#
12
#  SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
13
#  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
14
#  FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
15
#  more details.
16
#
17
#  You  should have received a copy of the GNU Lesser General  Public  License
18
#  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
1377 slepc 19
#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
20
#
21
 
808 dsic.upv.es!antodo 22
import os
23
import sys
24
 
912 dsic.upv.es!antodo 25
import petscconf
26
import check
808 dsic.upv.es!antodo 27
 
912 dsic.upv.es!antodo 28
def Check(conf,directory,libs):
808 dsic.upv.es!antodo 29
 
1650 slepc 30
  if petscconf.SCALAR == 'real':
31
    if petscconf.PRECISION == 'single':
32
      functions = ['psnaupd','psneupd','pssaupd','psseupd']
1091 slepc 33
    else:
1650 slepc 34
      functions = ['pdnaupd','pdneupd','pdsaupd','pdseupd']
35
  else:
36
    if petscconf.PRECISION == 'single':
37
      functions = ['pcnaupd','pcneupd']
808 dsic.upv.es!antodo 38
    else:
1650 slepc 39
      functions = ['pznaupd','pzneupd']
808 dsic.upv.es!antodo 40
 
1650 slepc 41
  if libs:
42
    libs = [libs]
808 dsic.upv.es!antodo 43
  else:
1650 slepc 44
    libs = [['-lparpack','-larpack'],['-lparpack_MPI','-larpack'],['-lparpack_MPI-LINUX','-larpack_LINUX'],['-lparpack_MPI-SUN4','-larpack_SUN4']]
808 dsic.upv.es!antodo 45
 
46
  if directory:
47
    dirs = [directory]
48
  else:
912 dsic.upv.es!antodo 49
    dirs = check.GenerateGuesses('Arpack')
808 dsic.upv.es!antodo 50
 
912 dsic.upv.es!antodo 51
  return check.FortranLib(conf,'ARPACK',dirs,libs,functions)