[julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-07 Thread Jason Eckstein
I've had the same errors on MacOS, Windows 10, and Linux using the devices() do loop with CUDArt package. All of the programs I run I place inside the outer do loop including all the repetitions because as soon as that block ends I cannot use any other CUDA functions without some type of point

[julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-24 Thread Andrei Zh
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 t

[julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-24 Thread Kristoffer Carlsson
The original code in the OP fails for me but there is no problem with the one you posted. Ubuntu machine.

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-08 Thread Tim Holy
Are you sure this is due to CUDArt? For me, this works as many times as I care to try it (note that I'm not using CURAND): using CUDArt result = devices(dev->capability(dev)[1]>=2; nmax = 1) do devlist device(devlist[1]) h = rand(Float32, 1000) d_a = CudaArray(h) a = to_host(d_a)

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-08 Thread Jason Eckstein
Interesting. I have the bug when using cublas.jl I haven't found a way to initialize resources to avoid these errors but if I just use cudart on it's own there aren't memory errors.

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-08 Thread Jason Eckstein
Interesting. I have the bug when using cublas.jl I haven't found a way to initialize resources to avoid these errors but if I just use cudart on it's own there aren't memory errors.

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-08 Thread Jason Eckstein
Interesting. I have the bug when using cublas.jl I haven't found a way to initialize resources to avoid these errors but if I just use cudart on it's own there aren't memory errors.

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-08 Thread Tim Holy
This should be solvable, but I've never used cublas myself. I'd recommend filing an issue or pull request with that package. --Tim On Sunday, November 08, 2015 03:28:39 PM Jason Eckstein wrote: > Interesting. I have the bug when using cublas.jl I haven't found a way to > initialize resources to

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-09 Thread Joaquim Masset Lacombe Dias Garcia
if I load: using CUDArt using CURAND and then I run either: d_a = curand(Float64, 1000); a = to_host(d_a); OR: result = devices(dev->capability(dev)[1]>=2) do devlist end I can repeat the block as many time I want. However if I run both combined (or alternatedly in any order): d_a = curand(F

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-10 Thread Andrei Zh
> But I can replicate the bug if I use CURAND. I'd suggest filing an issue > with > that package. Most likely it needs to (and, you need to) initialize > resources > according to these instructions: > https://github.com/JuliaGPU/CUDArt.jl#initializing-and-freeing-ptx-modules > > CURAND.jl i

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-10 Thread Tim Holy
See the code in src/device.jl that implements the do-block syntax (especially functions that take a function as their first argument). It's not a big file, so shouldn't be too hard to figure out what's happening. --Tim On Tuesday, November 10, 2015 02:16:52 PM Andrei Zh wrote: > > But I can re

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-24 Thread Tim Holy
It didn't throw any errors for me. julia> versioninfo() Julia Version 0.4.2-pre+1 Commit b8b3517* (2015-11-08 10:37 UTC) Platform Info: System: Linux (x86_64-linux-gnu) CPU: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandy

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-24 Thread Andrei
On Tue, Nov 24, 2015 at 8:03 PM, Kristoffer Carlsson wrote: > The original code in the OP fails for me Yes, this is expected behavior: for convenience, CURAND.jl creates default random number generator, which obviously becomes invalid after `device_reset()`. At the same time, my last code snipp

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-24 Thread Tim Holy
6.5 --Tim On Wednesday, November 25, 2015 01:37:22 AM Andrei wrote: > On Tue, Nov 24, 2015 at 8:03 PM, Kristoffer Carlsson > wrote: > > The original code in the OP fails for me > > Yes, this is expected behavior: for convenience, CURAND.jl creates default > random number generator, which obviou

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-24 Thread Kristoffer Carlsson
7.5 here

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-24 Thread Joaquim Masset Lacombe Dias Garcia
Interesting, both my machines (windows and mac) have CUDA 7.0, possibly thats the issue, since the C code in https://github.com/JuliaGPU/CURAND.jl/issues/3#issuecomment-159319580 fails in both. If some linux user could test this version, our statistics would be more complete. I will try 6.5 an

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-25 Thread Sergio Muniz
It works fine here, on Ubuntu 14.04 and CUDA 6.5. Cheers, [S]. On Tuesday, November 24, 2015 at 9:30:32 PM UTC-2, Joaquim Masset Lacombe Dias Garcia wrote: > > Interesting, both my machines (windows and mac) have CUDA 7.0, possibly > thats the issue, since the C code in > https://github.com/

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-25 Thread Andrei
@Joaquim Would it be possible for you to upgrade or donwgrade your CUDA version? Meanwhile, we are still waiting for other people with Windows or Mac :D On Wed, Nov 25, 2015 at 6:35 PM, Sergio Muniz wrote: > It works fine here, on Ubuntu 14.04 and CUDA 6.5. > > Cheers, > [S]. > > > > > On Tuesd

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-11-25 Thread Joaquim Masset Lacombe Dias Garcia
Wow! it seems that something is wrong in CUDA 7.0 ! I updated my MAC to cuda 7.5 and bith the C code and julia code worked fine! This other guy: http://stackoverflow.com/questions/33904554/curand-error-while-alternating-with-device-initialization-and-reset-in-cuda-7-0?noredirect=1#comment55573150_

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-12-07 Thread Joaquim Masset Lacombe Dias Garcia
And it also works on windows if CUDA version is 7.5! On Wed, Nov 25, 2015 at 7:58 PM, Joaquim Masset Lacombe Dias Garcia < joaquimdgar...@gmail.com> wrote: > Wow! it seems that something is wrong in CUDA 7.0 ! > > I updated my MAC to cuda 7.5 and bith the C code and julia code worked > fine! > Th

Re: [julia-users] Re: CUDART and CURAND problem on running the same "do" loop twice

2015-12-08 Thread Andrei Zh
Thanks for checking it! I'll update README for CURAND.jl On Monday, December 7, 2015 at 8:56:36 PM UTC+3, Joaquim Masset Lacombe Dias Garcia wrote: > > And it also works on windows if CUDA version is 7.5! > > On Wed, Nov 25, 2015 at 7:58 PM, Joaquim Masset Lacombe Dias Garcia < > joaquim...@gmail