Skip to content

Conversation

@dabele
Copy link
Member

@dabele dabele commented Jun 21, 2024

Changes and Information

  • Integrated gperftools for profiling into cmake
  • added documentation about gperftools usage and general profling

@DavidKerkmann maybe you could give gperftools on MacOS a try? I haven't been able to find reliable information about whether it works or how to get it. apparently homebrew should work?

Closes #1053

Merge Request - Guideline Checklist

Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.

Checks by code author

  • Every addressed issue is linked (use the "Closes #ISSUE" keyword below)
  • New code adheres to coding guidelines
  • No large data files have been added (files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
  • Tests are added for new functionality and a local test run was successful (with and without OpenMP)
  • Appropriate documentation for new functionality has been added (Doxygen in the code and Markdown files if necessary)
  • Proper attention to licenses, especially no new third-party software with conflicting license has been added
  • (For ABM development) Checked benchmark results and ran and posted a local test above from before and after development to ensure performance is monitored.

Checks by code reviewer(s)

  • Corresponding issue(s) is/are linked and addressed
  • Code is clean of development artifacts (no deactivated or commented code lines, no debugging printouts, etc.)
  • Appropriate unit tests have been added, CI passes, code coverage and performance is acceptable (did not decrease)
  • No large data files added in the whole history of commits(files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
  • On merge, add 2-5 lines with the changes (main added features, changed items, or corrected bugs) to the merge-commit-message. This can be taken from the briefly-list-the-changes above (best case) or the separate commit messages (worst case).

@dabele dabele requested review from DavidKerkmann and reneSchm June 21, 2024 13:51
@dabele dabele self-assigned this Jun 21, 2024
@codecov
Copy link

codecov bot commented Jun 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.23%. Comparing base (9022c7c) to head (643f65e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1054   +/-   ##
=======================================
  Coverage   96.23%   96.23%           
=======================================
  Files         128      128           
  Lines       10852    10867   +15     
=======================================
+ Hits        10443    10458   +15     
  Misses        409      409           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@reneSchm reneSchm left a comment

Choose a reason for hiding this comment

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

I could not get this to work on the cluster, but it looks good otherwise.
In the cpp/README.md the entry for the benchmark dir is missing, maybe we could add something like

- benchmarks: applications to measure the performance of the framework. More information on profiling [can be found here](benchmarks/profiling.md).

so that the documentation is easier to find. I had to look at the "Files changed" tab to locate it.
Also, please add a description for "MEMILIO_ENABLE_PROFILING" in the "Configuring using CMake" section.

improved valgrind placeholder description
improved gperftools usage docs
documentation of profiler.h
documentation of cmake options
added hints/links to benchmarks directory in main README
@dabele
Copy link
Member Author

dabele commented Jun 28, 2024

added documentation for the cmake option (including some others that were added recently).

added links to profiling to the cpp README.

@dabele dabele requested a review from reneSchm June 28, 2024 10:42
Copy link
Member

@reneSchm reneSchm left a comment

Choose a reason for hiding this comment

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

Thanks for writing all this documentation!

I could verify the gperf steps work on native Linux, the Cluster should work as well, but had some issues possibly due to spack quirks.

@reneSchm reneSchm merged commit 88e0439 into main Jun 28, 2024
@reneSchm reneSchm deleted the 1053-integrate-simple-profiler branch June 28, 2024 13:16
Copy link
Member

@DavidKerkmann DavidKerkmann left a comment

Choose a reason for hiding this comment

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

I was able to run the profiler on MacOS 11.7.10.
It was important to also install the PkgConfig, I think we didn't have this as a requirement before. Perhaps we can add this to the installation process?
One thing that didn't work is the conversion of the .out file to .pdf, as proof-symbolize tries to access libs that were moved with MacOS 11. I am not sure how to resolve this. Here is some more information:

error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: /usr/lib/liboah.dylib (No such file or directory)
and about 100 similar more.

Here's a thread about this on apple.com:
https://developer.apple.com/forums/thread/655588?answerId=623718022#623718022

And another issue (thanks René) that lists the same problem:
google/pprof#726

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.

integration of a simple profiler

4 participants