Skip to content

Commit

Permalink
Hommexx: Use portable PRIx64 instead of lx in printf.
Browse files Browse the repository at this point in the history
  • Loading branch information
ambrad committed Sep 4, 2024
1 parent ac1f0ed commit cbf149b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include "TimeLevel.hpp"
#include "mpi/Comm.hpp"

#include <cinttypes>

namespace Homme {

namespace {
Expand Down Expand Up @@ -50,10 +52,10 @@ void print_global_state_hash (const std::string& label) {
all_reduce_HashType(comm.mpi_comm(), accum, gaccum, 5);
if (comm.root()) {
for (int i = 0; i < NUM_TIME_LEVELS; ++i)
fprintf(stderr, "hxxhash> %14d %1d %16lx (E %s)\n",
fprintf(stderr, "hxxhash> %14d %1d %16" PRIx64 " (E %s)\n",
tl.nstep, i, gaccum[i], label.c_str());
for (int i = 0; i < Q_NUM_TIME_LEVELS; ++i)
fprintf(stderr, "hxxhash> %14d %1d %16lx (T %s)\n",
fprintf(stderr, "hxxhash> %14d %1d %16" PRIx64 " (T %s)\n",
tl.nstep, i, gaccum[NUM_TIME_LEVELS+i], label.c_str());
}
}
Expand Down

0 comments on commit cbf149b

Please sign in to comment.