Dear Wolfgang,
thanks for pointing this out; I completely missed that aspect.
assuming all processes with rank smaller 4 in the FEM_Comm Communicator
participate works..
if(rank_fem<4) {
TopLevel<3> elastic_problem;
elastic_problem.run ();
}
else{
std::cout<<" I am not allowed to work on this problem ;-) "<<std::
endl;
}
MPI_Barrier(MPI_COMM_WORLD);
Thanks,
Daniel
Am Montag, 21. Januar 2019 05:41:42 UTC+1 schrieb Wolfgang Bangerth:
>
> On 1/19/19 1:09 PM, Daniel wrote:
> >
> > After compiling I get the following behavior:
> >
> > bash-3.2$ mpirun -np 4 ./step-18
> >
> > fem group size: 3 comm:3
> >
> > fem group size: 3 comm:3
> >
> > fem group size: 3 comm:3
> >
> > fem group size: 3 comm:32766
>
> The problem here is that only 3 of the processes participate in the
> communicator. But you ask the question of the group size on all processes:
> MPI_Comm_size( FEM_Comm ,&size_fem_comm);
> Here, FEM_Comm is a communicator object that is really only initialized on
> the
> three participating processes, whereas it is uninitialized on the fourth
> and
> consequently you are getting pointless answers there.
>
> You have the same problem again at the end of the same block, where every
> process creates a TopLevel object using FEM_Comm, but really only on three
> of
> the processes is this object valid.
>
> After creating the subset communicator, you need to have an if statement
> of
> the form
> if (this process is participating in the subset communicator)
> {
> do everything else
> }
>
> Best
> W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: [email protected]
> <javascript:>
> 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.