Skip to content

Commit

Permalink
Fix test failure in multithread rpc test (dmlc#3660)
Browse files Browse the repository at this point in the history
  • Loading branch information
VoVAllen authored Jan 19, 2022
1 parent e4cb4a3 commit 51651ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/distributed/test_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def start_client_multithread(ip_config):
dgl.distributed.send_request(0, req)

def subthread_call(server_id):
req = HelloRequest(STR, INTEGER, TENSOR+ server_id, simple_func)
req = HelloRequest(STR, INTEGER, TENSOR, simple_func)
dgl.distributed.send_request(server_id, req)


Expand All @@ -229,8 +229,9 @@ def subthread_call(server_id):

res0 = dgl.distributed.recv_response()
res1 = dgl.distributed.recv_response()
# Order is not guaranteed
assert_array_equal(F.asnumpy(res0.tensor), F.asnumpy(TENSOR))
assert_array_equal(F.asnumpy(res1.tensor), F.asnumpy(TENSOR+1))
assert_array_equal(F.asnumpy(res1.tensor), F.asnumpy(TENSOR))
dgl.distributed.exit_client()

start_client_multithread("rpc_ip_config_multithread.txt")
Expand Down

0 comments on commit 51651ec

Please sign in to comment.