Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[windows] process.cpu_affinity will have some problems on a 72-core machine #1848

Closed
tomatome opened this issue Oct 12, 2020 · 5 comments
Closed

Comments

@tomatome
Copy link

psutil version: 5.4.6
python version: 3.7.5

When the number of cpu cores of the system is greater than 64, cpu_affinity will have problems

@giampaolo
Copy link
Owner

giampaolo commented Oct 19, 2020

My mistake, didn't realize this is about CPU affinity, not CPU times (#1809), so I'm reopening.
@tomatome what problem do you have exactly?

@giampaolo giampaolo reopened this Oct 19, 2020
@tomatome
Copy link
Author

My mistake, didn't realize this is about CPU affinity, not CPU times (#1809), so I'm reopening.
@tomatome what problem do you have exactly?

cpus = [0, 1, 2, 3, ......69, 70, 71]
psutil.Process().cpu_affinity(cpus)

The cpu affinity setting failed which caused my program to quit, so how can the setting succeed?
and there are many threads in my process, I want to find a simple way to solve this problem

@giampaolo
Copy link
Owner

The cpu affinity setting failed which caused my program to quit

Failed how? Please, post the traceback.
Also, how many CPUs are on your system (psutil.cpu_count())?

@no-response
Copy link

no-response bot commented Jan 9, 2021

This issue has been automatically closed because there has been no response for more information from the original author. Please reach out if you have or find the answers requested so that this can be investigated further.

@no-response no-response bot closed this as completed Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@giampaolo @tomatome and others