Skip to content

Commit

Permalink
Merge pull request openucx#30 from TomAugspurger/print-debug
Browse files Browse the repository at this point in the history
Fix compiling with DEBUG set
  • Loading branch information
TomAugspurger authored Feb 11, 2019
2 parents 5a8031b + 6d5e880 commit c7ba7af
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pybind/ucp_py_ucp_fxns.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static int start_listener(ucp_worker_h ucp_worker, ucx_listener_ctx_t *context,

status = ucp_listener_create(ucp_worker, &params, listener);
if (status != UCS_OK) {
DEBUG_PRINT(stderr, "failed to listen (%s)\n", ucs_status_string(status));
ERROR_PRINT("failed to listen (%s)\n", ucs_status_string(status));
}

return status;
Expand Down Expand Up @@ -430,7 +430,7 @@ void *ucp_py_get_ep(char *ip, int listener_port)

status = ucp_ep_create(ucp_py_ctx_head->ucp_worker, &ep_params, ep_ptr);
if (status != UCS_OK) {
DEBUG_PRINT(stderr, "failed to connect to %s (%s)\n", ip,
ERROR_PRINT("failed to connect to %s (%s)\n", ip,
ucs_status_string(status));
}
internal_ep->ep_ptr = ep_ptr;
Expand Down Expand Up @@ -488,7 +488,7 @@ int ucp_py_put_ep(void *internal_ep)
request_init(close_req);
ucp_request_free(close_req);
} else if (UCS_PTR_STATUS(close_req) != UCS_OK) {
DEBUG_PRINT(stderr, "failed to close ep %p\n", (void*)*ep_ptr);
ERROR_PRINT("failed to close ep %p\n", (void*)*ep_ptr);
}

free(ep_ptr);
Expand Down Expand Up @@ -517,9 +517,6 @@ int ucp_py_init()

ucp_get_version(&a, &b, &c);

DEBUG_PRINT("client = %s (%d), ucp version (%d, %d, %d)\n",
client_target_name, strlen(client_target_name), a, b, c);

memset(&ucp_params, 0, sizeof(ucp_params));

status = ucp_config_read(NULL, NULL, &config);
Expand Down

0 comments on commit c7ba7af

Please sign in to comment.