Problems with crashing R session

Hello guys.
After I updated my R to version 4.04 it started showing some inconsistencies in the stan program (RStan version 2.21.2) and that is bothering me a lot when programming, besides the feeling that it is slightly slower.

When I start an RStudio (Version 1.4.1103) session I import my data, I load the stan model [stan_model ()], and when I am going to draw the samples [sampling ()] with large iterations (2,000 for example) at the first moment it is ok but if I do it again (I run it again) for the second times, all routine (even making a brief modification to the stan model or not) the RStudio crashing the session. And many times I have to restart not only the R session but the computer itself to be able to run the script again and get my posteriors.

Can someone explain to me why this is happening, as it did not happen before the update?

And when that is not the case, many times when running the sampling() function, it presents the following error:
Error: vector 6328.0 Gb cannot be allocated
or even:
Error in get (“storage”, envir = as.environment (x)):
storage object not found

Below some information about my pc system. My sincere thanks in advance. I am a loverstan.

sessionInfo()

sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8.1 x64 (build 9600)

Matrix products: default

locale:
[1] LC_COLLATE=Portuguese_Brazil.1252
[2] LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252
[4] LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252

attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base

other attached packages:
[1] rstan_2.21.2 StanHeaders_2.21.0-7
[3] gridExtra_2.3 ggplot2_3.3.3

loaded via a namespace (and not attached):
[1] tinytex_0.29 tidyselect_1.1.0 xfun_0.21
[4] purrr_0.3.4 splines_4.0.4 lattice_0.20-41
[7] V8_3.4.0 colorspace_2.0-0 vctrs_0.3.6
[10] generics_0.1.0 stats4_4.0.4 loo_2.4.1
[13] mgcv_1.8-33 rlang_0.4.10 pkgbuild_1.2.0
[16] pillar_1.4.7 glue_1.4.2 withr_2.4.1
[19] matrixStats_0.58.0 lifecycle_1.0.0 munsell_0.5.0
[22] gtable_0.3.0 codetools_0.2-18 labeling_0.4.2
[25] inline_0.3.17 callr_3.5.1 ps_1.5.0
[28] curl_4.3 parallel_4.0.4 Rcpp_1.0.6
[31] scales_1.1.1 RcppParallel_5.0.2 jsonlite_1.7.2
[34] farver_2.0.3 digest_0.6.27 processx_3.4.5
[37] dplyr_1.0.4 grid_4.0.4 cli_2.3.0
[40] tools_4.0.4 magrittr_2.0.1 tibble_3.0.6
[43] crayon_1.4.1 tidyr_1.1.2 pkgconfig_2.0.3
[46] ellipsis_0.3.1 Matrix_1.3-2 prettyunits_1.1.1
[49] assertthat_0.2.1 R6_2.5.0 nlme_3.1-152
[52] compiler_4.0.4

mod_MMF.stan (1.5 KB)

Script_forum.R (3.3 KB)

There is a longish post here on this error under Windows.

Hopefully one of those fixes will help.

1 Like

Thank you very much for your attention @Ara_Winter . But it didn’t work. The problem of crashing the R session still remains.

In summary, the solution suggested by the topic was:

Thanks a lot for sticking with me through this very long problem solving act.
Remove Sys.setenv(BINPREF = “C:/Rtools/mingw_$(WIN)/bin/”) from your .Rprofile.
And
moving or rename Documents/.R/Makevars.win.
solved the problem

But it didn’t work in my case

A couple of things to check, which are known to cause crashes:

  • Make sure that you delete any existing .rds files for the model after the upgrade from R3.x → R4.x (or run with rstan_options(auto_write = FALSE))
  • Make sure that your Makevars.win file does not contain -march=native
  • If you run the model multiple times, try assigning each run to a separate output in R, rather than overwriting the original
2 Likes

Thank @andrjohns very much for your attention.
Let’s go tray what do you recommend:

