I am a beginner in parallel-processing, I want to send one value from a process belonging to communicator A to all processes in a communicator B , I tried to use the MPI_Bcast(), the process_sender should belong to Communicator B but it doesn't
MPI_Bcast(&value ,value_size ,MPI_INT ,process_sender_rank, CommunicatorB);
how can I communicate between two separated communicators, please help me
In MPI processes can only communicate among processes within their communicator. From the source:
In your case you can form a new communicator compose by the process A and the processes belonging to the communicator B. Lets call it CommunicatorC, then you can call the routine again but this time using the new communicator: