例如,我想知道是否有可能将JAGS中的3条链细分到5或6个核上。这是我的代码:
library(parallel)
# There is no progression bar using parallel
jags.parallel(data = d$data,
inits = d$inits,
parameters.to.save = d$params,
model.file = model.jags,
n.chains = 3,
n.thin = 10,
n.iter = 9000,
n.burnin = 3000,
working.directory = NULL,
n.cluster = 3) ## the number of cluster it’s taking正如您所看到的,这是默认的,链的数量(在我的例子中是3)等于使用的核心数量。
Error in res[[ch]] : subscript out of bounds。为什么?我的电脑有16个核,所以我在核数量上有灵活性(还有64 GB内存和3千兆赫英特尔Xeon E5处理器)。
发布于 2016-05-24 19:55:40
不可能将3条链分裂成多个核心。当并行运行JAGS时,以下是实际发生的情况:
(n.iter -n.thin)/n.chains)。那么,让我们转到您的问题(# 1解释以上)。
x链,则不应该有> x cores。https://stackoverflow.com/questions/37418378
复制相似问题