[petsc-users] Interpreting ksp_view
Barry Smith
bsmith at mcs.anl.gov
Thu Jun 30 16:43:28 CDT 2011
Aldo,
This is a bug. The allocated number was not multipled by the block size squared. Because of the this the compute unneeded number was garbage. We fixed this a while ago in petsc-dev (yes it should have been fixed as a patch for 3.1 but that didn't happen.)
Barry
On Jun 30, 2011, at 8:17 AM, Aldo Bonfiglioli wrote:
> Dear all,
> I have a doubt concerning the interpretation of the output from -vec_view.
> I am using ILU(k) on a BAIJ matrix; the run is uni-processor.
>> KSP Object:
>> type: gmres
>> GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement
>> GMRES: happy breakdown tolerance 1e-30
>> maximum iterations=10000, initial guess is zero
>> tolerances: relative=1e-05, absolute=1e-50, divergence=1e+10
>> left preconditioning
>> using PRECONDITIONED norm type for convergence test
>> PC Object:
>> type: ilu
>> ILU: out-of-place factorization
>> ILU: Reusing fill from past factorization
>> ILU: Reusing reordering from past factorization
>> 1 level of fill
>> tolerance for zero pivot 1e-12
>> using diagonal shift to prevent zero pivot
>> matrix ordering: natural
>> factor fill ratio given 1.30284, needed 1.30284
>> Factored matrix follows:
>> Matrix Object:
>> type=seqbaij, rows=52995, cols=52995
>> package used to perform factorization: petsc
>> total: nonzeros=2398825, allocated nonzeros=95953
>> block size is 5
>> [0] PetscCommDuplicate(): returning tag 1073741814
>> linear system matrix = precond matrix:
>> Matrix Object:
>> type=seqbaij, rows=52995, cols=52995
>> total: nonzeros=1841225, allocated nonzeros=73649
>> block size is 5
> I have set the fill ratio and this is aknowledged.
> I do NOT understand why the nof allocated nonzeros does NOT match
> the nonzeros; this applies to both the A matrix and its ILU(k) preconditioner
> the ratio allocated nonzeros/nonzeros = 25 = blocksize^2 in both cases.
> Is there a bs*bs factor missing or am I misinterpreting the output?
> If a look at the MatInfo structure of the preconditioner
>> info = 1 25.000000000000000
>> info = 2 95953.000000000000
>> info = 3 2398825.0000000000
>> info = 4 -2302872.0000000000
>> info = 5 19576580.000000000
>> info = 6 0.0000000000000000
>> info = 7 0.0000000000000000
>> info = 8 1.3028418580021452
>> info = 9 1.3028418580021452
>> info = 10 0.0000000000000000
> a negative number of nz_unneeded seems to indicate that not enough memory has been provided.
> on the other hand, the -info option seems to confirm that the linear system matrix had been correctly pre-allocated
>> [0] MatAssemblyEnd_SeqBAIJ(): Matrix size: 52995 X 52995, block size 5; storage space: 0 unneeded, 1841225 used
>> [0] MatAssemblyEnd_SeqBAIJ(): Number of mallocs during MatSetValues is 0
> Thanks,
> Aldo
>
>
More information about the petsc-users
mailing list