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

Tiny Profiler: Runtime Options (Enable/Disable, Filename) #3895

Open
ax3l opened this issue Apr 16, 2024 · 2 comments
Open

Tiny Profiler: Runtime Options (Enable/Disable, Filename) #3895

ax3l opened this issue Apr 16, 2024 · 2 comments
Assignees

Comments

@ax3l
Copy link
Member

ax3l commented Apr 16, 2024

As discussed today with @WeiqunZhang @AlexanderSinn in the WarpX developer meeting:
Adding a few more runtime options in AMReX to optionally redirect the tiny profiler table summary into a file (and also to disable prints) would be awesome (e.g., for Python runs).

Current option

A C++ output stream that would be user-implemented (in apps), e.g., to pass an fstream.

New Options?

A runtime option that defaults to 1 if TP is compiled, but can be disabled to supress printing the table (or profiling altogether even? Maybe two options?)

tiny_profiler.enabled = 1
tiny_profiler.print = 1

A runtime option to set an fstream as a runtime option (so apps can default it and users can overwrite it)

tiny_profiler.outname = "diags/profile.txt"  # default: none, using stdout
@DerNils-git
Copy link

We also just discussed the Tiny-profiling tool within the GEMPIC meeting today and came up with a feature request that might be related.

Could an optional label be added to the amrex::parallel_for(...,"MyParallelRegionLabel"), which would be forwarded to a tiny profiling call within the amrex parallel for?
The Kokkos profiling tools provide a similar feature for the parallel regions which is really helpful for quick profiling and identifying compute expensive kernels within a simulation.

Should I open a new issue for the request or can this issue be extended by the feature request?

@WeiqunZhang
Copy link
Member

@DerNils-git Please open a new issue.

@ax3l ax3l changed the title TIny Profiler: Runtime Options (Enable/Disable, Filename) Tiny Profiler: Runtime Options (Enable/Disable, Filename) Apr 17, 2024
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