Spinach vs Spynach: zulf_pf6_1d (CPU)
run zulf_pf6_1d, both sides present. Built by comparison/report.py; protocol in comparison/README.md.
Provenance
spinach
| run date (UTC) | 2026-10-14T17:39:14Z |
|---|---|
| Spinach version | 2.13 |
| commit | 03a88b7e912ffbb3122dd24829cc5d216209c804 |
| local modifications | False |
| MATLAB | 26.2.0.3386108 (R2026b) |
| host | MacBook-Pro-8.local |
| platform | MACA64 |
| cores | 12 |
| BLAS | Apple Accelerate BLAS (ILP64) |
| computational threads | 12 |
| parallel pool workers | 11 |
| GPU requested | False |
| GPU device | |
| case options | {"gpu": false} |
Spynach
| run date (UTC) | 2026-10-14T12:34:58Z |
|---|---|
| Spynach version | 097b823-dirty |
| commit | 097b823313459abb57a2c727c52abfcfe013a4cf |
| local modifications | True |
| Python | 3.12.5 |
| NumPy | 2.5.4 |
| SciPy | 1.18.1 |
| host | MacBook-Pro-8.local |
| platform | macOS-26.6.2-arm64-arm-64bit |
| cores | 12 |
| BLAS | {"numpy": "accelerate", "scipy": "Accelerate"} |
| thread settings | library defaults |
| GPU requested | False |
| GPU device | |
| case options | {} |
| not run |
Timings
| stage | Spinach / s | Spynach / s | Spynach / Spinach |
|---|---|---|---|
| create | 1.27 | 0.00 | 0.00x |
| basis | 2.01 | 0.01 | 0.01x |
| hamiltonian | 0.51 | 0.06 | 0.11x |
| operators | 0.76 | 0.04 | 0.05x |
| pulse | 0.32 | 0.07 | 0.21x |
| acquisition | 46.68 | 46.87 | 1.00x |
| processing | 0.03 | 0.00 | 0.02x |
| plot | 0.09 | 0.05 | 0.49x |
| total (wall clock) | 51.83 | 47.11 | 0.91x |
Data
| variable | Spinach shape | Spynach shape | relative error | max |difference| | |
|---|---|---|---|---|---|
| coil_x | (16384, 1) | (16384,) | 0.000e+00 | 0.000e+00 | compared after squeezing singleton dimensions |
| coil_z | (16384, 1) | (16384,) | 0.000e+00 | 0.000e+00 | compared after squeezing singleton dimensions |
| fid | (16384, 1) | (16384,) | 1.521e-12 | 1.446e-17 | compared after squeezing singleton dimensions |
| rho0 | (16384, 1) | (16384,) | 0.000e+00 | 0.000e+00 | compared after squeezing singleton dimensions |
| rho_pulse | (16384, 1) | (16384,) | 2.419e-22 | 5.295e-23 | compared after squeezing singleton dimensions |
| spectrum | (16384, 1) | (16384,) | 8.075e-11 | 2.039e-14 | compared after squeezing singleton dimensions |
relative error = ||Spynach - Spinach||F / ||Spinach||F, the metric of the oracle tests.
Figures
spinach: spectrum
Profiles
spinach
by self time
| function | calls | self / s | total / s |
|---|---|---|---|
| evolution>(parfor body) | 8 | 43.28 | 46.62 |
| propagator | 1 | 3.15 | 3.34 |
| ParforEngine>ParforEngine.getCompleteIntervals | 153 | 2.58 | 2.69 |
| existentials | 1 | 0.80 | 0.80 |
| clean_up | 19 | 0.19 | 0.19 |
| create | 1 | 0.16 | 1.26 |
| ParforEngine>ParforEngine.addInterval | 213 | 0.10 | 0.19 |
| run_comparison | 1 | 0.09 | 51.84 |
| ParforEngine>ParforEngine.buildParforController | 58 | 0.08 | 0.10 |
| table.saveobj | 200 | 0.07 | 0.09 |
| zulf_pf6_1d_spinach | 1 | 0.07 | 51.75 |
| dlmread | 1 | 0.05 | 0.07 |
| scomponents | 2 | 0.05 | 0.08 |
| report | 385 | 0.05 | 0.06 |
| operator | 49 | 0.05 | 0.74 |
| parallel_function>distributed_execution | 58 | 0.05 | 3.13 |
| hamiltonian | 1 | 0.03 | 0.50 |
| sparse2csr | 2 | 0.03 | 0.03 |
| tabular.parenReference | 26 | 0.03 | 0.05 |
| AbstractDataQueue>AbstractDataQueue.get.QueueLength | 9 | 0.02 | 0.02 |
| ParforEngine>ParforEngine.ParforEngine | 58 | 0.02 | 0.13 |
| apodisation | 1 | 0.02 | 0.03 |
| parallel_function | 59 | 0.02 | 49.99 |
| num2str | 512 | 0.02 | 0.04 |
| ParforEngine>ParforEngine.allIntervalsAdded | 58 | 0.02 | 0.02 |
by total time (with callees)
| function | calls | self / s | total / s |
|---|---|---|---|
| run | 1 | 0.00 | 51.84 |
| run_comparison | 1 | 0.09 | 51.84 |
| zulf_pf6_1d_spinach | 1 | 0.07 | 51.75 |
| parallel_function | 59 | 0.02 | 49.99 |
| evolution | 2 | 0.01 | 47.00 |
| evolution>(parfor body) | 8 | 43.28 | 46.62 |
| propagator | 1 | 3.15 | 3.34 |
| parallel_function>distributed_execution | 58 | 0.05 | 3.13 |
| ParforEngine>ParforEngine.getCompleteIntervals | 153 | 2.58 | 2.69 |
| basis | 1 | 0.01 | 2.01 |
| unihash | 1 | 0.00 | 1.95 |
| create | 1 | 0.16 | 1.26 |
| existentials | 1 | 0.80 | 0.80 |
| operator | 49 | 0.05 | 0.74 |
| hamiltonian | 1 | 0.03 | 0.50 |
| state | 21 | 0.00 | 0.39 |
| reduce | 2 | 0.00 | 0.22 |
| ParforEngine>ParforEngine.addInterval | 213 | 0.10 | 0.19 |
| clean_up | 19 | 0.19 | 0.19 |
| path_trace | 2 | 0.01 | 0.18 |
| parallel_function>@(initData,F)createEngine(M,initData,F,N) | 58 | 0.00 | 0.14 |
| PoolOptions>PoolOptions.createEngine | 58 | 0.00 | 0.14 |
| ClusterPoolEngine>ClusterPoolEngine.createParforEngine | 58 | 0.00 | 0.14 |
| ParforEngine>ParforEngine.ParforEngine | 58 | 0.02 | 0.13 |
| VariableBuffer>@(varargin)obj.supply(varargin{:}) | 214 | 0.00 | 0.11 |
Spynach
by self time
| function | calls | self / s | total / s |
|---|---|---|---|
| evolution (propagation.py:208) | 2 | 40.97 | 46.94 |
| propagator (propagation.py:25) | 2 | 3.65 | 5.76 |
| matlab_round (utilities.py:20) | 75 | 1.04 | 1.04 |
| <built-in method numpy._core._multiarray_umath.count_nonzero> | 40 | 0.42 | 0.42 |
| <built-in method scipy.sparse._sparsetools.csr_matvecs> | 4 | 0.26 | 0.26 |
| <built-in method scipy.sparse._sparsetools.csr_sort_indices> | 5 | 0.08 | 0.08 |
| clean_up (utilities.py:27) | 18 | 0.08 | 1.57 |
| _detect (propagation.py:355) | 16384 | 0.07 | 0.13 |
| <method 'nonzero' of 'numpy.ndarray' objects> | 916 | 0.06 | 0.06 |
| _add (propagation.py:381) | 9 | 0.06 | 0.09 |
| <method 'conj' of 'numpy.ndarray' objects> | 16384 | 0.06 | 0.06 |
| <built-in method scipy.sparse._sparsetools.csr_todense> | 26 | 0.04 | 0.04 |
| <built-in method scipy.sparse._sparsetools.csr_matmat> | 16 | 0.04 | 0.04 |
| <built-in method scipy.sparse._sparsetools.csr_matvec> | 152 | 0.03 | 0.03 |
| _superop_side_build (operators.py:280) | 99 | 0.02 | 0.05 |
| <built-in method scipy.sparse._sparsetools.csr_matmat_maxnnz> | 18 | 0.02 | 0.02 |
| <method 'searchsorted' of 'numpy.ndarray' objects> | 672 | 0.01 | 0.01 |
| _reordered_taylor (propagation.py:122) | 5 | 0.01 | 0.05 |
| <method 'sort' of 'numpy.ndarray' objects> | 2 | 0.01 | 0.01 |
| <built-in method numpy.zeros> | 1206 | 0.01 | 0.01 |
| <built-in method scipy.sparse._sparsetools.csr_plus_csr> | 27 | 0.01 | 0.01 |
| load_matlab_csv (zulf_pf6_1d.py:61) | 1 | 0.01 | 0.01 |
| <method 'reshape' of 'numpy.ndarray' objects> | 16716 | 0.01 | 0.01 |
| <method 'copy' of 'numpy.ndarray' objects> | 358 | 0.01 | 0.01 |
| <built-in method scipy.sparse._sparsetools.csr_eliminate_zeros> | 12 | 0.01 | 0.01 |
by total time (with callees)
| function | calls | self / s | total / s |
|---|---|---|---|
| run (zulf_pf6_1d_spynach.py:14) | 1 | 0.00 | 47.11 |
| simulate (zulf_pf6_1d.py:70) | 1 | 0.00 | 47.06 |
| evolution (propagation.py:208) | 2 | 40.97 | 46.94 |
| propagator (propagation.py:25) | 2 | 3.65 | 5.76 |
| clean_up (utilities.py:27) | 18 | 0.08 | 1.57 |
| matlab_round (utilities.py:20) | 75 | 1.04 | 1.04 |
| count_nonzero (numeric.py:483) | 41 | 0.00 | 0.42 |
| <built-in method numpy._core._multiarray_umath.count_nonzero> | 40 | 0.42 | 0.42 |
| nnz (utilities.py:15) | 28 | 0.00 | 0.36 |
| _matmul_dispatch (_base.py:875) | 209 | 0.00 | 0.36 |
| __matmul__ (_base.py:1006) | 204 | 0.00 | 0.36 |
| _matmul_multivector (_compressed.py:399) | 4 | 0.00 | 0.26 |
| <built-in method scipy.sparse._sparsetools.csr_matvecs> | 4 | 0.26 | 0.26 |
| nnz (backend.py:71) | 10 | 0.00 | 0.14 |
| _detect (propagation.py:355) | 16384 | 0.07 | 0.13 |
| count_nonzero (_compressed.py:138) | 26 | 0.00 | 0.10 |
| sum_duplicates (_compressed.py:1072) | 95 | 0.00 | 0.09 |
| _add (propagation.py:381) | 9 | 0.06 | 0.09 |
| __init__ (_compressed.py:30) | 362 | 0.00 | 0.09 |
| sort_indices (_compressed.py:1124) | 33 | 0.00 | 0.08 |
| <built-in method scipy.sparse._sparsetools.csr_sort_indices> | 5 | 0.08 | 0.08 |
| <method 'nonzero' of 'numpy.ndarray' objects> | 916 | 0.06 | 0.06 |
| __init__ (_coo.py:32) | 56 | 0.00 | 0.06 |
| _matmul_sparse (_compressed.py:415) | 18 | 0.00 | 0.06 |
| <method 'conj' of 'numpy.ndarray' objects> | 16384 | 0.06 | 0.06 |
Console logs
- spinach: console.log
- Spynach: console.log