Milestone #15372: art multi-threading phase 1
Add nthreads back-off based on grid-provided information
art is run on a grid site, the TBB initializer needs to use a maximum number of threads that does not exceed the allowed number as specified by the grid node. According to the grid folks:
HTCondor already sets an environment variable 'OMP_NUM_THREADS' to indicate the number of CPUs available in the slot. I think that should suffice for your use case? The environment variable should also be available on offsite pilots.
Can you submit a few test jobs (onsite and offsite) to see if the environment variable is sufficient?
If not, we can work on alternate ways of getting you the cpu information from the slot.
#2 Updated by Kyle Knoepfel about 1 year ago
An email from Chris Green:
Assuming we are going to use (say) OMP_NUM_THREADS in art, then job scripts should:
HTCondor (as discussed):
environment = "OMP_NUM_THREADS=$$(CPUS)"
Note that we could do everything in art with the exception of older Condor installations.