problems with KSPComputeEigenvalues
Barry Smith
bsmith at mcs.anl.gov
Tue Jul 15 15:23:27 CDT 2008
From the manual page:
Notes:
The number of eigenvalues estimated depends on the size of the
Krylov space
generated during the KSPSolve() ; for example, with
CG it corresponds to the number of CG iterations, for GMRES it is
the number
of GMRES iterations SINCE the last restart. Any extra space in r[]
and c[]
will be ignored.
Likely you just have n too small by 1 or something, just make n and
the sizes of
realpart and complex part a bit longer.
Barry
On Jul 15, 2008, at 2:44 PM, mafunk at nmsu.edu wrote:
> Hi,
>
> i am trying to get some idea on the spectrum of my system. In order
> to do
> that i am calling KSPSetComputeEigenvalues right before calling
> KSPSetUp.
> Right after the call to KSPSolve i call KSPComputeEigenvalues as such:
>
> ...
>
>
> PetscInt n = -1;
> PetscReal * realpart;
> PetscReal * complexpart;
> PetscInt * neig;
>
> KSPComputeEigenvalues(m_ksp, n, realpart, complexpart, neig);
>
> ...
>
> (I am not sure whether i have to allocate the memory for the arrays,
> however, i tried that and it made no difference).
>
> Anyway, the issue is when it enters the KSPComputeEigenvalues call.
> The error i get is:
>
> ...
>
> [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> [0]PETSC ERROR: Nonconforming object sizes!
> [0]PETSC ERROR: Not enough room in work space r and c for eigenvalues!
>
> ...
>
> What does that mean/how do i debug that? I.e. am i doing something
> wrong
> in terms of usage?
>
>
> thanks
> matt
>
More information about the petsc-users
mailing list