R:使用并行写入磁盘

标签 r linux

可以将包 R.cache 与包 parallel 一起使用。 我正在做一些非常耗时的计算,我想在并行的同时使用缓存。

并行作业彼此独立。但是我无法在集群上加载 R.cache 包。

library(parallel)
library(R.cache)

cl <- makeCluster(getOption("cl.cores", 2))
clusterExport(cl,varlist = ls())
clusterEvalQ(cl, library(R.cache))

## Error in checkForRemoteErrors(lapply(cl, recvResult)) : 
##   2 nodes produced errors; first error: there is no package called ‘R.cache’

最佳答案

这里没有关于R.cache 的特别之处。您需要确保 R.cache 安装在每个计算节点上。

是的,R.cache 可以工作并且设计用于并发系统。另见 https://github.com/HenrikBengtsson/R.cache/issues/18

(我是 R.cache 的作者)。

关于R:使用并行写入磁盘,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41058675/

相关文章:

r - dplyr 0.7 等效于已弃用的 mutate_

r - 对许多列应用相同的标准来计算新列

linux - 在 Ubuntu 中使用 QSerialport 时出现问题

linux - Enctype ="multipart/form-data"在 linux 环境下不工作?

linux - Ubuntu中Mit Scheme安装错误(环境变量设置)

r - 调整 R 中 knn train() 命令中的 K

r - 如何调用 data.table 的基于列的子集而不自动对行进行排序?

linux - 从目录中打开 Sublime Text 中的所有文件,明确指定的文件除外

linux - Shell 脚本 - 检查参数上的数字是否唯一

r - 外部重用 X 的第一个元素而不是完成其工作