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

Print AMR info with Quiet/Verbose verbosity #5822

Open
knelli2 opened this issue Mar 4, 2024 · 6 comments
Open

Print AMR info with Quiet/Verbose verbosity #5822

knelli2 opened this issue Mar 4, 2024 · 6 comments

Comments

@knelli2
Copy link
Contributor

knelli2 commented Mar 4, 2024

Currently AMR prints either debug info for each element which can result in a lot of output, or it prints nothing. It'd be nice if I could choose a verbosity that prints a summary of what happened with AMR after each phase change. I'm imagining the domain::diagnostic_info function that we print at the beginning of the simulation would be a good thing to print. It gives a good overview of how elements were redistributed (for h-refinement) and how grid points were redistributed (for p-refinement). We'll probably have to do a reduction to get all this info but that shouldn't be too bad.

@nilsdeppe
Copy link
Member

This is likely not possible long-term because we will want to switch AMR to not be in its own phase. Additionally, while AMR is currently done effectively at Slab boundaries, we will need to be able to do it locally in space and time, which means the info you are asking for is not well-defined.

@knelli2
Copy link
Contributor Author

knelli2 commented Mar 4, 2024

Ah I see. However, I still think it would be nice to have an option to print something about what AMR is doing throughout the simulation. Maybe we need to aggregate this information somehow as AMR does its stuff locally then print every N slabs? I just don't want the only two options for diagnostics to be 100GB in spectre.out or absolutely nothing.

@nilsdeppe
Copy link
Member

I agree! We definitely need something! Could we have an Event that collects info about grid structure in a way that's convenient to visualize? I'm not sure what that means (and we probably won't until we try several things), but that seems like what we might want

@knelli2
Copy link
Contributor Author

knelli2 commented Mar 4, 2024

What about something similar to ObserveFields except we don't observe any tensors and just dump the grid? Maybe we also dump some other diagnostics to the reductions file like min/max p/h refinement? Number of elements? Etc. And then there we can print this to terminal

@nilsvu
Copy link
Member

nilsvu commented Mar 4, 2024

We can also write every change that AMR makes and/or accumulated data like the number of times h/p refinement/coarsening is triggered to the reductions file. Then visualize this data.

@nilsdeppe
Copy link
Member

Yea, I think we should add support for these things. We might not be able to do it in practice for all runs like SpEC does because it may be too much data. However, I think all the requests/suggestions here will be needed for debugging AMR or other things where AMR acts up as a symptom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants