[Rd] rhub vs. CRAN fedora-*-devel, using armadillo & slapack
Ivan Krylov
kry|ov@r00t @end|ng |rom gm@||@com
Tue Jan 10 20:05:45 CET 2023
On Tue, 10 Jan 2023 16:27:53 +0000
RICHET Yann <yann.richet using irsn.fr> wrote:
> In facts, 10 threads are asked by armadillo for some LinAlg, which
> backs to two threads as warned.
I think you're right about your tests de-facto using two threads, but
it might be a good idea to _default_ to up to two threads in tests and
examples. This is especially valuable for third-party developers who
have to mass-test packages (one of which could be rlibkriging) in
parallel.
> - is there any reason that could explain that fedora-*-devel is so
> slow for this package or compilation of Rcpp/testthat ?
Compilation time is definitely not the reason. Something in tests/*
actually runs for 30 minutes by itself.
> - is there any chance that I can get a deeper log of what happened ?
If you split your tests into separate files under tests/*.R instead of
using a single tests/testthat.R calling the rest of the tests, R will
be able to show you the individual test file that hung and maybe the
line where it happened. (Also, you'll get per-file timing.) But that
is potentially a huge investment: you may have to rewrite the tests to
work outside the testthat harness, and you'd also have to prepare
another CRAN submission just to have those tests run. It's also against
CRAN policy to knowingly submit a package with unfixed ERRORs.
(Currently, R can only tell you that the tests hung in the
test_check('rlibkriging') call in the tests/testthat.R, which isn't
precise enough.)
These lines look a bit scary:
tests/testthat/bench-KrigingFit.R:
pack=list.files(file.path("bindings","R"),pattern = ".tar.gz",full.names = T) install.packages(pack,repos=NULL)
tests/testthat/notest-LinearRegression.R:
install.packages(pkgs="rlibkriging_0.7-2.tgz", type="source", repos=NULL)
library(rlibkriging)
I don't think that install.packages does anything besides raising a
warning and letting the test continue (there doesn't seem to be any
.tar.gz files inside the package on CRAN, so installation fails), but
it's probably not a good idea to install packages during testing [*].
This is also not quite right but harmless, because rlibkriging is
already loaded:
library(rlibkriging, lib.loc="bindings/R/Rlibs")
I'm afraid I don't know how to reproduce the timeouts you're seeing on
the CRAN Fedora machine.
--
Best regards,
Ivan
[*] I once wrote a test that launched multiple child R processes,
created a temporary library in each of them and installed the package
there. The test was designed to only run on the developer's machine in
order to test file format compatibility between different versions of
R. I ended up moving the test away from tests/*.R in order to make sure
it won't run by accident.
More information about the R-devel
mailing list