Skip to content

Commit 98a0437

Browse files
committed
optimize distribute checkport
test=develop
1 parent 2354409 commit 98a0437

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/paddle/fluid/transpiler/details/checkport.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def wait_server_ready(endpoints):
3434
"""
3535
while True:
3636
all_ok = True
37+
not_ready_endpoints = []
3738
for ep in endpoints:
3839
ip_port = ep.split(":")
3940
with closing(socket.socket(socket.AF_INET,
@@ -42,8 +43,11 @@ def wait_server_ready(endpoints):
4243
result = sock.connect_ex((ip_port[0], int(ip_port[1])))
4344
if result != 0:
4445
all_ok = False
46+
not_ready_endpoints.append(ip_port)
4547
if not all_ok:
4648
sys.stderr.write("pserver not ready, wait 3 sec to retry...\n")
49+
sys.stderr.write("not ready endpoints:" + str(not_ready_endpoints) +
50+
"\n")
4751
sys.stderr.flush()
4852
time.sleep(3)
4953
else:

0 commit comments

Comments
 (0)