Given the situation when a master process generates a set of workflows B, each of which generates its own unique workflow C, how can I open a communicator between C and A?
I am trying to create a loop, using mpi4py, between several pieces of code that were written separately from each other while minimizing code modifications. So, the general structure of MPI code will be:
- Master A (one process) spawns 8 processes of worker B and scatters the array for them.
- Each process B spawns worker C, performs some manipulations with the array, and passes it to its own worker.
- Each working C manipulates the array in its own way, and then (ideally) master A collects the array from each array C.
I know that this will be due to the discovery of an intercommunicator between existing processes, possibly using group communication. What would be the best way to achieve this?
Thanks.
source
share