Repository navigation
Parallel plotting helpers: only the plotting rank needs the sample points - #1246
Conversation
…g rank only On #1243's head, None for the points on the other ranks hangs at np 2 (pytest's timeout fires); None on the plotting rank also hangs. Underworld development team with AI support from Claude Code
…efuse unusable ones on every rank The dimension of the empty point array is broadcast from viz_rank, so the other ranks may pass anything. Points on viz_rank that are not an (n, dim) array raise the same ValueError on every rank before global_evaluate. Every rank now runs one code path to global_evaluate; only the plotting differs. Underworld development team with AI support from Claude Code
|
Review from the Underworld development team with AI support from Claude Code (H1: review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH)) Verdict on 3292306: changes requested. One line is needed: refuse non-finite sample points in the new guard (finding 1). Everything else in the change is correct.
Which head the runs used: they were made on 3550263. The current head, 3292306, is that commit merged with development after #1243 merged. Between the two heads, MethodThe PR changes Python files only. Both the PR and #1243's head (5e5d599) were run as Python overlays on one clean build whose compiled sources match their merge base with development, 2a41d49 (an empty diff over The parallel layouts are a test-only shell partition of the gmsh mesh:
The value check uses a degree-2 field set to sin(3x)cos(2y) + xy, sampled at 41 points along a line, through Results
Findings
Confirmed correct
Run and not run
Logs kept by the reviewer. Underworld development team with AI support from Claude Code |
At np 2 on the previous head one rank fails with a different error and the other hangs. Underworld development team with AI support from Claude Code
Underworld development team with AI support from Claude Code
|
The parallel review desk's point, at 06cb900: the guard on the plotting rank's points now also requires
Underworld development team with AI support from Claude Code |
|
Review from the Underworld development team with AI support from Claude Code (H1: review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH)) Re-check of 06cb900: ready to merge on green from this review. The finite-points guard resolves the first review's only finding, and nothing else changed. The diff since 3292306 is two commits, with no merge of development. The merge base is still 9cf3509.
Build: an overlay on a clean build whose compiled sources match the merge base exactly. Every run printed
The other unusable inputs from the first review ( Underworld development team with AI support from Claude Code |
What changed and why
Follow-up to #1243 (stacked on it; retarget to
developmentonce #1243 merges), from the parallel review desk's low note on it: a caller that passessample_points=Noneon the ranks that do not plot still hung, because those ranks read the points' dimension themselves and raised, while the plotting rank waited inglobal_evaluate.Now only
viz_rank's sample points are read. One private helper,_points_on_this_rank, broadcasts their dimension fromviz_rankand gives every other rank an empty array of that dimension, so the other ranks may pass anything,Noneincluded. If the points onviz_rankare not an(n, dim)array, every rank raises the sameValueErrorbeforeglobal_evaluate, instead of hanging. Each helper now runs one code path toglobal_evaluateon every rank; only the plotting is onviz_rank. The docstrings say that every rank calls the helper and onlyviz_rank's points are used.What a user's run does now: a parallel notebook that builds its sample points only on the plotting rank works; one that passes no usable points on the plotting rank gets an error on every rank naming
viz_rank, where before it hung.Tests
Two new cases in
tests/parallel/test_1243_parallel_plot_helpers_parallel.py(tier B), each forviz_rank0 and the last rank:test_only_the_plotting_rank_needs_the_points: the other ranks passNone; all four helpers complete, and the plotting rank's values equal the exact fieldx + 2 y.test_unusable_points_on_the_plotting_rank_are_refused_on_every_rank:Noneon the plotting rank raises the sameValueErroron every rank.On #1243's head both hang at np 2 (pytest's timeout fires).
What was run
On a 96-thread Linux workstation (single system image, Intel Xeon Gold 6240R, MPICH):
scripts/check_deprecated_patterns.pyNot run
np 4 or more; a real display; macOS; the full suite.
Underworld development team with AI support from Claude Code