dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #05414
Re: Parallelization
2007/8/27, Anders Logg <logg@xxxxxxxxx>:
> Martin Sandve Alnæs wrote:
> > 2007/8/27, Anders Logg <logg@xxxxxxxxx>:
> >> 3. It should be relatively easy to extend the current assembler in
> >> src/kernel/fem/Assembler.cpp to do parallel assembly. It currently knows
> >> how to assemble over subdomains (defined by some MeshFunctions) and the
> >> parallel assembly would be similar: skip the cells (if (.. != ... )
> >> continue;) that don't belong to the current processor.
> >
> > It should rather iterate over cells that _are_ on the current
> > processor. Even if the mesh isn't distributed yet, this is probably
> > important.
>
> Why is it important? Iterating over all cells and skipping is very cheap
> (I imagine). Doing ++cell_iterator in DOLFIN only increases an int
> counter (inline). It probably takes more time to preprocess and extract
> the list of cells belonging to the process.
Because it's O(N_global), and needs to be O(N_local) to scale with
increased parallelism. I guess it's cheap enough for small scale
paralellism, but if you run with 100 subdomains (processes), then
that's 100 ++cell_iterator for each cell in the local mesh. So it is
fine until the mesh itself is distributed.
--
Martin
Follow ups
References