Hei,
I was wondering what the correct way is to use MPI_Bcast in a 
deal.II-program. Currently I am using it in the following way:
        print_status_update(pcout, std::string("Transmitting pulse data of 
size ") + std::to_string(module.data_size) + std::string("\n"), true);
        //MPI_Bcast(module.pulse_intensity.memptr(), module.data_size, 
MPI_DOUBLE, Utilities::MPI::this_mpi_process(mpi_communicator), 
MPI_COMM_WORLD);
        print_status_update(pcout, std::string("Transmitting old pulse 
data\n"), true);
        MPI_Bcast(module.old_pulse_intensity.memptr(), module.data_size, 
MPI_DOUBLE, 0, MPI_COMM_WORLD);
        print_status_update(pcout, std::string("Both data matrices 
transmitted\n"), true);
with module.old_pulse_intensity.memptr() the pointer to the memory to be 
transmitted and module.data_size the amount of doubles to be transmitted, 
from the root node to all the other nodes. Is that approach correct? 
Currently my program hangs when executing this line (MPI_Bcast) when 
running it on more than one node. Do I have to use something else than "0" 
for indicating the root node?

Thanks!

-- 
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