[petsc-users] block ILU(K) is slower than the point-wise version?
Barry Smith
bsmith at mcs.anl.gov
Tue Mar 7 22:54:13 CST 2017
> On Mar 7, 2017, at 9:41 PM, Fande Kong <fdkong.jd at gmail.com> wrote:
>
>
>
> On Tue, Mar 7, 2017 at 7:37 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> > On Mar 7, 2017, at 4:35 PM, Kong, Fande <fande.kong at inl.gov> wrote:
> >
> > I found one issue on my side. The preallocation is not right for the BAIJ matrix. Will this slow down MatLUFactor and MatSolve?
>
> No, but you should still fix it.
>
> >
> > How to converge AIJ to BAIJ using a command-line option?
>
> Instead of using MatCreateSeq/MPIAIJ() at the command line you would use
>
> MatCreate()
> MatSetSizes()
> MatSetBlockSize()
> MatSetFromOptions()
>
> MatSetFromOptions() has to be called before "MatXXXXSetPreallocation"? What happens if I call MatSetFromOptions() right after "MatXXXXSetPreallocation"?
To late! The type has to be set before the preallocation, otherwise the preallocation is ignored.
Note there is a a MatXAIJSetPreallocation() that works for both AIJ and BAIJ matrices in one line.
>
> MatMPIAIJSetPreallocation()
> MatMPIBAIJSetPreallocation() and any other preallocations you want
> MatSetValues.....MatAssemblyBegin/End()
>
> Then you can use -mat_type baij or aij to set the type.
>
> Barry
>
> >
> > Fande,
> >
> > On Tue, Mar 7, 2017 at 3:26 PM, Jed Brown <jed at jedbrown.org> wrote:
> > "Kong, Fande" <fande.kong at inl.gov> writes:
> >
> > > On Tue, Mar 7, 2017 at 3:16 PM, Jed Brown <jed at jedbrown.org> wrote:
> > >
> > >> Hong <hzhang at mcs.anl.gov> writes:
> > >>
> > >> > Fande,
> > >> > Got it. Below are what I get:
> > >>
> > >> Is Fande using ILU(0) or ILU(k)? (And I think it should be possible to
> > >> get a somewhat larger benefit.)
> > >>
> > >
> > >
> > > I am using ILU(0). Will it be much better to use ILU(k>0)?
> >
> > It'll be slower, but might converge faster. You asked about ILU(k) so I
> > assumed you were interested in k>0.
> >
>
>
More information about the petsc-users
mailing list