Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Julia v0.7 #160

Closed
wants to merge 12 commits into from
Closed

Update to Julia v0.7 #160

wants to merge 12 commits into from

Conversation

ranocha
Copy link
Member

@ranocha ranocha commented Aug 8, 2018

Locally on Kubuntu 18.04 with an Nvidia GPU, all tests pass for me. There is still one deprecation warning in line 140 of context.jl (https://github.com/JuliaGPU/OpenCL.jl/compare/master...ranocha:update_v07?expand=1#diff-6cc00ffb6d6452cf5b665d33b6f45a90R140). However, if I replace cfunction with @cfunction (and the argument type tuple accordingly to get f_ptr = @cfunction($payload, Nothing, (Ptr{Cchar}, Ptr{Cvoid}, Csize_t))), I get some errors:

OpenCL.Context constructor: Error During Test at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:24
  Got exception ErrorException("pointer_from_objref cannot be used on immutable objects") outside of a @test
  pointer_from_objref cannot be used on immutable objects
  Stacktrace:
   [1] error(::String) at ./error.jl:33
   [2] pointer_from_objref at ./pointer.jl:142 [inlined]
   [3] unsafe_convert(::Type{Ptr{OpenCL.cl.api.CL_user_data_tag}}, ::Base.RefValue{Base.CFunction}) at /home/hendrik/.julia/dev/OpenCL/src/api.jl:35
   [4] clCreateContext(::Ptr{Nothing}, ::Int64, ::Array{Ptr{Nothing},1}, ::Ptr{Nothing}, ::Base.CFunction, ::Base.RefValue{Int32}) at /home/hendrik/.julia/dev/OpenCL/src/api.jl:17
   [5] #Context#44(::Nothing, ::Nothing, ::Type, ::Array{OpenCL.cl.Device,1}) at /home/hendrik/.julia/dev/OpenCL/src/context.jl:141
   [6] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:properties, :callback),Tuple{Nothing,Nothing}}, ::Type{OpenCL.cl.Context}, ::Array{OpenCL.cl.Device,1}) at ./none:0
   [7] #Context#45(::Nothing, ::Nothing, ::Type, ::OpenCL.cl.Device) at /home/hendrik/.julia/dev/OpenCL/src/context.jl:152
   [8] OpenCL.cl.Context(::OpenCL.cl.Device) at /home/hendrik/.julia/dev/OpenCL/src/context.jl:152
   [9] macro expansion at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:28 [inlined]
   [10] macro expansion at /home/hendrik/Downloads/julia07/usr/share/julia/stdlib/v0.7/Test/src/Test.jl:1079 [inlined]
   [11] macro expansion at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:25 [inlined]
   [12] macro expansion at /home/hendrik/Downloads/julia07/usr/share/julia/stdlib/v0.7/Test/src/Test.jl:1079 [inlined]
   [13] top-level scope at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:24
   [14] include at ./boot.jl:317 [inlined]
   [15] include_relative(::Module, ::String) at ./loading.jl:1038
   [16] include at ./sysimg.jl:29 [inlined]
   [17] include(::String) at /home/hendrik/.julia/dev/OpenCL/test/runtests.jl:1
   [18] top-level scope at none:0
   [19] include at ./boot.jl:317 [inlined]
   [20] include_relative(::Module, ::String) at ./loading.jl:1038
   [21] include(::Module, ::String) at ./sysimg.jl:29
   [22] include(::String) at ./client.jl:398
   [23] top-level scope at none:0
   [24] eval(::Module, ::Any) at ./boot.jl:319
   [25] exec_options(::Base.JLOptions) at ./logging.jl:317
   [26] _start() at ./client.jl:432
OpenCL.Context create_some_context: Error During Test at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:106
  Test threw exception OpenCL Error: Unable to create any OpenCL.Context, no devices worked
  Expression: cl.create_some_context() != nothing
  OpenCL Error: Unable to create any OpenCL.Context, no devices worked
  Stacktrace:
   [1] create_some_context() at /home/hendrik/.julia/dev/OpenCL/src/context.jl:311
   [2] macro expansion at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:29 [inlined]
   [3] macro expansion at /home/hendrik/Downloads/julia07/usr/share/julia/stdlib/v0.7/Test/src/Test.jl:1079 [inlined]
   [4] macro expansion at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:25 [inlined]
   [5] macro expansion at /home/hendrik/Downloads/julia07/usr/share/julia/stdlib/v0.7/Test/src/Test.jl:1079 [inlined]
   [6] top-level scope at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:24
OpenCL.Context create_some_context: Error During Test at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:107
  Test threw exception OpenCL Error: Unable to create any OpenCL.Context, no devices worked
  Expression: typeof(cl.create_some_context()) == cl.Context
  OpenCL Error: Unable to create any OpenCL.Context, no devices worked
  Stacktrace:
   [1] create_some_context() at /home/hendrik/.julia/dev/OpenCL/src/context.jl:311
   [2] macro expansion at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:30 [inlined]
   [3] macro expansion at /home/hendrik/Downloads/julia07/usr/share/julia/stdlib/v0.7/Test/src/Test.jl:1079 [inlined]
   [4] macro expansion at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:25 [inlined]
   [5] macro expansion at /home/hendrik/Downloads/julia07/usr/share/julia/stdlib/v0.7/Test/src/Test.jl:1079 [inlined]
   [6] top-level scope at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:24
Test Summary:                        | Pass  Error  Total
OpenCL.Context                       |   16      3     19
  OpenCL.Context constructor         |    1      1      2
  OpenCL.Context platform properties |   11            11
  OpenCL.Context create_some_context |           2      2
  OpenCL.Context parsing             |    4             4
ERROR: LoadError: LoadError: Some tests did not pass: 16 passed, 0 failed, 3 errored, 0 broken.
in expression starting at /home/hendrik/.julia/dev/OpenCL/test/test_context.jl:23
in expression starting at /home/hendrik/.julia/dev/OpenCL/test/runtests.jl:26
ERROR: Package OpenCL errored during testing

Thus, I've not changed this part and there is still a deprecation warning.

During the first using OpenCL, there are some deprecation warnings such as

┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `properties``.
│ Use `global properties` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `properties``.
│ Use `global properties` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `context``.
│ Use `global context` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `context``.
│ Use `global context` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `num_devices``.
│ Use `global num_devices` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `num_devices``.
│ Use `global num_devices` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `devices``.
│ Use `global devices` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `devices``.
│ Use `global devices` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `context``.
│ Use `global context` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `context``.
│ Use `global context` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0
┌ Warning: Deprecated syntax `implicit assignment to global variable `info``.
│ Use `global info` instead.
└ @ none:0

@ranocha
Copy link
Member Author

ranocha commented Aug 9, 2018

As in #159, Travis does not seem to respond...

@ranocha ranocha mentioned this pull request Aug 9, 2018
@SimonDanisch
Copy link
Member

I'll try to activate our gitlab ci today!

@ranocha
Copy link
Member Author

ranocha commented Aug 9, 2018

There is an OutOfMemoryError on Travis (https://travis-ci.org/JuliaGPU/OpenCL.jl/jobs/413939671#L351) which I can't reproduce on my computer.

@ranocha ranocha mentioned this pull request Aug 29, 2018
@ranocha
Copy link
Member Author

ranocha commented Oct 18, 2018

This seems to be superseded by #169.

@ranocha ranocha closed this Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants