[R-pkg-devel] Byte-compilation problem for R-package ddalpha after update to R 3.5.0

MOZHAROVSKYI Pavlo pavlo.mozharovskyi at ensai.fr
Tue May 1 08:31:09 CEST 2018


Dear Joris,

indeed, the the data sets saved as R-files constituted the issue. As suggested by you, saving them as *.rda helped.

Enormous thanks for your prompt and useful advice. The new version of the R-package ddalpha (1.3.3, on CRAN now) causes no problems during the byte-compilation phase.

Best regards,
Pavlo


On 30/04/2018 11:45, Joris Meys wrote:
Dear pavlo,

fwiw, the binary of ddalpha 1.3.2 installs just fine on Windows 10. When building from source, I get a whole lot of warnings about uninitialized variables, comparisons between signed and unsigned integers. The compilation of the source code doesn't have a large impact on the memory. I can confirm that the last step of the installation process (the byte compiling of the actual package) requires at least 8 Gb. I have 8Gb DDR3 of which 2.5 Gb is used by other processes. During the build process it fills up and at one point  I have another 3 Gb in swap. That works on Windows 10 (the installation process exits successfully) but might well be the reason why on other systems you get the errors you see.

One thing I noticed, is humongously huge code files (eg dataf.tecator.R is a whopping 624 Kb). I would start with storing the data structures you include as a .RDS file in a data folder (eg a file tefactor.rda containing a data structure tefactor) , and rewrite the functions as

dataf.tefactor <- function() {return(tefactor) }

That will save in total several Mb of code files that need to be processed by the byte compiler. Not sure this will solve the problem, but it's a low hanging fruit ready to pick. If you're not sure what I'm talking about, you can link me to the github repo (if you have one) and I'll take a look.

Cheers
Joris

On Mon, Apr 30, 2018 at 2:32 AM, MOZHAROVSKYI Pavlo <pavlo.mozharovskyi at ensai.fr<mailto:pavlo.mozharovskyi at ensai.fr>> wrote:

After the R-update to version 3.5.0 there seems to be a problem with our
R-package ddalpha. As it seems that the problem is connected to the
newly introduced byte-compilation on installation, we feel unable to
locate its root cause and ask for your help.

During the byte-compilation of the package ddalpha (latest (CRAN)
version 1.3.2), an immense amount of memory (more than 4Gb) is consumed.
Further, byte-compilation takes at least several minutes to complete on
Windows and MacOS, while it throws an error on the Linux system where it
does not install at all:

Error message:
Error in system2(file.path(R.home("bin"), "R"), c(if (nzchar(arch))
paste0("--arch=",  :
   cannot popen ' '/usr/lib64/R/bin/R' --no-save --slave 2>&1 <
'/tmp/RtmpU4dXOt/file3fb5b89c507'', probable reason 'Cannot allocate memory'

We suspect a mistake in the design of our package and would appreciate
your advice. From our side, we are ready to undertake necessary actions
as soon as possible.

Here are the existing discussions on this topic:

- SO:
https://stackoverflow.com/questions/50028566/cannot-allocate-memory-while-re-installing-r-package-ddalpha-under-arch-linu
- Arch Linux: https://bbs.archlinux.org/viewtopic.php?id=236517
- RStudio Community:
https://community.rstudio.com/t/memory-allocation-problem-while-re-installing-ddalpha-package-after-upgrade-to-r-3-5-0/7663/3

Thank you a lot for your help!

Best regards,
Pavlo


--
------------------------------------------------------------
Pavlo Mozharovskyi
ENSAI - Campus de Ker-Lann
Rue Blaise Pascal - BP 37203
35172 Bruz cedex
FRANCE

Tel: +33 (0)2 99 05 32 55
Fax: +33 (0)2 99 05 32 05
Email: pavlo.mozharovskyi at ensai.fr<mailto:pavlo.mozharovskyi at ensai.fr>

http://www.ensai.fr/enseignant/alias/pavlo-mozharovskyi.html
______________________________________________
R-package-devel at r-project.org<mailto:R-package-devel at r-project.org> mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel



--
Joris Meys
Statistical consultant

Department of Data Analysis and Mathematical Modelling
Ghent University
Coupure Links 653, B-9000 Gent (Belgium)
<https://maps.google.com/?q=Coupure+links+653,%C2%A0B-9000+Gent,%C2%A0Belgium&entry=gmail&source=g>

tel: +32 (0)9 264 61 79
-----------
Biowiskundedagen 2017-2018
http://www.biowiskundedagen.ugent.be/

-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php


--
------------------------------------------------------------
Pavlo Mozharovskyi
ENSAI - Campus de Ker-Lann
Rue Blaise Pascal - BP 37203
35172 Bruz cedex
FRANCE

Tel: +33 (0)2 99 05 32 55
Fax: +33 (0)2 99 05 32 05
Email: pavlo.mozharovskyi at ensai.fr<mailto:pavlo.mozharovskyi at ensai.fr>

http://www.ensai.fr/enseignant/alias/pavlo-mozharovskyi.html

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list