When a complex task depending on a larger amount of data is divided into subtasks, the data also has to be divided into portions relevant to the related subtask and the results have to be assembled and processed into a final result.
Let's consider as an example the scalar product of two vectors  divided into subtasks:
                 Â
with  All subtasks perform the same operations on portions of the initial data, the results have to be summed up, and possibly any remaining operations have to be carried out.
We have to perform the following steps:
- Creating the vectors u and v
- Dividing them into m subvectors with a balanced number of elements, that is, elements if N is divisible by m, otherwise some subvectors have more elements
- Communicating each subvector to "its" processor
- Performing the scalar...