Ipython ipcluster命令未创建全套引擎

Ipython ipcluster命令未创建全套引擎,ipython,ipython-parallel,Ipython,Ipython Parallel,使用Ubuntu12.04,我试图建立一个局域网集群。详情如下: 控制器配置 # Configuration file for ipcontroller. c = get_config() c.IPControllerApp.reuse_files = True c.IPControllerApp.engine_ssh_server = u'bar@bar1' c.HubFactory.ip = '*' c.HubFactory.db_class = 'NoDB' 集群配置 # Config

使用Ubuntu12.04,我试图建立一个局域网集群。详情如下:

控制器配置

# Configuration file for ipcontroller.

c = get_config()
c.IPControllerApp.reuse_files = True
c.IPControllerApp.engine_ssh_server = u'bar@bar1'
c.HubFactory.ip = '*'
c.HubFactory.db_class = 'NoDB'
集群配置

# Configuration file for ipcluster.

c = get_config()
c.IPClusterEngines.engine_launcher_class = 'SSH'
c.SSHEngineSetLauncher.engine_args = ['--profile-dir=~/.config/ipython/profile_foo']
c.SSHEngineSetLauncher.engines = {'foo@foo1' : 1, 'foo@foo2' : 1, 'foo@foo3' : 1, 'foo@foo4' : 1}
发动机配置

# Configuration file for ipengine.

c = get_config()
c.EngineFactory.timeout = 10
那么,然后跑步

ipcluster start --profile=foo --debug
结果如下:

2013-09-03 19:43:45.772 [IPClusterStart] Process 'ssh' started: 5198
2013-09-03 19:43:45.773 [IPClusterStart] Process 'engine set' started: [None, None, None, None]
2013-09-03 19:43:47.086 [IPClusterStart] 2013-09-03 19:44:02.726 [IPEngineApp] Completed registration with id 0
2013-09-03 19:43:47.795 [IPClusterStart] 2013-09-03 19:43:53.737 [IPEngineApp] Completed registration with id 1
2013-09-03 19:43:48.561 [IPClusterStart] 2013-09-03 19:43:59.793 [IPEngineApp] Completed registration with id 2
2013-09-03 19:43:49.667 [IPClusterStart] 2013-09-03 19:44:03.859 [IPEngineApp] Completed registration with id 3
2013-09-03 19:44:15.773 [IPClusterStart] Engines appear to have started successfully
我觉得不错。但是当我尝试与客户机连接时,我得到的引擎数量少于预期数量。即使在一台远程机器上运行1或2台发动机,也会发生这种情况

我将超时设置得很高,以防出现问题,但它仍然存在


如果我分别运行
ipcontroller
ipengines
,该过程会成功,但我更希望能够使用
ipcluster

启动和停止群集,因为您已指示它为每个连接构建ssh隧道,您可能需要使用
SSHEngineSetLauncher增加发动机启动之间的延迟。延迟=10
。好的,谢谢,我会试试的。您会推荐另一种策略(MPI)来提高速度吗?如果您的所有引擎都可以在相同的MPI环境中启动,那么您可能不需要SSH隧道。这是真的吗?我对MPI还不够精通,不知道答案,尽管我相信是这样。我在局域网上使用一个小集群,我选择SSH来快速开始测试我的算法,尽管我现在读到的是SSH相对较慢。只要我可以使用Direct接口,我就希望MPI可以工作。欢迎您的建议,再次感谢。您好,我一直(似乎)有类似的问题。你解决了你的问题了吗?切换到MPI成功了吗?在我的例子中,
ipcluster start--profile=myssh
成功返回,表示所有引擎都已启动,但我只能从python中看到本地引擎。
In [22]: rc=Client(profile='foo')

In [23]: rc.ids
Out[23]: [1, 2]