Added gprof profiling option by EvertBunschoten · Pull Request #2243 · su2code/SU2

Proposed Changes

Added profiling option through gprof. This allows you to profile your SU2 application to see where it spends most of its time and therefore figure out which of your new features could use some better efficiency.

How to enable profiling? Add the flag -Denable-gprof to your meson.py command and re-configure.

Now you can run SU2 or SU2 AD as normal. However, at the end, a file called gmon.out will be generated in your working directory.

In order to get the analysis from the profiling, run gprof <path/to/SU2/executable> > analysis.txt. Now, the file analysis.txt contains the profiling analysis which you can use to assess the efficiency of your code.

Added instructions for enabling and using the gprof option on the su2code.github.io repository under PR #145

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.