Skip to content

Commit

Permalink
Merge pull request #5569 from hiroyuki-sato/topic/tools-use-portable-…
Browse files Browse the repository at this point in the history
…print

TOOLS/PERF: Use portable format string like PRIu64
  • Loading branch information
yosefe committed Aug 14, 2020
2 parents ba69e14 + c7a5f50 commit 6cd8b3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/tools/perf/lib/uct_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# include "config.h"
#endif

#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include <tools/perf/lib/libperf_int.h>

extern "C" {
Expand Down Expand Up @@ -503,7 +505,8 @@ class uct_perf_test_runner {
/* Wait until getting ACK from responder */
sn = get_recv_sn(recv_sn, m_perf.uct.recv_mem.mem_type);
ucs_assertv(UCS_CIRCULAR_COMPARE8(send_sn - 1, >=, sn),
"recv_sn=%d iters=%ld", sn, m_perf.current.iters);
"recv_sn=%d iters=%" PRIu64, sn,
m_perf.current.iters);

while (UCS_CIRCULAR_COMPARE8(send_sn, >, sn + fc_window)) {
progress_responder();
Expand Down
4 changes: 2 additions & 2 deletions src/tools/perf/perftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ static void usage(const struct perftest_context *ctx, const char *program)
printf(" -m <send mem type>[,<recv mem type>]\n");
printf(" memory type of message for sender and receiver (host)\n");
print_memory_type_usage();
printf(" -n <iters> number of iterations to run (%ld)\n", ctx->params.super.max_iter);
printf(" -w <iters> number of warm-up iterations (%zu)\n",
printf(" -n <iters> number of iterations to run (%"PRIu64")\n", ctx->params.super.max_iter);
printf(" -w <iters> number of warm-up iterations (%"PRIu64")\n",
ctx->params.super.warmup_iter);
printf(" -c <cpulist> set affinity to this CPU list (separated by comma) (off)\n");
printf(" -O <count> maximal number of uncompleted outstanding sends\n");
Expand Down

0 comments on commit 6cd8b3c

Please sign in to comment.