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

Temporarily disable/enable Vernier #153

Open
hiker opened this issue Dec 9, 2024 · 2 comments
Open

Temporarily disable/enable Vernier #153

hiker opened this issue Dec 9, 2024 · 2 comments

Comments

@hiker
Copy link

hiker commented Dec 9, 2024

Many profiling libraries offer the option to (temporarily) disable or enable profiling, eg. to reduce profiling impact in terms of runtime of output file size, or just to focus on a given part of the code. PSyclone's psydata API provides call to these functionality, and I believe Andy is often using it.

While there is no requirement to support this (atm the corresponding PSyclone's psydata API call just don't do anything), I just wanted to suggest this as a potential enhancement.

@mo-mglover
Copy link
Collaborator

We wondered about this in the early stages of the project, but I think it's better left to the client code to manage this.

On the negative side, it makes code such as if (flag) call vernier_start necessary, but the postives are:

  • If flag is set as a parameter to .false. then the compiler's optimiser will strip out the calls completely, so there's no overhead a production context.
  • Client codes are free to define several different flags, which may be specific to particular code sections or relate to the amount of profiling overhead particular regions incur.

@hiker
Copy link
Author

hiker commented Dec 10, 2024

I wasn't talking of disabling it entirely. It could be that e.g. you don't want to measure (say) startup, or you only want to measure after 2 days of simulated time (to capture a shift in computational profile because ... something happens). So you would add a call to 'disable' Venier, and once the init is done, you will enable it again.

With PSyclone, by default each kernel will get instrumented, while this can be changed (by using custom scripts for some files), it is way more convenience to just add calls to start/stop to narrow the output to what you are interested in.

The name I used (enabling/disabling) was not ideal - in PSyclone we have calls to PSyDataStart() and PSyDataStop, which will enable/disable a library (if supported). That's why I called it 'temporarily', i.e. for some parts of the runtime.

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

No branches or pull requests

2 participants