Dear all, I want to run the brm model, but it freezes the machine after a few seconds without results, just like the attached picture, could anyone help and thanks
Hi @andrjohns
Thanks for your replay , but
its stay on Compiling the C++ model and freeze, I should restart from power, also I did that on studio cloud and it crashed.
In the Rstudio cloud (online), I used the first example given in brm help and the same problem, but here he gave the message that the computation is crashed.
Hi again
I run it again and it gave me this error on studio could
Compiling the C++ model
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! file552375f4c3b9.cpp:6:36: warning: ISO C++11 requires whitespace after the macro name #define STAN__SERVICES__COMMAND_HPP#include <boost/integer/integer_log2.hpp>
^
In file included from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/smart_ptr/shared_ptr.hpp:28:0,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/shared_ptr.hpp:17,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/date_time/time_clock.hpp:17,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/date_time/posix_time/posix_time_types.hpp:10,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/rstan/include/rstan/stan_fit.hpp:13,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/rstan/include/rstan/rstaninc.hpp:3,
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command ‘/opt/R/3.6.0/lib/R/bin/R CMD SHLIB file552375f4c3b9.cpp 2> file552375f4c3b9.cpp.err.txt’ had status 1
Error in sink(type = “output”) : invalid connection
example(stan_model,run.dontrun = TRUE,verbose=TRUE)
Warning messages:
1: In find.package(package, lib.loc, verbose = verbose) :
package ‘boot’ found more than once, using the first from
“/home/kamel/R/x86_64-pc-linux-gnu-library/3.6/boot”,
“/usr/lib/R/library/boot”
2: In find.package(package, lib.loc, verbose = verbose) :
package ‘MASS’ found more than once, using the first from
“/home/kamel/R/x86_64-pc-linux-gnu-library/3.6/MASS”,
“/usr/lib/R/library/MASS”
3: In example(stan_model, run.dontrun = TRUE, verbose = TRUE) :
no help found for ‘stan_model’
and on studio cloud its like this
example(stan_model,run.dontrun = TRUE,verbose=TRUE)
Warning message:
In example(stan_model, run.dontrun = TRUE, verbose = TRUE) :
no help found for ‘stan_model’
sorry for late, but it freezed three times on my machine, I tried on studio cloud and its looks like this
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! file55e812e58a4a.cpp:6:36: warning: ISO C++11 requires whitespace after the macro name #define STAN__SERVICES__COMMAND_HPP#include <boost/integer/integer_log2.hpp>
^
In file included from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/smart_ptr/shared_ptr.hpp:28:0,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/shared_ptr.hpp:17,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/date_time/time_clock.hpp:17,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/BH/include/boost/date_time/posix_time/posix_time_types.hpp:10,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/rstan/include/rstan/stan_fit.hpp:13,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/rstan/include/rstan/rstaninc.hpp:3,
Let’s focus on your local machine for now, since rstudio cloud can have other issues.
When you say that it freezes, can you do anything else in RStudio? Like opening the ‘File’ menu or something similar? Does your whole computer freeze or just RStudio?
4GB? That’s likely the issue. Model compilation can take up roughly 2GB of memory, so you’re likely running out of memory, and the computer is swapping (storing information on the hard drive or SSD, rather than in RAM). This causes the computer to become pretty unresponsive.
I think if you leave it for long enough that the model will finish compiling and your computer will start responding again, but it will take much longer than a normal model compilation time. Definitely close as many other programs as possible (especially web browsers like chrome & firefox) so that your computer has as much RAM as possible to work with
Yes, but its too slow, more than three min, however with stanarm just a few second. I do not know why.
I have q quick question on that, you think here I successed in using the function argunments to define skeptical prior (mean zero and low variance )
fit<-brm(Dc~treat, mydata, family = bernoulli(link = “logit”),
prior = c(set_prior("normal(0,0.15)", class = "Intercept"),
set_prior("normal(0,0.15)", class = "b")),
inits = "random",chains = 1, iter = 500,
cores = 1, control = list(adapt_delta = 0.9))