-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
do not set CPU affinity on Linux (see #3097) #9639
Conversation
I agree that it is best to not set this by default, maybe we could have a command line switch to enable this? |
We didn't do this to inflate benchmark numbers; we did it to prevent openblas from causing |
@JeffBezanson, is this for distro builds of OpenBLAS that don't use Even for OpenBLAS compiled without |
@jakebolewski, there is already a command-line switch, called taskset. |
It seems that @wernsaar changed the default in OpenBLAS to Maybe we could set the |
If openblas' default is NO_AFFINITY now that should be good enough. I believe we already do dlopen openblas, so we can set the env var too for good measure. We already set |
Great, since we dlopen OpenBLAS this is easy. Just added a commit to set |
do not set CPU affinity on Linux (see #3097)
|
Note that since we still set |
Yes. I just got a report in Fedora about this, but AFAICT it's not related to Julia but to the Fedora OpenBLAS package. |
Is there still a reason for this behavior? I'm using Julia together with MPI and this overrides whatever MPI tells it to do and there is no way to disable this. I'd be in favor of just using what is assigned to the process. In applications I typically look at the mask to determine the number of available logical cores assigned to the process. I'm also confused about how this would interact with "julia -p 2". Does everyone take control of all available cores? |
See the discussion in #3097 and #1802 as well as this mailing-list thread. Julia should not touch the CPU affinity by default; not only is this a hack that degrades overall system usability to inflate benchmark numbers, but it also prevents people from using
taskset
manually.