Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to control the number of CPU cores used by POT? #385

gangcai started this conversation in General
Discussion options

Describe the bug

It seems that for some functions of POT, all the CPU cores available for the machine will be used. How can I control the number of CPU cores to be used? For example, if the computer has 20 CPU cores, all of them will be used by POT, how can I control only part of them (such as 10 CPU cores) being used?

You must be logged in to vote

Replies: 1 comment

Comment options

Functions such as emd/emd2 have a parameter numThreads that allows to select the number of CPU used by the solver.

But note that most solver actually use numpy that use multiple processors on marix multiplucation operation automatically. For those functiuosn you need to tell NUMPY how many cpu you want to use. On linux you can usually set them with the environment variable

export OPENBLAS_NUM_THREADS = 1
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
Converted from issue

This discussion was converted from issue #384 on June 08, 2022 13:01.

AltStyle によって変換されたページ (->オリジナル) /