[petsc-dev] MatAssembly and VecAssembly
Kong, Fande
fande.kong at inl.gov
Fri Oct 20 17:33:19 CDT 2017
On Fri, Oct 20, 2017 at 4:24 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> > On Oct 20, 2017, at 12:17 PM, Kong, Fande <fande.kong at inl.gov> wrote:
> >
> > How about to do a global check (MPI_Allreduce)?
>
> Kill you for large number of processes.
>
> > If we do not set values at all and the matrix is already assembled, we
> just return without doing anything?
> >
> > How expensive, in the current implementation, to call
> MatAssemblyBegin/End if there are no any stashed data? Is it so cheap that
> we can just ignore it?
>
> It requires at least one global reduction.
>
So, this global reduction is cheaper than MPI_Allreduce? Or they are
similar.
> >
> > I am asking because we call MatAssemblyBegin/End so often in MOOSE. I
> want to make sure this is not going to bring up any performance issue.
>
> You need to check each use in MOOSE and see WHY it is being called. If
> no reason then don't call.
>
Good point.
Fande,
>
> Barry
>
> >
> >
> > Fande,
> >
> > On Fri, Oct 20, 2017 at 11:08 AM, Barry Smith <bsmith at mcs.anl.gov>
> wrote:
> >
> > One process sets a value in the matrix, the others do not. They all
> call MatAssemblyBegin(). Some processes will skip the assembly and hence
> the code will hang.
> >
> >
> > > On Oct 20, 2017, at 12:03 PM, Kong, Fande <fande.kong at inl.gov> wrote:
> > >
> > > Hi All,
> > >
> > > In Mat/VecAssemblyBegin/End, why we do not check if or not mat/vec is
> assembled. If mat/vec is already assembled, should we just return without
> doing anything?
> > >
> > > I think we have some particular reasons not to check if the matrix is
> assembled. I honestly do not know why.
> > >
> > > Thanks,
> > >
> > > Fande,
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20171020/915f8a0c/attachment.html>
More information about the petsc-dev
mailing list