PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Error: symbol `.STATICS3' is already defined

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



Joined: 08 Sep 2011
Posts: 2

PostPosted: Fri Sep 16, 2011 4:26 am    Post subject: Error: symbol `.STATICS3' is already defined Reply with quote

I receive the error " Error: symbol `.STATICS3' is already defined" when I add a data region around some subroutines, the subroutines contain accelerator regions, i.e:
Code:
!$acc data region copy(u,v,f,feq,rho,omega,w,cx,cy)
call collesion(u,v,f,feq,rho,omega,w,cx,cy,n,m)
call streaming(f,n,m)
! 覧覧覧覧覧
call sfbound(f,n,m,uo)
call rhouv(f,rho,u,v,cx,cy,n,m)
!$acc end data region

and an example subroutine:
Code:
subroutine collision(u,v,f,feq,rho,omega,w,cx,cy,n,m)
real*8 f(0:8,0:n,0:m)
real*8 feq(0:8,0:n,0:m),rho(0:n,0:m)
real*8 w(0:8), cx(0:8),cy(0:8)
real*8 u(0:n,0:m), v(0:n,0:m)
!$acc region
DO i=0,n
DO j=0,m
t1=u(i,j)*u(i,j)+v(i,j)*v(i,j)
DO k=0,8
t2=u(i,j)*cx(k)+v(i,j)*cy(k)
feq(k,i,j)=rho(i,j)*w(k)*(1.0+3.0*t2+4.50*t2*t2-1.50*t1)
f(k,i,j)=omega*feq(k,i,j)+(1.-omega)*f(k,i,j)
END DO
END DO
END DO
!$acc end region
return
end

I can post more code if needed.
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Sep 16, 2011 9:04 am    Post subject: Reply with quote

Hi mjmawson,
Quote:

I can post more code if needed.
Please do. A small complete source that reproduces the problem would be ideal. If the code is too large to post, please send a report to PGI Customer Service (trs@pgroup.com)

Note you need to add a reflected directive in collision in order for the compiler to know that arguments have already been copied to the device. For example:
Code:
subroutine collision(u,v,f,feq,rho,omega,w,cx,cy,n,m)
real*8 f(0:8,0:n,0:m)
real*8 feq(0:8,0:n,0:m),rho(0:n,0:m)
real*8 w(0:8), cx(0:8),cy(0:8)
real*8 u(0:n,0:m), v(0:n,0:m)
!$acc reflected (u,v,f,feq,rho,omega,w,cx,cy)
!$acc region
DO i=0,n
DO j=0,m
t1=u(i,j)*u(i,j)+v(i,j)*v(i,j)
DO k=0,8
t2=u(i,j)*cx(k)+v(i,j)*cy(k)
feq(k,i,j)=rho(i,j)*w(k)*(1.0+3.0*t2+4.50*t2*t2-1.50*t1)
f(k,i,j)=omega*feq(k,i,j)+(1.-omega)*f(k,i,j)
END DO
END DO
END DO
!$acc end region
return
end


- Mat
Back to top
View user's profile
mjmawson



Joined: 08 Sep 2011
Posts: 2

PostPosted: Wed Sep 21, 2011 3:49 am    Post subject: Reply with quote

Cheers, all sorted now.
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