Closed HenrikBengtsson closed 1 year ago
Thanks! The function where parallel::detectCores()
is invoked is deprecated. The respective function has been superseded by futuremice()
.
Will change, though.
futuremice()
uses the availableCores
routine. I think it is not worthwhile anymore to change it in the deprecated parlmice()
, so I am closing.
Hello,
please avoid using
parallel::detectCores()
to infer how many CPU cores there are available to R. For example, when this is used on a machine where multiple users or multiple processes are running, it risks overloading the machine making it sluggish or even bringing the machine to a near halt, causing all users to suffer. It also does not respect settings in Linux containers and environments like the RStudio Cloud. See https://www.jottr.org/2022/12/05/avoid-detectcores/ for further arguments against relying onparallel::detectCores()
.(Disclaimer: I'm the author). You could use
parallelly::availableCores()
instead. It is backward compatible withparallel::detectCores()
, but is also agile to a lot more settings, so it's less likely to cause damage.