set_num_threads.py

jcmwave.set_num_threads(n_threads=None)

Sets number of threads used by JCMsolve for parallelization on SMP machines.

Parameters:n_threads (int) – number of parallel threads to be used by JCMsuite. If missing the number of available CPU cores is used.

Detailed Description

Sets the environment variable OMP_NUM_THREADS. A value larger than one will cause JCMsolve to run in parallel mode.

Warning

A value larger than the number of idle CPUs may cause a performance loss.