PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Common Statement

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
ElMaskina



Joined: 09 Jul 2013
Posts: 13

PostPosted: Tue Jul 23, 2013 4:02 am    Post subject: Common Statement Reply with quote

Hello,
I'm trying to accelerate a code which uses the common statement, how can I substitute it in order to be compatible with CUDA?
Thanks
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Jul 23, 2013 2:21 pm    Post subject: Reply with quote

Hi ElMaskina,

No need to change the code other than COMMON blocks have been superceeded by modules. If you are rewritting the code, I'd move to using module data but common blocks can be used in CUDA Fortran.

- Mat
Back to top
View user's profile
ElMaskina



Joined: 09 Jul 2013
Posts: 13

PostPosted: Wed Jul 24, 2013 6:32 am    Post subject: Reply with quote

Common blocks are not allowed in device code, isn't it?
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 322
Location: Greenbelt, MD

PostPosted: Wed Jul 24, 2013 9:34 am    Post subject: Reply with quote

ElMaskina wrote:
Common blocks are not allowed in device code, isn't it?

The manual seems to support this assertion:
Code:
These rules apply to device data:
...snip...
Device variables and arrays may appear in modules, but may not be in a Common block or an Equivalence statement.


As Mat said, I've moved some old COMMON code to be module variables which are then moved into device or constant memory (as appropriate).

Matt
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Jul 24, 2013 9:55 am    Post subject: Reply with quote

Ugh, am I giving wrong information again? Sorry... No, commons are not allowed for device data since they are static. In OpenACC they are fine.

- Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling 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