Cannot find symbols exported to node by parallel::clusterExport
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- r
调研方向
首先运行提供的 R 示例,使用 makeClusterPSOCK()、clusterExport()、future(..., globals = FALSE) 和 values(f)。跟踪解析 future 时集群计划与导出的符号如何交互。当导出的 test1 在每个 worker 上都可用,并且在连续的 future 之间无需重复检测或导出全局变量时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
In the following example, I try to export certain variables to each cluster node before any future is created. However, the exported symbols cannot be found when a future is resolved.
I don't want future() to detect globals or export variables because in my use case, there are tens of futures and they will be called periodically (every several minutes), each run is time critical so that I don't want the same global variables to be detected and exported to the workers again and again.
library(future)
library(parallel)
test1 <- rnorm(10000)
cl <- makeClusterPSOCK(2)
clusterExport(cl, "test1")
plan(cluster, workers = cl)
f <- future({
sum(test1)
}, globals = FALSE)
values(f)
stopCluster(cl)
- 主要语言
- R
- 星标
- 1k
- 派生
- 93
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
futureverse/future 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
futureverse/future#852 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 35/100
futureverse/future#849 ·
-
bug
难度 4/5 3-5 天 新手友好度 48/100
futureverse/future#833 ·
-
feature/resources RNG
难度 5/5 一周以上 新手友好度 35/100
futureverse/future#832 ·
-
RNG
难度 5/5 一周以上 新手友好度 38/100
futureverse/future#831 · 1 条评论 ·
查看 futureverse/future 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 88/100
nf-core/provenancereport#75 ·
-
难度 1/5 1 小时以内 新手友好度 95/100
-
难度 1/5 1 小时以内 新手友好度 72/100
garner-code/PsyR#80 ·