Closed HenrikBengtsson closed 6 years ago
Thanks, I'll fix that!
@HenrikBengtsson I don't know how could I test it on single-core setting, so could you please give me some hints, or confirm that now it the tests work fine?
If you set (parallel's) env var MC_CORES
to a single core, then future will acknowledge that, e.g.
$ export MC_CORES=1
$ Rscript -e "future::availableCores()"
mc.cores
1
This should also work when you do:
$ export MC_CORES=1
$ R CMD check --as-cran kernelboot_x.y.z.tar.gz
Or, in your R test script, you can use:
options(mc.cores = 1L)
@HenrikBengtsson thanks! I don't feel that this is urgent to update on CRAN, does it affect revdeps of your package?
Correct - nothing urgent, just though you might wanna know about it since the fix is simple.
Hi, while running revdep checks on globals packages in single-core mode, I got:
This is because tests/test_parallel.R:
assumes that
availableCores() > 1
. See also https://github.com/twolodzko/kernelboot/blob/master/R/kernelboot.R#L355-L368