I have openSUSE Leap 42.2 fully patched. CUDA 8 is installed with a physical GT 610 card which works fine with CUDAnative. I have tried to wake up OpenCL on Julia 0.5 and 0.6; both install without complaint, but Pkg.test fails for different reasons on each version of Julia.
openSUSE offers me the following from repos, all installed: Mesa-Lib-OpenCL, beignet and beignet-devel, clinfo, libclc, opencl-headers. Do I have the right dependencies?
Julia 0.5 official release (Version 0.5.0 (2016-09-19 18:14 UTC)):
Julia 0.6 (Version 0.6.0-dev.2661 (2017-02-08 04:42 UTC))
julia> Pkg.test("OpenCL")
INFO: Testing OpenCL
ERROR: LoadError: LoadError: LoadError: LoadError: UndefVarError: CSize_t not defined
Stacktrace:
[1] include_from_node1(::String) at ./loading.jl:539
[2] include(::String) at ./sysimg.jl:14
[3] include_from_node1(::String) at ./loading.jl:539
[4] include(::String) at ./sysimg.jl:14
[5] include_from_node1(::String) at ./loading.jl:539
Thanks, this solves the problem on v 0.5, all tests pass. V 0.6 issue persists.
From the first steps user perspective on v 0.5 on openSUSE, the OpenCL docs state specifically that user should install a driver for OpenCL. Examination of the options in the package manager Yast reveal the two options for Mesa and beignet, but even after the NVidia repository for openSUSE is available it is not evident that user already has an OpenCL driver unless you query on the description field.
Yeah the state of OpenCL drivers is quite annoying. Sadly I have no idea on how we can work around the issue of multiple versions of LLVM being loaded and conflicting with each other.
The CSize_t error is just a typo (was it capitalized like that in earlier versions of Julia? I don’t remember), apparently src/api/opencl_1.0.0.jl isn’t tested? https://github.com/JuliaGPU/OpenCL.jl/pull/129
The “eliminate intrinsics” PR (https://github.com/JuliaLang/julia/pull/18754) changed the behavior of ccall in 0.6 so it’s now more picky about ccalls being valid code even if they are never called. This caught a few similar typos in untested lines of code in other packages too.