[petsc-users] Solving a Linear System with two different Solvers (one each thread)..?

Jed Brown jedbrown at mcs.anl.gov
Mon Mar 19 16:22:08 CDT 2012


On Mon, Mar 19, 2012 at 16:16, Pedro Torres <torres.pedrozpk at gmail.com>wrote:

> Ok, so the only way to implement that is coding by hand each algorithm for
> each thread, rigth?.
>
> Anyway, at least can I use petsc object like Vec/Mat on each thread?.
>

No, the threading model in PETSc does not allow you to call it
simultaneously from different threads. You can set locks around every call,
but this whole approach is almost certainly a waste of your time. Just
solve those systems one after the other. It will be much simpler code and
faster in many cases.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120319/a7d65549/attachment.htm>


More information about the petsc-users mailing list