Self-Assessment Quiz: Capstone — Your Complete Parallel Scientific Simulation
Twenty questions to confirm you can assemble the solver, verify it, analyze its performance honestly, and present it as a result. This is the book's climax, so the questions range across the whole enterprise. Aim for 16 or more. Answers and a topic map are at the end — try the whole quiz first.
Question 1
The single property of step that let the driver stay unchanged while its body was rewritten five times is
that its:
- A. body was always short
- B. signature (interface) never changed
- C. name was in uppercase
- D. arguments were all real
Question 2
In the assembled solver, the module that performs no science itself — only orchestration — is the:
- A. heat_solver module
- B. kinds module
- C. driver (program heat)
- D. heat_types module
Question 3
Verification asks: - A. Are we solving the right equations (does the model match reality)? - B. Are we solving the equations right (does the code solve the model correctly)? - C. Is the code fast enough? - D. Is the output pretty?
Question 4
Validation would require, which this chapter does not do: - A. a finer grid - B. comparison to physical experiment or observation - C. a faster compiler - D. more timesteps
Question 5
Comparing the solver to $u = \sin(\pi x)\sin(\pi y)e^{-2\alpha\pi^2 t}$ on the unit square is an act of: - A. validation - B. verification - C. optimization - D. profiling
Question 6
The reason the analytical sine mode makes the error trivial to compute is that its grid samples are: - A. all zero - B. an exact eigenvector of the five-point stencil, so the field is exactly $G^K$ times the initial field - C. randomly distributed - D. larger than the boundary values
Question 7
In a convergence study, halving $h$ and seeing the error fall by a factor of about four indicates: - A. first-order accuracy - B. second-order accuracy - C. an unstable scheme - D. a memory leak
Question 8
Measuring order 1 where the method is second-order most likely means: - A. the grid is too fine - B. a bug — a dropped $1/h^2$ scaling, a lopsided stencil, or mixed time levels - C. the timestep is too small - D. nothing; order 1 is close enough
Question 9
Holding $r = \alpha\Delta t/h^2$ fixed while halving $h$ forces the timestep to: - A. double - B. stay the same - C. drop by a factor of four - D. drop by a factor of two
Question 10
Amdahl's Law with parallel fraction $f = 0.98$ caps the speedup, no matter how many cores, at: - A. $2\times$ - B. $16\times$ - C. $50\times$ - D. unbounded
Question 11
A kernel's arithmetic intensity is measured in: - A. cores per second - B. flops per byte of memory traffic - C. bytes per second - D. steps per second
Question 12
The five-point stencil is memory-bound because its arithmetic intensity is: - A. very high (many flops per byte) - B. very low (well under one flop per byte), so it starves waiting for data - C. exactly one flop per byte - D. undefined
Question 13
On the roofline plot, a memory-bound kernel is limited by the: - A. flat peak-compute ceiling - B. sloped memory-bandwidth ceiling - C. number of registers - D. clock speed alone
Question 14
Strong scaling means: - A. the problem grows with the processor count - B. the total problem is fixed and you add processors - C. the code is written in strong (static) typing - D. the timestep is held strong (large)
Question 15
A distributed (MPI) solver is honestly "sold" on weak scaling because: - A. it is slower than OpenMP - B. each rank keeps constant work as the problem grows, so a thousand nodes solve a thousand-times-larger problem - C. weak scaling is easier to fake - D. strong scaling is illegal
Question 16
The correct order of sections in a computational-science paper is: - A. results → method → verification → conclusion - B. problem → method → verification & validation → implementation/performance → results → conclusion → reproducibility - C. conclusion → results → method → problem - D. method → results → problem → verification
Question 17
Verification is placed before results in a paper because: - A. it is shorter - B. the reader must be convinced the code is correct before the results mean anything - C. reviewers skip results - D. it is traditional and arbitrary
Question 18
Of a reviewer's checklist, the non-negotiable item is: - A. significance - B. correctness (V&V) - C. good figures - D. a long reference list
Question 19
A speedup claim ("8× on 8 cores") is meaningless without, at minimum: - A. the author's name - B. the stated baseline it was measured against, plus the build configuration and problem size - C. the room temperature - D. the number of coauthors
Question 20
The OpenMP step must give the identical field the serial step gives because:
- A. OpenMP is slower
- B. the physics is deterministic — a different answer is a bug (a race), not a faster result
- C. the compiler requires it
- D. the grid is small
Answer Key
| Q | Ans | Why |
|---|---|---|
| 1 | B | A frozen interface is the contract; the body is free to change beneath it. |
| 2 | C | The driver orchestrates (setup, loop, output) and delegates all science to modules below. |
| 3 | B | Verification = solving the equations right (the code correctly solves the chosen model). |
| 4 | B | Validation compares the model to reality — experiment or observation — which we lack here. |
| 5 | B | Comparing to an exact solution of the same PDE tests the code, i.e. verification. |
| 6 | B | The discrete sine mode is an exact stencil eigenvector, so $u^K = G^K u^0$ exactly. |
| 7 | B | Error $\sim h^2$: halving $h$ quarters the error — second-order accuracy. |
| 8 | B | The wrong order is a bug signature (dropped scaling, lopsided stencil, mixed time levels). |
| 9 | C | $\Delta t \propto h^2$ when $r$ is fixed, so halving $h$ quarters $\Delta t$. |
| 10 | C | The ceiling is $1/(1-f) = 1/0.02 = 50\times$. |
| 11 | B | Arithmetic intensity = floating-point operations per byte of memory traffic. |
| 12 | B | ~10 flops per cell over tens of bytes gives intensity $\ll 1$ — memory-bound. |
| 13 | B | Low-intensity kernels sit under the sloped bandwidth ceiling, not the flat compute one. |
| 14 | B | Strong scaling: fixed total problem, more processors (Amdahl's regime). |
| 15 | B | Weak scaling keeps per-rank work constant as the problem grows — the case for a cluster. |
| 16 | B | Problem → method → V&V → implementation/performance → results → conclusion → reproducibility. |
| 17 | B | A result is only meaningful once the reader trusts the code that produced it. |
| 18 | B | Correctness (V&V) is first and non-negotiable; without it nothing else matters. |
| 19 | B | A speedup needs a baseline, a build configuration, and a problem size to mean anything. |
| 20 | B | Deterministic physics must match serial exactly; a mismatch is a data-race bug. |
Topics to review by question
- Q1–2 → §38.1 (assembly, the frozen interface, the five roles).
- Q3–9 → §38.3 (verification vs validation, the analytical solution, the convergence study).
- Q10–15 → §38.4 (Amdahl, arithmetic intensity, roofline, strong vs weak scaling).
- Q16–19 → §38.6 (paper structure, what reviewers check, honest performance claims).
- Q20 → §38.1 and Chapter 33 (parallel determinism).
Scored below 16? Reread the flagged sections. This is the chapter that ties the whole book into one result; the next two chapters (39, 40) send that result into the world.