[petsc-users] Zero pivot in LU factorisation

Jose E. Roman jroman at dsic.upv.es
Thu Jul 25 06:34:03 CDT 2013


El 25/07/2013, a las 13:30, Toby escribió:

> Hi Matt,
> 
> Thanks for the speedy reply. I tried using the options you suggested: 
> 
> mpiexec ./ex7 -f1 LHS-N7-M40-Re0.0-b0.1-Wi5.0-amp0.02.petsc  -f2 RHS-N7-M40-Re0.0-b0.1-Wi5.0-amp0.02.petsc -st_pc_factor_shift_type NONZERO -st_pc_shift_type_amount 1
> 
> But I still get the warnings:
> Option left: name:-st_pc_factor_shift_type value: NONZERO
> Option left: name:-st_pc_shift_type_amount value: 1

By default, ST is using PCREDUNDANT. In order to use the above options you must change it to e.g. PCLU.
That is, add -st_pc_type lu

Jose


> 
> I have tried it with just the -st_pc_type jacobi and -st_ksp_view. This gives me some eigenvalues, but I don't believe them (they do not appear on the spectrum which I solve using LAPACK where all eigenvalues have a real part less than 0). The output was very large, but consists of repetitions of this:
> 
> mpiexec ./ex7 -f1 LHS-N7-M40-Re0.0-b0.1-Wi5.0-amp0.02.petsc  -f2 RHS-N7-M40-Re0.0-b0.1-Wi5.0-amp0.02.petsc -st_pc_type jacobi -st_ksp_view 
> 
> Generalized eigenproblem stored in file.
> 
>  Reading COMPLEX matrices from binary files...
> KSP Object:(st_) 1 MPI processes
>   type: preonly
>   maximum iterations=10000, initial guess is zero
>   tolerances:  relative=1e-08, absolute=1e-50, divergence=10000
>   left preconditioning
>   using NONE norm type for convergence test
> PC Object:(st_) 1 MPI processes
>   type: jacobi
>   linear system matrix = precond matrix:
>   Matrix Object:   1 MPI processes
>     type: seqaij
>     rows=6000, cols=6000
>     total: nonzeros=3600, allocated nonzeros=3600
>     total number of mallocs used during MatSetValues calls =0
>       using I-node routines: found 4080 nodes, limit used is 5
> 
> ...
> 
>  Number of iterations of the method: 189
>  Number of linear iterations of the method: 1520
>  Number of requested eigenvalues: 1
>  Stopping condition: tol=1e-08, maxit=750
>  Number of converged approximate eigenpairs: 2
> 
>            k          ||Ax-kBx||/||kx||
>    ----------------- ------------------
>   1388.774454+0.001823 i     0.751726
>   1388.774441+0.001820 i     0.912665
> 
> 
> Thanks again,
> Toby



More information about the petsc-users mailing list