Hello and thank you for your time.
I get the error:
cl <- parallel::makeCluster(2)
Rscript execution error: No such file or directory
whenever I try to make a cluster using the package "parallel". Other commands such as detectCores() work, but makeCluster() fails. I have reinstalled R and Rstudio, and I do not think the problem is with the installation.
R version 3.6.2 (2019-12-12)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.3 LTS
Any help would be appreciated.
UPDATE:
If I run Rscript in the terminal, I get a similar error, but if I use sudo Rscript the error goes away. For example: Rscript helloworld.r gives me the error Rscript execution error: No such file or directory, but sudo Rscript helloworld.r works. (helloworld.r is an R script that prints hello world.)
Thanks in advance.
~/.bashrc
. Try troubleshooting withcl <- future::makeClusterPSOCK(2, verbose = TRUE)
. It works very similar toparallel::makeCluster()
but gives more detailed output. The returned cluster is also 100% compatible with what parallel returns. – HenrikBR
in the terminal. That way you can rule out RStudio. – HenrikBRscript helloworld.r
without usingsudo
? If so, wow, you got some that messes with your R setup. DoesRscript --version
work? What aboutRscript -e 1+2
? Try alsoRscript --vanilla helloworld.r
. – HenrikB