While investigating this issue we found that CUDArt and CURAND may behave 
differently on different platforms. Could somebody from user group with 
enabled CUDA try the following code in Julia REPL and report: 

 * operating system
 * whether this code succeeded or failed; if failed, then what is the 
message. 

The code is (just copy and paste):

Pkg.add("CUDArt")  # if it's not installed yet
Pkg.add("CURAND")  # if it's not installed yet

using CUDArt
using CURAND

rng = create_generator()
d_a = curand(rng,Float64, 1000)
destroy_generator(rng)
a = to_host(d_a)
device_reset()
result = devices(dev->capability(dev)[1]>=2) do devlist
end

rng = create_generator()
d_a = curand(rng,Float64, 1000)
destroy_generator(rng)
a = to_host(d_a)
device_reset()
result = devices(dev->capability(dev)[1]>=2) do devlist
end

The goal of this experiment is to see if cuRAND can survive after 
`cudaDeviceReset()`. So far it works on one Linux machine and fails on one 
Windows machine, so some statistics will be very helpful.

Thanks. 


On Friday, November 6, 2015 at 10:46:54 PM UTC+3, Joaquim Masset Lacombe 
Dias Garcia wrote:
>
> I was playing with the GPU (in both windows and mac) libraries and I came 
> up with the following errors:
> The first time I execute the do loop, every thing goes well.
> But If i try a second time in a row I get this invalid pointer error.
>
> I got the same error in all my do loops, any ideas?
>
> best,
> Joaquim
>
> *My code running on terminal:*
>
> julia> using CUDArt
> julia> using CURAND
> julia> result = devices(dev->capability(dev)[1]>=2) do devlist
>            d_a = curand(Float32, 1000);
>            a = to_host(d_a);
>        end
>
> 1000-element Array{Float64,1}:
>  0.438451
>  0.460365
>  0.250215
>  0.494744
>  0.0530111
>  0.337699
>  0.396763
>  0.874419
>  0.482167
>  0.0428398
>  ?
>  0.563937
>  0.80706
>  0.190015
>  0.334969
>  0.622164
>  0.710596
>  0.0125895
>  0.990388
>  0.467796
>  0.24313
>
> julia> result = devices(dev->capability(dev)[1]>=2) do devlist
>            d_a = curand(Float32, 1000);
>            a = to_host(d_a);
>        end
> WARNING: CUDA error triggered from:
>
>  in checkerror at 
> C:\Users\joaquimgarcia\.julia\v0.4\CUDArt\src\libcudart-6.5.jl
> :15
>  in copy! at C:\Users\joaquimgarcia\.julia\v0.4\CUDArt\src\arrays.jl:152
>  in to_host at C:\Users\joaquimgarcia\.julia\v0.4\CUDArt\src\arrays.jl:87
>  in anonymous at none:3
>  in devices at 
> C:\Users\joaquimgarcia\.julia\v0.4\CUDArt\src\device.jl:61ERROR:
> Launch failed, perhaps due to an invalid pointer
>  in checkdrv at C:\Users\joaquimgarcia\.julia\v0.4\CUDArt\src\module.jl:6
>  in close at C:\Users\joaquimgarcia\.julia\v0.4\CUDArt\src\device.jl:136
>  in devices at C:\Users\joaquimgarcia\.julia\v0.4\CUDArt\src\device.jl:63
>
>

Reply via email to