I Hi,
I'm running some OpenCL code from a simple application and all is fine. But when I run it in a more complex one, that launch several threads:
1 - the compilation failed
2 - I just got the following message "Compilation failed" !
My soft is a simple .NET soft using "OpenTk" and "Cloo", it sounds that it is not doing anything special... just some calls...
...
clCreateContextFromType...
clCreateProgramWithSource...
clBuildProgram...
Then I got a compilation problem !
from where you are getting "compilation failed" message?
is it coming form clBuildProgram? could you please post your code?
Hum,
Just after,
I receive an error code : -11
And then I call clclGetProgramBuildInfo
Thx
is clGetProgramBuildInfo not returning any error message?
could you please post your kernel code?
Yes,
clclGetProgramBuildInfo returns "Compilation failed".
Here is my CL code :
kernel void intersect(
float4 dir,
global float4 * points,
global float * hits,
global float * us,
global float * vs)
{
int index = get_global_id(0);
hits[index] = -1;
float4 EdgeAB = points[1] - points[0];
float4 EdgeAC = points[2] - points[0];
float4 Normal = normalize( cross( EdgeAB, EdgeAC ) );
float dotABAB = dot( EdgeAB, EdgeAB );
float dotABAC = dot( EdgeAB, EdgeAC );
float dotACAC = dot( EdgeAC, EdgeAC );
float Denominator = dotABAC * dotABAC - dotABAB * dotACAC;
if( Denominator == 0 ) return;
// cosine between ray direction and triangle normal
float cosDirNorm = dot( dir, Normal );
// backface culling
if( cosDirNorm >= 0 ) return;
// distance from eye
float distance = dot( points[0], Normal ) / cosDirNorm;
// intersection behind camera
if( distance < 0 ) return;
float4 point = distance * dir;
float4 w = point - points[0];
float uw = dot( EdgeAB, w );
float vw = dot( EdgeAC, w );
float s = ( dotABAC * vw - dotACAC * uw ) / Denominator;
if( s < 0 ) return;
float t = ( dotABAC * uw - dotABAB * vw ) / Denominator;
if( t < 0 ) return;
if( ( s + t ) > 1 ) return;
//!!!!found intersection!!!!
hits[ index ] = distance;
us[ index ] = s;
vs[ index ] = t;
}
we are able to compile your kernel without any error.
could you please post your runtime code?
Yes,
Mee to, I'm able to compile it from a "simple" application.
It sounds that the problem come from the fact that my application is a WPF application.
It is a C# application, if you want I can provide you a small sample ?
Thanks
I have do a sample application... you can send me an email at viewon01@viewon.tv , I will send you the ZIP file.
Regards
Viewon01,
are you using C# binding? if you are using C# binding, it is not the best place for you queries. OpenTK people can help you well.
Thanks,
But it is not a "bidding" problem, we simple call the "dll" functions !
So, it sounds that there are interference between OpenCL and .NET WPF application. I know that WPF is used the "DirectX shader"... maybe the problem reside there, but I can't debug this !
Also,
I have do a post at : http://www.opentk.com/node/1430#comment-7620
But when I debug, we're doing nothing special ! I think that the problem occur in the OpenCL dll and not somewhere else !
So, how can I debug this problem 😞
Originally posted by: viewon01 Also,
I have do a post at : http://www.opentk.com/node/1430#comment-7620
But when I debug, we're doing nothing special ! I think that the problem occur in the OpenCL dll and not somewhere else !
So, how can I debug this problem 😞
debugging OpenCL.dll is not allowed. we have passed user code to developers. we will get back to you as early as possible.
Thanks a lot for your great support.
So, I'll wait for your feddback with impatience 🙂
Hi,
I have do a test with another OpenCL implementation (NVidia) and it works fine.
With the AMD version is run correctly if I create a "command line" version of my version... of course it is not acceptable but useful to debug.
Is there any way I can help you ?
Thanks
Originally posted by: viewon01 Hi,
I have do a test with another OpenCL implementation (NVidia) and it works fine.
With the AMD version is run correctly if I create a "command line" version of my version... of course it is not acceptable but useful to debug.
Is there any way I can help you ?
Thanks
I suspect that there could be issue with your GUI code because It works fine with console version.
I use WPF (the new presentation framework of Microsoft) and it sounds that the AMD/OpenCL interfere with WPF !
I have try with a simple test app and got the same problem... just create a window and try to build it !
So... the only way to correct this is to debug directly on your implementation... I can provide you a "sample" test program if you want ?
Like this you will be able to debug the problem ?
Originally posted by: viewon01 I use WPF (the new presentation framework of Microsoft) and it sounds that the AMD/OpenCL interfere with WPF !
I have try with a simple test app and got the same problem... just create a window and try to build it !
So... the only way to correct this is to debug directly on your implementation... I can provide you a "sample" test program if you want ?
Like this you will be able to debug the problem ?
Please send us simple test case and .exe also. I was not able to open your previous WPF project from my Visual studio. atleast i can use your exe to reproduce the problem.
Thanks a lot,
I have create a sample and an .exe file. How can I send it ?
Thanks for your help
viewon01 send your test case to this mail id
ther; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin;} a:link, span.MsoHyperlink {mso-style-noshow:yes; mso-style-priority:99; color:#009966; mso-text-animation:none; text-decoration:none; text-underline:none; text-decoration:none; text-line-through:none;} a:visited, span.MsoHyperlinkFollowed {mso-style-noshow:yes; mso-style-priority:99; colorurple; mso-themecolor:followedhyperlink; text-decoration:underline; text-underline:single;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> streamdeveloper@amd.com
Please send us details to reproduce this issue and also mension your system details(OS, devices, software tools).
I have the same problem
chm289,
Can you share the driver details and platform information?
Also, Sample code would be of help.
Thanks,