[dune-pdelab] reg: OpenMP parallelization of assembly

Santiago Ospina sospinar at gmail.com
Thu Jun 25 18:38:16 CEST 2020


Hi Shubhangi,

as far as I can tell, the main PDELab is not able to do so. I know that
this was tried out in the EXADUNE project but I don't know the outcome of
that implementation. Perhaps someone else may comment on that one. But in
general, you need that each thread owns a copy of a LocalFunctionSpace, an
LFSCache, an assembler_engine and an entity (this may need some
modifications on these classes). Once that is done, most of the assembler
loop can be done in parallel. Binds, loads and assemble methods should be
OK with multiple threads. The problematic part comes on the unbind. There
is when the local container from assembler_engine are scattered to the
global container. Since contiguous entities are likely to have common DOFs
or be very near in memory in the global container, data races may appear.
Thinkthreads most of that is possible with the C++ thread, but I might be
wrong.

Please let us know if you get that working ;-)

Best,
Santiago Ospina

On Thu, Jun 25, 2020 at 2:10 PM Shubhangi Gupta <sgupta at geomar.de> wrote:

> Dear all,
>
> The matrix assembly is the main bottleneck for my numerical
> implementation in pdelab. So, I am thinking of parallelizing this part
> using openMP.. I understand that dune-pdelab is already capable of doing
> this...but I don't know where to start and I have only very superficial
> understanding of openMP.
>
> Is there an example that I can look at? Or can someone give me a quick
> outline of how to proceed?
>
> Thanks, and warm wishes, Shubhangi
>
>
> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at lists.dune-project.org
> https://lists.dune-project.org/mailman/listinfo/dune-pdelab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20200625/631b908f/attachment.htm>


More information about the dune-pdelab mailing list