-
-
Notifications
You must be signed in to change notification settings - Fork 567
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
Unify computation of number of parallel jobs #33317
Comments
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:4
If I'm reading the old code right, the default number of threads was 2, but you've changed it to 10. At least one reason to keep the default low was for the case of shared machines, where a single user should only use many cores at a time intentionally. |
comment:5
Replying to @jhpalmieri:
Yes, removing |
comment:6
Replying to @jhpalmieri:
Yes, you are right. Some of the defaults changed as part of this refactoring since the defaults used where not homogeneous. Personally, I would say that we should try to use a high parallelization as the default, because most systems today have more than 8 cores (especially developer machines). People in a shared environment can still overwrite this of course. But if you think another default is more reasonable, this can be easily changed. |
comment:7
ALL_CAPS variables in |
comment:8
Also, I don't see why the words |
comment:9
Also, the point of |
Replying to @tobiasdiez:
... no, that's not what it does |
comment:11
Replying to @tobiasdiez:
I'm concerned with mathematicians not knowing that they should change it and so accidentally overloading a system. We should not rely on users knowing what they're doing. |
comment:12
Replying to @jhpalmieri:
+1 Users who need speed will figure out how to change They can set the number of threads to use |
comment:13
Replying to @slel:
+1 as well. We could very likely upset a sysadmin, especially with such a change where even a more knowledgeable user might not be paying so close attention to the Sage development cycle. |
comment:14
Replying to @mkoeppe:
I took the |
comment:15
Replying to @mkoeppe:
I didn't delete this script, but only the one in src/bin. |
comment:16
Replying to @tscrim:
I think you misunderstood me. I didn't change the user-facing multiprocessing for calculation, i.e. what Anyway, if the special treatment of compilation and doctests is indeed preferred, what would be a good default? No parallelization at all if the user doesn't specify SAGE_NUM_THREADS? |
comment:17
Replying to @tobiasdiez:
You deleted its use in |
comment:18
Replying to @tobiasdiez:
Yes, please change it back. |
Currently, the number of jobs used for parallel operations is re-computed and set in various places. In this ticket, we unify this to one central place in
sage.env
, which is then reused across the whole infrastructure. The only exception is the scriptbuild/bin/sage-build-num-threads
which is only needed in the build of thesage-conf
package. This can probably be improved as well, but we leave it for a follow-up ticket.Changes in detail:
thread_count
insage.env
that based on the environment variableSAGE_NUM_THREADS
and the number of CPUs computes the number of parallel jobs sage should use.THREAD_COUNT
) everywhere where previouslySAGE_NUM_THREADS
has been used.sage.env
.SAGE_NUM_THREADS
on CI, but let this be calculated using the number of CPUs available.CC: @mkoeppe @jhpalmieri @tscrim @nthiery @fchapoton
Component: build
Branch/Commit: public/build/num_threads @
af4c3e2
Issue created by migration from https://trac.sagemath.org/ticket/33317
The text was updated successfully, but these errors were encountered: