[R-pkg-devel] Default number of cores <=2

Murray Efford murr@y@e||ord @end|ng |rom ot@go@@c@nz
Sun Feb 9 19:22:16 CET 2020


Except that the cited wording cannot be literally correct ("never use more than two") and therefore appears to refer only to the check process. Some rewording may be needed if the intended meaning is "never default to more than two".
Thanks, Uwe, for your efforts to make me understand.
Murray
________________________________________
From: Uwe Ligges <ligges using statistik.tu-dortmund.de>
Sent: Monday, 10 February 2020 1:37 a.m.
To: Murray Efford; r-package-devel using r-project.org
Subject: Re: [R-pkg-devel] Default number of cores <=2

On 09.02.2020 09:56, Murray Efford wrote:
> The CRAN Repository Policy (revision 4170) states "If running a package uses multiple threads/cores it must never use more than two simultaneously: the check farm is a shared resource and will typically be running many checks simultaneously" and I try to respect this limit in package example code. However I was recently warned that package functions must not default to >2 cores, even if checks are limited to 2 cores. I see the sense in this, to not hog resources on multi-user systems, but I cannot find it in the documentation. My package 'secr' has unintentionally violated such a policy since October (multithreading with RcppParallel in function 'secr.fit'). No complaints so far, but I'd like to dodge the pain of rejection at my next revision.
>
> Further, "not all CRAN machines use _R_CHECK_LIMIT_CORES_", so that environment variable cannot be relied upon to apply a 2-core limit during checking.


You  found it: The cited CRAN policies say that you must not use more
than 2 by default.


> I would appreciate pointers to the relevant documentation and guidance on how others handle this. Is it unavoidable that for users to exploit multiple cores they must specify a non-default function argument, or similar?

Exactly.

Best,
Uwe Ligges


>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-package-devel&data=02%7C01%7Cmurray.efford%40otago.ac.nz%7C6bfde86da46144efdcfc08d7ad5cd2fc%7C0225efc578fe4928b1579ef24809e9ba%7C1%7C0%7C637168486579693244&sdata=XoirKkHlZFgqRutkhKvbKidl3AHm6aGTWfXBswN4HsA%3D&reserved=0
>



More information about the R-package-devel mailing list