[petsc-users] Mat/Vec with empty ranks

Florian Lindner mailinglists at xgm.de
Tue Oct 3 21:27:41 CDT 2017


Am 03.10.2017 um 16:05 schrieb Matthew Knepley:
> On Mon, Oct 2, 2017 at 10:11 PM, Florian Lindner <mailinglists at xgm.de <mailto:mailinglists at xgm.de>> wrote:
> 
> 
> 
>     Am 02.10.2017 um 21:04 schrieb Matthew Knepley:
>     > On Mon, Oct 2, 2017 at 6:21 AM, Florian Lindner <mailinglists at xgm.de <mailto:mailinglists at xgm.de>
>     <mailto:mailinglists at xgm.de <mailto:mailinglists at xgm.de>>> wrote:
>     >
>     >     Hello,
>     >
>     >     I have a matrix and vector that live on 4 ranks, but only rank 2 and 3 have values:
>     >
>     >     Doing a simple LSQR solve does not converge. However, when the values are distributed equally, it converges
>     within 3
>     >     iterations.
>     >
>     >     What can I do about that?
>     >
>     >     I have attached a simple program and creates the matrix and vector or loads them from a file.
>     >
>     >
>     > There are a few problems with this program. I am attaching a cleaned up version. However, convergence still
>     differs starting
>     > at iteration 2. It appears that LSQR has a problem with this system, or we have a bug that I cannot see.
> 
>     Thanks for having a look at it!
> 
>     And good to hear it's not by design. If I can be of any more help tracking this down, pleae let me know.
> 
>     In the meantime, what could be a good way to work around this? This is admittedly a very malformed example. Is there a
>     way to force solving on a single CPU and then distribute the results resp. KSP object to the original parallel layout?
>     Of course, we would first try to solve in parallel, but we have little influence about the actual parallel layout, since
>     we are just a library and other solvers give us the data.
> 
> 
> I need to be more clear. I do not think convergence has anything to do with being on 1 process. I think this is an
> ill-conditioned
> example and convergence is an accident in one case. Unless you see this in a bunch of cases, I would not worry about
> gathering
> to a single process. However, that can be done using PCREDUNDANT if this is really a problem.

Why do think it is ill-conditioned? The condition number is around 5, The singular values are [5.93710645,  1.85088733,
1.15107911] (both according to NumPy) and QR decomposition with NumPy works fine.

I believe you're right about that, giving your proficiency in the subject, just want to learn and maybe fix my input
data, if it's possible.

Thanks,
Florian


More information about the petsc-users mailing list