parallelly icon indicating copy to clipboard operation
parallelly copied to clipboard

availableThreads(): Report on settings controlling amount of multi-threading

Open HenrikBengtsson opened this issue 1 year ago • 0 comments

Wish

Add availableThreads(), which works similarly to availableCores(), but instead reports on settings that control multi_threading_, in contrast to multi_processing_.

It should work something like:

> parallelly::availableThreads(which = "all")
system nproc omp tbb rcpp
    16    16   4   4    8  

Open questions

  • What should, say, system report on? Should it be detectCores() * detectThreadsPerCores()?
  • Should this also report on anything that availableCores() report on? Basically, availableCores() * detectThreadsPerCores()?
  • For queries that require loading a package (e.g. RcppParallel::defaultNumThreads()), what should happen? Should it return NA_integer_ if package is not loaded? Should it attempt to load it? (probably not)
  • ...

See also

  • Issue #47

HenrikBengtsson avatar Jan 31 '24 16:01 HenrikBengtsson