Cc1plus.exe: out of memory allocating 65536 bytes

Hello,

I’m currently running into cc1plus.exe: out of memory allocating 65536 bytes error on AWS EC2 Windows instances.

They have 32 cores, 128 GB of RAM, 25 GB of SWAP and the software on them is mirroring the current build machines we have, still I ran into that error.
I have tried the following with no success yet https://stackoverflow.com/questions/12231266/qt-compiling-error-out-of-memory-allocating-134-mb-cc1plus-exe-not-found

Note: on the on-site build machines we have, this isn’t happening.

Did anyone ran into this error and managed to fix it ?

I would guess that it is generating debug symbols. If so, you can prevent that by adding -g0 to the compilation flags.

Note that on the on-site build machines we have, this isn’t happening.

I have this same error

cc1plus.exe: out of memory allocating 427808 bytes
make: *** [C:/PROGRA~1/R/R-40~1.2/etc/i386/Makeconf:227: stanExports_lgp_latent.o] Error 1

with my package GitHub - jtimonen/lgpr: R-package for interpretable nonparametric modeling of longitudinal data using additive Gaussian processes. Contains functionality for inferring covariate effects and assessing covariate relevances. Various models can be specified using a convenient formula syntax. when trying to install from source
on my Windows machine. The problem appeared after updating it to use rstan 2.26. The problem
does not appear on winbuilder or github CI, and package went to CRAN. It is mostly annoying because
I can’t develop on my computer now.

It seems like you’re using a 32 bit installation of R

> R.version
               _                           
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          4                           
minor          0.2                         
year           2020                        
month          06                          
day            22                          
svn rev        78730                       
language       R                           
version.string R version 4.0.2 (2020-06-22)
nickname       Taking Off Again

And I can compile and fit an example model in rstan. I have both both i386 and x64 compilers as they both come with the 64-bit Rtools40. And in Program FilesR/R-4.0.2/bin I have both i386 and x64. I assume those both come with the 64-bit installation of R as well. I don’t know why this would be a problem and where I have gone wrong, as I have just followed the Rstan installation instructions and C++ toolchain setup instructions. Everything worked with the same R installation before rstan 2.26.

When using R4.1 and older all packages are built for both 32-bit and 64-bit by default. You can disable this by adding Biarch: false to your DESCRIPTION file or by upgrading your R version.

R-oldrel is currently R4.2, which is why there are no issues on CI/CRAN

Thanks, that is good to know. Configuring C Toolchain for Windows · stan-dev/rstan Wiki · GitHub says that the version of RStan currently available on CRAN is not compatible with R4.2-4.3, which why I haven’t upgraded. I wonder if that is outdated info now.

Ah yes it is, that’s obsolete now that 2.26 is on CRAN. Thanks for letting me know, I’ve just updated it

1 Like