TheMatt
Joined: 06 Jul 2009 Posts: 263 Location: Greenbelt, MD
|
Posted: Wed Aug 26, 2009 11:36 am Post subject: |
|
|
Mat,
I have a new case of this, so I'm bumping this thread (the title is about what I'd use). If I don't use local, copyin, and copyout, my code errors out with a cuMemcpy2D. But, adding them leads to a cuCtxSynchronize error. In case it's something simple (like a dimension I'm missing), I'm reproducing my variables and !$acc region lines:
| Code: | c-----input parameters
integer m,np,ict,icb,ih1,ih2,im1,im2,is1,is2
real rr(m,0:np+1,2),tt(m,0:np+1,2),td(m,0:np+1,2)
real rs(m,0:np+1,2),ts(m,0:np+1,2)
real cc(m,3)
c-----temporary array
integer i,k,ih,im,is
real rra(m,0:np+1,2,2),tta(m,0:np+1,2,2),tda(m,0:np+1,2,2)
real rsa(m,0:np+1,2,2),rxa(m,0:np+1,2,2)
real ch(m),cm(m),ct(m),flxdn(m,0:np+1)
real fdndir(m),fdndif(m),fupdif
real denm,xx,yy
c-----output parameters
real fclr(m,np+1),fall(m,np+1)
real fsdir(m),fsdif(m)
!$acc region
!$acc& copyin(rr(1:m,0:np+1,1:2),
!$acc& tt(1:m,0:np+1,1:2),
!$acc& td(1:m,0:np+1,1:2),
!$acc& rs(1:m,0:np+1,1:2),
!$acc& ts(1:m,0:np+1,1:2),
!$acc& cc(1:m,1:3))
!$acc& copyout(fclr(1:m,1:np+1),
!$acc& fall(1:m,1:np+1),
!$acc& fsdir(1:m),
!$acc& fsdif(1:m))
!$acc& local(rra(1:m,0:np+1,1:2,1:2),
!$acc& tta(1:m,0:np+1,1:2,1:2),
!$acc& tda(1:m,0:np+1,1:2,1:2),
!$acc& rsa(1:m,0:np+1,1:2,1:2),
!$acc& rxa(1:m,0:np+1,1:2,1:2),
!$acc& ch(1:m),
!$acc& cm(1:m),
!$acc& ct(1:m),
!$acc& flxdn(1:m,0:np+1),
!$acc& fdndir(1:m),
!$acc& fdndif(1:m))
|
As near as I can tell, I have the array dimensions correct. Upon compiling, the -Minfo=accel outputs:
| Code: | 2316, Generating copyin(td(:m,:np+1,:))
Generating copyin(tt(:m,:np+1,:))
Generating copyin(rs(:m,:np+1,:))
Generating copyin(rr(:m,:np+1,:))
Generating copyin(ts(:m,:np+1,:))
Generating local(ch(:m))
Generating copyin(cc(:m,:))
Generating local(cm(:m))
Generating copyout(fsdir(:m))
Generating copyout(fsdif(:m))
Generating local(flxdn(:m,:np+1))
Generating local(fdndif(:m))
Generating local(fdndir(:m))
Generating local(tta(:m,:np+1,:,:))
Generating local(tda(:m,:np+1,:,:))
Generating local(rsa(:m,:np+1,:,:))
Generating local(ct(:m))
Generating local(rxa(:m,:np+1,:,:))
Generating local(rra(:m,:np+1,:,:))
Generating copyout(fclr(:m,:np+1))
Generating copyout(fall(:m,:np+1))
|
The compiler seems to have suppressed some dimensions to ":", could that do it? Or should I use ct(m) rather than ct(1:m), say?
ETA: I'm suspecting bug after some trial and error. I'll submit to Customer Service. |
|