[R-pkg-devel] CRAN Debian error installation time
Guillermo Vinue
gu|||ermov|nue @end|ng |rom gm@||@com
Tue Jan 28 16:07:38 CET 2025
Thank you for your help, Ben and Ivan. Unfortunately, the note persists:
https://win-builder.r-project.org/incoming_pretest/fawir_1.0_20250128_113725/Debian/00check.log
The public source repository from my package is here:
https://github.com/guivivi/fawir
The function that seems to cause the problem is
https://github.com/guivivi/fawir/blob/master/R/do_player_recruitment.R
because it uses RcppParallel::setThreadOptions
Until now, my package includes:
- a configure file with this content:
#!/bin/sh
# Globally restrict threads
export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1
export OPENBLAS_NUM_THREADS=1
export R_INSTALL_NCPUS=1
# Pass make flags
export MAKEFLAGS="-j1"
# Proceed with configuration
exit 0
- an .Rprofile file with this content:
Sys.setenv(R_INSTALL_NCPUS = 1)
- a zzz.R file with this content:
.onLoad <- function(libname, pkgname) {
# Restrict threading globally
Sys.setenv(OMP_NUM_THREADS = 1)
Sys.setenv(MKL_NUM_THREADS = 1)
Sys.setenv(OPENBLAS_NUM_THREADS = 1)
Sys.setenv(R_INSTALL_NCPUS = 1)
# Set RcppParallel to single-threaded
RcppParallel::setThreadOptions(numThreads = 1)
}
- a vignette with these headers:
%\VignetteDepends{RcppParallel}
%\VignetteKeyword{no_install}
- the option \dontrun{} in the examples of the function that uses
setThreadOptions
- this command inside do_player_recruitment:
if (!identical(Sys.getenv("NOT_CRAN"), "true")) {
invisible(capture.output({word_vectors <-
glove_model$fit_transform(tcm, n_threads = 1)}))
}
But the note from CRAN persists.
Can anyone provide me with any insight? Many thanks in any case.
Kind regards,
Guillermo
El lun, 27 ene 2025 a las 21:36, Ivan Krylov (<ikrylov using disroot.org>)
escribió:
> Dear Guillermo,
>
> Welcome to R-package-devel!
>
> В Mon, 27 Jan 2025 19:26:10 +0100
> Guillermo Vinue <guillermovinue using gmail.com> пишет:
>
> > I am writing to you because I am getting this NOTE from the CRAN
> > Debian machine that is not allowing CRAN acceptance: "Installation
> > took CPU time 2.9 times elapsed time". Uwe Ligges told me that this
> > means that I am using more than 2 cores, but I must not use more than
> > 2 by default.
>
> The key word here is "installation". Check your configure/build
> scripts. Are you using CMake, Ninja, or Cargo? Does it default to using
> as many parallel processes as feasible? Most build systems nowadays
> accept the -j flag to control that. Make sure to give it the flag that
> limits it to two processes (most likely -j 2) when running on CRAN:
>
> http://contributor.r-project.org/cran-cookbook/code_issues.html#using-more-than-2-cores
>
> The above advice is very general and may completely miss the mark. If
> you provide the links to the latest CRAN pre-test logs and the package
> source code, someone will be able to give more precise advice.
>
> --
> Best regards,
> Ivan
>
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list