提交 178c47c0 编写于 作者: D dongdaxiang

refine import path for ps_instance.py

test=develop
上级 29c77266
......@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from mpi4py import MPI
import ps_pb2 as pslib
......@@ -59,7 +58,7 @@ class FileSystem(object):
class MPIHelper(object):
"""
MPIHelper is a wrapper of mpi4py, supprot get_rank get_size etc.
MPIHelper is a wrapper of mpi4py, support get_rank get_size etc.
Args:
No params
Examples:
......@@ -68,7 +67,9 @@ class MPIHelper(object):
"""
def __init__(self):
from mpi4py import MPI
self.comm = MPI.COMM_WORLD
self.MPI = MPI
def get_rank(self):
return self.comm.Get_rank()
......@@ -86,4 +87,4 @@ class MPIHelper(object):
return socket.gethostname()
def finalize(self):
MPI.Finalize()
self.MPI.Finalize()
......@@ -9,4 +9,3 @@ Pillow
nltk>=3.2.2
graphviz
six
mpi4py==3.0.0
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册