[Mono-list] Mono freezes when used along with OpenCL

danvil davidw at danvil.de
Sat Sep 4 11:06:01 EDT 2010


Hello,

I am writing a program with Mono 2.4 (also tested it with Mono 2.6.7) which
opens an OpenGL window and loads a C/C++ library via P/Invoke. Inside this
library I create an OpenCL context and compile a kernel. When this is done,
after ca. 1 second the mono program freezes. It does not freeze if I only
create an OpenCL command queue, but only if I also compile a kernel. I did
not called the kernel yet however.

The OpenCL code library works perfectly when used from a C/C++ program. And
the Mono program works perfectly if I use another library instead which
performs the same tasks, but uses only the CPU.

I also tried something else which yields the same problem: Having a C++
program which opens an OpenCL window and loads my C/C++ library using
OpenCL. Additionally (afterwards) I call a simple Mono function from C++
(like explained on the mono pages). This Mono function only has an infinite
loop printing numbers, and freezes after ca 1 second. Again if I do not
compile kernels, the program does not appear.

Are there any potential downfalls or problems when using Mono together with
a C/C++ library using OpenCL?

Regards,
David

-- 
View this message in context: http://mono.1490590.n4.nabble.com/Mono-freezes-when-used-along-with-OpenCL-tp2526766p2526766.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list