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

Vectorization report - where is it? and why such long lines in build log?

anthonyrichards
New Contributor III
825 Views
IVF 11.1.067 VS2005
I compile the following code with options /c /QxSSSE3 /Qvec-report:3 /Qvc8 (among others) but get no vectorization report messages (even negative ones) in the build log (attached). Why is this?

program testassembly

implicit none

integer(4),parameter::N=10000
REAL(8) A(N), B(N), TOTAL
INTEGER(4) i,j

do i=1,N
A(I)=1.0D+00
B(I)=2.0D+00
enddo
call DOTPROD(A,B,N,TOTAL)
end program testassembly

subroutine DOTPROD(A,B,N,TOTAL)
integer(4) N,I
REAL(8) a(N),B(N),TOTAL,CONST

CONST=0.0D+00
do i=1,N
CONST=CONST+A(I)*B(I)
end do
TOTAL=CONST
return
end subroutine DOTPROD

P.S. Why must the build log display such long lines which makes selection of sections in the build.log window so difficult?
0 Kudos
5 Replies
TimP
Honored Contributor III
825 Views
$ ifort -Qvec-report3 -Qip- ar.f
Intel Visual Fortran Intel 64 Compiler XE for applications running on Inte
l 64, Version 12.0.1.127 Build 20101116
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.

C:\src\net\ar.f(9) (col. 11
): remark: LOOP WAS VECTORIZED.
C:\src\net\ar.f(21) (col. 1
1): remark: LOOP WAS VECTORIZED.

Strange things happen with in-lining of examples where dead code is eliminated, and when extra characters such as your : go in the command line options.
Yes, there's no attention to text line formatting.
0 Kudos
anthonyrichards
New Contributor III
825 Views
Thanks, but I always use the VS2005 IDE, which gives me loads of command line options, compared to your 2 options (Qip and Qvec-report). How can I trim down my IDE command line?
With my present set of options (see build log) I get

Source2.f90(12): (col. 10) remark: routine skipped: no vectorization candidates.
Source2.f90(29): (col. 13) remark: routine skipped: no vectorization candidates.

The source code is as posted above. Note, I asked for the assembler code listing.

So I then decided to try command line compilation (for the first time!) using your options.
After opening a Command window, navigating to the project folder and running ifortvars.bat ia32 vs2005, I ran your commands:

ifort -Qip -Qvec-report3 source2.f90

and got

source2.f90(20): (col. 2) remark: LOOP WAS VECTORIZED.

So I only got one loop vectorised compared to your two. I don't quite understand the messages: why use 'column' reference? I understand (20) implies line 20, but where is line 1 and do blank lines count?



0 Kudos
Steven_L_Intel1
Employee
825 Views
The lines are exactly what you see in Visual Studio if you have line numbers turned on. It is a simple count of lines in the source file, starting with the first one. Blank lines count.
0 Kudos
TimP
Honored Contributor III
825 Views
I set -Qip- in order to avoid the dead code elimination affecting source lines 29ff. There is a Visual Studio option for that; it defaults to -Qip.
0 Kudos
John_Campbell
New Contributor II
825 Views
Is it possible to generate a code listing (/lis) with the vectorization report directed to the listing, so we do not need to interpred the line and column number (?) or loop level ?
0 Kudos
Reply