Skip to content

Commit

Permalink
UCP/FLUSH: Use PRIx64 to print lane maps info
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankochin committed May 7, 2024
1 parent 9b84043 commit fa5e8ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions src/ucp/rma/flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ ucp_ep_flush_request_update_uct_comp(ucp_request_t *req, int diff,
&req->send.state.uct_comp, req->send.state.uct_comp.count,
diff);
ucs_assertv(!(req->send.flush.started_lanes & new_started_lanes),
"req=%p started_lanes=0x%zx new_started_lanes=0x%zx", req,
req->send.flush.started_lanes, new_started_lanes);
"req=%p started_lanes=0x%"PRIx64" new_started_lanes=0x%"PRIx64,
req, req->send.flush.started_lanes, new_started_lanes);

ucp_trace_req(req,
"flush update ep %p comp_count %d->%d num_lanes %d->%d "
"started_lanes 0x%zx->0x%zx",
"started_lanes 0x%"PRIx64"->0x%"PRIx64,
req->send.ep, req->send.state.uct_comp.count,
req->send.state.uct_comp.count + diff,
req->send.flush.num_lanes, ucp_ep_num_lanes(req->send.ep),
Expand Down Expand Up @@ -99,8 +99,8 @@ static void ucp_ep_flush_progress(ucp_request_t *req)
}

ucp_trace_req(req,
"progress ep=%p flush flags=0x%x started_lanes=0x%zx "
"count=%d", ep, ep->flags, req->send.flush.started_lanes,
"progress ep=%p flush flags=0x%x started_lanes=0x%" PRIx64
" count=%d", ep, ep->flags, req->send.flush.started_lanes,
req->send.state.uct_comp.count);

while (req->send.flush.started_lanes < all_lanes) {
Expand Down Expand Up @@ -229,20 +229,20 @@ static void ucp_ep_flush_request_resched(ucp_ep_h ep, ucp_request_t *req)
(ucp_ep_config(ep)->p2p_lanes &&
ep->worker->context->config.ext.proto_request_reset)) {
ucs_assertv(!req->send.flush.started_lanes,
"req=%p flush started_lanes=0x%zx", req,
"req=%p flush started_lanes=0x%"PRIx64, req,
req->send.flush.started_lanes);
} else {
ucs_assertv(!(UCS_BIT(req->send.lane) & req->send.flush.started_lanes),
"req=%p lane=%d started_lanes=0x%zx", req, req->send.lane,
req->send.flush.started_lanes);
"req=%p lane=%d started_lanes=0x%"PRIx64, req,
req->send.lane, req->send.flush.started_lanes);

/* Only lanes connected to iface can be started/flushed before
* wireup is done because connect2iface does not create wireup_ep
* without cm mode */
ucs_assertv(!(req->send.flush.started_lanes &
ucp_ep_config(ep)->p2p_lanes),
"req=%p flush started_lanes=0x%zx p2p_lanes=0x%zx", req,
req->send.flush.started_lanes,
"req=%p flush started_lanes=0x%"PRIx64" p2p_lanes=0x%"PRIx64,
req, req->send.flush.started_lanes,
ucp_ep_config(ep)->p2p_lanes);
}

Expand Down Expand Up @@ -348,7 +348,7 @@ void ucp_ep_flush_request_ff(ucp_request_t *req, ucs_status_t status)
int num_comps = req->send.flush.num_lanes -
ucs_popcount(req->send.flush.started_lanes);

ucp_trace_req(req, "fast-forward flush, comp-=%d num_lanes %d started 0x%zx",
ucp_trace_req(req, "fast-forward flush, comp-=%d num_lanes %d started 0x%"PRIx64,
num_comps, req->send.flush.num_lanes,
req->send.flush.started_lanes);

Expand Down
2 changes: 1 addition & 1 deletion src/ucs/sys/compiler_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
#define UCS_BIT(i) (1ul << (i))

/* Mask of bits 0..i-1 */
#define UCS_MASK(i) ((i == 0) ? 0 : (UCS_BIT(i - 1) | (UCS_BIT(i - 1) - 1)))
#define UCS_MASK(_i) (((_i) >= 64) ? UINT64_MAX : (UCS_BIT(_i) - 1))

/*
* Enable compiler checks for printf-like formatting.
Expand Down

0 comments on commit fa5e8ca

Please sign in to comment.