From ccbdd7aad0c163d07290de0d50abb27f7cf8e941 Mon Sep 17 00:00:00 2001 From: Dong Daxiang <35550832+guru4elephant@users.noreply.github.com> Date: Wed, 20 Nov 2019 12:00:11 +0800 Subject: [PATCH] update worker_num for MPISymetricRoleMaker (#20798) test=develop --- python/paddle/fluid/incubate/fleet/base/role_maker.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/paddle/fluid/incubate/fleet/base/role_maker.py b/python/paddle/fluid/incubate/fleet/base/role_maker.py index 03657ada029..2471748b4e4 100644 --- a/python/paddle/fluid/incubate/fleet/base/role_maker.py +++ b/python/paddle/fluid/incubate/fleet/base/role_maker.py @@ -252,8 +252,7 @@ class MPISymetricRoleMaker(MPIRoleMaker): return the current number of worker """ if self._check_role_generation(): - if self.is_worker(): - return self._get_size() / self._proc_per_node + return self._get_size() / self._proc_per_node return 0 def _server_num(self): -- GitLab