Parallel programs are sometimes substantially different in form than their serial counterparts. In some cases, such as when you need to use the low-level MPI interface to move data around, it may be easier to start with a new program design. Some of the I/O functions and computational kernels in the serial program will probably still be useful. You may also choose to use a template code as the starting point of your parallel application.

A further benefit of "starting from scratch" is that it may be advantageous to choose a different algorithm than you would use for a serial code. Not all algorithms are parallelizable. Even the ones that are might not be scalable, i.e., they might not gain speed in proportion to the number of parallel processing units brought to bear. By starting over, you gain the freedom to choose an algorithm that is both parallelizable and scalable.

The section on Data Communication explains how message passing is used to move data and enable parallel computation.

 
©   Cornell University  |  Center for Advanced Computing  |  Copyright Statement  |  Inclusivity Statement