Make sure that you delete any existing .rds files for the model after the upgrade from R3.x → R4.x (or run with rstan_options(auto_write = FALSE));

Yes. I made sure of that. I deleted the .rds file and when I declared the stan model [through “stan_model(…)” function], it created a new file, and even then the R session crashing.

Make sure that your Makevars.win file does not contain -march=native

How do I make sure of that? I would like more guidance on this, if possible. What is curious is that when I run “library(rstan)” the return at the command prompt is:

Carregando pacotes exigidos: StanHeaders
Carregando pacotes exigidos: ggplot2
Learn more about the underlying theory at
rstan (Version 2.21.2, GitRev: 2e1f913d3ca3)
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)
Do not specify ‘-march=native’ in ‘LOCAL_CPPFLAGS’ or a Makevars file

If you run the model multiple times, try assigning each run to a separate output in R, rather than overwriting the original;

I will do this as good programming practice, but in this case, in the first run it crashing the R session, that is, I can’t even assign an object for the first time RStan model output because doesn’t work.

What do you get from:

readLines("~/.R/Makevars.win")
1 Like

readLines("~/.R/Makevars.win")
[1] “”
[2] " CXX14FLAGS += -mtune=native -O3 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2"

If the problem is Windows operating system I can switch to Linux without any problem, if it is a suggestion. The priority is my models than the operating system for sure.

Is there also a crash with the rstan example model? Can you run:

example(stan_model,package="rstan",run.dontrun=TRUE)
1 Like

It works without any problem. At most it shows this message:

Warning message:
In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
‘C:/rtools40/usr/mingw_/bin/g++’ not found

Hm, let me get a bit more information about your system. Can you post the outputs from:

Sys.getenv("BINPREF")
Sys.getenv("PATH")
readLines("~/.Renviron")
readLines("~/.Rprofile")
devtools::session_info("rstan")
1 Like

1) Sys.getenv(“BINPREF”)

Sys.getenv(“BINPREF”)
[1] “”

2) Sys.getenv(“PATH”)

Sys.getenv(“PATH”)
[1] “C:\rtools40\usr\bin;C:\Program Files\R\R-4.0.4\bin\x64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\UCRT\;C:\Program Files\Intel\UCRT\;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\CineForm\Tools;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Users\Carlos Zarzar\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64"”

3 )readLines("~/.Renviron")

readLines("~/.Renviron")
[1] “PATH=”{RTOOLS40_HOME}\\usr\\bin;{PATH}""

4) readLines("~/.Rprofile")

readLines("~/.Rprofile")
Error in file (con, “r”): unable to open the connection
In addition: Warning message:
In file (with, “r”):
could not open file ‘D: / Users / Carlos Zarzar / Documents / .Rprofile’: No such file or directory

5) devtools::session_info(“rstan”)

devtools::session_info(“rstan”)
Error in loadNamespace(name) : there is no package called ‘devtools’

So I installed the package “devtools” and output was

