[petsc-users] multi-threaded assembly

Jed Brown jed at jedbrown.org
Mon Jun 23 21:59:38 CDT 2014


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 --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140623/72240657/attachment.pgp>


More information about the petsc-users mailing list