A hydrologist models pollutant diffusion in a lake with the explicit scheme on a grid…

PHYSICS · Multi-part · Fermi University Physics · Computational Physics · High-performance and data-driven computational physics · High-performance and data-driven computational physics

Scientific Computing for Physicists, Ch Graphics processors: kernels, memory and the roofline

Problem

A hydrologist models pollutant diffusion in a lake with the explicit scheme on a 3072×30723072\times3072 grid of binary64 values, stored in C order, and tracks the concentration ui,jnu^n_{i,j} at the injection cell. One kernel maps threadIdx.x\text{threadIdx.x} to the fast (column) index, so a warp reads 32 consecutive entries of a row; a careless port instead maps threadIdx.x\text{threadIdx.x} to the slow (row) index, so a warp reads 32 consecutive rows at fixed column, each thread's load a single binary64 value. ((a)) Predict how many 32 byte sectors one warp's load fetches in the mis-mapped version, and the factor by which this exceeds the coalesced version. ((b)) The device has FP64 peak 9.7 TFLOP s−19.7\,\mathrm{TFLOP\,s^{-1}} and data-sheet peak bandwidth 1555 GB s−11555\,\mathrm{GB\,s^{-1}}; the coalesced stencil (7 flops, 16 B16\,\mathrm{B} moved per cell) already runs at its bandwidth-limited cap. Assuming the mis-mapped version is limited only by the extra traffic found in (a), predict its attained rate in TFLOP s−1\mathrm{TFLOP\,s^{-1}}. ((c)) The injection-cell value is stored in float16 once it falls into [0.25,0.5)[0.25, 0.5), which happens near step 600600. A binary64 reference run shows the decrement per step near this range fits Δun≈6.0×104/n3\Delta u_n \approx 6.0\times10^{4}/n^{3}. Using the float16 rounding-unit argument, predict the step at which the stored value stops changing. ((d)) State what you would run on your own device to check parts (a)-(c), and what result in each case would show a prediction wrong.

Browse the problem library