devtools::session_info(“rstan”)

  • Session info ---------------------------------------------
    setting value
    version R version 4.0.4 (2021-02-15)
    os Windows 8.1 x64
    system x86_64, mingw32
    ui RStudio
    language (EN)
    collate Portuguese_Brazil.1252
    ctype Portuguese_Brazil.1252
    tz America/Sao_Paulo
    date 2021-02-26

  • Packages -------------------------------------------------
    ! package * version date lib source
    assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.0)
    backports 1.2.1 2020-12-09 [1] CRAN (R 4.0.3)
    BH 1.75.0-0 2021-01-11 [1] CRAN (R 4.0.3)
    brio 1.1.1 2021-01-20 [1] CRAN (R 4.0.3)
    callr 3.5.1 2020-10-13 [1] CRAN (R 4.0.3)
    checkmate 2.0.0 2020-02-06 [1] CRAN (R 4.0.0)
    cli 2.3.0 2021-01-31 [1] CRAN (R 4.0.3)
    colorspace 2.0-0 2020-11-11 [1] CRAN (R 4.0.3)
    crayon 1.4.1 2021-02-08 [1] CRAN (R 4.0.3)
    curl 4.3 2019-12-02 [1] CRAN (R 4.0.0)
    desc 1.2.0 2018-05-01 [1] CRAN (R 4.0.0)
    diffobj 0.3.3 2021-01-07 [1] CRAN (R 4.0.3)
    digest 0.6.27 2020-10-24 [1] CRAN (R 4.0.3)
    ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.3)
    evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.0)
    fansi 0.4.2 2021-01-15 [1] CRAN (R 4.0.3)
    farver 2.0.3 2020-01-16 [1] CRAN (R 4.0.0)
    ggplot2 3.3.3 2020-12-30 [1] CRAN (R 4.0.3)
    glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.3)
    gridExtra 2.3 2017-09-09 [1] CRAN (R 4.0.0)
    gtable 0.3.0 2019-03-25 [1] CRAN (R 4.0.0)
    inline 0.3.17 2020-12-01 [1] CRAN (R 4.0.3)
    isoband 0.2.3 2020-12-01 [1] CRAN (R 4.0.3)
    jsonlite 1.7.2 2020-12-09 [1] CRAN (R 4.0.4)
    labeling 0.4.2 2020-10-20 [1] CRAN (R 4.0.3)
    lattice 0.20-41 2020-04-02 [2] CRAN (R 4.0.4)
    lifecycle 1.0.0 2021-02-15 [1] CRAN (R 4.0.4)
    loo 2.4.1 2020-12-09 [1] CRAN (R 4.0.3)
    magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.0.3)
    MASS 7.3-53 2020-09-09 [2] CRAN (R 4.0.4)
    Matrix 1.3-2 2021-01-06 [2] CRAN (R 4.0.4)
    matrixStats 0.58.0 2021-01-29 [1] CRAN (R 4.0.3)
    mgcv 1.8-33 2020-08-27 [2] CRAN (R 4.0.4)
    munsell 0.5.0 2018-06-12 [1] CRAN (R 4.0.0)
    nlme 3.1-152 2021-02-04 [2] CRAN (R 4.0.4)
    pillar 1.4.7 2020-11-20 [1] CRAN (R 4.0.3)
    pkgbuild 1.2.0 2020-12-15 [1] CRAN (R 4.0.3)
    pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.0)
    pkgload 1.1.0 2020-05-29 [1] CRAN (R 4.0.3)
    praise 1.0.0 2015-08-11 [1] CRAN (R 4.0.0)
    prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.0)
    processx 3.4.5 2020-11-30 [1] CRAN (R 4.0.3)
    ps 1.5.0 2020-12-05 [1] CRAN (R 4.0.3)
    R6 2.5.0 2020-10-28 [1] CRAN (R 4.0.3)
    RColorBrewer 1.1-2 2014-12-07 [1] CRAN (R 4.0.0)
    Rcpp 1.0.6 2021-01-15 [1] CRAN (R 4.0.3)
    RcppEigen 0.3.3.9.1 2020-12-17 [1] CRAN (R 4.0.3)
    D RcppParallel 5.0.2 2020-06-24 [1] CRAN (R 4.0.3)
    rematch2 2.1.2 2020-05-01 [1] CRAN (R 4.0.3)
    rlang 0.4.10 2020-12-30 [1] CRAN (R 4.0.3)
    rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.0.3)
    rstan 2.21.2 2020-07-27 [1] CRAN (R 4.0.3)
    rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.0.3)
    scales 1.1.1 2020-05-11 [1] CRAN (R 4.0.3)
    StanHeaders 2.21.0-7 2020-12-17 [1] CRAN (R 4.0.3)
    testthat 3.0.2 2021-02-14 [1] CRAN (R 4.0.4)
    tibble 3.0.6 2021-01-29 [1] CRAN (R 4.0.3)
    utf8 1.1.4 2018-05-24 [1] CRAN (R 4.0.0)
    V8 3.4.0 2020-11-04 [1] CRAN (R 4.0.3)
    vctrs 0.3.6 2020-12-17 [1] CRAN (R 4.0.3)
    viridisLite 0.3.0 2018-02-01 [1] CRAN (R 4.0.0)
    waldo 0.2.4 2021-02-11 [1] CRAN (R 4.0.3)
    withr 2.4.1 2021-01-26 [1] CRAN (R 4.0.3)

