小编Xin*_*ing的帖子

使用并行计算时 R 卡住并警告“关闭未使用的连接”

我正在 R 中运行一些模拟,代码在不使用并行计算的情况下运行良好。但是,当我修改一行代码并尝试使用并行计算时,R 卡住了,并且每次都卡在不同的迭代时间。当 R 卡住时,我必须手动停止它运行,有时会有一些警告说

Warning messages:
1: closing unused connection 13 (<-localhost:11688)
2: closing unused connection 12 (<-localhost:11688) 
3: closing unused connection 9 (<-localhost:11688) 
4: closing unused connection 8 (<-localhost:11688) 
5: closing unused connection 7 (<-localhost:11688) 
6: closing unused connection 6 (<-localhost:11688) 
Run Code Online (Sandbox Code Playgroud)

或者类似的东西

Warning message:
In .Internal(get(x, envir, mode, inherits)) :
closing unused connection 6 (<-localhost:11688)
Run Code Online (Sandbox Code Playgroud)

这是我的代码:

for (iter in 1:100){
    *Simulate data matrix X and Y, and initial start Z0*

    for (i in 1:100){
    *Calculate input matrix …
Run Code Online (Sandbox Code Playgroud)

memory connection parallel-processing r

5
推荐指数
1
解决办法
3558
查看次数

标签 统计

connection ×1

memory ×1

parallel-processing ×1

r ×1