Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug of point to point with GPU #174

Merged
merged 6 commits into from Dec 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions chainermn/communicators/_base.py
Expand Up @@ -87,7 +87,12 @@ def send(self, obj, dest, tag):
'chainermn.communicators.CommunicatorBase.send')

msgtype = _MessageType(obj)
self.mpi_comm.send(msgtype, dest=dest, tag=tag)
"""We use ssend() instead of send() to pass unittests.
If we don't use it, an error occurs in
test_point_to_point_communication.py
when using MVAPICH2-2.2 and GPUs.
"""
self.mpi_comm.ssend(msgtype, dest=dest, tag=tag)

if not msgtype.is_tuple:
obj = [obj]
Expand All @@ -97,7 +102,8 @@ def send(self, obj, dest, tag):
chainer.cuda.Stream.null.synchronize()

buf = _memory_utility.array_to_buffer_object(array)
self.mpi_comm.Send(buf, dest=dest, tag=tag)
"""We use Ssend() for the same reason as using ssend()."""
self.mpi_comm.Ssend(buf, dest=dest, tag=tag)

def recv(self, source, tag):
"""A primitive of inter-process receiver.
Expand Down