M0 / M1 measurements: case S on a 4-core cloud VM

Date: 2026-09-25. Everything here runs on the CPU. There is no GPU yet (M2).

Setup

Hardware

cloud container, 4 vCPU Intel Xeon @ 2.10 GHz (1 thread per core), 15 GB RAM

CCPi

ccpi-dvc 22.0.0 (conda channel ccpi, build 0). The newer 25.0.0 build is broken (see below)

zvDVC

numpy 2.4.6, scipy 1.17.1, zarr 3.1.6; numpy reference (backend="numpy", float64, one process)

Case S

zvdvc synth --shape 256 256 256 --field affine --spacing 16 (u16 speckle, feature size 3, i.e. Gaussian σ = 1.5 voxels)

Points

13³ = 2 197 on a 16-voxel lattice. Points closer than subvolume radius + max|u| + 3 to a face are dropped, hence fewer than the plan’s “~3 k”

Settings

sphere 32 voxels / 2 000 samples, ZNSSD, tricubic, disp_max 8, rigid_trans 0, wavefront seeding (zvDVC) / CCPi order (CCPi)

Fields

affine: translation (1.2, −0.4, 0.3) + strain up to 0.94 % about the centre, |u| ≤ 3.3 voxels in the volume. rigid: translation + rotation ≈ (0.40°, −0.34°, 0.47°), |u| ≤ 3.5 voxels. n2: affine with 2 % Gaussian noise (σ = 0.02 of full scale, independent per volume; speckle σ is 0.12 of full scale)

Reproduce:

zvdvc synth --shape 256 256 256 --field affine --spacing 16 --out cases/S_affine            # + --noise 0.02, --field rigid --dof 6
zvdvc solve cases/S_affine/config.yaml && zvdvc compare cases/S_affine/run/results.npz cases/S_affine/truth.npz
ZVDVC_CCPI_DVC=/path/to/ccpi-dvc-22.0.0/bin/dvc \
  python -m zvdvc.bench.ccpi_baseline cases/S_affine/config.yaml --workdir runs/ccpi_S --threads 1 2 4

M0: CCPi throughput on case S (whole cloud, no sampling)

DOF

OMP threads × processes

wall time

pt/s

vs 1 × 1

12

1 × 1

58.6 s

37.5

1.00

12

2 × 1

70.9 s

31.0

0.83

12

4 × 1

60.5 s

36.3

0.97

12

2 × 2

35.5 s

61.8

1.65

12

1 × 4

17.8 s

123.3

3.29

6

1 × 1

50.3 s

43.7

—

6

4 × 1

56.5 s

38.9

—

6

1 × 4

14.2 s

154.8

—

CCPi’s own .stat figure agrees with wall-clock time (37.7 pt/s for 12-DOF with 1 thread).

  • OpenMP threads buy nothing at this subvolume size. Throughput is flat or lower from 1 to 4 threads. This is the structural limit described in PERFORMANCE.md §3: per-point box reads and serial sections dominate.

  • Processes scale. Four processes on disjoint z-slabs give 3.3×. That is the fair “CCPi as shipped on one node” baseline: about 31 pt/s per core.

  • 12-DOF costs only 14 % more than 6-DOF (26.7 vs 22.9 ms per point). Most of the per-point time is fixed overhead, not correlation.

  • Against the model. PERFORMANCE.md §3’s formulas for S (L = 52, M = 2 000, 12-DOF, about 3 iterations) predict 4–15 ms per point (67–250 pt/s). The measured 26.7 ms is 2–7× slower than modelled, so the modelled speed-ups are, if anything, conservative for this size. Case A (L = 160) is not measured: see “Blocked” below.

M1: accuracy (Q1) on case S

Errors are over GOOD points, in voxels. RMSE is per axis; the worst axis is shown.

Case

Code

GOOD

RMSE (worst axis)

|error| median / p95 / p99

affine, 12-DOF

zvDVC numpy

100 %

0.0011

0.0015 / 0.0028 / 0.0035

CCPi 22.0.0

100 %

0.0010

0.0015 / 0.0028 / 0.0032

affine, 6-DOF

zvDVC numpy

100 %

0.0059

0.0079 / 0.0150 / 0.0193

CCPi 22.0.0

100 %

0.0061

0.0080 / 0.0152 / 0.0189

affine, 12-DOF, 2 % noise

zvDVC numpy

100 %

0.0103

0.0159 / 0.0285 / 0.0338

CCPi 22.0.0

100 %

0.0102

0.0154 / 0.0288 / 0.0352

rigid, 6-DOF

zvDVC numpy

100 %

0.0010

0.0015 / 0.0028 / 0.0033

CCPi 22.0.0 (rigid_trans 0 −1 2)

100 %

0.0010

0.0015 / 0.0028 / 0.0033

Q1 synthetic passes: RMSE ≤ 0.02 noise-free (measured 0.0011) and ≤ 0.05 with 2 % noise (measured 0.0103), with 100 % GOOD. The 6-DOF error on the affine field is the unmodelled strain, as expected. The two codes are equally accurate against ground truth on every case.

zvDVC against CCPi, point by point (the Q1 agreement metrics, measured here on S because case A is blocked):

Case

median |Δu|

p95 |Δu|

status agreement

affine, 12-DOF

0.0016

0.0032

100 %

affine, 6-DOF

0.0061

0.0116

100 %

affine, 12-DOF, 2 % noise

0.0202

0.0377

100 %

rigid, 6-DOF

0.0016

0.0033

100 %

All are well inside the Q1 criteria (median ≤ 0.05, p95 ≤ 0.2, agreement ≥ 98 %).

Numerical checks (unit tests)

  • Catmull-Rom ≡ Lekien–Marsden. Separable Catmull-Rom matches a clean-room Lekien–Marsden tricubic with central-difference derivative estimates to a maximum relative difference of 1.1e-12 on random data (target 1e-5). The 64-weight fallback is not needed. The Lekien–Marsden reference was built from the published method (64×64 matrix derived from its constraints), not from CCPi’s source.

  • Warp Jacobian. The analytic ∂x′/∂p matches central finite differences within 1e-4 relative for 3/6/12-DOF (target 1e-4).

  • Normal equations. For all five objectives, with and without masks, H and b match JrᵀJr and Jrᵀr built from the finite-difference Jacobian of the residual vector to about 1e-9.

zvDVC numpy reference throughput (not the product; for scale only)

Case

solve time

pt/s (1 process)

mean GN iterations

affine, 12-DOF

20.1 s

109

2.0

affine, 6-DOF

19.7 s

111

2.0

affine, 12-DOF, 2 % noise

25.8 s

85

3.0

rigid, 6-DOF

18.9 s

116

2.1

The unoptimised float64 numpy path, on one process, already runs 2.9× faster than a CCPi process and matches four CCPi processes on four cores. It uses whole-volume bricks, an analytic Jacobian and batched points. This is a first data point for Q5 (restructuring vs GPU); the numba restructured-CPU baseline comes in M2.

CCPi ccpi-dvc 25.0.0 has a broken tricubic path

The newest conda build (ccpi-dvc-25.0.0-h2bc3f7f_0, reporting v22.0.0-19-gb0e2642) fails with tricubic interpolation. Test: a pure fractional translation u = (1.3, −0.7, 0.45) of σ = 1.5 speckle, one point, 3-DOF, ZNSSD, with rigid_trans at the exact answer (start error 0) or 0.37 voxel off:

build

interpolation

start error

final error

objmin

25.0.0

tricubic

0.000

1.689

0.233

25.0.0

tricubic

0.373

0.915

0.074

25.0.0

trilinear

0.000 / 0.373

0.013 / 0.010

5e-4

22.0.0

tricubic

0.000 / 0.373

0.002 / 0.001

8e-5

21.2.0

tricubic

0.000 / 0.373

0.001 / 0.001

8e-5

With 25.0.0, case S 12-DOF comes out with errors of about 3 voxels, yet every point is reported Point_Good. On integer translations every interpolant reproduces grid values, so 25.0.0 looks correct there, which hides the bug. Use 22.0.0 for baselines. This is worth reporting upstream (TomographicImaging/DigitalVolumeCorrelation).

With 22.0.0, capture range is the same for both codes. From starts 0.25–3 voxels off the truth, in 12 directions, on a 3-DOF or 6-DOF pure translation, both converge in 100 % of cases.

dvc input quirks found while running it

zvdvc.io.ccpi.write_dvc_input handles these:

  • A value keeps its line ending unless a ### comment follows it on the line, so every line is written with a trailing comment.

  • num_points_to_process and starting_point are required, although the manual calls them optional.

  • dvc exits 0 after input errors; the missing .disp is the signal.

  • .disp holds displacements only (no rotation/strain columns) even for 6/12-DOF, so CCPi’s rotation-angle convention could not be checked from its output. zvDVC’s R = Rx(ψ)·Ry(θ)·Rz(φ) satisfies the matrix entries the tests pin, and the rigid case’s displacements agree.

Blocked

  • Case A (the iDVC example, Zenodo 10.5281/zenodo.7363345). zenodo.org is denied by this environment’s network policy, so the data could not be downloaded. Q1 CCPi agreement on A, CCPi pt/s on A, and “the numpy path runs A in minutes” remain to be measured where the data is reachable. At the rate above, A (4 680 points × 8 000 samples) should take about 4× longer per point than S, i.e. roughly 3 min for the numpy path if the iteration count is similar.