Ticket #14833: patch-slepc-2.3.3.diff

File patch-slepc-2.3.3.diff, 31.8 KB (added by mmoll@…, 17 years ago)
  • config/configure.

    diff -u config/configure.py:1.23 config/configure.py:1.23.2.1
    old new  
    163163log.Write('Configure Options: '+str.join(' ',sys.argv))
    164164log.Write('Working directory: '+os.getcwd())
    165165log.Write('Python version:\n' + sys.version)
     166log.Write('make: ' + petscconf.MAKE)
     167log.Write('PETSc source directory: ' + petscdir)
     168log.Write('PETSc install directory: ' + petscconf.INSTALL_DIR)
     169log.Write('PETSc version: ' + petscconf.VERSION)
     170log.Write('PETSc architecture: ' + petscconf.ARCH)
     171log.Write('SLEPc source directory: ' + slepcdir)
     172log.Write('SLEPc install directory: ' + prefixdir)
    166173log.Write('='*80)
    167174
    168175# Check if PETSc is working
  • config/lapack.

    diff -u config/lapack.py:1.12 config/lapack.py:1.12.2.2
    old new  
    5252      conf.write(' -DSLEPC_MISSING_LAPACK_' + i.upper())
    5353
    5454
     55  functions = ['stevr','bdsdc']
    5556  if petscconf.PRECISION == 'single':
    56     functions = ['slamch','sstevr','sbdsdc']
     57    prefix = 's'
    5758  else:
    58     functions = ['dlamch','dstevr','dbdsdc']
     59    prefix = 'd'
    5960
    6061  for i in functions:
    6162    f =  '#if defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_UNDERSCORE)\n'
    62     f += i + '_\n'
     63    f += prefix + i + '_\n'
    6364    f += '#elif defined(PETSC_HAVE_FORTRAN_CAPS)\n'
    64     f += i.upper() + '\n'
     65    f += prefix.upper() + i.upper() + '\n'
    6566    f += '#else\n'
    66     f += i + '\n'
     67    f += prefix + i + '\n'
    6768    f += '#endif\n'
    6869   
    6970    log.Write('=== Checking LAPACK '+i+' function...')
    7071    if not check.Link([f],[],[]):
    71       missing.append(i)
     72      missing.append(prefix + i)
    7273      conf.write(' -DSLEPC_MISSING_LAPACK_' + i.upper())
    7374 
    7475  conf.write('\n')
  • include/slepc.

    diff -u include/slepc.h:1.11 include/slepc.h:1.11.4.1
    old new  
    4747EXTERN PetscErrorCode SlepcMatConvertSeqDense(Mat,Mat*);
    4848EXTERN PetscErrorCode SlepcCheckOrthogonality(Vec*,PetscInt,Vec *,PetscInt,Mat,PetscScalar*);
    4949 
     50extern PetscTruth SlepcInitializeCalled;
     51
    5052PETSC_EXTERN_CXX_END
    5153#endif
    5254
  • include/slepcblaslapack.

    diff -u include/slepcblaslapack.h:1.31 include/slepcblaslapack.h:1.31.4.1
    old new  
    9797#define LAPACKormlq_ SLEPC_BLASLAPACK(unmlq,UNMLQ)
    9898#endif
    9999
    100 #define LAPACKlamch_ SLEPC_BLASLAPACKREAL(lamch,LAMCH)
    101100#define LAPACKstevr_ SLEPC_BLASLAPACKREAL(stevr,STEVR)
    102101#define LAPACKbdsdc_ SLEPC_BLASLAPACKREAL(bdsdc,BDSDC)
    103102
    104103EXTERN_C_BEGIN
    105104
    106 EXTERN PetscReal LAPACKlamch_(const char*,PetscBLASInt);
    107105EXTERN PetscReal LAPACKlanhs_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt);
    108106EXTERN PetscReal LAPACKlange_(const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt);
    109107EXTERN void      LAPACKlaev2_(PetscScalar*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*);
  • include/slepcsvd.

    diff -u include/slepcsvd.h:1.26 include/slepcsvd.h:1.26.2.2
    old new  
    139139#endif
    140140EXTERN PetscErrorCode SVDRegisterDestroy(void);
    141141
     142PETSC_EXTERN_CXX_END
    142143#endif
  • include/slepcversion.

    diff -u include/slepcversion.h:1.13 include/slepcversion.h:1.13.2.7
    old new  
    1919#define SLEPC_VERSION_MAJOR      2
    2020#define SLEPC_VERSION_MINOR      3
    2121#define SLEPC_VERSION_SUBMINOR   3
    22 #define SLEPC_VERSION_PATCH      0
     22#define SLEPC_VERSION_PATCH      7
    2323#define SLEPC_VERSION_DATE       "June 1, 2007"
    24 #define SLEPC_VERSION_PATCH_DATE "June 1, 2007"
     24#define SLEPC_VERSION_PATCH_DATE "March 3, 2008"
    2525#define SLEPC_AUTHOR_INFO        "        The SLEPc Team\n\
    2626   slepc-maint@grycap.upv.es\n\
    2727 http://www.grycap.upv.es/slepc\n"
  • include/finclude/slepceps.

    diff -u include/finclude/slepceps.h:1.7 include/finclude/slepceps.h:1.7.4.1
    old new  
    2121#define EPSSUBSPACE  'subspace'
    2222#define EPSARNOLDI   'arnoldi'
    2323#define EPSLANCZOS   'lanczos'
     24#define EPSKRYLOVSCHUR 'krylovschur'
    2425#define EPSLAPACK    'lapack'
    2526#define EPSARPACK    'arpack'
    2627#define EPSBLZPACK   'blzpack'
    27 #define EPSPLANSO    'planso'
    2828#define EPSTRLAN     'trlan'
    29 #define EPSLOBPCG    'lobpcg'
     29#define EPSBLOPEX    'blopex'
     30#define EPSPRIMME    'primme'
    3031
    3132!  Convergence flags.
    3233!  They sould match the flags in $SLEPC_DIR/include/slepceps.h
     
    6667      parameter (EPS_SMALLEST_REAL          =  3)
    6768      parameter (EPS_LARGEST_IMAGINARY      =  4)
    6869      parameter (EPS_SMALLEST_IMAGINARY     =  5)
    69 
    70       integer EPS_MGS_ORTH
    71       integer EPS_CGS_ORTH
    72      
    73       parameter (EPS_MGS_ORTH               =  0)
    74       parameter (EPS_CGS_ORTH               =  1)
    75 
    76       integer EPS_ORTH_REFINE_NEVER
    77       integer EPS_ORTH_REFINE_IFNEEDED
    78       integer EPS_ORTH_REFINE_ALWAYS
    79 
    80       parameter (EPS_ORTH_REFINE_NEVER      =  0) 
    81       parameter (EPS_ORTH_REFINE_IFNEEDED   =  1) 
    82       parameter (EPS_ORTH_REFINE_ALWAYS     =  2) 
    8370       
    8471      integer EPSPOWER_SHIFT_CONSTANT
    8572      integer EPSPOWER_SHIFT_RAYLEIGH
     
    9481
    9582      parameter (EPS_ONE_SIDE               =  0)
    9683      parameter (EPS_TWO_SIDE               =  1)
     84     
     85      integer EPS_RITZ
     86      integer EPS_HARMONIC
     87      integer EPS_REFINED
     88      integer EPS_REFINED_HARMONIC
     89
     90      parameter (EPS_RITZ                   =  1)
     91      parameter (EPS_HARMONIC               =  2)
     92      parameter (EPS_REFINED                =  3)
     93      parameter (EPS_REFINED_HARMONIC       =  4)
    9794
    98       integer EPSLANCZOS_REORTHOG_NONE
     95      integer EPSLANCZOS_REORTHOG_LOCAL
    9996      integer EPSLANCZOS_REORTHOG_FULL
    10097      integer EPSLANCZOS_REORTHOG_SELECTIVE
    10198      integer EPSLANCZOS_REORTHOG_PERIODIC
    10299      integer EPSLANCZOS_REORTHOG_PARTIAL
    103100
    104       parameter (EPSLANCZOS_REORTHOG_NONE      =  0)
     101      parameter (EPSLANCZOS_REORTHOG_LOCAL      =  0)
    105102      parameter (EPSLANCZOS_REORTHOG_FULL      =  1)
    106103      parameter (EPSLANCZOS_REORTHOG_SELECTIVE =  2)
    107104      parameter (EPSLANCZOS_REORTHOG_PERIODIC  =  3)
    108105      parameter (EPSLANCZOS_REORTHOG_PARTIAL   =  4)
    109106
     107      integer EPSPRIMME_DYNAMIC
     108      integer EPSPRIMME_DEFAULT_MIN_TIME
     109      integer EPSPRIMME_DEFAULT_MIN_MATVECS
     110      integer EPSPRIMME_ARNOLDI
     111      integer EPSPRIMME_GD
     112      integer EPSPRIMME_GD_PLUSK
     113      integer EPSPRIMME_GD_OLSEN_PLUSK
     114      integer EPSPRIMME_JD_OLSEN_PLUSK
     115      integer EPSPRIMME_RQI
     116      integer EPSPRIMME_JDQR
     117      integer EPSPRIMME_JDQMR
     118      integer EPSPRIMME_JDQMR_ETOL
     119      integer EPSPRIMME_SUBSPACE_ITERATION
     120      integer EPSPRIMME_LOBPCG_ORTHOBASIS
     121      integer EPSPRIMME_LOBPCG_ORTHOBASIS_WINDOW
     122
     123      parameter (EPSPRIMME_DYNAMIC                  =  0)
     124      parameter (EPSPRIMME_DEFAULT_MIN_TIME         =  1)
     125      parameter (EPSPRIMME_DEFAULT_MIN_MATVECS      =  2)
     126      parameter (EPSPRIMME_ARNOLDI                  =  3)
     127      parameter (EPSPRIMME_GD                       =  4)
     128      parameter (EPSPRIMME_GD_PLUSK                 =  5)
     129      parameter (EPSPRIMME_GD_OLSEN_PLUSK           =  7)
     130      parameter (EPSPRIMME_JD_OLSEN_PLUSK           =  8)
     131      parameter (EPSPRIMME_RQI                      =  9)
     132      parameter (EPSPRIMME_JDQR                     = 10)
     133      parameter (EPSPRIMME_JDQMR                    = 11)
     134      parameter (EPSPRIMME_JDQMR_ETOL               = 12)
     135      parameter (EPSPRIMME_SUBSPACE_ITERATION       = 13)
     136      parameter (EPSPRIMME_LOBPCG_ORTHOBASIS        = 14)
     137      parameter (EPSPRIMME_LOBPCG_ORTHOBASIS_WINDOW = 15)
     138
     139      integer EPSPRIMME_NONE
     140      integer EPSPRIMME_DIAGONAL
     141
     142      parameter (EPSPRIMME_NONE               =  0)
     143      parameter (EPSPRIMME_DIAGONAL           =  1)
     144
    110145#endif
  • new file include/finclude/slepcip.h

    diff -u /dev/null include/finclude/slepcip.h:1.1
    - +  
     1!
     2!  Include file for Fortran use of the IP object in SLEPc
     3!
     4!
     5!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     6!     SLEPc - Scalable Library for Eigenvalue Problem Computations
     7!     Copyright (c) 2002-2007, Universidad Politecnica de Valencia, Spain
     8!
     9!     This file is part of SLEPc. See the README file for conditions of use
     10!     and additional information.
     11!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     12!
     13#if !defined(__SLEPCIP_H)
     14#define __SLEPCIP_H
     15
     16#define IP                PetscFortranAddr
     17
     18      integer IP_MGS_ORTH
     19      integer IP_CGS_ORTH
     20     
     21      parameter (IP_MGS_ORTH               =  0)
     22      parameter (IP_CGS_ORTH               =  1)
     23
     24      integer IP_ORTH_REFINE_NEVER
     25      integer IP_ORTH_REFINE_IFNEEDED
     26      integer IP_ORTH_REFINE_ALWAYS
     27
     28      parameter (IP_ORTH_REFINE_NEVER      =  0) 
     29      parameter (IP_ORTH_REFINE_IFNEEDED   =  1) 
     30      parameter (IP_ORTH_REFINE_ALWAYS     =  2) 
     31
     32      integer IP_MGS_ORTH
     33      integer IP_CGS_ORTH
     34
     35      parameter (IP_MGS_ORTH               =  0)
     36      parameter (IP_CGS_ORTH               =  1)
     37
     38#endif
  • include/finclude/slepcst.

    diff -u include/finclude/slepcst.h:1.5 include/finclude/slepcst.h:1.5.4.1
    old new  
    2929      parameter (STMATMODE_INPLACE       =  1)
    3030      parameter (STMATMODE_SHELL         =  2)
    3131
    32       integer STINNER_HERMITIAN
    33       integer STINNER_SYMMETRIC
    34       integer STINNER_B_HERMITIAN
    35       integer STINNER_B_SYMMETRIC
    36 
    37       parameter (STINNER_HERMITIAN       =  0)
    38       parameter (STINNER_SYMMETRIC       =  1)
    39       parameter (STINNER_B_HERMITIAN     =  2)
    40       parameter (STINNER_B_SYMMETRIC     =  3)
    41 
    4232#endif
  • new file include/finclude/slepcsvd.h

    diff -u /dev/null include/finclude/slepcsvd.h:1.2
    - +  
     1!
     2!  Include file for Fortran use of the SVD object in SLEPc
     3!
     4!
     5!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     6!     SLEPc - Scalable Library for Eigenvalue Problem Computations
     7!     Copyright (c) 2002-2007, Universidad Politecnica de Valencia, Spain
     8!
     9!     This file is part of SLEPc. See the README file for conditions of use
     10!     and additional information.
     11!  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     12!
     13#if !defined(__SLEPCSVD_H)
     14#define __SLEPCSVD_H
     15
     16#define SVD                PetscFortranAddr
     17#define SVDType            character*(80)
     18#define SVDConvergedReason integer
     19
     20#define SVDCROSS     'cross'
     21#define SVDCYCLIC    'cyclic'
     22#define SVDLAPACK    'lapack'
     23#define SVDLANCZOS   'lanczos'
     24#define SVDTRLANCZOS 'trlanczos'
     25
     26!  Convergence flags.
     27!  They sould match the flags in $SLEPC_DIR/include/slepcsvd.h
     28
     29      integer SVD_CONVERGED_TOL       
     30      integer SVD_DIVERGED_ITS
     31      integer SVD_DIVERGED_BREAKDOWN
     32      integer SVD_CONVERGED_ITERATING
     33
     34      parameter (SVD_CONVERGED_TOL          =  2)
     35      parameter (SVD_DIVERGED_ITS           = -3)
     36      parameter (SVD_DIVERGED_BREAKDOWN     = -4)
     37      parameter (SVD_CONVERGED_ITERATING    =  0)
     38
     39      integer SVD_TRANSPOSE_EXPLICIT
     40      integer SVD_TRANSPOSE_IMPLICIT
     41
     42      parameter (SVD_TRANSPOSE_EXPLICIT     =  0)
     43      parameter (SVD_TRANSPOSE_IMPLICIT     =  1)
     44     
     45      integer SVD_LARGEST
     46      integer SVD_SMALLEST
     47
     48      parameter (SVD_LARGEST                =  0)
     49      parameter (SVD_SMALLEST               =  1)
     50
     51#endif
  • src/eps/impls/primme/primmes.

    diff -u src/eps/impls/primme/primmes.c:1.20 src/eps/impls/primme/primmes.c:1.20.2.1
    old new  
    6767static void applyPreconditioner_PRIMME(void *in, void *out, int *blockSize, struct primme_params *primme);
    6868
    6969static void par_GlobalSumDouble(void *sendBuf, void *recvBuf, int *count, primme_params *primme) {
    70   MPI_Allreduce((double*)sendBuf, (double*)recvBuf, *count, MPI_DOUBLE, MPI_SUM, ((EPS)(primme->commInfo))->comm);
     70  PetscErrorCode ierr;
     71  ierr = MPI_Allreduce((double*)sendBuf, (double*)recvBuf, *count, MPI_DOUBLE, MPI_SUM, ((EPS)(primme->commInfo))->comm);CHKERRABORT(((EPS)(primme->commInfo))->comm,ierr);
    7172}
    7273
    7374#undef __FUNCT__ 
     
    8283
    8384  PetscFunctionBegin;
    8485
    85   MPI_Comm_size(eps->comm,&numProcs);
    86   MPI_Comm_rank(eps->comm,&procID);
     86  ierr = MPI_Comm_size(eps->comm,&numProcs);CHKERRQ(ierr);
     87  ierr = MPI_Comm_rank(eps->comm,&procID);CHKERRQ(ierr);
    8788 
    8889  /* Check some constraints and set some default values */
    8990  ierr = VecGetSize(eps->vec_initial,&N);CHKERRQ(ierr);
     
    331332  if (flg) {ierr = EPSPRIMMESetBlockSize(eps,op);CHKERRQ(ierr);}
    332333  op = 0;
    333334  ierr = PetscOptionsEList("-eps_primme_method","set method for solving the eigenproblem",
    334                            "EPSPRIMMESetMethod",methodList,15,methodList[0],&op,&flg); CHKERRQ(ierr);
     335                           "EPSPRIMMESetMethod",methodList,15,methodList[1],&op,&flg); CHKERRQ(ierr);
    335336  if (flg) {ierr = EPSPRIMMESetMethod(eps, methodN[op]);CHKERRQ(ierr);}
    336337  ierr = PetscOptionsEList("-eps_primme_precond","set preconditioner type",
    337338                           "EPSPRIMMESetPrecond",precondList,2,precondList[0],&op,&flg); CHKERRQ(ierr);
     
    456457
    457458  PetscFunctionBegin;
    458459
    459   if (method == PETSC_DEFAULT) ops->method = DYNAMIC;
     460  if (method == PETSC_DEFAULT) ops->method = DEFAULT_MIN_TIME;
    460461  else ops->method = (primme_preset_method)method;
    461462
    462463  PetscFunctionReturn(0);
     
    484485.  -eps_primme_set_method - Sets the method for the PRIMME library.
    485486
    486487   Note:
    487    If not set, the method defaults to EPSPRIMME_DYNAMIC.
     488   If not set, the method defaults to EPSPRIMME_DEFAULT_MIN_TIME.
    488489
    489490   Level: advanced
    490491
     
    690691  primme_initialize(&primme->primme);
    691692  primme->primme.matrixMatvec = multMatvec_PRIMME;
    692693  primme->primme.globalSumDouble = par_GlobalSumDouble;
    693   primme->method = DYNAMIC;
     694  primme->method = EPSPRIMME_DEFAULT_MIN_TIME;
    694695  ierr = PetscObjectComposeFunctionDynamic((PetscObject)eps,"EPSPRIMMESetBlockSize_C","EPSPRIMMESetBlockSize_PRIMME",EPSPRIMMESetBlockSize_PRIMME);CHKERRQ(ierr);
    695696  ierr = PetscObjectComposeFunctionDynamic((PetscObject)eps,"EPSPRIMMESetMethod_C","EPSPRIMMESetMethod_PRIMME",EPSPRIMMESetMethod_PRIMME);CHKERRQ(ierr);
    696697  ierr = PetscObjectComposeFunctionDynamic((PetscObject)eps,"EPSPRIMMESetPrecond_C","EPSPRIMMESetPrecond_PRIMME",EPSPRIMMESetPrecond_PRIMME);CHKERRQ(ierr);
  • src/eps/interface/basic.

    diff -u src/eps/interface/basic.c:1.31 src/eps/interface/basic.c:1.31.2.1
    old new  
    208208  PetscValidPointer(outeps,2);
    209209  *outeps = 0;
    210210
    211   PetscHeaderCreate(eps,_p_EPS,struct _EPSOps,EPS_COOKIE,-1,"EPS",comm,EPSDestroy,EPSView);
     211  ierr = PetscHeaderCreate(eps,_p_EPS,struct _EPSOps,EPS_COOKIE,-1,"EPS",comm,EPSDestroy,EPSView);CHKERRQ(ierr);
    212212  *outeps = eps;
    213213
    214214  eps->bops->publish   = EPSPublish_Petsc;
  • src/eps/interface/dense.

    diff -u src/eps/interface/dense.c:1.44 src/eps/interface/dense.c:1.44.4.1
    old new  
    651651@*/
    652652PetscErrorCode EPSDenseTridiagonal(int n,PetscScalar *A,int lda,PetscReal *w,PetscScalar *V)
    653653{
    654 #if defined(SLEPC_MISSING_LAPACK_DSTEVR)
     654#if defined(SLEPC_MISSING_LAPACK_STEVR)
    655655  PetscFunctionBegin;
    656   SETERRQ(PETSC_ERR_SUP,"DSTEVR - Lapack routine is unavailable.");
     656  SETERRQ(PETSC_ERR_SUP,"STEVR - Lapack routine is unavailable.");
    657657#else
    658658  PetscErrorCode ierr;
    659659  PetscReal      abstol = 0.0,vl,vu,*D,*E,*work;
  • src/examples/

    diff -u src/examples/makefile:1.25 src/examples/makefile:1.25.4.1
    old new  
    9999#------------------------------------------------------------------------------------
    100100
    101101runex1_1:
    102         -@${MPIEXEC} -np 1 ex1 > ex1_1.tmp 2>&1;          \
     102        -@${MPIEXEC} -np 1 ./ex1 > ex1_1.tmp 2>&1;        \
    103103           if (${DIFF} output/ex1_1.out ex1_1.tmp) then true; \
    104104           else echo "Possible problem with ex1_1, diffs above"; fi; \
    105105           ${RM} -f ex1_1.tmp
    106106
     107testex1: ex1.PETSc
     108        @if [ "${PETSC_WITH_BATCH}" != "" ]; then \
     109           echo "Running with batch filesystem; to test run src/examples/ex1 with" ; \
     110           echo "your systems batch system"; \
     111        else \
     112           ${MPIEXEC} -np 1 ./ex1 > ex1_1.tmp 2>&1; \
     113           if (${DIFF} output/ex1_1.out ex1_1.tmp > /dev/null 2>&1) then \
     114           echo "C/C++ example src/examples/ex1 run successfully with 1 MPI process"; \
     115           else echo "Possible error running C/C++ src/examples/ex1 with 1 MPI process"; \
     116           cat ex1_1.tmp; fi; \
     117           ${RM} -f ex1_1.tmp; fi
     118
    107119runex1f_1:
    108         -@${MPIEXEC} -np 1 ex1f > ex1f_1.tmp 2>&1;        \
     120        -@${MPIEXEC} -np 1 ./ex1f > ex1f_1.tmp 2>&1;      \
    109121           if (${DIFF} output/ex1f_1.out ex1f_1.tmp) then true; \
    110122           else echo "Possible problem with ex1f_1, diffs above"; fi; \
    111123           ${RM} -f ex1f_1.tmp
    112124
     125testex1f: ex1f.PETSc
     126        @if [ "${PETSC_WITH_BATCH}" != "" ]; then \
     127           echo "Running with batch filesystem; to test run src/examples/ex1f with" ; \
     128           echo "your systems batch system"; \
     129        else \
     130           ${MPIEXEC} -np 1 ./ex1f > ex1f_1.tmp 2>&1; \
     131           if (${DIFF} output/ex1f_1.out ex1f_1.tmp > /dev/null 2>&1) then \
     132           echo "Fortran example src/examples/ex1f run successfully with 1 MPI process"; \
     133           else echo "Possible error running Fortran src/examples/ex1f with 1 MPI process"; \
     134           cat ex1f_1.tmp; fi; \
     135           ${RM} -f ex1f_1.tmp; fi
     136
    113137runex2_1:
    114         -@${MPIEXEC} -np 1 ex2 > ex2_1.tmp 2>&1;          \
     138        -@${MPIEXEC} -np 1 ./ex2 > ex2_1.tmp 2>&1;        \
    115139           if (${DIFF} output/ex2_1.out ex2_1.tmp) then true; \
    116140           else echo "Possible problem with ex2_1, diffs above"; fi; \
    117141           ${RM} -f ex2_1.tmp
    118142
    119143runex3_1:
    120         -@${MPIEXEC} -np 1 ex3 > ex3_1.tmp 2>&1;          \
     144        -@${MPIEXEC} -np 1 ./ex3 > ex3_1.tmp 2>&1;        \
    121145           if (${DIFF} output/ex3_1.out ex3_1.tmp) then true; \
    122146           else echo "Possible problem with ex3_1, diffs above"; fi; \
    123147           ${RM} -f ex3_1.tmp
    124148
    125149runex4_1:
    126         -@${MPIEXEC} -np 1 ex4 -file ${SLEPC_DIR}/src/mat/examples/rdb200.petsc > ex4_1.tmp 2>&1;         \
     150        -@${MPIEXEC} -np 1 ./ex4 -file ${SLEPC_DIR}/src/mat/examples/rdb200.petsc > ex4_1.tmp 2>&1;       \
    127151           if (${DIFF} output/ex4_1.out ex4_1.tmp) then true; \
    128152           else echo "Possible problem with ex4_1, diffs above"; fi; \
    129153           ${RM} -f ex4_1.tmp
    130154
    131155runex5_1:
    132         -@${MPIEXEC} -np 1 ex5 -st_shift 1 > ex5_1.tmp 2>&1;      \
     156        -@${MPIEXEC} -np 1 ./ex5 -st_shift 1 > ex5_1.tmp 2>&1;    \
    133157           if (${DIFF} output/ex5_1.out ex5_1.tmp) then true; \
    134158           else echo "Possible problem with ex5_1, diffs above"; fi; \
    135159           ${RM} -f ex5_1.tmp
    136160
    137161runex5_2:
    138         -@${MPIEXEC} -np 2 ex5 -st_shift 1 > ex5_2.tmp 2>&1;      \
     162        -@${MPIEXEC} -np 2 ./ex5 -st_shift 1 > ex5_2.tmp 2>&1;    \
    139163           if (${DIFF} output/ex5_1.out ex5_2.tmp) then true; \
    140164           else echo "Possible problem with ex5_2, diffs above"; fi; \
    141165           ${RM} -f ex5_2.tmp
    142166
    143167runex6f_1:
    144         -@${MPIEXEC} -np 1 ex6f -st_shift 1 -eps_max_it 1000 -eps_ncv 12 -eps_tol 1e-5 > ex6f_1.tmp 2>&1;         \
     168        -@${MPIEXEC} -np 1 ./ex6f -st_shift 1 -eps_max_it 1000 -eps_ncv 12 -eps_tol 1e-5 > ex6f_1.tmp 2>&1;       \
    145169           if (${DIFF} output/ex6f_1.out ex6f_1.tmp) then true; \
    146170           else echo "Possible problem with ex6f_1, diffs above"; fi; \
    147171           ${RM} -f ex6f_1.tmp
    148172
    149173runex7_1:
    150         -@${MPIEXEC} -np 1 ex7 -f1 ${SLEPC_DIR}/src/mat/examples/bfw62a.petsc -f2 ${SLEPC_DIR}/src/mat/examples/bfw62b.petsc > ex7_1.tmp 2>&1;    \
     174        -@${MPIEXEC} -np 1 ./ex7 -f1 ${SLEPC_DIR}/src/mat/examples/bfw62a.petsc -f2 ${SLEPC_DIR}/src/mat/examples/bfw62b.petsc > ex7_1.tmp 2>&1;          \
    151175           if (${DIFF} output/ex7_1.out ex7_1.tmp) then true; \
    152176           else echo "Possible problem with ex7_1, diffs above"; fi; \
    153177           ${RM} -f ex7_1.tmp
    154178
    155179runex8_1:
    156         -@${MPIEXEC} -np 1 ex8 > ex8_1.tmp 2>&1;          \
     180        -@${MPIEXEC} -np 1 ./ex8 > ex8_1.tmp 2>&1;        \
    157181           if (${DIFF} output/ex8_1.out ex8_1.tmp) then true; \
    158182           else echo "Possible problem with ex8_1, diffs above"; fi; \
    159183           ${RM} -f ex8_1.tmp
    160184
    161185runex9_1:
    162         -@${MPIEXEC} -np 1 ex9 > ex9_1.tmp 2>&1;          \
     186        -@${MPIEXEC} -np 1 ./ex9 > ex9_1.tmp 2>&1;        \
    163187           if (${DIFF} output/ex9_1.out ex9_1.tmp) then true; \
    164188           else echo "Possible problem with ex9_1, diffs above"; fi; \
    165189           ${RM} -f ex9_1.tmp
    166190
    167191runex10_1:
    168         -@${MPIEXEC} -np 1 ex10 > ex10_1.tmp 2>&1;        \
     192        -@${MPIEXEC} -np 1 ./ex10 > ex10_1.tmp 2>&1;      \
    169193           if (${DIFF} output/ex10_1.out ex10_1.tmp) then true; \
    170194           else echo "Possible problem with ex10_1, diffs above"; fi; \
    171195           ${RM} -f ex10_1.tmp
    172196
    173197runex11_1:
    174         -@${MPIEXEC} -np 1 ex11 > ex11_1.tmp 2>&1;        \
     198        -@${MPIEXEC} -np 1 ./ex11 > ex11_1.tmp 2>&1;      \
    175199           if (${DIFF} output/ex11_1.out ex11_1.tmp) then true; \
    176200           else echo "Possible problem with ex11_1, diffs above"; fi; \
    177201           ${RM} -f ex11_1.tmp
    178202
    179203runex12_1:
    180         -@${MPIEXEC} -np 1 ex12 -eps_type power -st_shift 1 -eps_nev 2 > ex12_1.tmp 2>&1;         \
     204        -@${MPIEXEC} -np 1 ./ex12 -eps_type power -st_shift 1 -eps_nev 2 > ex12_1.tmp 2>&1;       \
    181205           if (${DIFF} output/ex12_1.out ex12_1.tmp) then true; \
    182206           else echo "Possible problem with ex12_1, diffs above"; fi; \
    183207           ${RM} -f ex12_1.tmp
    184208
    185209runex13_1:
    186         -@${MPIEXEC} -np 1 ex13 > ex13_1.tmp 2>&1;        \
     210        -@${MPIEXEC} -np 1 ./ex13 > ex13_1.tmp 2>&1;      \
    187211           if (${DIFF} output/ex13_1.out ex13_1.tmp) then true; \
    188212           else echo "Possible problem with ex13_1, diffs above"; fi; \
    189213           ${RM} -f ex13_1.tmp
    190214
    191215runex14_1:
    192         -@${MPIEXEC} -np 1 ex14 -file ${SLEPC_DIR}/src/mat/examples/rdb200.petsc > ex14_1.tmp 2>&1;       \
     216        -@${MPIEXEC} -np 1 ./ex14 -file ${SLEPC_DIR}/src/mat/examples/rdb200.petsc > ex14_1.tmp 2>&1;     \
    193217           if (${DIFF} output/ex14_1.out ex14_1.tmp) then true; \
    194218           else echo "Possible problem with ex14_1, diffs above"; fi; \
    195219           ${RM} -f ex14_1.tmp
    196220
    197221runex15_1:
    198         -@${MPIEXEC} -np 1 ex15 > ex15_1.tmp 2>&1;        \
     222        -@${MPIEXEC} -np 1 ./ex15 > ex15_1.tmp 2>&1;      \
    199223           if (${DIFF} output/ex15_1.out ex15_1.tmp) then true; \
    200224           else echo "Possible problem with ex15_1, diffs above"; fi; \
    201225           ${RM} -f ex15_1.tmp
  • src/ip/ipbasic.

    diff -u src/ip/ipbasic.c:1.9 src/ip/ipbasic.c:1.9.4.1
    old new  
    101101
    102102  PetscFunctionBegin;
    103103  PetscValidPointer(newip,2);
    104   PetscHeaderCreate(ip,_p_IP,struct _IPOps,IP_COOKIE,-1,"IP",comm,IPDestroy,IPView);
     104  ierr = PetscHeaderCreate(ip,_p_IP,struct _IPOps,IP_COOKIE,-1,"IP",comm,IPDestroy,IPView);CHKERRQ(ierr);
    105105  *newip            = ip;
    106106  ip->orthog_type   = IP_CGS_ORTH;
    107107  ip->orthog_ref    = IP_ORTH_REFINE_IFNEEDED;
  • src/ip/ipdot.

    diff -u src/ip/ipdot.c:1.6 src/ip/ipdot.c:1.6.4.1
    old new  
    4848  PetscValidHeaderSpecific(x,VEC_COOKIE,2);
    4949  PetscValidPointer(norm,3);
    5050 
    51   ierr = IPInnerProduct(ip,x,x,&p);CHKERRQ(ierr);
    52 
    53   if (PetscAbsScalar(p)<PETSC_MACHINE_EPSILON)
    54     PetscInfo(ip,"Zero norm, either the vector is zero or a semi-inner product is being used\n");
    55 
     51  if (!ip->matrix && ip->bilinear_form == IPINNER_HERMITIAN) {
     52    ierr = VecNorm(x,NORM_2,norm);CHKERRQ(ierr);
     53  } else {
     54    ierr = IPInnerProduct(ip,x,x,&p);CHKERRQ(ierr);
     55    if (PetscAbsScalar(p)<PETSC_MACHINE_EPSILON)
     56      PetscInfo(ip,"Zero norm, either the vector is zero or a semi-inner product is being used\n");
    5657#if defined(PETSC_USE_COMPLEX)
    57   if (PetscRealPart(p)<0.0 || PetscAbsReal(PetscImaginaryPart(p))>PETSC_MACHINE_EPSILON)
    58      SETERRQ(1,"IPNorm: The inner product is not well defined");
    59   *norm = PetscSqrtScalar(PetscRealPart(p));
     58    if (PetscRealPart(p)<0.0 || PetscAbsReal(PetscImaginaryPart(p))>PETSC_MACHINE_EPSILON)
     59       SETERRQ(1,"IPNorm: The inner product is not well defined");
     60    *norm = PetscSqrtScalar(PetscRealPart(p));
    6061#else
    61   if (p<0.0) SETERRQ(1,"IPNorm: The inner product is not well defined");
    62   *norm = PetscSqrtScalar(p);
     62    if (p<0.0) SETERRQ(1,"IPNorm: The inner product is not well defined");
     63    *norm = PetscSqrtScalar(p);
    6364#endif
     65  }
    6466
    6567  PetscFunctionReturn(0);
    6668}
     
    9496  PetscValidHeaderSpecific(x,VEC_COOKIE,2);
    9597  PetscValidPointer(norm,3);
    9698 
    97   ierr = IPInnerProductBegin(ip,x,x,&p);CHKERRQ(ierr);
     99  if (!ip->matrix && ip->bilinear_form == IPINNER_HERMITIAN) {
     100    ierr = VecNormBegin(x,NORM_2,norm);CHKERRQ(ierr);
     101  } else {
     102    ierr = IPInnerProductBegin(ip,x,x,&p);CHKERRQ(ierr);
     103  }
    98104
    99105  PetscFunctionReturn(0);
    100106}
     
    130136  PetscValidHeaderSpecific(x,VEC_COOKIE,2);
    131137  PetscValidPointer(norm,3);
    132138 
    133   ierr = IPInnerProductEnd(ip,x,x,&p);CHKERRQ(ierr);
    134 
    135   if (PetscAbsScalar(p)<PETSC_MACHINE_EPSILON)
    136     PetscInfo(ip,"Zero norm, either the vector is zero or a semi-inner product is being used\n");
     139  if (!ip->matrix && ip->bilinear_form == IPINNER_HERMITIAN) {
     140    ierr = VecNormEnd(x,NORM_2,norm);CHKERRQ(ierr);
     141  } else {
     142    ierr = IPInnerProductEnd(ip,x,x,&p);CHKERRQ(ierr);
     143    if (PetscAbsScalar(p)<PETSC_MACHINE_EPSILON)
     144      PetscInfo(ip,"Zero norm, either the vector is zero or a semi-inner product is being used\n");
    137145
    138146#if defined(PETSC_USE_COMPLEX)
    139   if (PetscRealPart(p)<0.0 || PetscAbsReal(PetscImaginaryPart(p))>PETSC_MACHINE_EPSILON)
    140      SETERRQ(1,"IPNorm: The inner product is not well defined");
    141   *norm = PetscSqrtScalar(PetscRealPart(p));
     147    if (PetscRealPart(p)<0.0 || PetscAbsReal(PetscImaginaryPart(p))>PETSC_MACHINE_EPSILON)
     148       SETERRQ(1,"IPNorm: The inner product is not well defined");
     149    *norm = PetscSqrtScalar(PetscRealPart(p));
    142150#else
    143   if (p<0.0) SETERRQ(1,"IPNorm: The inner product is not well defined");
    144   *norm = PetscSqrtScalar(p);
     151    if (p<0.0) SETERRQ(1,"IPNorm: The inner product is not well defined");
     152    *norm = PetscSqrtScalar(p);
    145153#endif
     154  }
    146155
    147156  PetscFunctionReturn(0);
    148157}
  • src/st/impls/sinvert/sinvert.

    diff -u src/st/impls/sinvert/sinvert.c:1.29 src/st/impls/sinvert/sinvert.c:1.29.4.1
    old new  
    117117    ierr = KSPSetOperators(st->ksp,st->mat,st->mat,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
    118118    break;
    119119  default:
    120     ierr = MatDuplicate(st->A,MAT_COPY_VALUES,&st->mat);CHKERRQ(ierr);
    121120    if (st->sigma != 0.0) {
     121      ierr = MatDuplicate(st->A,MAT_COPY_VALUES,&st->mat);CHKERRQ(ierr);
    122122      if (st->B) {
    123123        ierr = MatAXPY(st->mat,-st->sigma,st->B,st->str);CHKERRQ(ierr);
    124124      } else {
  • src/st/interface/stfunc.

    diff -u src/st/interface/stfunc.c:1.32 src/st/interface/stfunc.c:1.32.2.1
    old new  
    137137  PetscValidPointer(newst,2);
    138138  *newst = 0;
    139139
    140   PetscHeaderCreate(st,_p_ST,struct _STOps,ST_COOKIE,-1,"ST",comm,STDestroy,STView);
     140  ierr = PetscHeaderCreate(st,_p_ST,struct _STOps,ST_COOKIE,-1,"ST",comm,STDestroy,STView);CHKERRQ(ierr);
    141141  st->bops->publish       = STPublish_Petsc;
    142142  ierr = PetscMemzero(st->ops,sizeof(struct _STOps));CHKERRQ(ierr);
    143143
  • src/st/interface/stsolve.

    diff -u src/st/interface/stsolve.c:1.46 src/st/interface/stsolve.c:1.46.4.1
    old new  
    6464   Output Parameter:
    6565.  B - output matrix
    6666
     67   Note:
     68   The output matrix B must be destroyed after use.
     69   
    6770   Level: developer
    6871@*/
    6972PetscErrorCode STGetBilinearForm(ST st,Mat *B)
     
    8184#define __FUNCT__ "STGetBilinearForm_Default"
    8285PetscErrorCode STGetBilinearForm_Default(ST st,Mat *B)
    8386{
     87  PetscErrorCode ierr;
     88
    8489  PetscFunctionBegin;
    8590  *B = st->B;
     91  if (*B) {
     92    ierr =  PetscObjectReference((PetscObject)*B);CHKERRQ(ierr);
     93  }
    8694  PetscFunctionReturn(0);
    8795}
    8896
  • src/svd/impls/cross/cross.

    diff -u src/svd/impls/cross/cross.c:1.9 src/svd/impls/cross/cross.c:1.9.2.1
    old new  
    118118
    119119  ierr = EPSSetOperators(cross->eps,cross->mat,PETSC_NULL);CHKERRQ(ierr);
    120120  ierr = EPSSetProblemType(cross->eps,EPS_HEP);CHKERRQ(ierr);
     121  ierr = EPSSetWhichEigenpairs(cross->eps,svd->which == SVD_LARGEST ? EPS_LARGEST_REAL : EPS_SMALLEST_REAL);CHKERRQ(ierr);
    121122  ierr = EPSSetDimensions(cross->eps,svd->nsv,svd->ncv);CHKERRQ(ierr);
    122123  ierr = EPSSetTolerances(cross->eps,svd->tol,svd->max_it);CHKERRQ(ierr);
    123124  ierr = EPSSetUp(cross->eps);CHKERRQ(ierr);
     
    136137  PetscScalar    sigma;
    137138 
    138139  PetscFunctionBegin;
    139   ierr = EPSSetWhichEigenpairs(cross->eps,svd->which == SVD_LARGEST ? EPS_LARGEST_REAL : EPS_SMALLEST_REAL);CHKERRQ(ierr);
    140140  ierr = EPSSetInitialVector(cross->eps,svd->vec_initial);CHKERRQ(ierr);
    141141  ierr = EPSSolve(cross->eps);CHKERRQ(ierr);
    142142  ierr = EPSGetConverged(cross->eps,&svd->nconv);CHKERRQ(ierr);
  • src/svd/impls/cyclic/cyclic.

    diff -u src/svd/impls/cyclic/cyclic.c:1.10 src/svd/impls/cyclic/cyclic.c:1.10.2.1
    old new  
    133133
    134134  ierr = EPSSetOperators(cyclic->eps,cyclic->mat,PETSC_NULL);CHKERRQ(ierr);
    135135  ierr = EPSSetProblemType(cyclic->eps,EPS_HEP);CHKERRQ(ierr);
     136  ierr = EPSSetWhichEigenpairs(cyclic->eps,svd->which == SVD_LARGEST ? EPS_LARGEST_REAL : EPS_SMALLEST_MAGNITUDE);CHKERRQ(ierr);
    136137  ierr = EPSSetDimensions(cyclic->eps,svd->nsv,svd->ncv);CHKERRQ(ierr);
    137138  ierr = EPSSetTolerances(cyclic->eps,svd->tol,svd->max_it);CHKERRQ(ierr);
    138139  ierr = EPSSetUp(cyclic->eps);CHKERRQ(ierr);
     
    163164  VecScatter     vsU,vsV;
    164165 
    165166  PetscFunctionBegin;
    166   ierr = EPSSetWhichEigenpairs(cyclic->eps,svd->which == SVD_LARGEST ? EPS_LARGEST_REAL : EPS_SMALLEST_MAGNITUDE);CHKERRQ(ierr);
    167167  ierr = EPSSolve(cyclic->eps);CHKERRQ(ierr);
    168168  ierr = EPSGetConverged(cyclic->eps,&svd->nconv);CHKERRQ(ierr);
    169169  ierr = EPSGetIterationNumber(cyclic->eps,&svd->its);CHKERRQ(ierr);
  • src/svd/interface/svdbasic.

    diff -u src/svd/interface/svdbasic.c:1.29 src/svd/interface/svdbasic.c:1.29.2.1
    old new  
    189189  PetscFunctionBegin;
    190190  PetscValidPointer(outsvd,2);
    191191
    192   PetscHeaderCreate(svd,_p_SVD,struct _SVDOps,SVD_COOKIE,-1,"SVD",comm,SVDDestroy,SVDView);
     192  ierr = PetscHeaderCreate(svd,_p_SVD,struct _SVDOps,SVD_COOKIE,-1,"SVD",comm,SVDDestroy,SVDView);CHKERRQ(ierr);
    193193  *outsvd = svd;
    194194
    195195  svd->bops->publish   = SVDPublish_Petsc;
  • src/svd/interface/svdopts.

    diff -u src/svd/interface/svdopts.c:1.17 src/svd/interface/svdopts.c:1.17.4.1
    old new  
    288288  switch (which) {
    289289    case SVD_LARGEST:
    290290    case SVD_SMALLEST:
    291       svd->which = which;
     291      if (svd->which != which) {
     292        svd->setupcalled = 0;
     293        svd->which = which;
     294      }
    292295      break;
    293296  default:
    294297    SETERRQ(PETSC_ERR_ARG_OUTOFRANGE,"Invalid 'which' parameter");   
  • src/sys/ftn-custom/zslepc_start.

    diff -u src/sys/ftn-custom/zslepc_start.c:1.8 src/sys/ftn-custom/zslepc_start.c:1.8.4.1
    old new  
    1919
    2020extern PetscTruth SlepcBeganPetsc;
    2121
    22 static PetscTruth SlepcInitializeCalled=PETSC_FALSE;
     22extern PetscTruth SlepcInitializeCalled;
    2323
    2424#ifdef PETSC_HAVE_FORTRAN_CAPS
    2525#define petscinitialize_              PETSCINITIALIZE