From cfb408e1dca2cfc6ca2145d14c7f6c5c6c7eb466 Mon Sep 17 00:00:00 2001 From: Gabriele Bozzola Date: Tue, 19 Dec 2023 09:47:14 -0800 Subject: [PATCH] Add RSS memory usage to reporting --- src/solver/solve.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/solver/solve.jl b/src/solver/solve.jl index 0fe1fcea18..68aec04c63 100644 --- a/src/solver/solve.jl +++ b/src/solver/solve.jl @@ -1,4 +1,5 @@ import ClimaTimeSteppers as CTS +import Base.Sys: maxrss struct EfficiencyStats{TS <: Tuple, WT} tspan::TS @@ -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