Parallel Programming Patterns: Part 1
By Hardik Dave on Mar 06, 2008
Recently we released MPI Development environment for Netbeans IDE, and this series is a consolidated summary of Parallel Programming Patterns implemented in the Plugin. The first Pattern which we will see is SPMD(Single Process Multiple Data) Pattern. This is a technique used to achieve data level parallelism. One of the dominant style of parallel programming, where all processors use the same program, though each has its own data, SPMD pattern exploits data parallelism in applications where a large mass of data of a uniform type needs the same instruction performed on it. The data is divided among processes to be independently operated. The example provided in the MPI Netbeans plugin shows following:
- An array of elements is created on main process which is then distributed amongst other processes.
- All processes do independent processing of data which is sent to them.
- If the main process wants, it can collect the data from other processes for some final processing, etc.