[R-pkg-devel] Installation took CPU time XXX times elapsed time
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Fri Oct 3 14:24:22 CEST 2025
On 1 October 2025 at 16:58, fabian.bernhard using unibe.ch wrote:
| Dear list members,
|
| We are trying to get our package rsofun updated on CRAN. The source code is hosted in the master branch at: https://github.com/geco-bern/rsofun
|
| The CRAN pretest fails on Debian with the NOTE: “Installation took CPU time 2.8 times elapsed time”. For full output see: https://win-builder.r-project.org/incoming_pretest/rsofun_5.1.0_20251001_152239/
|
| From what I gathered, the discrepancy between walltime and elapsed time hints at use of more than two cores. Note that contrary to issues I found online, here it appears to be linked to installation of the package and not the test suite, examples, or vignettes. Test suite, examples, and vignettes report equal walltime and elapsed time.
|
| The cookbook (https://contributor.r-project.org/cran-cookbook/code_issues.html) suggests use of the j-flag for compilation (which I am unsure how to implement). Whereas LLMs suggest to ensure all dependencies are stated in ‘src/Makevars’ (which I tried to ensure). However still no success with the current version of the code.
|
| I would appreciate any suggestions how to resolve this.
I cannot replicate this in a container running r2u (to get all your nunerous
dependencies quickly as binaries) running Ubuntu 24.04:
[...]
* checking whether package ‘rsofun’ can be installed ... OK
* used C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’
* used Fortran compiler: ‘GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’
* checking installed package size ... OK
[...]
so you could try to ask this if this may have to do with their use of clang
and flang-new. That said, I somehow doubt that is the case as it would hit
every package with Fortran sources.
>From a first glance your src/Makevars is correct (and elaborate). You do not
ask for any parallel compilation (which is what this check is about -- as
CRAN runs many builds and checks in parallel in their server they have to
ensure no one build 'runs away' with resources).
Yet if you look at the 00install.out in that URL reference you see that your
compilations _happens twice_ once before and and once after the linking of
rsofun.so. I cannot say if that causes it, but I would try to rework that:
there should be no need to compile the Fortran files and wrappersc.c twice.
Dirk
--
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-package-devel
mailing list