First GAP testing

First GAP testing

As requested by Kittur Ganesh, I've tried some simple tests.

Maybe I'm missing something but the first result is strange. I'm uploading a document describing the test with some sample code and some rtf with the output text.

Best regards

AttachmentSize
Downloadapplication/zip GAPTest1.zip16.98 KB
8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Manuel,
Thanks very much for your quick response to my request. I'll look into the test reproducer you have attached, and will get back to you. Appreciate much for your patience till then.
_Cheers,
Kittur

Hi Manuel,
Per our email conversation offline, I'll again touch base with and will discuss more. In the meantime, just wanted to add here that the log files from the run looks fine. The GAP messages between the start and end shows recommendations and hints that you can consider on the application run. The GAP messages generally start with a number and accronym in (). For example, below:

30519: (PAR) Use "#pragma parallel" to parallelize the loop at line 253,,.,,,,

The recommendation above is that you can use #pragme parallel at line 253 if you want to parallelize the loop?

I'll discuss with you more offline on this - just FYI. Again, thanks for testing out your application Manuel and for continued testing and feedback.

_Cheers,
Kittur

Hi, Kittur

I'd like to add some valid points.

1) Actually, Idon't think anybody needs any help to parallelize its programs. Most programmers know the points where its code can go parallel. What we need is to find any non obvious point if any.

2) I understand pretty well what the recommendation at line 253 is stating. I just want to mark that this recommendation is not useful. Of course, I know I can discard it and, in fact, I've done it.

3) If GAP is going to help me in any way, I think it should make any recommendation about more important loops in the code and, about that loops, I get a blank line.

4) I suppose you know I've been reading compilers output some years now so I can distinguish GAP recommendations format and style. If the recommendation about line 253 is all I'm going to obtain from GAP, I think you all must dedicate your efforts to anotherimprovements of the compiler and forget about GAP.

Thanks and best regards

Additional afterthoughts

The code I used as sample is very simple but have some useful points (I think I mentioned something in the document): The loops can beorganized from the point of view of the DIB data or from the point of view of the results array (please, remember that there is no boundary alignment in the calculations). This can lead to race conditions. And a novice programmer could fall in this error easily...

Obviously, in real world, we are going to do it the right way... hopely. But from the point of view of testing GAP....

Shouldn't GAP give some hints to the user about these risks and ways to avoid the race conditions... I mean, if GAP is supposed to help...

Best regards

manucp,

You have some good points, however, those features are beyond the scope of the GAP feature in the compiler. There are other tools in Parallel Studio such as Inspector and Advisor that will address those issues.

GAP however is a feature in the compiler that provides recommendation to the user on how to change the code so that the compiler can vectorize or parallelize the code.

In the past, the Intel compiler is able to determine if a loop can be vectorize / parallelize or not, however, the compiler did not have the capability to recommend changes to your code to get the loop to parallelize or vectorize.

With GAP, the compiler is able to analyze a certain class of loops, not all loops, and provide feedback to the user. The feedback from GAP lets the user know why the compiler was not able to vectorize/parallelize the loop. The users need to determine that the recommendations from GAP are valid for the specific code, make the necessary changes, then the loop will be vectorize / parallelize by the compiler. As you have found, GAP does not provide recommendation for all class of loops.

If you have specific loops that should vectorize or parallelize, but the compiler is unable to vectorize/parallelize and GAP does not provide any recommendation, we would like to take a look.

Thank you for the feedback,

An

I see your points too. But I feel that GAP is not very useful. AnywayI intend to keep moving my code along this beta and I'll keep an eye in GAP output (for your sake not mine) and try to give any feedback if I can.

Best regards

Hi Manuel!
Thanks for recording the feedback here! BTW, An Le makes a good point on GAP. With the current implementation of GAP, not all types of loops for say what may be reported by the vectorizer can be handled by GAP. Also, it is recommended that for those code changes you may make on the recommendation by GAP, you'll still need to verify in the vectorizer or the parallel reports to ensure loops are parallelized. Basically, GAP will try to guide the user to apply changes to loops that it can detect and guide for auto-parallelization and auto vectorization, with recommendation. This was not possible earlier as vectorizer could only output remarks on if a loop was vectorized or not like An mentioned before.In addition, it does provide guidance for code portions that can undergo data transformation with IPO too, which was not possible before GAP.

Obviously, GAP doesn't guide the user on how to write parallel code, and is also not a general feature to accomplish maximum performance too but is for adding parallelism. You'll still need to use other tools for profiling (hot spot analysis/tuning for performance)....

I've noted your feedback on the beta feedback notes too. I've also sent you an offline email further requesting some more info, just FYI.
_Cheers,
Kittur

Leave a Comment

Please sign in to add a comment. Not a member? Join today