HPCE / hpce-2017-cw5

1 stars 6 forks source link

Unknown exception crash of OpenCL #26

Closed jeg114 closed 6 years ago

jeg114 commented 6 years ago

I have the following simple gaussian blur provider which during the execute function just tries to setup the GPU as we did in cw3 (it is pretty much the copy paste code). This works fine for my partner's Mac, but silently crashes with in my windows (using the canned mingw provided). It crashes when context is initialised:

image

Running it with gdb I can see it is caused by an unknown exception, and the backtrace has led me to find that I might not be running the provided opencl_sdk/lib/windows/x86_64/ library copied from cw3 but the following library /c/WINDOWS/SYSTEM32/OpenCL.dll

image

The relevant part of my makefile looks like:

image

and results in the following compilation:

image

I have also tried to force the search path of the libraries to be set only to the location of the provided library by adding LDFLAGS += -Wl,-rpath,opencl_sdk/lib/windows/x86_64, resulting in the same result.

guigzzz commented 6 years ago

I have this same problem! That is the code exits silently right at context creation. I didn't go as far as you and debugged it with gdb... However, I did try messing around with the devices and how exactly the context is created. This lead me to isolate that the context creation is actually failing when the CPU is included in the vector of devices passed to the context creation. If I manually remove it from this vector of devices, and only pass the integrated graphics, the context creation works fine. The context creation also works fine when I select the NVIDIA platform and select the dGPU. for info I have a 7700HQ with HD630 graphics and a GTX 1050. Could you see if my fix also works for you? I'll try running gdb to see if I crash at the same point as you.

EDIT:

Here's my stacktrace, seems like it's the same problem as you... So maybe a bug in the intel OpenCL drivers? I was also wondering if CW3 also worked fine for you as well. This doesn't seem to make much sense to me, especially as I can still run CW3 OpenCL code without any problems on the intel provider... image

jeg114 commented 6 years ago

Thanks for the info and suggestions. Will try running taking the cpu out, though selecting the gpu as a platform I already tried and didnt work.

I did notice the provided header CL/cl.hpp has some differences from the opencl_sdk header

m8pple commented 6 years ago

BTW: I didn't have any better ideas, on this - it looked like an Intel driver bug.