PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Error with #define statement for accessing array
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
kyle.niemeyer



Joined: 02 Oct 2008
Posts: 6

PostPosted: Mon Dec 10, 2012 5:12 pm    Post subject: Reply with quote

I sent an email with code—thanks for your help! I'm going to keep working on it as well.
Back to top
View user's profile
kyle.niemeyer



Joined: 02 Oct 2008
Posts: 6

PostPosted: Mon Dec 10, 2012 7:47 pm    Post subject: Reply with quote

I removed all uses of the macro, but the problem is persisting—so it isn't that. Through a little testing, it looks like the "pres_red" array calls in the "black_kernel" function and "pres_black" calls in the "red_kernel" function somehow aren't returning the correct values.
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Dec 11, 2012 11:32 am    Post subject: Reply with quote

Hi Kyle,

Thanks for the example code. I was able to track down two issues.

First is a problem with the auto-caching in three of the routines. If I add the flag "-ta=nvidia,nocache" or hoist the declaration of NUM_2 out of the loops then you will get better answers. I have filed this problem as TPR#19040 and sent it to our compiler engineers for further investigation.

The second issue is the if statement "if ((col & 1) == 1) {" in calculate_v. While I'm not sure why, this seems to generate incorrect code. The work around is to change this to the equivalent statement "if ((col%2) == 1) {". I have filed this one as TPR#19041.

Note that there is a small difference where the some values set in "set_BCs" get returned as -0.0 on the GPU versus +0.0 on the CPU. However, these are the same values. Though, in a strict "diff" of the results they are flagged as different.

I have sent you an updated file with my modifications.

Best Regards,
Mat
Back to top
View user's profile
jtull



Joined: 30 Jun 2004
Posts: 438

PostPosted: Tue Sep 09, 2014 5:21 pm    Post subject: TPR 19041 is fixed in the 14.9 release. Reply with quote

TPR 19041 - OpenACC "if ((col & 1) == 1) {" in a compute region give wrong answers

has been fixed in the current 14.9 release.

Thanks again for your report.

dave
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