Skip to content

Commit

Permalink
Merge pull request #2448 from CliMA/gb/memory_stats
Browse files Browse the repository at this point in the history
Add RSS memory usage to reporting
  • Loading branch information
Sbozzolo authored Dec 19, 2023
2 parents a223fbe + 5dcccf1 commit 773e04f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/solver/solve.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ClimaTimeSteppers as CTS
import Base.Sys: maxrss

struct EfficiencyStats{TS <: Tuple, WT}
tspan::TS
Expand Down Expand Up @@ -74,6 +75,10 @@ function solve_atmos!(simulation)
return AtmosSolveResults(nothing, :simulation_crashed, nothing)
finally
# Close all the files opened by the writers

maxrss_str = prettymemory(maxrss())
@info "Memory currently used (after solve!) by the process (RSS): $maxrss_str"

foreach(CAD.close, output_writers)
end
end
Expand Down

0 comments on commit 773e04f

Please sign in to comment.