PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

3D Array Reduction in ACC?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
JMa



Joined: 30 Nov 2012
Posts: 22

PostPosted: Thu Jan 03, 2013 8:57 am    Post subject: 3D Array Reduction in ACC? Reply with quote

Hi,
I know $ACC reduction works for a variable, but may I get to know whether it should work for a 3D array? Say,
!$acc reduction(+:a(:,:,:))

Thanks,
Jingsen
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jan 07, 2013 2:36 pm    Post subject: Reply with quote

Hi Jingsen,

Sorry, only scalars are allowed in reductions.

- Mat
Back to top
View user's profile
JMa



Joined: 30 Nov 2012
Posts: 22

PostPosted: Tue Jan 08, 2013 9:57 am    Post subject: Reply with quote

Hi Mat,
Very thankful for your clarification.
Will array reduction possibly be supported in future version of PGI? or this feature is not under planning at all?

In addtion, I've one more question. I remember you've told me that "critical" is not supported in ACC, but how about "Atomic"? If this not in current version, will it be allowed in the coming 2013 release?

Thanks,
Jingsen
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Jan 08, 2013 10:11 am    Post subject: Reply with quote

Quote:
Will array reduction possibly be supported in future version of PGI? or this feature is not under planning at all?
It would need to come from OpenACC committee since this restriction is defined by the OpenACC standard. See section 2.8.8 http://www.openacc.org/sites/default/files/OpenACC.1.0_0.pdf

Quote:
I remember you've told me that "critical" is not supported in ACC, but how about "Atomic"? If this not in current version, will it be allowed in the coming 2013 release?
No, atomics are not part of the OpenACC standard. The problem is that synchronization features are device specific, if available at all. Given that the standard must cover a wide variety of devices, the OpenACC standard does not include synchronization.

If your algorithm must use atomics, I would suggest using CUDA Fortran or CUDA C for these particular kernels. OpenACC is interoperable with CUDA so you can mix.

Hope this helps,
Mat
Back to top
View user's profile
JMa



Joined: 30 Nov 2012
Posts: 22

PostPosted: Tue Jan 08, 2013 4:20 pm    Post subject: Reply with quote

Mat, thanks.
I cann't use cuda inside $acc region, right?
Jingsen
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 1, 2  Next
Page 1 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