Skip to content

Instantly share code, notes, and snippets.

@jkozdon
Created June 26, 2019 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkozdon/1380c4818f35c314080ecacbe6f2eadc to your computer and use it in GitHub Desktop.
Save jkozdon/1380c4818f35c314080ecacbe6f2eadc to your computer and use it in GitHub Desktop.
CUDAnative MArray error
julia> include("test.jl")
ERROR: LoadError: InvalidIRError: compiling gpu_knl_v2() resulted in invalid LLVM IR
Reason: unsupported call through a literal pointer (call to jl_alloc_string)
Stacktrace:
[1] _string_n at strings/string.jl:60
[2] StringVector at iobuffer.jl:31
[3] oct at intfuncs.jl:562
[4] #string#323 at intfuncs.jl:643
[5] string at intfuncs.jl:638
[6] map at tuple.jl:140
[7] dims2string at show.jl:1854
[8] throw_setindex_mismatch at indices.jl:169
[9] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_string_to_array)
Stacktrace:
[1] unsafe_wrap at strings/string.jl:71
[2] StringVector at iobuffer.jl:31
[3] oct at intfuncs.jl:562
[4] #string#323 at intfuncs.jl:643
[5] string at intfuncs.jl:638
[6] map at tuple.jl:140
[7] dims2string at show.jl:1854
[8] throw_setindex_mismatch at indices.jl:169
[9] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_array_to_string)
Stacktrace:
[1] Type at strings/string.jl:39
[2] oct at intfuncs.jl:569
[3] #string#323 at intfuncs.jl:643
[4] string at intfuncs.jl:638
[5] map at tuple.jl:140
[6] dims2string at show.jl:1854
[7] throw_setindex_mismatch at indices.jl:169
[8] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_alloc_string)
Stacktrace:
[1] _string_n at strings/string.jl:60
[2] StringVector at iobuffer.jl:31
[3] dec at intfuncs.jl:574
[4] #string#323 at intfuncs.jl:646
[5] string at intfuncs.jl:638
[6] map at tuple.jl:140
[7] dims2string at show.jl:1854
[8] throw_setindex_mismatch at indices.jl:169
[9] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_string_to_array)
Stacktrace:
[1] unsafe_wrap at strings/string.jl:71
[2] StringVector at iobuffer.jl:31
[3] dec at intfuncs.jl:574
[4] #string#323 at intfuncs.jl:646
[5] string at intfuncs.jl:638
[6] map at tuple.jl:140
[7] dims2string at show.jl:1854
[8] throw_setindex_mismatch at indices.jl:169
[9] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_array_to_string)
Stacktrace:
[1] Type at strings/string.jl:39
[2] dec at intfuncs.jl:581
[3] #string#323 at intfuncs.jl:646
[4] string at intfuncs.jl:638
[5] map at tuple.jl:140
[6] dims2string at show.jl:1854
[7] throw_setindex_mismatch at indices.jl:169
[8] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_array_copy)
Stacktrace:
[1] copy at array.jl:309
[2] unaliascopy at abstractarray.jl:1171
[3] unalias at abstractarray.jl:1155
[4] macro expansion at multidimensional.jl:719
[5] _unsafe_setindex! at multidimensional.jl:717
[6] _setindex! at multidimensional.jl:712
[7] setindex! at abstractarray.jl:1074
[8] gpu_knl_v2 at /home/jekozdon/codes/CLIMA/tmp/test.jl:17
Reason: unsupported call through a literal pointer (call to jl_alloc_string)
Stacktrace:
[1] _string_n at strings/string.jl:60
[2] StringVector at iobuffer.jl:31
[3] _base at intfuncs.jl:605
[4] #string#323 at intfuncs.jl:651
[5] string at intfuncs.jl:638
[6] map at tuple.jl:140
[7] dims2string at show.jl:1854
[8] throw_setindex_mismatch at indices.jl:169
[9] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_string_to_array)
Stacktrace:
[1] unsafe_wrap at strings/string.jl:71
[2] StringVector at iobuffer.jl:31
[3] _base at intfuncs.jl:605
[4] #string#323 at intfuncs.jl:651
[5] string at intfuncs.jl:638
[6] map at tuple.jl:140
[7] dims2string at show.jl:1854
[8] throw_setindex_mismatch at indices.jl:169
[9] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_array_to_string)
Stacktrace:
[1] Type at strings/string.jl:39
[2] _base at intfuncs.jl:617
[3] #string#323 at intfuncs.jl:651
[4] string at intfuncs.jl:638
[5] map at tuple.jl:140
[6] dims2string at show.jl:1854
[7] throw_setindex_mismatch at indices.jl:169
[8] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_alloc_string)
Stacktrace:
[1] _string_n at strings/string.jl:60
[2] StringVector at iobuffer.jl:31
[3] bin at intfuncs.jl:550
[4] #string#323 at intfuncs.jl:640
[5] string at intfuncs.jl:638
[6] map at tuple.jl:140
[7] dims2string at show.jl:1854
[8] throw_setindex_mismatch at indices.jl:169
[9] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_string_to_array)
Stacktrace:
[1] unsafe_wrap at strings/string.jl:71
[2] StringVector at iobuffer.jl:31
[3] bin at intfuncs.jl:550
[4] #string#323 at intfuncs.jl:640
[5] string at intfuncs.jl:638
[6] map at tuple.jl:140
[7] dims2string at show.jl:1854
[8] throw_setindex_mismatch at indices.jl:169
[9] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_array_to_string)
Stacktrace:
[1] Type at strings/string.jl:39
[2] bin at intfuncs.jl:557
[3] #string#323 at intfuncs.jl:640
[4] string at intfuncs.jl:638
[5] map at tuple.jl:140
[6] dims2string at show.jl:1854
[7] throw_setindex_mismatch at indices.jl:169
[8] multiple call sites at unknown:0
Reason: unsupported dynamic function invocation (call to print)
Stacktrace:
[1] print_to_string at strings/io.jl:124
[2] multiple call sites at unknown:0
Reason: unsupported dynamic function invocation (call to print)
Stacktrace:
[1] print_to_string at strings/io.jl:129
[2] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_array_grow_end)
Stacktrace:
[1] _growend! at array.jl:811
[2] resize! at array.jl:1003
[3] print_to_string at strings/io.jl:131
[4] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_array_del_end)
Stacktrace:
[1] _deleteend! at array.jl:820
[2] resize! at array.jl:1008
[3] print_to_string at strings/io.jl:131
[4] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_array_to_string)
Stacktrace:
[1] Type at strings/string.jl:39
[2] print_to_string at strings/io.jl:131
[3] multiple call sites at unknown:0
Reason: unsupported call to the Julia runtime (call to jl_type_error)
Stacktrace:
[1] print_to_string at strings/io.jl:124
[2] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_alloc_string)
Stacktrace:
[1] _string_n at strings/string.jl:60
[2] string at strings/substring.jl:186
[3] throw_setindex_mismatch at indices.jl:169
[4] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to __memcpy_avx_unaligned_erms)
Stacktrace:
[1] unsafe_copyto! at array.jl:226
[2] __unsafe_string! at strings/substring.jl:173
[3] string at strings/substring.jl:189
[4] throw_setindex_mismatch at indices.jl:169
[5] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_alloc_string)
Stacktrace:
[1] _string_n at strings/string.jl:60
[2] StringVector at iobuffer.jl:31
[3] #IOBuffer#318 at iobuffer.jl:114
[4] Type at none:0
[5] print_to_string at strings/io.jl:127
[6] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_string_to_array)
Stacktrace:
[1] unsafe_wrap at strings/string.jl:71
[2] StringVector at iobuffer.jl:31
[3] #IOBuffer#318 at iobuffer.jl:114
[4] Type at none:0
[5] print_to_string at strings/io.jl:127
[6] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to __memset_avx2_unaligned_erms)
Stacktrace:
[1] fill! at array.jl:366
[2] #IOBuffer#318 at iobuffer.jl:121
[3] Type at none:0
[4] print_to_string at strings/io.jl:127
[5] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_alloc_array_2d)
Stacktrace:
[1] Type at boot.jl:406
[2] Type at boot.jl:414
[3] Type at boot.jl:421
[4] similar at abstractarray.jl:672
[5] similar at abstractarray.jl:671
[6] similar at broadcast.jl:196
[7] copy at broadcast.jl:818
[8] materialize at broadcast.jl:798
[9] broadcast at broadcast.jl:752
[10] + at arraymath.jl:47
[11] gpu_knl_v2 at /home/jekozdon/codes/CLIMA/tmp/test.jl:17
Reason: unsupported call through a literal pointer (call to jl_array_copy)
Stacktrace:
[1] copy at array.jl:309
[2] unaliascopy at abstractarray.jl:1171
[3] unalias at abstractarray.jl:1155
[4] broadcast_unalias at broadcast.jl:863
[5] preprocess at broadcast.jl:870
[6] preprocess_args at broadcast.jl:872
[7] preprocess at broadcast.jl:869
[8] copyto! at broadcast.jl:886
[9] copyto! at broadcast.jl:842
[10] copy at broadcast.jl:818
[11] materialize at broadcast.jl:798
[12] broadcast at broadcast.jl:752
[13] + at arraymath.jl:47
[14] gpu_knl_v2 at /home/jekozdon/codes/CLIMA/tmp/test.jl:17
Reason: unsupported call through a literal pointer (call to jl_array_copy)
Stacktrace:
[1] copy at array.jl:309
[2] unaliascopy at abstractarray.jl:1171
[3] unalias at abstractarray.jl:1155
[4] broadcast_unalias at broadcast.jl:863
[5] preprocess at broadcast.jl:870
[6] preprocess_args at broadcast.jl:873
[7] preprocess_args at broadcast.jl:872
[8] preprocess at broadcast.jl:869
[9] copyto! at broadcast.jl:886
[10] copyto! at broadcast.jl:842
[11] copy at broadcast.jl:818
[12] materialize at broadcast.jl:798
[13] broadcast at broadcast.jl:752
[14] + at arraymath.jl:47
[15] gpu_knl_v2 at /home/jekozdon/codes/CLIMA/tmp/test.jl:17
Reason: unsupported call through a literal pointer (call to jl_alloc_string)
Stacktrace:
[1] _string_n at strings/string.jl:60
[2] StringVector at iobuffer.jl:31
[3] hex at intfuncs.jl:586
[4] #string#323 at intfuncs.jl:649
[5] string at intfuncs.jl:638
[6] map at tuple.jl:140
[7] dims2string at show.jl:1854
[8] throw_setindex_mismatch at indices.jl:169
[9] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_string_to_array)
Stacktrace:
[1] unsafe_wrap at strings/string.jl:71
[2] StringVector at iobuffer.jl:31
[3] hex at intfuncs.jl:586
[4] #string#323 at intfuncs.jl:649
[5] string at intfuncs.jl:638
[6] map at tuple.jl:140
[7] dims2string at show.jl:1854
[8] throw_setindex_mismatch at indices.jl:169
[9] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_array_to_string)
Stacktrace:
[1] Type at strings/string.jl:39
[2] hex at intfuncs.jl:594
[3] #string#323 at intfuncs.jl:649
[4] string at intfuncs.jl:638
[5] map at tuple.jl:140
[6] dims2string at show.jl:1854
[7] throw_setindex_mismatch at indices.jl:169
[8] multiple call sites at unknown:0
Reason: unsupported call through a literal pointer (call to jl_alloc_array_2d)
Stacktrace:
[1] Type at boot.jl:406
[2] Type at boot.jl:414
[3] similar at abstractarray.jl:637
[4] similar at /home/jekozdon/.julia/packages/StaticArrays/3KEjZ/src/abstractarray.jl:128
[5] similar at abstractarray.jl:627
[6] _unsafe_getindex at multidimensional.jl:682
[7] _getindex at multidimensional.jl:670
[8] getindex at abstractarray.jl:981
[9] gpu_knl_v2 at /home/jekozdon/codes/CLIMA/tmp/test.jl:17
Reason: unsupported call to the Julia runtime (call to jl_f__apply_latest)
Stacktrace:
[1] #invokelatest#1 at essentials.jl:790
[2] invokelatest at essentials.jl:789
[3] throw_overflowerr_binaryop at checked.jl:154
[4] multiple call sites at unknown:0
Reason: unsupported dynamic function invocation (call to #sprint#342(context, sizehint::Integer, ::typeof(sprint), f::Function, args...) in Base at strings/io.jl:103)
Stacktrace:
[1] sprint at strings/io.jl:103
[2] join at strings/io.jl:292
[3] dims2string at show.jl:1854
[4] throw_setindex_mismatch at indices.jl:169
[5] multiple call sites at unknown:0
Stacktrace:
[1] check_ir(::CUDAnative.CompilerJob, ::LLVM.Module) at /home/jekozdon/.julia/packages/CUDAnative/gJDZI/src/compiler/validation.jl:114
[2] macro expansion at /home/jekozdon/.julia/packages/TimerOutputs/7zSea/src/TimerOutput.jl:216 [inlined]
[3] #codegen#121(::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::typeof(CUDAnative.codegen), ::Symbol, ::CUDAnative.CompilerJob) at /home/jekozdon/.julia/packages/CUDAnative/gJDZI/src/compiler/driver.jl:186
[4] #codegen at /home/jekozdon/.julia/packages/CUDAnative/gJDZI/src/compiler/driver.jl:0 [inlined]
[5] #compile#120(::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::typeof(CUDAnative.compile), ::Symbol, ::CUDAnative.CompilerJob) at /home/jekozdon/.julia/packages/CUDAnative/gJDZI/src/compiler/driver.jl:47
[6] #compile#119 at ./none:0 [inlined]
[7] #compile at ./none:0 [inlined] (repeats 2 times)
[8] macro expansion at /home/jekozdon/.julia/packages/CUDAnative/gJDZI/src/execution.jl:388 [inlined]
[9] #cufunction#161(::Nothing, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(cufunction), ::typeof(gpu_knl_v2), ::Type{Tuple{}}) at /home/jekozdon/.julia/packages/CUDAnative/gJDZI/src/execution.jl:356
[10] cufunction(::Function, ::Type) at /home/jekozdon/.julia/packages/CUDAnative/gJDZI/src/execution.jl:356
[11] top-level scope at /home/jekozdon/.julia/packages/CUDAnative/gJDZI/src/execution.jl:174
[12] top-level scope at gcutils.jl:87
[13] top-level scope at /home/jekozdon/.julia/packages/CUDAnative/gJDZI/src/execution.jl:171
[14] top-level scope at /home/jekozdon/codes/CLIMA/tmp/test.jl:26
[15] include at ./boot.jl:328 [inlined]
[16] include_relative(::Module, ::String) at ./loading.jl:1094
[17] include(::Module, ::String) at ./Base.jl:31
[18] include(::String) at ./client.jl:431
[19] top-level scope at REPL[1]:1
in expression starting at /home/jekozdon/codes/CLIMA/tmp/test.jl:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment