PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

More than one device-resident object in assignment

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



Joined: 06 Jul 2011
Posts: 27

PostPosted: Tue Aug 30, 2011 8:57 am    Post subject: More than one device-resident object in assignment Reply with quote

Hello! I get the following error:

Quote:
Error S0519 - More than one device-resident object in assignment


when i try to performe the following operations:

Code:
u_dev(i,j) = u_dev(i-1,j)
...
zb_dev(i_ini_dev(k):i_end_dev(k)) = ...


where all the arrays are allocatable ones located on device memory. Is there any way to get those operations working other than using a temporary scalar variable? (Which I suppose is a pretty inefficient way of solving the problem...)


Thanks in advance for you help,

Nicola
Back to top
View user's profile
cparrott



Joined: 02 May 2011
Posts: 146

PostPosted: Tue Aug 30, 2011 5:24 pm    Post subject: Re: More than one device-resident object in assignment Reply with quote

nicolaprandi wrote:
Hello! I get the following error:

Quote:
Error S0519 - More than one device-resident object in assignment


when i try to performe the following operations:

Code:
u_dev(i,j) = u_dev(i-1,j)
...
zb_dev(i_ini_dev(k):i_end_dev(k)) = ...


where all the arrays are allocatable ones located on device memory. Is there any way to get those operations working other than using a temporary scalar variable? (Which I suppose is a pretty inefficient way of solving the problem...)


Thanks in advance for you help,

Nicola


Hi Nicola,

I would have to see the exact line triggering the error in order to more precisely help you with this. However, it may be helpful to refer to the section entitled "Implicit Data Transfer in Expressions" in the PGI CUDA Fortran Programming Guide, pp. 19-20, for information about data transfers between host and device. There are some examples of expressions here which are not legal in CUDA Fortran. You may be using an expression similar to these in your application.

Hope this helps.
Back to top
View user's profile
nicolaprandi



Joined: 06 Jul 2011
Posts: 27

PostPosted: Wed Aug 31, 2011 3:06 am    Post subject: Re: More than one device-resident object in assignment Reply with quote

cparrott wrote:
Hi Nicola,

I would have to see the exact line triggering the error in order to more precisely help you with this. However, it may be helpful to refer to the section entitled "Implicit Data Transfer in Expressions" in the PGI CUDA Fortran Programming Guide, pp. 19-20, for information about data transfers between host and device. There are some examples of expressions here which are not legal in CUDA Fortran. You may be using an expression similar to these in your application.

Hope this helps.


Hi cparrott, I found the "solution". Since I'm porting a complex 2D code for OMP accelerated FORTRAN to CUDA FORTRAN, yesterday I was just creating the device variables I need without building the corresponding device subroutine's structure: that was the problem given by the compiler.

So, in order to port a code, it's better to rewrite every subroutine at a time and not the whole code.


Thanks for the help,

Nicola
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