SimuCell3D: HPC tissue mechanics in C++
Published:
Problem
SimuCell3D simulates 3D tissue mechanics — cell division, polarization, adhesion — at subcellular resolution. The reference implementation is correct but bottlenecked by uneven OpenMP work distribution: most threads sit idle while a few finish long contact-detection chunks.
Approach
- Profiled the hot loops to localize the imbalance to contact detection and force assembly over heterogeneous cell meshes.
- Replaced the static OpenMP schedule with an adaptive scheme that sizes chunks to the per-cell work estimate.
- Kept the public simulation API unchanged so existing experiment scripts continue to run without modification.
Result: 1.8×–4.4× faster across the benchmark tissues — the bigger and more heterogeneous the tissue, the larger the win — with no change to numerical output. Per-thread busy time during contact detection tightens from a 20–95% spread to a uniform 90–94%.
Links
- Repo: github.com/nilesh-patil/simucell3d
- Deep dive: Most threads idle, a few sprinting — how the adaptive scheduler was built and measured.
- Reference paper: Runser et al., SimuCell3D, Nature Computational Science (2024)