I'm a PhD working in the mechanical engineering community. I constantly use open-source FEM libraries to solve my problems. Up to now I didn't really care about the performance of my codes, mainly because I rely on external C++ libraries and I know/assume that the core features were highly optimised. Just to make a popular example, one of the libraries I use is deal.II.
I've seen (please correct me if I'm wrong) that people in FEM community are using Valgrind + Callgrind in order to visualise how much time the program spends in various places in the program (see also here for an example https://www.dealii.org/developer/doxygen/deal.II/step_22.html#Performanceoptimizations).
My problem is that I don't have a Linux machine, but a Mac (Monterey). The huge problem is that Valgrind is not natively supported for MacOS, and the
brew version is not working on my machine. I've found and tried the "built-in" Instruments (https://en.wikipedia.org/wiki/Instruments_(software) and I easily got the same level of information shown in the picture of the first link with KCachegrind.
Does anybody know how people in scientific computing do profiling on a MacOS? Does anybody know if Instruments is really used, or there are better/standard alternatives?
TimerOutputclass used in programs such as step-40 to get an overview of which components of a program take substantial amounts of time, and could use some optimization. $\endgroup$