Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid FieldVector outer constructor inference #2115

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions perf/flame.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ allocs = @allocated SciMLBase.step!(integrator)
@info "`allocs ($job_id)`: $(allocs)"

allocs_limit = Dict()
allocs_limit["flame_perf_target"] = 4384
allocs_limit["flame_perf_target_tracers"] = 204016
allocs_limit["flame_perf_target_edmfx"] = 304064
allocs_limit["flame_perf_target_diagnostic_edmfx"] = 685456
allocs_limit["flame_perf_target_edmf"] = 12459299664
allocs_limit["flame_perf_target"] = 4256
allocs_limit["flame_perf_target_tracers"] = 203888
allocs_limit["flame_perf_target_edmfx"] = 274832
allocs_limit["flame_perf_target_diagnostic_edmfx"] = 662032
allocs_limit["flame_perf_target_edmf"] = 12031972048
allocs_limit["flame_perf_target_threaded"] = 6175664
allocs_limit["flame_perf_target_callbacks"] = 49850536
allocs_limit["flame_perf_gw"] = 4985829472
allocs_limit["flame_perf_target_callbacks"] = 45111592
allocs_limit["flame_perf_gw"] = 4911463328

if allocs < allocs_limit[job_id] * buffer
@info "TODO: lower `allocs_limit[$job_id]` to: $(allocs)"
Expand Down
9 changes: 4 additions & 5 deletions src/callbacks/callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,10 @@ function save_to_disk_func(integrator)
hdfwriter = InputOutput.HDF5Writer(output_file, p.comms_ctx)
InputOutput.HDF5.write_attribute(hdfwriter.file, "time", t) # TODO: a better way to write metadata
InputOutput.write!(hdfwriter, Y, "Y")
InputOutput.write!(
hdfwriter,
Fields.FieldVector(; pairs(diagnostic)...),
"diagnostics",
)
FT = Spaces.undertype(axes(Y.c))
values = map(Fields.wrap, diagnostic)
fv = Fields.FieldVector{FT}(values)
InputOutput.write!(hdfwriter, fv, "diagnostics")
Base.close(hdfwriter)
return nothing
end
Expand Down
Loading