Multithreading

16 views
Skip to first unread message

Андрей Черепанов

unread,
Feb 3, 2026, 5:59:39 AMFeb 3
to Cantera Users' Group
Greetings, developers and users of Cantera Software!
I have a question about cantera calculation. I noticed that in version 3.3.0a1 cantera with python3 interface began to utilize more than one thread to compute. Does newer version (after 3.0) uses all possible threads? Is there a way to actually control the number of available  threads?

system Ubuntu 24.04.3
CPU: 12th Gen Intel(R) Core(TM) i9-12900K
On-line CPU(s) list:    0-23

Снимок экрана от 2026-02-03 17-57-57.png
Thanks in advance for your answer!
Andrei

Ray Speth

unread,
Feb 13, 2026, 10:38:30 AM (7 days ago) Feb 13
to Cantera Users' Group

Hi Andrei,

Cantera will use multithreaded linear algebra routines if they are available when it is compiled. This is not a new feature, and has been around for many years.

The main place where this provides a performance benefit is in the reactor network solver, and perhaps to a more limited extent the 1D solver (the parallel efficiency of the banded solver used here is not great in some LAPACK implementations). You can control how many threads are used for most of these by setting the OMP_NUM_THREADS environment variable, or variables that are particular to the LAPACK implementation you’re using.

Regards,
Ray

Reply all
Reply to author
Forward
0 new messages