I am attempting to parallelize a part of a large legacy software product using MPI.
I would like to start up a number of processes just as they are started now, and use one of them as a master taking care of the overall execution and the rest as workers each doing its share of the parallel part.
Hence the MPI connections should be established on the fly. The processes can be running on the same computer or on different blades. Theycan communicate through sockets, too. The solution should work on Windows platforms.
I have tried to find a sample for doing this but have not found one.
Can someone help me.
I am not willing to spawn the processes thenormal MPI way, as the software is currently started up in a manner which has quite a few historical details, which I am reluctant to change. There are other processes attached etc. This applies both to the start-up of the master and the workers.
What Ihave inmindis that the master somehow publishes an interface (MPI_OPEN_PORT?) to which the workers register. Each time when the execution of the master comes to the beginning of the parallel region, the master sees how many workers there are and distributes the work accordingly.
Maybe at a later stage if the results are good we will design and implement specific workers which will be spawned by the master. However ifthe above ideaworks, itwill give us a quick start with minimal changes in the code.