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

Platform not found #123

Closed
ameresj opened this issue Dec 3, 2016 · 1 comment
Closed

Platform not found #123

ameresj opened this issue Dec 3, 2016 · 1 comment

Comments

@ameresj
Copy link

ameresj commented Dec 3, 2016

When building julia Version 0.6.0-dev.1378 on ubuntu 16.04, I can successfully use access OpenCL.

julia> using OpenCL
julia> platform=cl.platforms()
igdrcl: using XCB-DRI2 authentication...
1-element Array{OpenCL.cl.Platform,1}:
 OpenCL.Platform('Intel(R) OpenCL' @0x000000000318a460)
julia> cl.devices(platform[1])
2-element Array{OpenCL.cl.Device,1}:
 OpenCL.Device(Intel(R) HD Graphics on Intel(R) OpenCL @0x0000000002979820)                    
 OpenCL.Device(Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz on Intel(R) OpenCL @0x00000000031b88d8)

Nevertheless for the stable and also nightly build binaries from the Ubuntu repository it doesn't even find the platform. For example julia version 0.6.0-dev gives me:

ERROR: LoadError: CLError(code=-1001, CL_PLATFORM_NOT_FOUND_KHR)
 in macro expansion at /home/ameresj/.julia/v0.6/OpenCL/src/macros.jl:6 [inlined]
 in platforms() at /home/ameresj/.julia/v0.6/OpenCL/src/platform.jl:20
 in create_some_context() at /home/ameresj/.julia/v0.6/OpenCL/src/context.jl:235
 in create_compute_context() at /home/ameresj/.julia/v0.6/OpenCL/src/util.jl:2
 in include_from_node1(::String) at ./loading.jl:532
 in include(::String) at ./sysimg.jl:14
 in process_options(::Base.JLOptions) at ./client.jl:271
 in _start() at ./client.jl:335

Python with pyopencl works out of the box, so it has to be something julia specific that I am missing here. Probably some library path is redefined. What is a good point to start looking?

@vchuravy
Copy link
Member

vchuravy commented Dec 5, 2016

I am not quite sure how to debug this from afar. Make sure that the same OpenCL library is loaded (see https://github.com/JuliaGPU/OpenCL.jl/blob/master/src/api.jl#L5-L8) and that you onnly have one OpenCL library installed. It might be that you have two on your load path. We get the platforms from the OpenCL library and there should be no difference between versions or between Julia and Python

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

No branches or pull requests

2 participants