Dear Bruno,
Thanks. That's even better and even in just a single line of code. ;)
MPI_Bcast(, 1, MPI_DOUBLE, max_rank, mpi_com);
Best,
Seyed Ali
--
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
---
Dear Bruno,
Thanks. That's even better and even in just a single line of code. ;)
MPI_Bcast(, 1, MPI_DOUBLE, max_rank, mpi_com);
Best,
Seyed Ali
--
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
Seyed,
you probably want to use MPI_Bcast instead of your code (see
http://mpitutorial.com/tutorials/mpi-broadcast-and-collective-communication/)
Best,
Bruno
On Wednesday, March 8, 2017 at 9:51:50 AM UTC-5, Seyed Ali Mohseni wrote:
>
> Dear all,
>
> I was able to solve the MPI variable
Dear all,
I was able to solve the MPI variable problem.
For the users who may have the same issue once:
if ( this_mpi_process == max_rank )
{
for (unsigned int i = 0; i < n_mpi_processes; ++i)
{
if ( i != max_rank )
MPI_Send(, 1, MPI_DOUBLE, i, 0, mpi_com);
}
}
else
{
Dear all,
I was able to solve the MPI variable problem.
For the users who may have the same issue once:
if ( this_mpi_process == max_rank )
{
for (unsigned int i = 0; i < n_mpi_processes; ++i)
{
if ( i != max_rank )
MPI_Send(, 1, MPI_DOUBLE, i, 0, mpi_com);
}
}
else
{
Dear Seyed,
> Extra question: Can we store variables or copy them to all processors?
> Since I am filling a variable in a locally owned cell, currently on rank 3.
> Then my other ranks, especially the root rank 0 has no clue of the values
> which are set. Hence, there has to be a possibility
@Prof. Bangerth: I will try to learn debugging parallel code and also to
follow your words of advice. Please do not apologize since I don't think
you ever became rude. I mean, after 1 emails I would definitely not be
as calm as you. Thank you. :)
@Daniel: Thumbs up. From your words I