On 12/11/2017 06:57 AM, Bruno Turcksin wrote:
My current problem involves the use of a relatively big main domain that
is distributed accross a number of mpi process. The solution on this
domain is coupled with the solutions on smaller domains. At the moment the
smaller domains are distributed on the same number of mpi processes as the
main one. However, I wonder if it would be more efficient to assing each
of these smaller domains to a specific mpi process instead of distribute
them, and if so, what would be the best way to do this.
p::d::Triangulation takes a communicator in the constructor. So if you split
your communicator, the smaller domains won't use the same processors as the
largest one. However, I am not sure how the linear algebra is going to work.
The distributed vectors also take communicators so depending if you work on a
sub-problem or on the whole problem you will need to use different
communicators. I have never done anything like that so I can't say if it is
easy or hard to do.
It's conceptually not difficult to do -- every parallel object we have takes a
communicator argument, and these communicators need not be equal to
MPI_COMM_WORLD: they can contain a subset of processors, and in that case only
a subset of processors will own the object and participate in communication.
The much more difficult aspect of this is that you now need to make sure that
every processor knows which objects it owns and which communication it is
supposed to participate in. In other words, you lose the fact that in all
programs you've likely seen before, every processor does the same thing at all
times, because every processor participates in every communication step. By
splitting objects to a subset of processors, you will end up with code that
has a lot of statements such as
if (my processor participates in object A)
{
do something with object A;
builds some linear system;
solve linear system;
}
if (my processor participates in object B)
...
It's not *difficult* to write code like this, it's just error prone and
unwieldy.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.colostate.edu/~bangerth/
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.