PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

hanging on array copy

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



Joined: 04 Aug 2011
Posts: 28

PostPosted: Sat Dec 08, 2012 6:07 pm    Post subject: hanging on array copy Reply with quote

This code used to work. But then a program on the computer went bad and started corrupting the memory so I had to restart only to find the nvidia drivers somehow weren't being loaded into X. So I used the opportunity to update to the newest nvidia linux drivers, and Cuda Fortran 12.10, and I can get other cuda programs that are almost identical working again, but not this one. This first piece of code hangs on " call SetArrays3o3" and when I look at the process in top it appears to be sitting at constant 3% cpu usage and 91% memory usage. I never reach "mark 2".

Main Program up to problem:
program isixintegral
use cudafor
use i4six3odd3cuda
use i4six4odd2cuda
use i4six4odd1cuda
use i4six5oddcuda
use i4six6oddcuda
implicit none

integer factmax, i, j, k, l, m, n, p, q, s, t
parameter (factmax = 170)
double precision fact(0:factmax)
real *8 a, b, c, d, i4six, result, ibe
double precision factrf(0:500)
real t1, t2, t3, totaltime, t0, tfinal

common /facts/ fact
common /factratio/ factrf

fact(0) = 1.d0
do i = 1, factmax
fact(i) = fact(i-1) * dble(i)
enddo

factrf(0) = 1.d0
do i = 0, 500
factrf(i+1) = 2.d0 * factrf(i) * dble( i + i +1)/dble(i + 1)
enddo
write(6,*) "mark 1"
call setArrays3o3()
write(6,*) "mark 2"









Module with subroutine giving problem:
module i4six3odd3cuda
c making variables local to module
double precision, dimension(0:500) :: factrfD
double precision, dimension(0:170) :: factD
integer, dimension(1:256) :: q1AryD
integer, dimension(1:256) :: s1AryD
integer, dimension(1:256) :: t1AryD
attributes(constant) :: factrfD,factD,q1AryD,s1AryD,t1AryD
contains

c called at program start to set-up the fact and factrf arrays on the gpu
subroutine setArrays3o3()
double precision, dimension(0:500) :: factrf
double precision, dimension(0:170) :: fact
common /facts/ fact
common /factratio/ factrf
factrfD = factrf
factD = fact
end subroutine setArrays3o3



Any ideas what might be causing this to hang indefinitely? I have other code which for all I can tell is identical and doesn't have problems with a subroutine call like that. I've tried switching from using common blocks to explicitly passing the arrays, but it doesn't seem to make a difference.

Thanks!
Morgan
Back to top
View user's profile
vibrantcascade



Joined: 04 Aug 2011
Posts: 28

PostPosted: Sun Dec 09, 2012 11:09 am    Post subject: Reply with quote

Never mind, it just hangs for like 5 minutes the first time, then suddenly works. I'm not sure why.
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