cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Paolo88
Journeyman III

error CL_INVALID_PLATFORM in clGetDeviceIds on Ubuntu 9.10

On Ubuntu 9.10, the call clGetDeviceIDs returns the error CL_INVALID_PLATFORM when the platform should be valid

Hi to everyone,

I installed the OpenCL deb packages on ubuntu 9.10 and I compiled a simple OpenCL code (sum of two arrays... classic).

I'm working without any ATI card only on the CPU.

As the ATI requirements say, the only CPU requirement is x86 CPU with SSE3.x., so I should be able to work on one that supports SSE3.x

I'm actually working on a Pentium D 805 (2.66 Ghz) and, as wiki says, it does support SSe3.x ( http://en.wikipedia.org/wiki/Pentium_D#Smithfield ).

 

I know this computer is bad, but I use it only to try OpenCL on a different OS; normally I work on Snow Leopard on a MacBook.

 

Now, I would like to know why I have this error, if somebody knows.

Thanks in advance to everyone and sorry for my english but I'm italian ( 🙂 ).

Regards, Paolo

 

 

0 Likes
5 Replies
nou
Exemplar

did you pass proper platform into clGetDeviceIDs()?

try run some examples from SDK.

0 Likes

No, I use the right arguments.

 

Here is the code (only a little portion)

 

cl_device_id cpu = NULL, device = NULL;

  cl_int err = 0;

......


    // Find the CPU CL device
    err = clGetDeviceIDs(NULL, CL_DEVICE_TYPE_CPU, 1, &cpu, NULL);

assert(err == CL_SUCCESS);

 

ad here it fails, at this assert.

err is CL_INVALID_PLATFORM and I don't understand where this error comes from.

0 Likes

Also, in the previous beta releases of the ATI Stream SDK v2.0, the clGetDeviceIDs()
function accepted NULL as a platform ID. This is no longer supported.

 

ehm... You are right.... Sorry I didn't see it. I'm abituated with OpenCL on Mac. I have to pay more attention on these things.

and now... IT WORKS!!!!

 

Thank you very much. You deserved a 10 score for this.

0 Likes

Originally posted by: Paolo88 Also, in the previous beta releases of the ATI Stream SDK v2.0, the clGetDeviceIDs() function accepted NULL as a platform ID. This is no longer supported.

 

 

ehm... You are right.... Sorry I didn't see it. I'm abituated with OpenCL on Mac. I have to pay more attention on these things.

 

and now... IT WORKS!!!!

 

 

Thank you very much. You deserved a 10 score for this.



I agree with you, nou is great

0 Likes