OpenCL: Feedback on install on OpenSUSE

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> Pkg.test("OpenCL")
INFO: Testing OpenCL
: CommandLine Error: Option 'help-list' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
===============================[ ERROR: OpenCL ]================================

failed process: Process(`/home/colin/Downloads/julia/bin/julia -Cx86-64 -J/home/colin/Downloads/julia/lib/julia/sys.so --compile=yes --depwarn=yes --check-bounds=yes --code-coverage=none --color=yes --compilecache=yes /home/colin/.julia/v0.5/OpenCL/test/runtests.jl`, ProcessExited(1)) [1]

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

See CommandLine Error: Option 'help-list' registered more than once! · Issue #125 · JuliaGPU/OpenCL.jl · GitHub → Add a build option to rename all LLVM symbols · Issue #12644 · JuliaLang/julia · GitHub

1 Like

For your specific case you should use the OpenCL implementation from nvidia and remove beignet as well as Mesa-Lib-OpenCL.

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.

Distro’s really shouldn’t be dynamically linking libLLVM… 93103 – llvm symbols leak through, cause trouble with software rendering in llvm-linked software

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.

2 Likes