← Back to team overview

dolfin team mailing list archive

Re: OpenMP assembler

 

On Tuesday September 27 2011 03:22:59 Garth N. Wells wrote:
> On 27 September 2011 03:55, Johan Hake <johan.hake@xxxxxxxxx> wrote:
> > On Monday September 26 2011 16:52:02 Johan Hake wrote:
> >> Hello!
> >> 
> >> I played around with the OpenMP assembler as I really needed to speed up
> >> some assemble because of problems with Real Spaces. Speedwise it looked
> >> really promissing, untill I compared the results...
> >> 
> >> It turns out that the result is not correct for forms with Real spaces
> >> included. Anyone knows why and if there is an easy fix?
> >> 
> >>   https://bugs.launchpad.net/dolfin/+bug/860142
> >> 
> >> I would really like to fix this one ASAP...
> > 
> > The easiest is probably for me to flesh out the forms with no global dofs
> > in and pass these to the OpenMP assembler.
> > 
> > To fix this more permanently we need to collect the rows and columns of
> > the global dofs in separate vectors. After the assemble we can add them
> > separtely.
> > 
> > To make it thread safe we can first sum the vectors over the threads and
> > then add them outside the openmp loop. I think this strategi might speed
> > up insertion into PETSc Matrices for forms with global dofs too.
> 
> I added something to a Blueprint recently. PETSc 3.2 has a new
> function that assembles everything at once. What we need to add in
> DOLFIN is an 'unassmebled matrix' backend that stores each local
> matrix block. It could be a good solution to issue that is described.

Ok.

> > For this to be robust and fast we need to make ufc global dof aware.
> > Maybe extend ufc dof_map with:
> > 
> >  tabulate_global_dofs(double* dofs);
> >  num_global_dofs();
> 
> This can be done already, in a way. Have a look at
> 
>   DofMapBuilder::compute_global_dofs
> 
> It can figure out the global dof indices.

Ok, nice, but we might discuss this in more detail when we plan the next major 
ufc change. One could imagine that we had a separate 
tabulate_global_dof_tensor method, to split the logic of local (mesh bound) 
versus global dofs.

> > What you say before or after the 1.0 release ;)
> 
> Sounds desperate. My money is on after.

:)

Johan

> Garth
> 
> > Johan
> > 
> >> I also discovered that OpenMP assemble crashes for scalars. This is not
> >> as critical as scalars are pretty fast to assemble anyhow.
> >> 
> >>   https://bugs.launchpad.net/dolfin/+bug/860040
> >> 
> >> Johan
> >> 
> >> _______________________________________________
> >> Mailing list: https://launchpad.net/~dolfin
> >> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> >> Unsubscribe : https://launchpad.net/~dolfin
> >> More help   : https://help.launchpad.net/ListHelp
> > 
> > _______________________________________________
> > Mailing list: https://launchpad.net/~dolfin
> > Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~dolfin
> > More help   : https://help.launchpad.net/ListHelp


References