I am now trying to build a Fortran program with Fortran compiler (version 2013.3.163). I choose -O2 (or -O3), -xHost option in the building process. The built program works fine under ubuntu 12.04 (kernel 3.5.0-26) in the vmware virtual machine in my laptop (the CPU is i7-3720QM), the speed is 3.19 times faster than the version of unoptimized (-O0, -g option used). However, when I run the program under ubuntu 12.04 (kernel 3.5.0-26) in a HP Z800 workstation (with two Xeon E5620 CPU), the program speed is the same as that of unoptimized, i.e., the optimization does not work with E5620 CPU.
I have tried the optimized program built with gfortran, it works fine under E5620, although not so fast as the program built with ifort (which can work in my laptop). I am really confused why the optimization does not work in E5620. I am a new bee with ifort and do not know how to debug and diagnose the problem. Can anyone give me some suggestions? Thanks a lot! My email address is: email@example.com.