0
我正在通过示例here来学习MNIST上的分布式TF。我改变了集群配置到:分布式Tensorflow不能与简单示例一起工作
parameter_servers = ["1.2.3.4:2222"]
workers = [ "1.2.3.4:2222", "5.6.7.8:2222"]
1.2.3.4
和5.6.7.8
只是我的两个节点的表示。它们不是真正的IP地址。整个脚本名为example.py
在1.2.3.4
,我跑:python example.py --job_name=ps --task_index=0
。然后在同一台机器上,我在不同的终端跑python example --job_name=worker --task_index=0
。看起来它只是在等待。
在5,6,7,8
,我跑python example.py --job_name=worker --taks_index=1
。从那以后,我立即得到5.6.7.8
以下错误:
tensorflow.python.framework.errors.UnavailableError: {"created":"@1480458325.580095889","description":"EOF","file":"external/grpc/src/core/lib/iomgr/tcp_posix.c","file_line":235,"grpc_status":14}
I tensorflow/core/distributed_runtime/master_session.cc:845] DeregisterGraph error: Aborted: Graph handle is not found: . Possibly, this worker just restarted.
上
1.2.3.4
而且
tensorflow/core/distributed_runtime/graph_mgr.cc:55] 'unit.device' Must be non NULL
Aborted (core dumped)
这是因为我在同一台机器上同时运行参数服务器和工人?我没有超过2个节点,所以我该如何解决这个问题?
下面是在单个节点上运行2个工作人员的独立示例,您是否可以看到这是否适合您? https://gist.github.com/yaroslavvb/1124bb02a9fd4abce3d86caf2f950cb2 –
@YaroslavBulatov:它的工作原理,但我得到GPU服务器上的CUDA_ERROR_OUT_OF_MEMORY(1 GPU)。 – user3813674
您需要为其中一个进程“导出CUDA_VISIBLE_DEVICES =”,默认情况下它会抓取所有GPU内存。使用该设置,在同一台计算机上运行参数服务器和工作器应该没有问题。 –