PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Use of atomic with OpenACC

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
teodoro



Joined: 21 Sep 2012
Posts: 4

PostPosted: Fri Sep 21, 2012 11:35 am    Post subject: Use of atomic with OpenACC Reply with quote

Hi All,

I'm new at OpenACC, and I'd like to know if it is possible to use atomic operations with OpenACC. In the GPU code I'm trying to port to OpenACC, there is a LARGE matrix that needs to be updated by the threads in parallel, and since it's quite large using private is not an option. Is it possible to use atomic with OpenACC or do you suggest any other away to handle it?
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Sep 21, 2012 1:11 pm    Post subject: Reply with quote

Hi teodoro,

OpenACC is designed to be device neutral, hence NVIDIA specific features such as atomics are not supported.

OpenACC is interoperable with CUDA C/Fortran, so you may consider writing this one kernel directly in CUDA if you must use atomics.

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



Joined: 21 Sep 2012
Posts: 4

PostPosted: Fri Sep 21, 2012 2:04 pm    Post subject: Reply with quote

Hi Mat,

Sure it helps. When developing code in OpenMP this kind of situations happened to me, and at that time I could use, for instance, atomic operations which are compiler built-in (gcc) inside a parallel loop. Would I be able to do something similar with OpenACC? Calling a specific atomic operation inside a parallel loop or is it compiler specific?

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



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

PostPosted: Mon Sep 24, 2012 9:47 am    Post subject: Reply with quote

Hi George,

OpenACC and CUDA are interoperable but can't be mixed together so no you could put the CUDA atomic inside an OpenACC region. Though, I'll ask our OpenACC representative to see what, if anything, can be done to the standard to allow such extensions.

- Mat
Back to top
View user's profile
teodoro



Joined: 21 Sep 2012
Posts: 4

PostPosted: Mon Sep 24, 2012 2:50 pm    Post subject: Reply with quote

Thanks Mat,

I would very much appreciate it.

George
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
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