PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Warning: Potential store to read-only data.

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



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

PostPosted: Mon Nov 08, 2010 12:01 pm    Post subject: Warning: Potential store to read-only data. Reply with quote

I'm currently trying to move a code to GPUs that, like all my code, is quite complex. With this latest attempt, I am seeing a new Warning on the command line that I've never seen before:
Code:
/tmp/pgnvdAajboYFMJOOT.nv4(1608): Warning: Potential store to read-only data.
/tmp/pgnvdAajboYFMJOOT.nv4(1604): Warning: Potential store to read-only data.
/tmp/pgnvdAajboYFMJOOT.nv4(1698): Warning: Potential store to read-only data.
/tmp/pgnvdAajboYFMJOOT.nv4(1694): Warning: Potential store to read-only data.

Since I can't see those .nv4 files after it compiles, I don't know if this warning is dire or not. Maybe it relates to the other warning I get with this compile?

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



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

PostPosted: Tue Nov 09, 2010 3:43 pm    Post subject: Reply with quote

Hi Matt,

This seems to indicate the code is trying to write to constant memory from a device routine, or at least the NVIDIA compiler thinks it might be. Can you send us a reproducing example?

Thanks,
Mat
Back to top
View user's profile
TheMatt



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

PostPosted: Wed Nov 10, 2010 6:20 am    Post subject: Reply with quote

mkcolg wrote:
This seems to indicate the code is trying to write to constant memory from a device routine, or at least the NVIDIA compiler thinks it might be. Can you send us a reproducing example?

Mat,

I'm sending some code via email to you. It will also demonstrate the issue I had in my other thread.

Thanks for the help,
Matt
Back to top
View user's profile
TheMatt



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

PostPosted: Wed Nov 10, 2010 11:39 am    Post subject: Reply with quote

Problem possibly solved (or at least, warnings not there anymore).

The issue seems to have been due to the use of named keyword arguments (or whatever they are called) in calling these functions.

For example, in my code I had this:
Code:
DQSx  = DQSAT( TEo, PL, QSAT=QSx )

which is correct for the CPU because the DQSAT it calls has many optional arguments (as well as being overloaded for 0-, 1-, 2-, and 3-D input/outputs). For the GPU I had stripped this functionality out and kept only the bare code needed for DQSAT to replicate what was going on. Likewise, in the DQSAT code I had:
Code:
QQ  = QSATICE0(TL,PP,DQ=DQSAT)

where the original QSATICE0 also had optional arguments. I imagine I made mistakes in this, or the compiler was just getting confused somehow.

So, I went through all the code here and got rid of all this X=Y jazz and just did "normal" function references. Doing this meant no more warnings thrown and (promisingly?) the compile time for the GPU is now c. 2 minutes instead of c. 15s.

I'm still not sure the code works, but it compiles differently at least.

Thanks,
Matt
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