[1] D:/Users/Carlos Zarzar/Documents/R/win-library/4.0
[2] C:/Program Files/R/R-4.0.4/library

D – DLL MD5 mismatch, broken installation.

1 Like

Any suggestion @andrjohns? Do you have any idea what’s going on?

Is the problem with windows? And if I change the operating system it improves this problem.

Terribly sorry for the delay, I was away for a few days. I’m not entirely sure where the crashing is coming from, since your script doesn’t replicate the behaviour for me on either a Windows or a Linux machine and none of the usual culprits for these crashes are present.

Does the crash happen if you use the default settings? As in, just specifying the model and the data, not the number of iterations or inits, etc.

If it still crashes, there are two things I would try. First, you can try running your model through the cmdstanR package, which tends to be much more stable and also uses the latest release of Stan. Install instructions here: Getting started with CmdStanR • cmdstanr

Alternatively, you can try installing the experimental preview of the upcoming RStan 2.26. There may be some bugs, but that’s helpful for us to know about. To install, you need to restart your R session, and then run:

remove.packages(c("StanHeaders", "rstan"))
install.packages("StanHeaders", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
1 Like

FYI, I’ve been experiencing the same thing and have filed an issue on the RStudio GitHub:
Rstudio consistently-but-randomly slowing down & crashing when viewing Stan files

2 Likes

Cool Mike.
I took advantage and sent a message to RStudio too, suddenly we were able to solve this problem as quickly as possible.

1 Like

Hi, @andrjohns .
No problem about the delay.
I followed your suggestion and removed all indicated packages plus rstantools.
I will give you several details of the operation and you consider whether it is relevant or not ok.

remove.packages(c(“StanHeaders”, “rstan”,“rstantools”))

Upon restarting the session after removing them, the following message was displayed:

Warning: namespace ‘rstan’ is not available and has been replaced
by .GlobalEnv when processing object ‘.__C__C++Object’

And then I installed it again.

install.packages(“StanHeaders”, repos = c(“Repository for distributing (some) stan-dev R packages | r-packages”, getOption(“repos”)))
install.packages(“rstan”, repos = c(“Repository for distributing (some) stan-dev R packages | r-packages”, getOption(“repos”)))
install.packages(“rstantools”, repos = c(“Repository for distributing (some) stan-dev R packages | r-packages”, getOption(“repos”)))

So I made the rstan package available:

library(rstan)

  • with output:

Carregando pacotes exigidos: StanHeaders
rstan (Version 2.26.1, GitRev: 2e1f913d3ca3)
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)
For within-chain threading using reduce_sum() or map_rect() Stan functions,
change threads_per_chain option:
rstan_options(threads_per_chain = 1)

Do not specify ‘-march=native’ in ‘LOCAL_CPPFLAGS’ or a Makevars file

And now when specific, the model returns this to me:

