[petsc-dev] de-global variablelizing PETSc
Jed Brown
jedbrown at mcs.anl.gov
Sun Nov 10 18:38:38 CST 2013
Matthew Knepley <knepley at gmail.com> writes:
> This all seems like a terribly convoluted and fragile solution to this
> problem. If we stack this up against some
> extra configure work to get the lock call right, I think that is a clear
> win.
I agree that the initialize stuff is totally overkill for threading,
though PetscInitialize is currently somewhat brittle since adding new
arguments is intrusive and we currently have totally unprotected
globals. Changing to PetscSetCommWorld(comm) instead of
PETSC_COMM_WORLD = comm seems acceptable to me, however.
Regardless, the fact is that even if part of a user's code solves
separate problems on separate threads (the tiny Vec case), the same code
should be able to turn around and create "fat" Vecs. I think we have to
offer the lock solution; other possibilities are optional, and I don't
think PetscInitialize has to change in a significant way for this reason
(though perhaps it should for some other reason).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131110/88514afd/attachment.sig>
More information about the petsc-dev
mailing list