You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ROBUSTNESS: Automatically disable multi-threading in forked processing ("multicore") #355
Forked parallel processing and multi-threading are not the best friends, e.g. futureverse/future.apply#29 (comment). I think it might be worth having future disable multi-threading in such cases by default.
One solution would be do depend on RhpcBLASctl and use:
Next release will have an optional prototype/beta feature for temporarily disabling multi-threading in futures using OpenMP. I'm holding back on ditto BLAS for the reason that I don't know how to get the current number of BLAS threads, i.e. I don't know what the corresponding "getter" for RhpcBLASctl::blas_set_num_threads(1L) is.
Activity
EmilRehnberg commentedon Jan 8, 2020
Thanks for all the digging @HenrikBengtsson I wouldn't have been able to diagnose this myself well enough.
I think the solution makes sense AFAIU it anyways. Still having 7 threads running while forking (as you mentioned in #348 ) doesn't seem helpful.
Add support for automatic disabling of multi-threading while running …
TESTS: Add test on forced single-threading for multicore futures [#355]
FIX: Quering OpenMP threads is not supported on all platforms [#355]
FIX: RhpcBLASctl return NULLs when compiled without OpenMP support [#355
HenrikBengtsson commentedon Jan 15, 2020
Next release will have an optional prototype/beta feature for temporarily disabling multi-threading in futures using OpenMP. I'm holding back on ditto BLAS for the reason that I don't know how to get the current number of BLAS threads, i.e. I don't know what the corresponding "getter" for
RhpcBLASctl::blas_set_num_threads(1L)is.