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
Add env variable to limit number of threads used by ROOT #9805
Comments
Removed "experiment" label to cross-check that Ed can add it himself :-) |
Should this not be some generic grid variable that we honor? Does that exist, or if not, should it be defined? What does the GDB say - could you talk to them? |
This idea is to have an optional ROOT variable we can set in the PanDA pilot or the PanDA worker node wrapper environment that allows to limit the number of threads spawned on the worker node by ROOT. We did this in the past e.g. with We steer AthenaMP and MT jobs via the environment variables ATHENA_PROC_NUMBER and ATHENA_CORE_NUMBER and set them to the PanDA queue core count. Asking the GDB might be a bit too high level committee, but if needed this could be brought up in some WLCG operations meetings if others would be interested to steer ROOT in a similar way. |
Hi, hard coding anything related to Athena into ROOT seems weird to me. Maybe the wrapper should take some generic value and then set application specific variables like ROOT_MAX_THREADS? |
Yes, that’s what we’re proposing. |
Ok - maybe I misunderstood @Axel-Naumann's "generic grid variable that we honor" .. sorry! |
What's wrong with grid sites agreeing on an env var (whatever the mechanism) that sets the max threads to be started by any process for any grid job? Why would we want to only steer ROOT, only through PanDA - what happens if there's an analysis job that an ATLAS physicist starts outside ATHENA, outside PanDA? What if it's a CMS physicist? How isn't this a generic issue to be addressed, outside ATLAS or ROOT? Maybe such an env var already exists - I sort of remember that the grid sites agreed to define one, actually... Do you want to drive this (my preference!) or do you prefer that I talk to WLCG folks? |
Hi @Axel-Naumann - we discussed this again internally. From our side, we're happy with whatever suits you best (it's not really our place to decide what the variable is called or how this is implemented). However it is at least conceivable that we might want to limit ROOT to less threads than provided by the queue, in which scenario we would need |
Just a reminder of this ticket. It'd be nice to give users a way to handle this with an environment variable. We can (and often do) set this for virtually all other programs we run on the grid individually. |
Just for the record: ROOT currently already respects the cgroups #CPU limits (see |
This overrides the number of threads that ROOT will be using in the thread pool. This can be set to be higher or lower than the number of physical cores; it can be specified as decimal, octal, or hex. Fixes issue root-project#9805.
We completely agree and the above PR implements what you propose. Apologies for the long wait for such a simple thing! |
This overrides the number of threads that ROOT will be using in the thread pool. This can be set to be higher or lower than the number of physical cores; it can be specified as decimal, octal, or hex. Fixes issue root-project#9805. Mention the env var in `ROOT::EnableImplicitMT()`'s doc.
This overrides the number of threads that ROOT will be using in the thread pool. This can be set to be higher or lower than the number of physical cores; it can be specified as decimal, octal, or hex. Fixes issue #9805. Mention the env var in `ROOT::EnableImplicitMT()`'s doc.
This overrides the number of threads that ROOT will be using in the thread pool. This can be set to be higher or lower than the number of physical cores; it can be specified as decimal, octal, or hex. Fixes issue root-project#9805. Mention the env var in `ROOT::EnableImplicitMT()`'s doc.
Hi @Axel-Naumann, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
Hi,
ATLAS would like to request the addition of a mechanism to control the number of threads used by ROOT with implicit multi-threading enabled, ideally via an environment variable (e.g.
ROOT_MAX_THREADS
). The primary motivation for this is to give GRID sites an easier way to limit the number of threads to match that of a queue.Thanks!
Ed
The text was updated successfully, but these errors were encountered: