set_num_threads¶
- set_num_threads(num_threads: int) None¶
Set the maximum number of logical cores that Amplify uses.
This function sets an upper limit on the number of logical cores that Amplify uses. The limit applies to the parallel formulation, to graph embedding with
Minor, and to the size of the internal thread pool. The value is a limit and not a request. If you give0or a value that is larger than the number of concurrent threads that the hardware supports, Amplify uses that hardware number. In parallel solving withparallel_solve(), the number of concurrent requests is set independently, with a default that is at least the number of jobs. Those requests wait for a solver, so this limit does not apply to them.- パラメータ:
num_threads (int) -- Maximum number of logical cores to use.
0restores the default.