Skip to 0 minutes and 12 seconds Let’s look briefly into execution and data model in MPI. In MPI parallel program is executed as a set of independent, identical process. That is, when program is launched for example with mpirun, the runtime creates N copies of the program which all execute the same program code. These processes are often called MPI tasks. How the N copies of the program can then perform different tasks? The MPI runtime assigns each process an unique id number which in MPI terminology is called rank.
Skip to 0 minutes and 54 seconds The ranks start always from zero and go up to N-1. Based on the rank, the different processes can, for example, branch into different path of the program execution. Identical processes means thus that all the processes execute the same if statement, however, how they branch then depends on the rank. As the MPI tasks are process, they have their own memory space which are distinct from the other processes. Thus, the MPI tasks cannot directly access the data of the other tasks. In MPI, as the name message passing suggests, the tasks exchange data by sending and receiving messages. In the normal use case, the communication is two sided, there is always both sending and receiving involded, and sends and receives need to match.
Skip to 1 minute and 48 seconds To summarize, in MPI one launches multiple processes which all execute the same program code. Based on the rank, these multiple processes can perform different tasks. Processes communicate by sending and receiving messages.
Execution and data model in MPI
In MPI, a parallel program is executed as a set of independent processes.
In this video we illustrate in more detail the execution and data model in MPI.
© CSC - IT Center for Science Ltd.