[petsc-users] multi-threaded assembly

Wen Jiang jiangwen84 at gmail.com
Tue Jun 24 08:54:48 CDT 2014


Thanks for this information. Could you tell me an efficient way to do this
in PETSc? I am planning to use at least 32 threads and need to minimize the
synchronization overhead Any suggestions?

Thanks!
Wen


On Mon, Jun 23, 2014 at 10:59 PM, Jed Brown <jed at jedbrown.org> wrote:

> Wen Jiang <jiangwen84 at gmail.com> writes:
>
> > Dear all,
> >
> > I am trying to change my MPI finite element code to OPENMP one. I am not
> > familiar with the usage of OPENMP in PETSc and could anyone give me some
> > suggestions?
> >
> > To assemble the matrix in parallel using OpenMP pragmas, can I directly
> > call MATSETVALUES(ADD_VALUES) or do I need to add some locks around it?
>
> You need to ensure that only one thread is setting values on a given
> matrix at any one time.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140624/d64bf056/attachment.html>


More information about the petsc-users mailing list