CLArrays.jl icon indicating copy to clipboard operation
CLArrays.jl copied to clipboard

ERROR (unhandled task failure) after running example code (but seems to still work)

Open currymj opened this issue 7 years ago • 3 comments

After creating the simple array of zeros like in the example, I see this (running in Juno/JuliaPro, 0.6, built with MKL, both with the METADATA version and after doing a checkout and build of master). I'm on a new-ish Macbook Pro (output of CLArrays.devices() at bottom).

ERROR (unhandled task failure): OpenCL Error: OpenCL.Context error: 
Stacktrace:
 [1] raise_context_error(::String, ::String) at /Applications/JuliaPro-0.6.1.1.app/Contents/Resources/pkgs-0.6.1.1/v0.6/OpenCL/src/context.jl:109
 [2] macro expansion at /Applications/JuliaPro-0.6.1.1.app/Contents/Resources/pkgs-0.6.1.1/v0.6/OpenCL/src/context.jl:148 [inlined]
 [3] (::OpenCL.cl.##43#44)() at ./task.jl:335

However, the array still seems to get created and I can still work with it, so it's not a huge problem. I thought I should report it though! If there's anything else I can do to help narrow down or reproduce it, please ask.

3-element Array{OpenCL.cl.Device,1}:
 OpenCL.Device(Intel(R) HD Graphics 630 on Apple @0x0000000001024500)                 
 OpenCL.Device(AMD Radeon Pro 555 Compute Engine on Apple @0x0000000001021c00)        
 OpenCL.Device(Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz on Apple @0x00000000ffffffff)

currymj avatar Nov 10 '17 06:11 currymj

I've seen this issue before, not really sure what to do about it. Which one of those devices did you use to create the array?

A = CLArray(...)
CLArrays.device(A)

SimonDanisch avatar Nov 10 '17 13:11 SimonDanisch

Ah, I need to have a better look at it, but maybe we just don't filter non fatal errors. https://github.com/JuliaGPU/OpenCL.jl/blob/master/src/context.jl#L109

As you can see, there should be an error information, which seems to be empty. I have the feeling, that some vendors just sent an empty message to the callback on initialization, or something similar!

SimonDanisch avatar Nov 10 '17 13:11 SimonDanisch

Ha, OpenCL.jl itself seems to do that: https://github.com/JuliaGPU/OpenCL.jl/blob/master/src/context.jl#L148

I haven't written that code, so I'm not sure why it's structured in that way, and why on some platforms it just get's to the true_callback(error_info, "") line and some others not. cc @vchuravy

SimonDanisch avatar Nov 10 '17 13:11 SimonDanisch