PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Code execution depends strangely on irrelevant parameters
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
mkcolg



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

PostPosted: Wed Oct 16, 2013 1:13 pm    Post subject: Reply with quote

Hmm, it may be because I'm using the 13.10 pre-release compiler. With 13.9, I show it failing intermittently.

13.10 should be out very soon.

- Mat
Back to top
View user's profile
wiersma



Joined: 16 May 2013
Posts: 29

PostPosted: Thu Oct 17, 2013 7:37 am    Post subject: Reply with quote

Thanks Mat.

A few further questions then:
- How long is the "very soon" for 13.10? Are we talking days, weeks, or months?
- Is the choice to use the 'parallel' directive rather than the 'kernel' directive one that should have been obvious to me? If not, does that mean there is some degree of trial and error to using OpenACC?
- I'm surprised this wasn't noticed before ... Do people normally use mainly scalars and small arrays as loop-dependent quanities?

Rob
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Oct 21, 2013 9:26 am    Post subject: Reply with quote

Quote:
How long is the "very soon" for 13.10? Are we talking days, weeks, or months?
Days. Hopefully this week.

Quote:
Is the choice to use the 'parallel' directive rather than the 'kernel' directive one that should have been obvious to me? If not, does that mean there is some degree of trial and error to using OpenACC?
The general rule of thumb is to use "kernels" when you have tightly nested loops, many loops, or using Fortran array syntax. "parallel" is best used when loops are not tightly nested (like yours) or when the user wants more explicit control over the loop scheduling.

Here, the issue becomes at which level, the "gang" or "vector", the "private" array is created. Because you want privatize a large 260x260 array, it's simply too big to have every vector thread have it's own copy. Hence, you need to make sure it's applied to the "parallel" directive which defaults to having each "gang" having a private copy that's shared amongst the "vectors". Alternatively, it should have the same effect if you apply it to a "!$acc loop gang private" directive, but it looks like we're applying the "private" to the "vector" level when "kernels" is used. I'm investigating and will submit a problem report.

Quote:
I'm surprised this wasn't noticed before ... Do people normally use mainly scalars and small arrays as loop-dependent quanities?
Scalars are private by default. I'll see a few codes that do use small arrays, but I wouldn't classify a 260x260 array as small given that you need to multiply it by the number of vectors or gangs.

- Mat
Back to top
View user's profile
wiersma



Joined: 16 May 2013
Posts: 29

PostPosted: Tue Oct 22, 2013 8:54 am    Post subject: Reply with quote

Gotcha. I eagerly await 13.10!

mkcolg wrote:

Quote:
I'm surprised this wasn't noticed before ... Do people normally use mainly scalars and small arrays as loop-dependent quanities?
Scalars are private by default. I'll see a few codes that do use small arrays, but I wouldn't classify a 260x260 array as small given that you need to multiply it by the number of vectors or gangs.


I recognize that it's probably a large array. I was supposing that other people must only use small private arrays since this apparently hasn't been noticed yet. Basically I'm trying to figure out if I'm doing something out of the ordinary since that usually increases the number of issues I expect to come across.

Rob
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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