Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

multiple vec-messages with Qvec-report:2

zhang_h_
Beginner
364 Views

Hi all,

I used the GAP to analysis my program, there are a lot of message, a for loop may correspond to multiple messages,

when I set the report options to"/Qvec-report:2 /Qpar-report:2" I will get:

[cpp]

1. ImageReconstruction.cpp(1812): message : LOOP WAS AUTO-PARALLELIZED

2. ImageReconstruction.cpp(1812): message : loop was not parallelized: existence of parallel dependence

3. ImageReconstruction.cpp(1812): message : LOOP WAS VECTORIZED

4. ImageReconstruction.cpp(1812): message : loop skipped: multiversioned

5. ImageReconstruction.cpp(1812): message : LOOP WAS VECTORIZED

6. ImageReconstruction.cpp(1812): message #30532: (LOOP) Store the value of the upper-bound expression (param->mNumOfSinogramRhoBins) of the loop at line 417.......

7. ImageReconstruction.cpp(1812): message #30525: (PAR) Insert a "#pragma loop count min(512)" statement right before the loop at line 1812 to parallelize the loop

[/cpp]

I found this explain in the web:

"Typically loops inside a function will get processed from beginning to end in linear order by the compiler, but this is not always guaranteed - Compiler may perform optimizations that rearrange code based on the control-flow graph, and the loops may get processed (and reported) by the compiler in non-sequential manner. But you should be able to find one vec-message per every instance of a loop if you use -vec-report2 or -vec-report3"

Does it means that  sometimes will be optimized, and sometimes will not be optimized?

 

0 Kudos
4 Replies
TimP
Honored Contributor III
364 Views

As your report says multi-versioned, the other messages may apply to only one of the versions.

You may need run-time performance analysis to see whether optimization is effective on the executed version.

I suppose the message about setting a minimum expected loop count indicates that parallelization is not considered useful for smaller counts.

0 Kudos
SergeyKostrov
Valued Contributor II
364 Views
... ImageReconstruction.cpp(1812): message : loop was not parallelized: existence of parallel dependence ... IImageReconstruction.cpp(1812): message : loop skipped: multiversioned ... >>...Does it means that sometimes will be optimized, and sometimes will not be optimized?.. Yes, You have two issues and you need to understand what is wrong with these two loops.
0 Kudos
Bernard
Valued Contributor I
364 Views

First message is self explanatory your loop has some dependency which prohibits efficient parallelization.

0 Kudos
QIAOMIN_Q_
New Contributor I
364 Views

Hello,

As the iliyapolak said ,you should analyze the mentioned source code line first to try break the dependency according the report told.

Thank you.

-- QIAOMIN.Q

Intel Developer Support

0 Kudos
Reply