# The analyses using brms has slowed down, any hint?

Hi,
Till a few days ago I could run my analyses at a reasonable pace on my laptop. But, now the same analyses take more than a day and it finally gets terminated because of memory and timeout!
I took the analyses on the cluster server to come over the memory, but it is the same( too slow) and get killed.
When I run the syntax on my laptop and reach to compiling step it asks to re-install Rtools either with R 3.6.1 or R3.6.2.
This is my syntax:

if (!file.exists("barr.RData")) {

p<-get_prior( rec_n_r_bodn ~ mo(rec_comb_sevarrythmia)+age1,family=cumulative(),
data =bodi_fu1)

p$prior[1] <- "normal(0,1)" # sets a N(0,1) on \beta p$prior[4] <- "normal(1.1,20)" # for each cutpoint
p\$prior[19] <- "dirichlet(2,2,2,2,2,2)" # sets weakly regularizing dirichlet for 1-3 Likert scale response

fit_barr<-brm(
formula = rec_n_r_bodn~ mo(rec_comb_sevarrythmia)+age1,family=cumulative(),
save(bodi_fu1, p, fit_barr, file="barr.RData")
} else {
}


Any hint is appreciated.
-Thanks

1 Like

Hi,
sorry to hear you are having problems. Could you be specific about the setup on your laptop and the cluster (OS, R version, RTools version, brms version)? Also, if you have a Makevars / Makevars.win file could you post its contents? (should be in HOME_DIRECTORY/.R/Makevars)

Also what did change in your setup in the meantime? Did you upgrade the OS/R/brms/… ?

Hope we can get that resolved quickly.

Hi,
I use R3.6.1 on cluster but R3.6.2 on my laptop.
Rtools is 3.5 on my laptop but 3.4 on cluster
With the cluster I used below synatx and it improved the speed:
mv ~/R/3.6/library ~/R/3.6/library.old
mkdir ~/R/3.6/library

I do not have access to to the content of the makevar on cluster but on my laptop it is as below:

Thanks

## With Rcpp 0.11.0 and later, we no longer need to set PKG_LIBS as there is
## no user-facing library. The include path to headers is already set by R.
#PKG_LIBS =

## With R 3.1.0 or later, you can uncomment the following line to tell R to
## enable compilation with C++11 (or even C++14) where available
#CXX_STD = CXX11


So I assume both laptop and cluster are Linux? I can’t really help with Linux stuff, but hopefully @bbbales2 has an idea and is not busy?

The laptop is Rstudio on windows.

The issues with cluster/linux is resolved, though.
Thanks

1 Like

Sorry, I dropped the ball on this due to current events, did you manage to resolve this or do you still need help?

Hello, I hope all is well and safe!
I faced the problem with other packages a swell and every time when it reaches the point to compile it asks for installin Rtools while it is already installed and even if remove it and re-install it this happens again.

I did follow the instruction but I have not been able to resolve this on windows, so far!
[/quote]

The RTools problem was discussed at RStan Always trying to download RTools when it's already installed (I also did have this problem on a machine, so you are by far the only one). Does the suggestion there resolve your issue?

Hi,
Yes, it seems it has been some other folks as well: https://github.com/rstudio/rstudio/issues/3563
Rstudio not Stan. I used the advice from this website, to be honest, it has not been solved on my Laptop am still using cluster for my analyses, which is sometimes annoying as the server can be down sometimes :(

The hints here helped to resolve the issue! If anyone in the future come across this, the instruction is here!
https://cran.r-project.org/bin/windows/Rtools/

1 Like