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] Strange behavior of Process.cpu_affinity on a 2-nodes system. #2265

Open
RyougiKukoc opened this issue Jun 6, 2023 · 2 comments
Open

Comments

@RyougiKukoc
Copy link

RyougiKukoc commented Jun 6, 2023

Summary

  • OS: Windows10
  • Architecture: 64bit
  • Psutil version: 5.9.5
  • Python version: 3.11.1
  • Type: core

Description

Working on a Intel Xeon Platinum 8175M * 2 machine, (24c 48t)*2. psutil.cpu_count() returns 96.

I want to specify the process working on different nodes, but when I set psutil.Process().cpu_affinity([48]), a strange behavior occurs as shown below.
error

In _pswindows.py, 48 is in the list of allcpus, so it accepts the id and passes to proc_cpu_affinity_set, and goes wrong.

So I think whether it is an unwanted behavior of proc_cpu_affinity_set on server that has multiple cpu sockets, or allcpus should be corrected and 48 in this case should be raise by a ValueError: Invalid CPU 48.

@giampaolo
Copy link
Owner

What's the translation of those Chinese (or Japanese?) characters?

@RyougiKukoc
Copy link
Author

What's the translation of those Chinese (or Japanese?) characters?

“参数错误”="Parameter Error"

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

2 participants