[R-pkg-devel] Checking the number of cores used

Shu Fai Cheung @hu|@|@cheung @end|ng |rom gm@||@com
Mon Sep 18 16:10:05 CEST 2023


Hi All,

I know we should not use more than 2 cores in tests, vignettes, etc. I
encountered and solved this issue before. However, I still committed
this mistake in a new package and would like find out where the cause
is.

I have a package that already has parallel processing disabled by
default and I did not enable parallel processing in the examples and
tests (except for one test, which is always skipped by skip()).
However, I was told that somewhere in the package more than 2 cores
are used.

I checked several times and even added a temporary 'stop()` to "trap"
parallel processing but still could not find where the source of the
problem is.

I checked the timing in the log in R CMD check results from winbuilder
but everything seems OK. The user time and elapsed time are similar
for all the examples.

Is there any quick way to check where things go wrong regarding the
number of cores? It is not easy to find the source of the problems
when there are many examples and tests.

Regards,
Shu Fai



More information about the R-package-devel mailing list