Skip to content

Commit

Permalink
changing tests to await on send/recv rather than poll
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay-Venkatesh committed Nov 1, 2018
1 parent 43848eb commit 7519df6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
1 change: 0 additions & 1 deletion pybind/myucp.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ static unsigned ucp_ipy_worker_progress(ucp_worker_h ucp_worker)
num_cb_free++;
assert(num_cb_free <= CB_Q_MAX_ENTRIES);
assert(cb_free_head.tqh_first != NULL);
printf("calling pyx_cb\b");
tmp_pyx_cb(tmp_arg, tmp_py_cb);
}
return status;
Expand Down
23 changes: 13 additions & 10 deletions tests/test-server-listen-accept-future-recv.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,35 +47,38 @@ def send_recv(ep, msg_log, server, is_cuda):
async def talk_to_client(client_ep):

print("in talk_to_client")
msg_log = max_msg_log

'''
buffer_region = ucp.buffer_region()
buffer_region.alloc_cuda(1 << msg_log)

msg.set_mem(0, 1 << msg_log)
#await ep.send(msg, 1 << msg_log)
msg = ucp.ucp_msg(buffer_region)

send_req = await client_ep.send(msg, 1 << msg_log)

recv_req = await client_ep.recv_ft()

buffer_region.free_cuda()
'''

print(42)
return 42

async def talk_to_server(ip, port):

msg_log = max_msg_log

server_ep = ucp.get_endpoint(ip, port)

'''
buffer_region = ucp.buffer_region()
buffer_region.alloc_cuda(1 << msg_log)

msg.set_mem(0, 1 << msg_log)
#await ep.send(msg, 1 << msg_log)
msg = ucp.ucp_msg(buffer_region)

recv_req = await server_ep.recv_ft()

send_req = await server_ep.send(msg, 1 << msg_log)

buffer_region.free_cuda()
'''

print(3.14)
return 3.14
Expand Down

0 comments on commit 7519df6

Please sign in to comment.