Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29007 Discussions

Baseline performance of non-vectorized code: '-no-vec' or ' -no-vec -no-simd' ?

Wentao_Z_
Beginner
555 Views

Hi,

I am trying to have a baseline performance of the non-vectorized version of the following code:

1532         do k = ks, ke
1533           do ii = iis, iie
1534             value = vals(ii)
1535             do j = js, je
1536               offset_1 = ( (k-1)*N2 + (j-1) ) * N1g
1537               offset_2 = offset_1 + ii
1538               do i = is, ie
1539                 dF(i + offset_1) = dF(i + offset_1) + value * F(i + offset_2)
1540               end do
1541             end do
1542           end do
1543         end do

Please note that this code piece does NOT use SIMD directives, such as !DIR$ SIMD.

I compiled the code using ifort 13.1.0 with different compiler options and the profiling results are summarized as below:

        Compiler Options                                   CPU_TIME(s)
               -O2 -no-vec                                          12.274
       -O2 -no-vec -no-simd                                  15.791

I observed a non-trivial performance decrease (15.791/12/274=1.29). This result surprised me because:

According to the description of '-no-simd' in Intel Fortran Compiler Help:

-[no-]simd
                  
enables(DEFAULT)/disables vectorization using SIMD directive

Clearly in the code piece shown above there is no SIMD directive. Then '-no-simd' should have no influence on the performance. So I am confused where does the performance decrease come from? 

I also checked the User and Reference Guides:

http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/fortran-mac/

Here the description becomes:

To disable the SIMD transformations, specify option -no-simd

This description seems to be different from the first one. So I am wondering how '-no-simd' really works. Does '-no-simd' only disable SIMD directives? Or it disables more optimizations, which led to the performance decrease I observed? Which compiler options shall I use to have a baseline performance of a non-vectorized code?

Thanks in advance for your kind help!

Best regards,
     Wentao

0 Kudos
2 Replies
Xiaoping_D_Intel
Employee
555 Views

"-no-vec" is the right option for baseline performance of non-vec code.

"-no-simd" should only disable SIMD pragma and have no other impact on optimization. I have opened a bug report DPD200255086 for it.

 

Thanks,

Xiaoping

0 Kudos
Wentao_Z_
Beginner
555 Views

xiaoping-duan (Intel) wrote:

"-no-vec" is the right option for baseline performance of non-vec code.

"-no-simd" should only disable SIMD pragma and have no other impact on optimization. I have opened a bug report DPD200255086 for it.

 

Thanks,

Xiaoping

Thanks!

0 Kudos
Reply