model ← stan_model(model_name = “Morgan Mercer Flodin”, file = “Enviar forum/mod_MMF.stan”)

  • the output (white color):
    make cmd is
    make -f “C:/PROGRA~1/R/R-40~1.4/etc/x64/Makeconf” -f “C:/PROGRA~1/R/R-40~1.4/share/make/winshlib.mk” -f “D:/Users/Carlos Zarzar/Documents/.R/Makevars.win” CXX=’(CXX14) (CXX14STD)’ CXXFLAGS=’(CXX14FLAGS)' CXXPICFLAGS='(CXX14PICFLAGS)’ SHLIB_LDFLAGS=’(SHLIB_CXX14LDFLAGS)' SHLIB_LD='(SHLIB_CXX14LD)’ SHLIB=“file328c111c5a5c.dll” WIN=64 TCLBIN=64 OBJECTS=“file328c111c5a5c.o”

make would use
if test “zfile328c111c5a5c.o” != “z”; then
if test -e “file328c111c5a5c-win.def”; then
echo “C:/rtools40/mingw64/bin/“g++ -shared -s -static-libgcc -o file328c111c5a5c.dll file328c111c5a5c-win.def file328c111c5a5c.o “D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a” -L"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/libs/x64” -lStanHeaders -L"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppParallel/lib/x64” -ltbb -LD:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppParallel/lib/x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-40~1.4/bin/x64" -lR ;
“C:/rtools40/mingw64/bin/“g++ -shared -s -static-libgcc -o file328c111c5a5c.dll file328c111c5a5c-win.def file328c111c5a5c.o “D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a” -L"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/libs/x64” -lStanHeaders -L"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppParallel/lib/x64” -ltbb -LD:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppParallel/lib/x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-40~1.4/bin/x64" -lR ;
else
echo EXPORTS > tmp.def;
“C:/rtools40/mingw64/bin/“nm file328c111c5a5c.o | sed -n ‘s/^.* [BCDRT] / /p’ | sed -e ‘/[.]refptr[.]/d’ -e ‘/[.]weak[.]/d’ | sed 's/[^ ][^ ]*/”&”/g’ >> tmp.def;
echo “C:/rtools40/mingw64/bin/“g++ -shared -s -static-libgcc -o file328c111c5a5c.dll tmp.def file328c111c5a5c.o “D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a” -L"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/libs/x64” -lStanHeaders -L"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppParallel/lib/x64” -ltbb -LD:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppParallel/lib/x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-40~1.4/bin/x64" -lR ;
“C:/rtools40/mingw64/bin/“g++ -shared -s -static-libgcc -o file328c111c5a5c.dll tmp.def file328c111c5a5c.o “D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a” -L"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/libs/x64” -lStanHeaders -L"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppParallel/lib/x64” -ltbb -LD:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppParallel/lib/x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-40~1.4/bin/x64" -lR ;
rm -f tmp.def;
fi
fi

  • and the ouput erro (red color):
    Error in compileCode(f, code, language = language, verbose = verbose) :
    D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/ProductEvaluators.h:35:90: required from 'Eigen::internal::evaluator<Eigen::Product<Lhs, Rhs, Option> >::evaluator(const XprType&) [with Lhs = Eigen::Product<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::Matrix<double, 1, -1> >, const Eigen::Transpose<Eigen::Matrix<double, -1, 1> > >, Eigen::Matrix<double, -1, -1>, 0>; Rhs = Eigen::Matrix<double, -1, 1>; int Options = 0; Eigen::internal::evaluator<Eigen::Product<Lhs, Rhs, Option> >::XprType = Eigen::Product<Eigen::Product<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::Matrix<double, 1, -1> >, const Eigen::Transpose<Eigen::Matrix<double, -1, 1> > >, Eigen::Matrix<double, -1, -1>, 0>, Eigen::Matrix<double, -1, 1>, 0>]'D:/Us
    Além disso: Warning message:
    In readLines(file, warn = TRUE) :
    linha final incompleta encontrada em ‘D:\Users\Carlos Zarzar\Downloads\Stan_forum\Enviar forum\mod_MMF.stan’
    Error in sink(type = “output”) : conexão inválida

And so, now the .rds file is not generated

This looks like a possible culprit:

make would use

That should have a large block of code after it. This is all very strange.

