Rのスノークラスターにbigmatrixをエクスポートすることに成功した人はいますか? bigmatrix と attach.resource の例のコメント行は、そうすることが可能だと言っていますが、私は成功していません。
library(bigmemory)
library(snow)
z <- big.matrix(3, 3, type='integer', init=3)
cl = makeCluster(8, type = "SOCK")
clusterEvalQ(cl,{library(bigmemory)})
zdescription <- describe(z)
clusterExport(cl,"zdescription")
clusterEvalQ(cl,{y <- attach.resource(zdescription)}) #attach.big.matrix also crashes
ファイルでバックアップされた大きなマトリックスを使用してもクラッシュします(共有メモリさえ使用しないため、これは奇妙です)。
[[1]]
Warning: This is not advised. Here is the head of the matrix:
*** caught segfault ***
address 0x10, cause 'memory not mapped'
Traceback:
1: .Call("CGetNrow", x@address)
2: nrow(x)
3: nrow(x)
4: .local(x, ...)
5: head(x)
6: head(x)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace