To see the profile on a code, we are going to work with gprof on Cirrus. Let’s use the percolate code: Include the flag -pg for Intel compiler in the Makefile to compile.
After compiling, we will see that gmon.out was created, as well as its executable:To view the performance data, replace the gmon.out with the executable:
After recompiling and executing with the Intel profiling, two new files are going to be created *.xml and *.dump. To see the graphic output, run the executable *.sh: A graph will be displayed with the profile of the percolate code:To check the performance of loops, use can use the flag -profile-loops in the Makefile:
-profile-loops=all -profile-loops=outer -profile-loops=inner
Each one used separately to produce this outputs: