Skip to content

Commit

Permalink
Add RSS memory usage to reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Sbozzolo committed Dec 19, 2023
1 parent a223fbe commit cfb408e
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 by the process (RSS): $maxrss_str"

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

0 comments on commit cfb408e

Please sign in to comment.