From 009c7cf6ccf3f8ece6922d532df38cadd3ca5c84 Mon Sep 17 00:00:00 2001 From: heqiaozhi Date: Wed, 12 Dec 2018 16:23:50 +0800 Subject: [PATCH] add finialize --- python/paddle/fluid/contrib/utils/__init__.py | 2 +- python/paddle/fluid/distributed/helper.py | 3 +++ python/paddle/fluid/distributed/ps_instance.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/contrib/utils/__init__.py b/python/paddle/fluid/contrib/utils/__init__.py index 2fe9f702f..20b2cc381 100644 --- a/python/paddle/fluid/contrib/utils/__init__.py +++ b/python/paddle/fluid/contrib/utils/__init__.py @@ -18,5 +18,5 @@ from __future__ import print_function from . import hdfs_utils from .hdfs_utils import * -__all__ = lookup_table_utils.__all__ +#__all__ = lookup_table_utils.__all__ __all__ = hdfs_utils.__all__ diff --git a/python/paddle/fluid/distributed/helper.py b/python/paddle/fluid/distributed/helper.py index 4cc5eb2a9..1244b4c0c 100644 --- a/python/paddle/fluid/distributed/helper.py +++ b/python/paddle/fluid/distributed/helper.py @@ -44,5 +44,8 @@ class MPIHelper(object): def get_hostname(self): import socket return socket.gethostname() + + def finalize(self): + MPI.Finalize() diff --git a/python/paddle/fluid/distributed/ps_instance.py b/python/paddle/fluid/distributed/ps_instance.py index 94e123c2c..dce5dfc5b 100644 --- a/python/paddle/fluid/distributed/ps_instance.py +++ b/python/paddle/fluid/distributed/ps_instance.py @@ -97,6 +97,7 @@ class PaddlePSInstance(object): pass def finalize(self): + self.dh.finalize() pass -- GitLab