我在Windows7 x64台式机上安装了R版本3.5.1 (在Windows7的桌面PC上),然后安装了Rtools3.5和rstan (通过install.packages())
Rstan在多核支持方面失败了,就像这样:
library(rstan)
rstan_options(auto_write = TRUE)
options(mc.cores = 3) # or any number above 2
fit <- stan(file = '8schools.stan', data = schools_dat,
iter = 3, chains = 4)有错误:
Error in checkForRemoteErrors(val) :
4 nodes produced errors; first error: unable to load shared object 'C:/Users/ubashir/AppData/Local/Temp/RtmpIHGdm6/file194833bbb82.dll':
LoadLibrary failure: Access is denied.但是,如果我将选项行更改为:
options(mc.cores = 1) # or any other number up to 8代码起作用了。除了只使用一个内核之外,还有谁知道解决方案?谢谢
发布于 2018-04-29 21:44:30
rstan GitHub project site上有两个相关的问题:Issue #491和Issue #492。
此问题似乎与空的/etc/hosts文件有关。我没有Windows机,但这个文件似乎驻留在c:\Windows\System32\Drivers\etc\hosts中。
您需要确保该文件包含一行:
127.0.0.1 localhost如有必要,请编辑并保存该文件,然后重试。(您可能需要执行整个重新启动Windows的恶作剧...)
https://stackoverflow.com/questions/50017572
复制相似问题