我尝试使用dispy将工作分配到ec2实例。在
我跟踪了:
Using dispy with port forwarding via ssh tunnel
http://dispy.sourceforge.net/dispy.html#cloud
但是它不会去任何地方,客户端脚本被挂起,服务器节点没有接收到任何东西。在
我现在拥有的是:
从我的机器:
ssh -i mypemfile.pem -R 51347:localhost:51347 ubuntu@ec2-52-30-185-175.eu-west-1.compute.amazonaws.com
然后在远程计算机上:
^{pr2}$我得到:
2016-02-03 18:38:39,410 - dispynode - dispynode version 4.6.7
2016-02-03 18:38:39,414 - asyncoro - poller: epoll
2016-02-03 18:38:39,417 - dispynode - serving 1 cpus at 172.31.26.18:51348
2016-02-03 18:38:39,417 - dispynode - tcp server at 172.31.26.18:51348
2016-02-03 18:38:39,422 - asyncoro - waiting for 2 coroutines to terminate
Enter "quit" or "exit" to terminate dispynode,
"stop" to stop service, "start" to restart service,
"cpus" to change CPUs used, anything else to get status:
在我运行的客户机上:
import dispy
def f(x):
return 2*x
cluster = dispy.JobCluster(f,nodes=['ec2-52-30-185-175.eu-west-1.compute.amazonaws.com'],ext_ip_addr='localhost')
job = cluster.submit(2)
print('result: %s' % job())
什么也没发生,只是卡住了。 谢谢
目前没有回答
相关问题 更多 >
编程相关推荐