hanging on array copy

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)

factrf(0) = 1.d0
do i = 0, 500
factrf(i+1) = 2.d0 * factrf(i) * dble( i + i +1)/dble(i + 1)
write(6,) “mark 1”
call setArrays3o3()
) “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

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.


Never mind, it just hangs for like 5 minutes the first time, then suddenly works. I’m not sure why.