Seyed,

Thank you. Does your approach also apply to MPICH? Since I am using MPICH, 
> I wonder, if this command can be used there also.
> This struct variable, is there an example within deal.II steps? Or do you 
> have an example in C++ I can learn from. 
>
Since MPICH is (at least) MPI-1.1 conforming, you should be able to use 
that approach. MPI supports Fortran and C. Therefore, the example I 
referenced before is probably quite close to what you can get within C++.
 

> To be honest I am not yet very familiar with MPI itself, barely 
> understanding deal.II parallelism ;)
>
It's certainly hard to understand MPI in deal.II without knowing how MPI in 
principle works ;-).

I have also another idea: How about I find the maximum value regardless of 
> the position and processor core. Then just loop again over all cells and 
> compare the maximum value with the existing value within each cell. Would 
> this be a very inefficient approach or is looping over cells usually 
> computationally cheap in deal.II.
>
What you can do instead, is to first find the maximum values for each 
process, then compute the maximum of these values across all processes and 
finally compare the local maximum with the global maximum. There is no 
reason to loop again through all cells.
This should not be much more expensive than using MPI_MAXLOC directly.

Best,
Daniel

-- 
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 dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to