OpenCL problems on Win7 with MinGW64

asked 2013-11-21 20:38:44 -0600

tksharpless gravatar image

My platform is a Clevo P170HM with nVidia GTX460M running Windows 7. I build a lot of open s/w with MinGW64, most recently OpenCV. CUDA is only feasible with MSVC, so I asked for OpenCL and got a build with no errors. But it won't run a simple hello world: at the first ocl call (doesn't seem to matter which) I get "invalid parameter passed to C function", apparently from nVidia's nvopencl.dll, which gdb reports as having been loaded and then unloaded during the execution of that line. Moreover test_ocl and perf_ocl report nothing but failures, mostly "C++ exception with description "C:\Users\Public\3DSoftware\opencv-2.4.7\opencv\s ources\modules\ocl\src\cl_context.cpp:551: error: (-215) currentContext != NULL in function getContext" thrown in the test body"

I did have both Intel's and AMD's OpenCL SDKs installed (wrongly, as I now suppose) when the build was configured. I have since uninstalled those and re-installed the nVidia driver (which includes their OpenCL support). Then re-run Cmake from scratch, and in modules/ocl in the build tree, make clean; make. That remade a lot of opencv, maybe all of it. But the test pgms still fail the same way, and my hello world still gets the same error.

Any suggestions?

edit retag flag offensive close merge delete

Comments

RESOLVED by updating display driver. Did not want to do that because my machine has occasional display driver crashes, more often with newer drivers. But opencv-ocl evidently needs OpenCL support beyond what the old driver provided. So i shall just have to live with more crashes for the duration of this project -- or move it to a different machine.

tksharpless gravatar imagetksharpless ( 2013-11-23 09:53:46 -0600 )edit