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

feature: importing HPCToolkit data into Hatchet #126

Merged
merged 15 commits into from
May 30, 2024

Conversation

draganaurosgrbic
Copy link

No description provided.

@ilumsden
Copy link
Collaborator

@draganagrbicllnl I'm going to review your code shortly, but, before I do, I wanted to let you know that you need to add license comments to the top of your new file. You can copy those comments from any of the other Python files.

Copy link
Collaborator

@ilumsden ilumsden left a comment

Choose a reason for hiding this comment

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

I haven't run the code yet, so this is just a review based on reading the code.

Most of the code looks good. There are a few minor issues I've commented on, but, besides one possible bug in _read_cct, there's nothing major.

The biggest thing I'd want to see added to this PR is a unit test or two to make sure the reader is working as expected.

hatchet/graphframe.py Show resolved Hide resolved
hatchet/readers/hpctoolkit_reader_latest.py Outdated Show resolved Hide resolved
hatchet/readers/hpctoolkit_reader_latest.py Show resolved Hide resolved
hatchet/readers/hpctoolkit_reader_latest.py Outdated Show resolved Hide resolved
hatchet/readers/hpctoolkit_reader_latest.py Outdated Show resolved Hide resolved
hatchet/readers/hpctoolkit_reader_latest.py Outdated Show resolved Hide resolved
hatchet/readers/hpctoolkit_reader_latest.py Outdated Show resolved Hide resolved
hatchet/readers/hpctoolkit_reader_latest.py Show resolved Hide resolved
hatchet/readers/hpctoolkit_reader_latest.py Show resolved Hide resolved
hatchet/tests/hpctoolkit_latest.py Outdated Show resolved Hide resolved
hatchet/tests/hpctoolkit_latest.py Outdated Show resolved Hide resolved
hatchet/tests/hpctoolkit_latest.py Outdated Show resolved Hide resolved
hatchet/tests/__init__.py Outdated Show resolved Hide resolved
hatchet/tests/hpctoolkit_latest.py Show resolved Hide resolved
Copy link
Collaborator

@ilumsden ilumsden left a comment

Choose a reason for hiding this comment

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

Look good. I've only got a few more changes that should be made. This time, they're mostly related to the unit tests. The main code for the reader is pretty much good to go.

However, you need to fix formatting. The CI will not run unit tests unless the code satisfies the black and flake8 checks, and we won't be able to merge until we see the unit tests passing in CI. Regarding the flake8 checks, please rebase this PR on top of develop. Some changes just went in that will prevent certain failures related to flake8.

.gitignore Outdated Show resolved Hide resolved
hatchet/tests/hpctoolkit_latest.py Outdated Show resolved Hide resolved
assert len(graphframe.dataframe) == 10824
assert "name" in graphframe.dataframe.columns
assert "realtime (i)" in graphframe.dataframe.columns
assert "realtime (e)" in graphframe.dataframe.columns
Copy link
Collaborator

Choose a reason for hiding this comment

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

@pearce8 I know that, in the Caliper reader, we have a mapping of certain timing metrics to the names "time" and "time (inc)". Do we want to do something similar here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Similarly, we normally use the (inc) metric suffix for inclusive metrics and no suffix for exclusive metrics (at least those that aren't derived by Hatchet). @pearce8 should we continue using that convention here?

Copy link
Author

Choose a reason for hiding this comment

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

@ilumsden @pearce8 I was using (i) for inclusive metric mapping, and (e) for exclusive metric mapping. I can update this to be consistent with the Caliper convention you used. Also, for HPCToolkit we support three time metrics when measuring application - realtime, cputime, and cycles. I can map them to time for consistency.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@draganagrbicllnl I'd hold off on the time mapping for now until we hear back from @pearce8. As for the (i) and (e) part, it would probably be best to change them to (inc) and no suffix respectively. That convention isn't actually from Caliper. It's a Hatchet convention.

Copy link
Author

Choose a reason for hiding this comment

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

@ilumsden done

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ilumsden @draganagrbicllnl Yes, lets go with (inc) and no suffix to match the Caliper convention.

hatchet/tests/hpctoolkit_latest.py Outdated Show resolved Hide resolved
hatchet/tests/hpctoolkit_latest.py Outdated Show resolved Hide resolved
hatchet/tests/hpctoolkit_latest.py Outdated Show resolved Hide resolved
hatchet/tests/hpctoolkit_latest.py Outdated Show resolved Hide resolved
@ilumsden ilumsden added area-readers Issues and PRs involving Hatchet's data readers priority-normal Normal priority issues and PRs status-ready-for-review This PR is ready to be reviewed by assigned reviewers type-feature Requests for new features or PRs which implement new features labels May 24, 2024
@draganaurosgrbic
Copy link
Author

@ilumsden fixed the formatting

@draganaurosgrbic draganaurosgrbic force-pushed the hpctoolkit-integration branch 2 times, most recently from eadf7f5 to 422ebbd Compare May 24, 2024 23:23
Copy link
Collaborator

@ilumsden ilumsden left a comment

Choose a reason for hiding this comment

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

Now that CI is passing, I'll approve this.

Before merge, I'd appreciate your feedback on the "time metric" comment from my last review @pearce8.

@ilumsden ilumsden added status-approved No more revisions are required on this PR and it is ready for merge and removed status-ready-for-review This PR is ready to be reviewed by assigned reviewers labels May 24, 2024
@ilumsden
Copy link
Collaborator

Note that this PR now depends on #131

Copy link
Collaborator

@michaelmckinsey1 michaelmckinsey1 left a comment

Choose a reason for hiding this comment

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

@draganagrbicllnl Can you rebase on hatchet develop?

@draganaurosgrbic
Copy link
Author

@michaelmckinsey1 rebased on develop

@pearce8 pearce8 merged commit fc47f96 into LLNL:develop May 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-readers Issues and PRs involving Hatchet's data readers priority-normal Normal priority issues and PRs status-approved No more revisions are required on this PR and it is ready for merge type-feature Requests for new features or PRs which implement new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants