Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

x[Range, Vector] indexing crashes #10

Closed
ViralBShah opened this issue Sep 1, 2017 · 2 comments
Closed

x[Range, Vector] indexing crashes #10

ViralBShah opened this issue Sep 1, 2017 · 2 comments

Comments

@ViralBShah
Copy link

julia> x = cu(rand(1000,1000));

julia> x[1:10, [8;6]]
error in running finalizer: CUDAdrv.CuError(code=700, meta=nothing)
10×2 CuArray{Float64,2}:
Error showing value of type CuArray{Float64,2}:
ERROR: CUDA error: an illegal memory access was encountered (code #700, ERROR_ILLEGAL_ADDRESS)
Stacktrace:
 [1] macro expansion at /home/viralbshah/.julia/v0.6/CUDAdrv/src/base.jl:130 [inlined]
 [2] download(::Ptr{Float64}, ::CUDAdrv.OwnedPtr{Float64}, ::Int64) at /home/viralbshah/.julia/v0.6/CUDAdrv/src/memory.jl:141
 [3] copy!(::Array{Float64,2}, ::CuArray{Float64,2}) at /home/viralbshah/.julia/v0.6/CuArrays/src/array.jl:55
 [4] #showarray#1(::Bool, ::Function, ::IOContext{Base.Terminals.TTYTerminal}, ::CuArray{Float64,2}, ::Bool) at /home/viralbshah/.julia/v0.6/CuArrays/src/array.jl:111
 [5] display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::MIME{Symbol("text/plain")}, ::CuArray{Float64,2}) at ./REPL.jl:122
 [6] display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::CuArray{Float64,2}) at ./REPL.jl:125
 [7] display(::CuArray{Float64,2}) at ./multimedia.jl:194
 [8] eval(::Module, ::Any) at ./boot.jl:235
 [9] print_response(::Base.Terminals.TTYTerminal, ::Any, ::Void, ::Bool, ::Bool, ::Void) at ./REPL.jl:144
 [10] print_response(::Base.REPL.LineEditREPL, ::Any, ::Void, ::Bool, ::Bool) at ./REPL.jl:129
 [11] (::Base.REPL.#do_respond#16{Bool,Base.REPL.##26#36{Base.REPL.LineEditREPL,Base.REPL.REPLHistoryProvider},Base.REPL.LineEditREPL,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at ./REPL.jl:646
@ViralBShah
Copy link
Author

It seems to work sometimes and fail intermittently.

@maleadt
Copy link
Member

maleadt commented Sep 4, 2017

On f989092

using CuArrays

x = CuArray(rand(1000,1000))
@show x[1:10, [8;6]]
cuda-memcheck julia wip.jl
========= CUDA-MEMCHECK
========= Invalid __global__ read of size 8
=========     at 0x000001f0 in CuArrays/src/indexing.jl:53:ptxcall_index_kernel_61125
=========     by thread (255,0,0) in block (0,0,0)
=========     Address 0xb05500ec8 is out of bounds

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants