From 98a0437d7073b3de71121e53b8b652b7efdf019e Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Sat, 17 Nov 2018 15:29:21 +0800 Subject: [PATCH] optimize distribute checkport test=develop --- python/paddle/fluid/transpiler/details/checkport.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/paddle/fluid/transpiler/details/checkport.py b/python/paddle/fluid/transpiler/details/checkport.py index 7bad4b427a2..b201935ef45 100644 --- a/python/paddle/fluid/transpiler/details/checkport.py +++ b/python/paddle/fluid/transpiler/details/checkport.py @@ -34,6 +34,7 @@ def wait_server_ready(endpoints): """ while True: all_ok = True + not_ready_endpoints = [] for ep in endpoints: ip_port = ep.split(":") with closing(socket.socket(socket.AF_INET, @@ -42,8 +43,11 @@ def wait_server_ready(endpoints): result = sock.connect_ex((ip_port[0], int(ip_port[1]))) if result != 0: all_ok = False + not_ready_endpoints.append(ip_port) if not all_ok: sys.stderr.write("pserver not ready, wait 3 sec to retry...\n") + sys.stderr.write("not ready endpoints:" + str(not_ready_endpoints) + + "\n") sys.stderr.flush() time.sleep(3) else: -- GitLab