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

Add macro for Scorep instrumentation of a user-defined code region #1784

Merged
merged 5 commits into from
Sep 24, 2019

Conversation

JosephThomasParker
Copy link
Contributor

@JosephThomasParker JosephThomasParker commented Aug 13, 2019

Add a macro to allow scorep instrumentation of a user-defined region of code. The section of code

{
SCOREP_REGION("region name")
// stuff to time
}

appears as "region name" in the Scalasca profile. AIUI, the existing SCOREP0 macro can't be used to do this, as it (very usefully) times the whole function and automatic uses the function name as its display name.

d7919
d7919 previously approved these changes Aug 13, 2019
Copy link
Member

@d7919 d7919 left a comment

Choose a reason for hiding this comment

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

The documentation looks good -- I've not actually used this approach to instrument regions but it looks like it matches what I recall from the scorep documentation

@JosephThomasParker
Copy link
Contributor Author

Yes, I went from the quick reference here:
https://apps.fz-juelich.de/scalasca/releases/scalasca/2.3/docs/QuickReference.pdf

@ZedThree
Copy link
Member

Can SCOREP_USER_REGION be used instead? Looks like it makes things a bit simpler.

http://scorepci.pages.jsc.fz-juelich.de/scorep-pipelines/docs/scorep-5.0/html/group__SCOREP__User.html

@JosephThomasParker
Copy link
Contributor Author

Thanks @ZedThree, that is simpler - updated!

Like with SCOREP0, this macro is defined to be null if BOUT is compiled
without scorep.

Also update coresponding docs.
@JosephThomasParker JosephThomasParker changed the title Add ReadTheDocs section on Scorep user defined regions Add macro for Scorep instrumentation of a user-defined code region Aug 13, 2019
@JosephThomasParker
Copy link
Contributor Author

Sorry, mission creep. The approach documented doesn't build when BOUT is configured without scorep, so I've added a macro for the region that vanishes when there's no scorep support.

@JosephThomasParker
Copy link
Contributor Author

@d7919 - yes it works for me locally and on Archer. 🙂

@ZedThree ZedThree merged commit 53d9d9e into next Sep 24, 2019
@ZedThree ZedThree deleted the feature/update-scorep-docs branch September 24, 2019 16:24
@ZedThree ZedThree mentioned this pull request Oct 24, 2019
18 tasks
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

Successfully merging this pull request may close these issues.

None yet

3 participants