PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Trouble Getting Started CUDA/PGI Fortran
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
mkcolg



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

PostPosted: Tue Oct 30, 2012 7:44 am    Post subject: Reply with quote

Hi Dolf,

Error 30 is the code for "Unknown Error", so you'll need to do some investigation to figure out what's wrong. Can you determine what's different between your "Release" and "Debug" builds? What optimization's are applied? Is one being built in 32-bits and the other in 64-bits?

Emulation mode probably wont help here, so to debug, I'd start commenting out lines in your "GetReynVarqnj_kernel" until the crash goes away (or comment them all out and then add them back until the crash occurs). If you can narrow down where the crash is occurring, you can then get a better idea of why.

- Mat
Back to top
View user's profile
Dolf



Joined: 22 Mar 2012
Posts: 128

PostPosted: Tue Oct 30, 2012 10:35 am    Post subject: RE: Reply with quote

Hi Mat,

I was able to fix the debug mode (changed integer, value :: nx,ny >> to integer :: nx,ny), and I ran it, I discovered what's wrong, I am calling a host subroutine, passing device matrices as reference along with there bounds (nx,ny), so when I read the values of bounds, its all correct values (they are host integers), but unfortunately the matrices have wrong dimension and I dont know why! here is an example of what I am doing:

module Q4_globals

real(8), device, allocatable, dimension (:,:) :: bearx4Dev,beary4Dev
end module Q4_globals

subroutine fullmult
use Q4_globals
real(8), device :: akmaxDev,akinDev
integer :: nx,ny

nx = 20
ny = 20
allocate(bearx4Dev(nx,ny),beary4Dev(nx,ny))

call reyneq(akmaxDev,1.d0,bearx4Dev,beary4Dev,nx,ny)
end subroutine fullmult

subroutine reyneq(akmax,akin,bearx,beary,nx,ny)

integer :: nx,ny (if use integer, value :: the debugger exit with code 0.?!)
real(8), device :: bearx(nx,ny),beary(nx,ny)
real(8), device :: akmax,akin

................
end subroutine reyneq

when I plant break point to see whats in bearx,beary it tells me that bearx is more than 10000 elements, do you want to expand??
10,000???? why????? whats wrong here??
the nx is still 20 in reyeq sub though!

also, whats the difference between the following???
real(8), device :: bearx
dimension (bearx(nx,ny))

and
real(8), device :: bearx(nx,ny)


please help.
Dolf


Last edited by Dolf on Tue Oct 30, 2012 3:29 pm; edited 1 time in total
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Oct 30, 2012 11:00 am    Post subject: Reply with quote

Hi Dolf,
Code:
allocate(bearxDev(nx,ny),beary(nx,ny))
Did you mean to allocate "bearyDev" instead of "beary"?
Code:
call reyneq(akmaxDev,1.d0,bearx4Dev,beary4Dev,nx,ny)
Shouldn't these variables be "bearxDev" and "bearyDev" (i.e. no "4")?

- Mat
Back to top
View user's profile
Dolf



Joined: 22 Mar 2012
Posts: 128

PostPosted: Tue Oct 30, 2012 11:31 am    Post subject: RE: Reply with quote

sorry, I meant in the module to have bearx4Dev and beary4Dev
also, when I allocated them, I allocated bearx4Dev, not bearx4, since bearx4 is a host matrix.

thanks,

Dolf
Back to top
View user's profile
Dolf



Joined: 22 Mar 2012
Posts: 128

PostPosted: Wed Oct 31, 2012 10:36 am    Post subject: RE: Reply with quote

so, do you know why the bounds are way off in this case??

Dolf
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
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 2 of 7

 
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