[petsc-dev] use of hash table vs array in various places in PETSc
Mark F. Adams
mark.adams at columbia.edu
Tue Sep 20 11:37:19 CDT 2011
A type independent scatter would make my code simpler, faster, shorter. I reuse Mat scatters for all sorts of stuff and currently have to call scatter on each variable (stuffing ints in floats).
On Sep 20, 2011, at 12:22 PM, Matthew Knepley wrote:
> On Tue, Sep 20, 2011 at 8:43 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Tue, Sep 20, 2011 at 01:05, Barry Smith <bsmith at mcs.anl.gov> wrote:
> It may very well be limiting with MatGetSubMatrix() for VI solvers.
>
> As I recall, the gather is used to identify which global columns out of the off-diagonal block are needed. Well, the process owning that part of the index set knows, so why not use the scatter for the off-diagonal block to mark the needed columns?
>
> This seems quite straightforward when the submatrix is taking a local subset (not moving rows to different processes). This also takes care of the most common use case in fieldsplit.
>
>
> This would be even nicer if we could move indices over the same channels as scalars. This comes up so frequently that I think we should build a type-independent scatter, something like
>
> PetscScatterCreate(PetscLayout from,IS isfrom,PetscLayout to,IS isto,PetscScatter*);
>
> PetscScatterBegin(PetscScatter,void *from,MPI_Datatype,void *to,MPI_Datatype,MPI_Op,ScatterMode);
>
>
> The VecScatter API could be preserved, but the implementation would become a thin wrapper over this thing.
>
> Wait, a type-independent Scatter? The one I have been begging for for 7 years, and finally coded myself (see ParallelMapping.hh) suboptimally. I
> would like to see VecScatter completely refactored. We need
>
> - Flexible types
> - Flexible combination function
> - Better linkage to DM
>
> Matt
>
> --
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110920/1b0c62e1/attachment.html>
More information about the petsc-dev
mailing list