Skip to content

Commit

Permalink
return string from mem_usage
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Apr 22, 2024
1 parent 7b9170f commit bc42d38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion experiments/AMIP/coupler_driver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ function show_memory_usage(comms_ctx, objects, io::Union{Base.TTY, IOContext, IO
cumul_size += Base.summarysize(obj)
@info "Memory footprint of `$(name)` in GB: $(Base.summarysize(obj) / 1e9)"
end
return cumul_size / 1e9
allocs_GB = string(cumul_size / 1e9)
return allocs_GB
end
else
@warn "Invalid device type $device; cannot show memory usage."
Expand Down

0 comments on commit bc42d38

Please sign in to comment.