DOE OSTI2011
This is a simple benchmark to gauge the performance of a high-order isotropic wave equation grid. The code is optimized for both SSE and AVX and is parallelized using OpenMP (see Optimization section). Structurally, the benchmark begins, reads a few command-line parameters, allocates and pads the four arrays (current, last, next wave fields, and the spatially varying but isotropic velocity), initializes these arrays, then runs the benchmark proper. The code then benchmarks the naïve, SSE (if supported), and AVX (if supported implementations) by applying the wave equation stencil 100 times and taking the average performance. Boundary conditions are ignored and would nominally be implemented by the user. Thus, the benchmark measures only the performance of the wave equation stencil and not a full simulation. The naïve implementation is a quadruply (z,y,x, radius) nested loop that can handle arbitrarily order wave equations. The optimized (SSE/AVX) implentations are somewhat more complex as they operate on slabs and include a case statement to select an optimized inner loop depending on wave equation order.