PHYSICS · Multi-part · Fermi University Physics · Computational Physics · Research software practice, verification and validation · Research software practice, verification and validation
Scientific Computing for Physicists, Ch A repository others can build on: collaboration, history and workflows
Problem
Between a trusted commit c0, where the orbit integrator's seeded energy-drift test passes, and the current commit c64, where it fails, lie the commits c1,…,c64 on a single line of history. Unknown to the group, c10 introduced a fault in the half-step velocity update, c30 repaired it, and c50 put it back. The test therefore fails on c10 to c29 and on c50 to c64, and passes on every other commit. The group runs bisection search with c0 marked good and c64 marked bad, always testing cm with m=⌊(g+b)/2⌋, where cg is the current good end and cb the current bad end.
((a)) List the commits tested, in order, with each verdict. State how many runs the search takes and which commit it names as the first bad one.
((b)) The named commit fails and its parent passes, exactly as the search promises. Explain why it is nonetheless not the commit that first introduced the fault, and name the assumption of the chapter's key result that this history breaks.
((c)) Reading the named commit's diff shows that it undoes the change made in c30, whose message reads "repair half-step update". Use this to choose a new bad end for a second search from c0. Give the most runs that search can need, and the commit it names.