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

2020-02-09 Thread Murray Efford
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 
Sent: Monday, 10 February 2020 1:37 a.m.
To: Murray Efford; r-package-devel@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@r-project.org mailing list
> https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-package-develdata=02%7C01%7Cmurray.efford%40otago.ac.nz%7C6bfde86da46144efdcfc08d7ad5cd2fc%7C0225efc578fe4928b1579ef24809e9ba%7C1%7C0%7C637168486579693244sdata=XoirKkHlZFgqRutkhKvbKidl3AHm6aGTWfXBswN4HsA%3Dreserved=0
>

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


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

2020-02-09 Thread Uwe Ligges




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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


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

2020-02-09 Thread Murray Efford
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.

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?


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel