feos.set_num_threadsΒΆ
- feos.set_num_threads(n)ΒΆ
Set the number of threads used for any parallel calculations.
Must be called before any parallel computation is performed and before the FEOS_MAX_THREADS environment variable takes effect. If the thread pool has already been initialized β either because FEOS_MAX_THREADS was set at import time or because a parallel function has already run β this call has no effect and a warning is emitted.
- Parameters:
n (int) β Number of threads. Pass 0 to use the default (number of logical CPUs).
Example
>>> import feos >>> feos.set_num_threads(4)