Skip to content

Commit 543c144

Browse files
authored
Merge pull request #31 from stanmoore1/sts_unit
Change memory unit in space-time-stack to kB
2 parents fda1d9f + 648ab45 commit 543c144

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools/space-time-stack/kp_space_time_stack.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,13 @@ struct Allocations {
361361
#endif
362362
{
363363
std::stringstream ss;
364-
ss << "MAX BYTES ALLOCATED: " << total_size << '\n';
364+
ss << std::fixed << std::setprecision(1);
365+
ss << "MAX MEMORY ALLOCATED: " << double(total_size)/1024.0 << " kB" << '\n'; // convert bytes to kB
365366
#ifdef USE_MPI
366367
ss << "MPI RANK WITH MAX MEMORY: " << rank << '\n';
367368
#endif
368369
ss << "ALLOCATIONS AT TIME OF HIGH WATER MARK:\n";
369370
std::ios saved_state(nullptr);
370-
ss << std::fixed << std::setprecision(1);
371371
for (auto& allocation : alloc_set) {
372372
auto percent = double(allocation.size) / double(total_size) * 100.0;
373373
if (percent < 0.1) continue;

0 commit comments

Comments
 (0)