The compiler may be able to perform additional optimizations if it is able to optimize across source line boundaries. These may include, but are not limited to, function inlining. This is enabled with the -ipo option.
Recompile the program using the -ipo option to enable interprocedural optimization.
ifort -real-size 64 -vec-report2 -DALIGNED -ipo matvec.f90 driver.f90 -o MatVector
Note that the vectorization messages now appear at the point of inlining in driver.f90 (line 70).
driver.f90(59) (col. 5): remark: loop was not vectorized: not inner loop. driver.f90(59) (col. 5): remark: loop was not vectorized: vectorization possible but seems inefficient. driver.f90(59) (col. 5): remark: loop was not vectorized: not inner loop. driver.f90(59) (col. 5): remark: loop was not vectorized: subscript too complex. driver.f90(59) (col. 5): remark: LOOP WAS VECTORIZED. driver.f90(61) (col. 5): remark: loop was not vectorized: vectorization possible but seems inefficient. driver.f90(61) (col. 5): remark: LOOP WAS VECTORIZED. driver.f90(63) (col. 21): remark: loop was not vectorized: not inner loop. driver.f90(63) (col. 21): remark: LOOP WAS VECTORIZED. driver.f90(73) (col. 16): remark: loop was not vectorized: not inner loop. driver.f90(70) (col. 14): remark: LOOP WAS VECTORIZED. driver.f90(70) (col. 14): remark: loop was not vectorized: not inner loop. driver.f90(70) (col. 14): remark: LOOP WAS VECTORIZED. driver.f90(80) (col. 29): remark: LOOP WAS VECTORIZED.
Now, run the executable and record the execution time.
Copyright © 2011, Intel Corporation. All rights reserved.