Let’s double-check whether it will let you compile C++, can you post the output from the following:

Sys.which("make")
system("touch foo.cpp")
system("R CMD SHLIB foo.cpp")
1 Like

> Sys.which(“make”)

Sys.which(“make”)
make
“C:\rtools40\usr\bin\make.exe”

> system(“touch foo.cpp”)

system(“touch foo.cpp”)
[1] 0

> system(“R CMD SHLIB foo.cpp”)

"C:/rtools40/mingw64/bin/"g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-40~1.4/include" -DNDEBUG   -I"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/Rcpp/include/"  -I"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/"  -I"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/unsupported"  -I"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/BH/include" -I"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/include/src/"  -I"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/include/"  -I"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppParallel/include/"  -DRCPP_PARALLEL_USE_TBB=1 -I"D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/rstan/include" -DEIGEN_NO_DEBUG  -DBOOST_DISABLE_ASSERTS  -DBOOST_PENDING_INTEGER_LOG2_HPP  -DSTAN_THREADS  -DUSE_STANC3 -DSTRICT_R_HEADERS  -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION  -DBOOST_NO_AUTO_PTR  -include "D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/fun/Eigen.hpp"  -std=c++1y         -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c foo.cpp -o foo.o

In file included from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Core:397,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Dense:1,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22,
from :
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:60:39: warning: ignoring attributes on template argument ‘__m128’ {aka ‘__vector(4) float’} [-Wignored-attributes]
template<> struct is_arithmetic<__m128> { enum { value = true }; };
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:61:40: warning: ignoring attributes on template argument ‘__m128i’ {aka ‘__vector(2) long long int’} [-Wignored-attributes]
template<> struct is_arithmetic<__m128i> { enum { value = true }; };
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:62:40: warning: ignoring attributes on template argument ‘__m128d’ {aka ‘__vector(2) double’} [-Wignored-attributes]
template<> struct is_arithmetic<__m128d> { enum { value = true }; };
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:161:43: warning: ignoring attributes on template argument ‘Eigen::internal::Packet4f’ {aka ‘__vector(4) float’} [-Wignored-attributes]
template<> struct unpacket_traits { typedef float type; enum {size=4, alignment=Aligned16}; typedef Packet4f half; };
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:162:43: warning: ignoring attributes on template argument ‘Eigen::internal::Packet2d’ {aka ‘__vector(2) double’} [-Wignored-attributes]
template<> struct unpacket_traits { typedef double type; enum {size=2, alignment=Aligned16}; typedef Packet2d half; };
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:163:43: warning: ignoring attributes on template argument ‘Eigen::internal::Packet4i’ {aka ‘__vector(2) long long int’} [-Wignored-attributes]
template<> struct unpacket_traits { typedef int type; enum {size=4, alignment=Aligned16}; typedef Packet4i half; };
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:718:35: warning: ignoring attributes on template argument ‘Eigen::internal::Packet4f’ {aka ‘__vector(4) float’} [-Wignored-attributes]
struct palign_impl<Offset,Packet4f>
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:741:35: warning: ignoring attributes on template argument ‘Eigen::internal::Packet4i’ {aka ‘__vector(2) long long int’} [-Wignored-attributes]
struct palign_impl<Offset,Packet4i>
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:764:35: warning: ignoring attributes on template argument ‘Eigen::internal::Packet2d’ {aka ‘__vector(2) double’} [-Wignored-attributes]
struct palign_impl<Offset,Packet2d>
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:778:34: warning: ignoring attributes on template argument ‘Eigen::internal::Packet4f’ {aka ‘__vector(4) float’} [-Wignored-attributes]
ptranspose(PacketBlock<Packet4f,4>& kernel) {
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:783:34: warning: ignoring attributes on template argument ‘Eigen::internal::Packet2d’ {aka ‘__vector(2) double’} [-Wignored-attributes]
ptranspose(PacketBlock<Packet2d,2>& kernel) {
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/PacketMath.h:790:34: warning: ignoring attributes on template argument ‘Eigen::internal::Packet4i’ {aka ‘__vector(2) long long int’} [-Wignored-attributes]
ptranspose(PacketBlock<Packet4i,4>& kernel) {
^
In file included from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Core:377,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Dense:1,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22,
from :
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/Default/ConjHelper.h:15:70: warning: ignoring attributes on template argument ‘Eigen::internal::Packet4f’ {aka ‘__vector(4) float’} [-Wignored-attributes]
template<> struct conj_helper<PACKET_REAL, PACKET_CPLX, false,false> {
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/Complex.h:232:1: note: in expansion of macro ‘EIGEN_MAKE_CONJ_HELPER_CPLX_REAL’
EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cf,Packet4f)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/Default/ConjHelper.h:22:70: warning: ignoring attributes on template argument ‘Eigen::internal::Packet4f’ {aka ‘__vector(4) float’} [-Wignored-attributes]
template<> struct conj_helper<PACKET_CPLX, PACKET_REAL, false,false> {
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/Complex.h:232:1: note: in expansion of macro ‘EIGEN_MAKE_CONJ_HELPER_CPLX_REAL’
EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cf,Packet4f)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/Default/ConjHelper.h:15:70: warning: ignoring attributes on template argument ‘Eigen::internal::Packet2d’ {aka ‘__vector(2) double’} [-Wignored-attributes]
template<> struct conj_helper<PACKET_REAL, PACKET_CPLX, false,false> {
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/Complex.h:417:1: note: in expansion of macro ‘EIGEN_MAKE_CONJ_HELPER_CPLX_REAL’
EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet1cd,Packet2d)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/Default/ConjHelper.h:22:70: warning: ignoring attributes on template argument ‘Eigen::internal::Packet2d’ {aka ‘__vector(2) double’} [-Wignored-attributes]
template<> struct conj_helper<PACKET_CPLX, PACKET_REAL, false,false> {
^
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/arch/SSE/Complex.h:417:1: note: in expansion of macro ‘EIGEN_MAKE_CONJ_HELPER_CPLX_REAL’
EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet1cd,Packet2d)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Core:370,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Dense:1,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22,
from :
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h: In instantiation of ‘struct Eigen::internal::find_best_packet<float, 4>’:
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/Matrix.h:22:57: required from ‘struct Eigen::internal::traits<Eigen::Matrix<float, 4, 1> >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Geometry/Quaternion.h:242:7: required from ‘struct Eigen::internal::traits<Eigen::Quaternion >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Geometry/arch/Geometry_SSE.h:24:46: required from here
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:44: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__vector(4) float’} [-Wignored-attributes]
bool Stop = Size==Dynamic || (Size%unpacket_traits::size)==0 || is_same<PacketType,typename unpacket_traits::half>::value>
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:83: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__vector(4) float’} [-Wignored-attributes]
bool Stop = Size==Dynamic || (Size%unpacket_traits::size)==0 || is_same<PacketType,typename unpacket_traits::half>::value>
~^~~~~
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:83: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__vector(4) float’} [-Wignored-attributes]
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:83: warning: ignoring attributes on template argument ‘Eigen::internal::unpacket_traits<__vector(4) float>::half’ {aka ‘__vector(4) float’} [-Wignored-attributes]
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:205:88: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__vector(4) float’} [-Wignored-attributes]
typedef typename find_best_packet_helper<Size,typename packet_traits::type>::type type;
^~~~
In file included from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Core:439,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Dense:1,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22,
from :
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h: In instantiation of ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<float, 4, 1>, 0>’:
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:300:7: required from ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<float, 4, 1>, 1>’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:551:7: required from ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<float, 4, 1>, 3>’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/DenseBase.h:41:34: required from ‘class Eigen::DenseBase<Eigen::Matrix<float, 4, 1> >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/MatrixBase.h:48:34: required from ‘class Eigen::MatrixBase<Eigen::Matrix<float, 4, 1> >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/PlainObjectBase.h:98:7: required from ‘class Eigen::PlainObjectBase<Eigen::Matrix<float, 4, 1> >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/Matrix.h:178:7: required from ‘class Eigen::Matrix<float, 4, 1>’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Geometry/Quaternion.h:46:50: required from ‘class Eigen::QuaternionBase<Eigen::Quaternion >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Geometry/Quaternion.h:250:7: required from ‘class Eigen::Quaternion’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Geometry/arch/Geometry_SSE.h:27:3: required from here
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__vector(4) float’} [-Wignored-attributes]
>::type PacketReturnType;
^~~~~~~~~~~~~~~~
In file included from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Core:370,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Dense:1,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22,
from :
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h: In instantiation of ‘struct Eigen::internal::find_best_packet<double, 4>’:
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/Matrix.h:22:57: required from ‘struct Eigen::internal::traits<Eigen::Matrix<double, 4, 1> >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Geometry/Quaternion.h:242:7: required from ‘struct Eigen::internal::traits<Eigen::Quaternion >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Geometry/arch/Geometry_SSE.h:88:47: required from here
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:44: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
bool Stop = Size==Dynamic || (Size%unpacket_traits::size)==0 || is_same<PacketType,typename unpacket_traits::half>::value>
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:83: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
bool Stop = Size==Dynamic || (Size%unpacket_traits::size)==0 || is_same<PacketType,typename unpacket_traits::half>::value>
~^~~~~
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:83: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:187:83: warning: ignoring attributes on template argument ‘Eigen::internal::unpacket_traits<__vector(2) double>::half’ {aka ‘__vector(2) double’} [-Wignored-attributes]
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/util/XprHelper.h:205:88: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
typedef typename find_best_packet_helper<Size,typename packet_traits::type>::type type;
^~~~
In file included from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Core:439,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/Dense:1,
from D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22,
from :
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h: In instantiation of ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<double, 4, 1>, 0>’:
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:300:7: required from ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<double, 4, 1>, 1>’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:551:7: required from ‘class Eigen::DenseCoeffsBase<Eigen::Matrix<double, 4, 1>, 3>’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/DenseBase.h:41:34: required from ‘class Eigen::DenseBase<Eigen::Matrix<double, 4, 1> >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/MatrixBase.h:48:34: required from ‘class Eigen::MatrixBase<Eigen::Matrix<double, 4, 1> >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/PlainObjectBase.h:98:7: required from ‘class Eigen::PlainObjectBase<Eigen::Matrix<double, 4, 1> >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/Matrix.h:178:7: required from ‘class Eigen::Matrix<double, 4, 1>’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Geometry/Quaternion.h:46:50: required from ‘class Eigen::QuaternionBase<Eigen::Quaternion >’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Geometry/Quaternion.h:250:7: required from ‘class Eigen::Quaternion’
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Geometry/arch/Geometry_SSE.h:92:3: required from here
D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
>::type PacketReturnType;
^~~~~~~~~~~~~~~~
C:/rtools40/mingw64/bin/g++ -std=gnu++11 -shared -s -static-libgcc -o foo.dll tmp.def foo.o D:/Users/Carlos Zarzar/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a -LD:/Users/Carlos Zarzar/Documents/R/win-library/4.0/StanHeaders/libs/x64 -lStanHeaders -LD:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppParallel/lib/x64 -ltbb -LD:/Users/Carlos Zarzar/Documents/R/win-library/4.0/RcppParallel/lib/x64 -ltbb -ltbbmalloc -LC:/PROGRA~1/R/R-40~1.4/bin/x64 -lR
g++.exe: error: Zarzar/Documents/R/win-library/4.0/RcppParallel/lib/x64: No such file or directory
[1] 0