2 Replies Latest reply on Aug 27, 2015 11:22 AM by CraigT

    How to verify what instructions are being used in my code?


      In a few weeks, we will have another generation of Intel HPC system.  We will have systems that support SSE4.2 (Nehalem, Westmere), AVX (SandyBridge, IvyBridge), and CORE-AVX2 (Haswell) optimizations.  Since the compile nodes are being upgraded to Haswell as well, I want to tell the users to specify something different than -xHost when using Intel Fortran so binaries can be backwards compatible and run on any of the clusters.  I planned to tell the users to use -xSSE4.2 -axCORE-AVX2,AVX.


      My questions are:


      1) Is this the best way to compile codes so they can support different vectorization units depending on which system they run?

      2) How do I confirm that the correct code path is being used based on the system used?  I have looked at the assembly and see that the instructions are there, but I want to know at runtime the code is being used.