如何使用makeMPICluster

时间:2013-10-31 18:51:52

标签: r mpi

很抱歉提出琐碎的问题。我正在使用RMPI和雪来进行集群。调用makeMPICluster时没有任何返回。但是如果mpi.spawn.Rslaves()被调用

,它就有效
# method 1
library(snow)

library(Rmpi)

nclus=3

# no response
cl <-makeMPIcluster(nclus)

# method 2
library(Rmpi)
mpi.spawn.Rslaves()

4 slaves are spawned successfully. 0 failed.
master (rank 0, comm 1) of size 5 is running on:  
slave1 (rank 1, comm 1) of size 5 is running on:  
slave2 (rank 2, comm 1) of size 5 is running on: 
slave3 (rank 3, comm 1) of size 5 is running on: 
slave4 (rank 4, comm 1) of size 5 is running on: 

0 个答案:

没有答案