PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Checking loops for independence

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
THX 1138



Joined: 30 Jun 2011
Posts: 103

PostPosted: Wed Oct 03, 2012 8:23 am    Post subject: Checking loops for independence Reply with quote

i would just like to use the software to check a program's functions and determine if some loops are parallelizable or the loop's iteration sequences are dependent. What command line options should I use to just do that? There is no need to put ta=nvidia unless I have to. I tried -Minfo and got nothing.

I just compiled the program, but instead of using gcc I put in pgcc. Now what else must I put in to get this software codes loop information?

These loops are very complicated and you cannot determine independence by inspection.easily

Any help appreciated.

THX 1138
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6125
Location: The Portland Group Inc.

PostPosted: Thu Oct 04, 2012 12:48 pm    Post subject: Reply with quote

Hi THX 1138,

As part of optimizing code, pgcc will perform a loop dependency analysis. So if you add an optimization flag, such as "-Mconcur" which enables auto-parallaleization, and "-Minfo", the compiler will tell you if it's parallel or not. Granted, the dependency analysis does have it's limits, so if the code is over complex, it may fail to determine independence. Also, since you're compiling C code, you do have to worry about pointer aliasing. Hence, be sure to use the "restrict" keyword, or add the flag "-Msafeptr" to assert all pointers do not overlap.

- Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group