To somewhat follow up on the question asked here, I have been told that the Roofline model is one way of assessing the performance of any scientific code. Basically I compute the Arithmetic Intensity (ratio of FLOPS over DRAM bytes) and multiply this by the STREAM bandwidth to obtain the ideal FLOPS/s. I could also use the AI to see how close I get to the maximum performance of my given machine.
That said, what is the easiest way to obtain this AI for finite element packages like FEniCS or Deal.II? To simply things for now, I am not too concerned with register/cache reuse or quantification of useful bandwidth sustained for some level of cache. If I wrote my own explicit finite element implementation using PETSc, I could simply count by hand the approximate number of FLOPS and approximate the number of load/stores from all vector operations and sparse matrix-vector multiply as outlined here. However, does anyone have any suggestions for doing this for any given implementation?