PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

got problem on Fortran acc coding

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



Joined: 16 Mar 2012
Posts: 75

PostPosted: Mon Jan 27, 2014 12:25 am    Post subject: got problem on Fortran acc coding Reply with quote

Dear Sir,

I got the compiler error information as below:
Code:

    430, Accelerator region ignored
    436, Accelerator restriction: loop contains multi-level induction variable
    437, Accelerator restriction: multilevel induction variable: ia
    439, Accelerator restriction: multilevel induction variable: ii_k
    461, Accelerator restriction: loop contains multi-level induction variable
    462, Accelerator restriction: multilevel induction variable: i_k
    481, Accelerator restriction: an unsupported operation was found
    485, ray1 inlined, size=81, file E:\Fortran\Fortran77\r.f77 (914)
         485, Accelerator restriction: induction variable live-out from loop: ..inline
              Accelerator restriction: multilevel induction variable: ..inline
    485, Accelerator restriction: unsupported operation: ACON


I don't know what the "unsupported operation: ACON" means ,please kindly give me some advices.

Thanks a lot
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jan 27, 2014 11:01 am    Post subject: Reply with quote

Hi Teslalady,

Can you post or send an example of the loop?

A multi-level induction variable typically means an index variable is being calculated in the loop (such as in a while loop or "ia=ia+1"). ACON is a compiler term for a constant address. Though I'm not sure what's causing ti here. I've seen this problem before we supported C pointer operation in compute regions, but that support went into the 12.6 release.

- Mat
Back to top
View user's profile
Teslalady



Joined: 16 Mar 2012
Posts: 75

PostPosted: Tue Jan 28, 2014 2:50 am    Post subject: Reply with quote

Hi,Mat, Thanks for your reply.

the code of No.485 line calls a subroutine, I think the error should be from this subroutine. so I post this subroutine as the attached code:
Quote:
subroutine ray1(x0,z0,x_e,z_e,nz,nx,dx,dz,xu,zu,qq,
* vvxx1,vvzz1,xxx,yyy,ttt,ppp,pppz,xxx2,yyy2,ttt2
* ,ppp2,pppz2,idd)
real vvxx1(nz,nx),vvzz1(nz,nx)
real vvxx(nx,nz),vvzz(nx,nz)
real x_ray(90000),z_ray(90000)
real t(9000),pp(9000),ppx(9000),ppz(9000)
double precision x,z,dt,p,px,pz,v,p1,x1,x2,z1,z2,tx,tz
* ,tv1,tv2,vv1,vv2,dvx,dvx1,dvx2,dvz,dvz1,dvz2
do i=1,nx
do j=1,nz
vvxx(i,j)=vvxx1(j,i)
vvzz(i,j)=vvzz1(j,i)
end do
end do
num=1
ds=1
p=1000
px=p*sin(qq)
pz=p*cos(qq)
xxu=xu
zzu=zu
x_ray(num)=xu
z_ray(num)=zu
pp(num)=p
ppx(num)=px
ppz(num)=pz

do while((xxu.gt.x0.and.xxu.lt.x0+(nx-1)*dx).and.
* (zzu.gt.z0.and.zzu.lt.z0+(nz-1)*dz))
num=num+1
ix=(xxu/dx)+1
iz=(zzu/dz)+1
ks=ks+1
vx1=vvxx(ix,iz)+(vvxx(ix+1,iz)-vvxx(ix,iz))/dx*(xxu-(ix-1)*dx)
vx2=vvxx(ix,iz+1)+(vvxx(ix+1,iz+1)-vvxx(ix,iz+1))/dx
**(xxu-(ix-1)*dx)
vx=vx1+(vx2-vx1)/dz*(zzu-(iz-1)*dz)
vz1=vvzz(ix,iz)+(vvzz(ix+1,iz)-vvzz(ix,iz))/dx*(xxu-(ix-1)*dx)
vz2=vvzz(ix,iz+1)+(vvzz(ix+1,iz+1)-vvzz(ix,iz+1))/dx
**(xxu-(ix-1)*dx)
vz=vz1+(vz2-vz1)/dz*(zzu-(iz-1)*dz)
dpx=-vx*ds
dpz=-vz*ds
px=px+dpx
pz=pz+dpz
if(pz.ne.0) qq=atan (px/pz)
if(pz.eq.0) qq=3.1415926/2.
if(qq.lt.0) qq=qq+3.1415926
xxu=xxu+ds*sin(qq)
zzu=zzu+ds*cos(qq)
x_ray(num)=xxu
z_ray(num)=zzu
pp(num)=p
ppx(num)=px
ppz(num)=pz
t(num)=1
end do
xxx=x_ray(num)
yyy=z_ray(num)
ttt=t(num)
ppp=pp(num)
pppx=ppx(num)
pppz=ppz(num)
xxx2=x_ray(num-1)
yyy2=z_ray(num-1)
ttt2=t(num-1)
ppp2=pp(num-1)
pppx2=ppx(num-1)
pppz2=ppz(num-1)
return
end
Code:
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Jan 28, 2014 10:39 am    Post subject: Reply with quote

Hi Teslalady,

I don't see any accelerator directives here so am assuming that you've put them around the while loop. Unfortunately, while loops can not be accelerated given that they are not countable (i.e. the number of iterations cannot be determined upon entry into the loop).

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