MPI is a message passing interface used for parallel processing in distributed memory systems. There are language specific bindings that allow programs written in C, C++ and FORTRAN to execute in parallel by calling the appropriate library routines.
A single user program is prepared, but is run on multiple processors, one of which is the master, the others being slaves. Each processor has its own copy of the data, with the master processor in charge of directing how important results are to be moved from processor to processor.
Because the data is distributed, it is likely that a computation on one processor will require that a data value be copied from another processor. Thus, if processor A needs the value of data item X that is stored in the memory of processor B, then the program must include lines that say something like:
if ( I am processor A ) then
call mpi_send ( X )
else if ( I am processor B ) then
call mpi_receive ( X )
end
It should be clear that a program using MPI to execute in parallel will look much different from a corresponding sequential version. The user must divide the problem data among the different processors, rewrite the algorithm to divide up work among the processors, and add explicit calls to transfer values as needed from the processor where a data item "lives" to a processor that needs that value.
Files you may copy include:
Return to the FORTRAN software page.