On a machine recorded as Laptop A (a quad-core laptop CPU with two populated…
PHYSICS · Multi-part · Fermi University Physics · Computational Physics · Scientific programming for physicists · High-performance and data-driven computational physics
Scientific Computing for Physicists, Ch Arrays in memory: layout, cost and the data structures of physical problems
Problem
On a machine recorded as Laptop A (a quad-core laptop CPU with two populated DDR4-3200 channels, commit and lockfile as usual), you measure the memory-bandwidth triad np.add(b, c, out=a), one operation with no temporary, on three float64 arrays of N=5×107 elements each, following twenty measured repeats after warm-up: the median time is 45ms (interquartile range 2ms).
((a)) State the bytes the triad must move and estimate the sustained bandwidth βmem of Laptop A.
((b)) Using this βmem, estimate the lower bound on the time for one step of the explicit two-dimensional diffusion stencil on a 4000×4000 grid, assuming perfect cache reuse (one read and one write per grid point).
((c)) The same machine executes one such stencil step with a measured median time of 52ms (twenty repeats). Give the ratio of the measured time to the lower bound, to one significant figure, and say what the ratio shows.