A diffusion convergence study runs on a cluster with a lockfile pinning Python,…
PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Computational Physics · Research software practice, verification and validation
Scientific Computing for Physicists, Ch A repository others can build on: collaboration, history and workflows
Problem
A diffusion convergence study runs on a cluster with a lockfile pinning Python, NumPy, SciPy and the compiled-loop library, and a container image fixing the operating system and compiler; the same commit, lockfile and container are used throughout. The workflow graph has twelve simulation nodes, one per grid resolution (one hour each), a convergence-analysis node depending on all twelve (taking 5 minutes), and one summary-figure node depending on the analysis (taking 1 second).
((a)) Each simulation's total energy is summed by threads: each thread adds up the energy of its own share of the grid cells, and the threads' partial sums are then added together. The twelve simulations are first run with 4 threads per node and then rerun with 16 threads per node, same lockfile, container and hardware throughout; the reported total energy differs in its last three significant digits between the two runs. Does the lockfile and container reproduce this number identically between the two thread counts? Give the physical reason referring to floating-point addition.
((b)) The thread count is then fixed at 16 for all twelve simulations, and only the convergence-analysis script is edited to add a diagnostic print statement, with no change to the simulations' code or inputs. Which workflow nodes rerun, and what is the total rerun time in seconds?