Skip to content
pascal.tremblin edited this page Nov 28, 2026 · 3 revisions

bench-pykokkos-cpp-openmp: pykokkos against C++ on CPU

This page compares the time per step of canoP with its physics in Python, written with pykokkos, to the last canoP with its physics in C++.

  • pykokkos: canoP main at 8c715195 (release 0.1.0).
  • C++: canoP a778bf4a.

The cases, the method, the raw times and the way to run the benchmark again are in the README. In short:

  • every case is the blast of the model onephase on a periodic uniform mesh, adapted at every step;
  • the time per step is (ALL(250) − ALL(50)) / 200, with ALL the time Kalypsso::ALL of canoP;
  • the speed is Mcell/s = cells / time per step.

CPU (OpenMP), 2026-11-27

Ruche cpu_short: one node of 2 × Intel Xeon Gold 6230 (40 cores), one MPI process with 40 OpenMP threads.

  • pykokkos: the runs of this repository's campaign, one run per point, on node189 (one run on node190).
  • C++: the same input files converted to its format, minimum of two runs, on node001.

Mcell/s per case, C++ (blue) and pykokkos (orange); the label above each pair is pykokkos / C++

case C++ ms/step C++ Mcell/s pykokkos ms/step pykokkos Mcell/s pykokkos / C++
2D 2048², blocks 4² 278.97 15.0 272.21 15.4 1.03
2D 2048², blocks 16² 138.59 30.3 139.74 30.0 0.99
3D 128³, blocks 4³ 363.78 5.8 358.44 5.9 1.02
3D 128³, blocks 8³ 187.46 11.2 177.34 11.8 1.05
3D 256³, blocks 8³ 1425.51 11.8 1279.73 13.1 1.11

On CPU, the physics in Python runs as fast as the physics in C++: from 1 % slower to 11 % faster. The largest 3D case gains the most. The benchmark of 2026-11-23 (pykokkos at 16989d10, 50 and 150 steps) gave 0.99 to 1.07 on the same cases.

Limits: pykokkos has one run per point, while the C++ takes the best of two (spread of 0.6 to 4 %). The two versions ran on different nodes of the same model.

GPU (A100)

The GPU benchmark of the same versions is in its own repository, bench-pykokkos-cpp-cuda, with its results on its wiki. On an A100 (2026-11-28), pykokkos / C++ is 1.06 and 0.99 in 2D, and 1.12, 1.10 and 1.22 in 3D. The A100 is 9 to 22 times faster than this CPU node.