MPI Dynamic Process Management

MPI Dynamic Process Management

Hi, I have several questions about dynamic process managemnt in MPI.1. For example I have application a.out. If I execute mpirun twice (mpirun -n 1 a.out) Can I make the a.out to communicate each other?I clearly understand that mpirun -n 2 a.out creates two process that can communicate each other over MPI_COMM_WORLD, but I want to know if I run mpirun -n 1 a.out twice they have two different MPI_COMM_WORLD, is there a way to unite two MPI_COMM_WORLDs?2. If I create process using MPI_Comm_spawn, but after some time the parent process has died, what will happen to the child process?3. If some process A, create process B, that process B create process C, and C create D, (all processes use using MPI_Comm_spawn)etc... can I make these A, B, C, D process to communicate each other using one common communicator?Thanks,

4 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Hi,

If you run two separate instances of mpirun, by default the two will not communicate with each other. You can use MPI_Open_port and MPI_Comm_accept in one application to allow it to receive connections (server) and MPI_Comm_connect to connect to that port (client). In this case, you would run each application separately:

mpirun -n 1 ./server

mpirun -n 1 ./client

This will not change MPI_COMM_WORLD in either application, but will create new communicators that can be used to send messages between the two.

If the parent process ends early, all of the processes in that MPI_COMM_WORLD will end. However, the spawned processes do not share the same MPI_COMM_WORLD and will continue. There will be an error at MPI_Finalize(), since it will attempt to communicate with the parent.

You can chain process spawning and merging, using MPI_Intercomm_merge. This will allow a single communicator to be created that will contain all of the processes.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel Cluster Tools

Thanks for your reply,So, If I say that I am going to implement services that manages cluster nodes (than could be dynamicaly added or removed), mpi jobs, it won't be a good idea? MPI is best using just in general computation, but in client/server, or management software.

Hi,

Correct. MPI is generally intended for dividing a large computation into manageable pieces. You can use it for server/client capabilities, or in management software, but that is not its primary purpose.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel Cluster Tools

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi