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

Update all_native_events.c and get_event_component.c to allow users to optionally disable Cuda native events #278

Merged

Conversation

Treece-Burgess
Copy link
Contributor

@Treece-Burgess Treece-Burgess commented Nov 11, 2024

Pull Request Description

This PR looks to add an optional flag to all_native_events.c and get_event_component.c titled --disable-cuda-events with options of yes and no (the default is no). The reason for this is due to the runtime length of all_native_events.c and get_event_component.cwhen the Cuda component has been compiled in.

Along with the --disable-cuda-events option, I have also added -h and --help. Example of --help and -h is below (shown is all_native_events.c, but similarly is get_event_component.c):

This is the all_native_events program.
For all components compiled in, it attempts to: add the component events, start, and stop.
Usage: ./all_native_events [options]
General command options:
	-h, --help                           Print the help message.
	--disable-cuda-events=<yes,no>       Optionally disable processing the Cuda native events. Default is no.

Author Checklist

  • Description
    Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
  • Commits
    Commits are self contained and only do one thing
    Commits have a header of the form: module: short description
    Commits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
  • Tests
    The PR needs to pass all the tests

@Treece-Burgess Treece-Burgess added the type-feature Issues that request a new feature or PRs that add a new feature label Nov 11, 2024
/* parse command line flags */
for (i = 0; i < argc; i++) {
if (strncmp(argv[i], "--disable-cuda-events=", 22) == 0) {
strcpy(disableCudaEvts, argv[i] + 22);
Copy link
Contributor

@adanalis adanalis Nov 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to use: strncpy(disableCudaEvts, argv[i] + 22, PAPI_MIN_STR_LEN);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated all_native_events.c to use strncpy.

@Treece-Burgess Treece-Burgess changed the title Update all_native_events.c to allow users to optionally disable Cuda native events Update all_native_events.c and get_event_component.c to allow users to optionally disable Cuda native events Nov 21, 2024
@Treece-Burgess Treece-Burgess added the component-cuda PRs and Issues related to the cuda component label Dec 6, 2024
flag --disable-cuda-events=<yes,no> to disable processing of Cuda native
events.
@Treece-Burgess Treece-Burgess merged commit d3e966f into icl-utk-edu:master Dec 10, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-cuda PRs and Issues related to the cuda component type-feature Issues that request a new feature or PRs that add a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants