concept memory in category parallel computing

appears as: memory, memory
Parallel and High Performance Computing

This is an excerpt from Manning's book Parallel and High Performance Computing.

We will show you, through an example, how parallelism is introduced to an algorithm through a prototype application. This is the process that takes place in the application software layer, but requires an understanding of the computer hardware. For now, we refrain from discussing the choice in compiler and operating system. We will incrementally add each layer of parallelism so that you can see how this works. With each parallel strategy, we will explain how the available hardware influences the choices that are made. The purpose in doing this is to demonstrate how hardware features influence the parallel strategies.

For historical reasons, computational scientists still consider floating point operations (flops) as the primary performance limit. While this might have been true years ago, the reality is that flops are seldom the limit to performance on modern architectures. We first note that the limits can be for bandwidth or for latency. Bandwidth is the best rate at which data can be moved through a given path in the system. For bandwidth to be the limit, the code should be using a streaming approach. In the streaming approach, the memory usually needs to be contiguous and all the values used. When a streaming approach is not possible, latency is the more appropriate limit. Latency is the time required for the first byte or word of data to be transferred. Shown in the following list are some of the possible hardware performance limits.

Figure 4.2 C ordering is row major while Fortran ordering is column major, but switching either the Fortran or C index order will make them compatible. Note that convention also has Fortran array indices starting at 1 while C starts at 0. The elements are numbered from 0 to 15 in contiguous order in the C convention.
rowvscolumnmajor.png
Listing 4.14 Stencil kernel example
stencil.c