[petsc-dev] de-global variablelizing PETSc
Dmitry Karpeyev
karpeev at mcs.anl.gov
Sun Nov 10 17:33:21 CST 2013
On Sun, Nov 10, 2013 at 4:01 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Dmitry Karpeyev <karpeev at mcs.anl.gov> writes:
> > What would happen to VecCreate(PETSC_COMM_WORLD,&v)?
>
> VecCreate(petsclib, PetscCommWorld(petsclib), &v);
Presumably, since a comm knows what petsclib it came from,
the first argument can be omitted. That way at least this part of the API
can stay the same.
Dmitry.
>
> > Would v now be a collection of threadwise Vecs?
>
> Independent vecs in each thread that calls the function (this is in no
> way collective between threads, and you can "hand off" the lib and vec
> contexts between threads).
>
> > How would they sync?
>
> The point is that they would be separate, even with separate logging and
> debugging. This may not be solving the right problem.
>
--
Dmitry Karpeev
Mathematics and Computer Science
Argonne National Laboratory
Argonne, Illinois, USA
and
Computation Institute
University of Chicago
5735 S. Ellis Avenue
Chicago, IL 60637
-----------------------
Phone: 630-252-1229
Fax: 630-252-5986
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131110/9b554fcf/attachment.html>
More information about the petsc-dev
mailing list