PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

OpenACC declare and update directives
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: 6120
Location: The Portland Group Inc.

PostPosted: Thu Nov 08, 2012 10:02 am    Post subject: Reply with quote

Quote:
w2 is initialized in int wave13pt function as one can see
No, you're only initializing the interior of the array since your starting index is "2" and ending index is nx-2. The halo region (index 0,1,nx-1) will contain garbage values. Hence when the full array is copied back, and you sum all the elements, the garbage values give you incorrect results.

- Mat
Back to top
View user's profile
i_alex2004



Joined: 18 Aug 2012
Posts: 8

PostPosted: Fri Nov 09, 2012 11:56 pm    Post subject: Reply with quote

Oh, now I see. Thanks a lot, Mat!
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