arXiv:2611.05215cs.DCNov 2026

Manuscript Offprint

arXiv:2611.05215

Parallel Sparse Identification of Nonlinear Dynamics in Python: Task- and Data-Parallel SINDy with Numba, OpenMP, Threads and Multiprocessing for the Lorenz and Rössler Systems

Pablo Guillen-Rondon

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Pablo Guillen-Rondon

University of Houston–Downtown, Houston, TX, USA

guillenrondonp@uhd.edu

Abstract. The sparse identification of nonlinear dynamics (SINDy) recovers interpretable governing equations from time-series data by sparse regression over a library of candidate functions. As data sets, candidate libraries and the number of repeated fits grow, the cost of SINDy becomes dominated by the evaluation of the library matrix and its least-squares problems. We present an open-source Python implementation of SINDy in which a single set of loop-based kernels is just-in-time compiled with Numba and executed on a shared-memory multicore node by four interchangeable back ends: Numba prange, OpenMP directives through PyOMP, Python threads that release the global interpreter lock, and multiprocessing with shared memory. The normal equations are accumulated in one cache-blocked pass over the data, with an automatic fallback to a tall-skinny QR reduction for ill-conditioned problems. Two decompositions are studied on the Lorenz and Rössler systems: an ensemble (task-parallel) workload of 960 independent identifications and a library (data-parallel) workload of one trajectory with 2×1072\times 10^7 samples and a fifth-order library of 56 candidate terms. All back ends recover the exact sparsity pattern in every identification, with coefficient errors identical to PySINDy. On a dual-socket Intel Xeon E5-2650 v4 node of the University of Houston–Downtown HPC cluster (24 cores, 48 hardware threads), the compiled serial code is 4.3–5.6× faster than PySINDy, the parallel back ends reach speed-ups of 14.8–20.3 on 24 cores (parallel efficiency 0.61–0.84), and the overall time to solution is reduced by up to 117×117\times with respect to PySINDy. We analyse the differences between the back ends, the effect of the two sockets and of hyper-threading, and give practical recommendations.

Keywords: system identification; SINDy; sparse regression; parallel computing; OpenMP; Numba; multiprocessing; high-performance Python; Lorenz system; Rössler system.

1. Introduction

Discovering the governing equations of a dynamical system directly from measurements is a central problem in data-driven science [9]. The sparse identification of nonlinear dynamics (SINDy) algorithm of Brunton, Proctor and Kutz [1] addresses it by assuming that the right-hand side of the dynamics is a sparse combination of a few candidate functions, so that a sparse regression over a library of such functions yields models that are both accurate and interpretable. SINDy has since been extended to partial differential equations [5], latent coordinates [6], implicit and rational dynamics [7], weak formulations [8] and ensemble/bootstrap variants for noisy data [4], with a recent tutorial perspective for engineering applications [11] and robust autoencoder variants [12]. The open-source PySINDy package [2, 3, 10] made these methods widely accessible.

Practical SINDy studies rarely consist of a single fit. Model selection requires sweeps over the sparsity threshold and the library; robustness is assessed by bootstrapping [4]; and long or high-resolution experiments produce millions of samples while high-order libraries contain tens to hundreds of terms. In this regime the computation is dominated by the evaluation of the library matrix Θ(X)\Theta(X) and by least-squares solves, and interpreter overhead and serial execution become the limiting factors.

Python offers several mature routes to multicore execution: Numba's just-in-time (JIT) compilation with prange loops [15]; OpenMP [19] directives through PyOMP [16, 17] or pure-Python implementations such as OMP4Py [18]; ordinary threads, which run in parallel when compiled code releases the global interpreter lock (GIL) [21]; and process-based parallelism with multiprocessing. Their relative merits for equation-discovery workloads have not been systematically compared on a modern multicore node.

This paper makes three contributions. (i) We formulate SINDy so that its expensive part is a single cache-blocked pass that accumulates the normal equations, safeguarded by a tall-skinny QR (TSQR) fallback [27] for ill-conditioned data, and implement it as one set of compiled kernels shared by all back ends. (ii) We describe task-parallel (ensemble) and data-parallel (library) decompositions and their implementation with prange, PyOMP, GIL-free threads and multiprocessing. (iii) We report a strong-scaling study from 1 to 48 hardware threads on a compute node of the University of Houston–Downtown (UHD) HPC cluster for the Lorenz [13] and Rössler [14] systems, validated against PySINDy. All code and benchmark scripts are released as open source.

References (27)