Multithreading - daducci/AMICO GitHub Wiki
Fitting threads
By default, AMICO uses all the available cores on your machine to speed up the fitting process. However, you can specify the number of threads to use with the nthreads configuration parameter:
import amico
ae = amico.Evaluation()
ae.set_config('nthreads', 4)
[!IMPORTANT] The
nthreadsparameter can be set to any positive integer value. If you set it to-1,AMICOwill use all the available CPUs on your machine.
BLAS threads
AMICO limits to 1 the number of threads used in the threadpool-backend of common BLAS implementations (e.g. OpenBLAS). This is done optimize light computations and avoid oversubscription of resources when using multithreaded methods of other packages (e.g. numpy.linalg). You can change this behaviour by setting the BLAS_nthreads configuration parameter:
import amico
ae = amico.Evaluation()
ae.set_config('BLAS_nthreads', 4)
[!IMPORTANT] The
BLAS_nthreadsparameter can be set to any positive integer value. If you set it to-1,AMICOwill use all the available CPUs on your machine.