Rstan no longer working

I went back to a project I haven’ touched in about a month today and, voila, rstan is no longer working. The only related thing I’ve done on the cluster where I’m working on this is a failed attempt to install rstanarm from github, so I may have done something there.
Here is the the error message I got:

Error: package or namespace load failed for  rstan  in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/x_tomli/R/x86_64-pc-linux-gnu-library/3.6.3/V8/libs/': cannot open shared object file: No such file or directory
Execution halted
srun: error: n641: task 0: Exited with exit code 1

I also tried the standard stan example on the log-in node, which caused RStudio to crash. Here is a screen shot of the incident:

Here is info about the platform etc:

Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /software/sse/manual/R/3.6.3/g73/nsc1/lib64/R/lib/
LAPACK: /software/sse/manual/R/3.6.3/g73/nsc1/lib64/R/lib/

 [1] LC_CTYPE=sv_SE.UTF-8 LC_NUMERIC=C         LC_TIME=C            LC_COLLATE=C         LC_MONETARY=C       
 [6] LC_MESSAGES=C        LC_PAPER=C           LC_NAME=C            LC_ADDRESS=C         LC_TELEPHONE=C      

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

loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3    yaml_2.2.1 

I’ve tried reinstalling rstan, V8 and rcpp. Any suggestions of what else to try? I’ve seen other having problems lately that were solved by upgrading to a newer R, but 3.6.3 is the most recent available version on the cluster on which I’m working.

You can probably get by temporarily by doing

rstan_options(javascript = FALSE)

if you have the latest rstan, but you are going to have to figure out what it causing v8 to not load before rstan_2.25.x .

That didn’t help unfortunately. I get the same error.

What happens if you just do



As it turns out, V8 is only installed on the login-node on the cluster on which I’m running analyses. So doing library(V8) works fine on the login-node but gives the same error as library(rstan) when submitting jobs to computational nodes. What confuses me is that V8 was never installed on the computational nodes, yet rstan ran just fine on July 16. Has something in rstan’s dependency on V8 changed lately? I think I reinstalled rstan in the process of attempting to install rstanarm.

The dependence on the V8 package was added recently, probably after July 16th, but will be needed for the indefinite future. So, I would tell the system administrator to install V8 on the computational nodes.

Thanks @bgoodri, that explain the mystery.

Is 2.19.3 the latest version without the V8 dependency?



I tried installing the previous version, but I’m not having much luck:

g++: error: /home/x_tomli/R/x86_64-pc-linux-gnu-library/3.6.3/rstan/lib//libStanServices.a: No such file or directory
make: *** [] Error 1
ERROR: compilation failed for package ?rstan?
* removing ?/home/x_tomli/R/x86_64-pc-linux-gnu-library/3.6.3/rstan?

I’ve tried googling the error message, but it didn’t make much wiser. Suggestions?

cmdstanr is another R interface for Stan which might work better in this situation:

Rstan has more features, but cmdstanr is probably easier to build and use on a cluster. It doesn’t have everything (in particular if you needed rstanarm on the cluster, cmdstanr doesn’t help), but if you’re just running Stan models this might be easier.

Thanks everybody for your help. The cluster administrators installed V8 on nodes, so rstan is now running again.

1 Like