cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

IRSA
Journeyman III

clCreateContextFromType error

InitCL, error

Hi, everybody:

My grahpics card is ATI Radeon HD 4670?when I  ran the sample "Image Convolution Using OpenCL -A Step-by-Step Tutorial" downloaded in this web, an error occured when going to the InitCL function,error message is:

   err {err_=-32 errStr_=0x0047e648 "clCreateContextFromType" } cl::Error

. And for CL_DEVICE_TYPE_CPU and CL_DEVICE_TYPE_GPU, the same error.

What's the problem?

Thanks! 


 

0 Likes
11 Replies
nou
Exemplar

you must specify platform when you create context. http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=71

0 Likes
IRSA
Journeyman III

Thanks for reply!

And now I updated the driver to Catalyst Software Suite 10.1, and then I ran the SDK v2 Samples "HelloCL" project,  when I changed the CL_DEVICE_TYPE_CPU to CL_DEVICE_TYPE_GPU, an error still occured:

  Context::Context() failed (-1).

  What's the problem?

SO I want to know if this version of OpenCL supports the GPU implementation?  

Thanks a lot!

0 Likes

-1 mean CL_DEVICE_NOT_FOUND. try run CLInfo sample and FindNumDevices from cal samples.

0 Likes
IRSA
Journeyman III

Hi, I run the ClInfo sample, the result is:
Number of platforms:  1

Plaform Profile:       FUll_PROFILE

Plaform Version:     OpenCL 1.0 ATI-Stream-v2.0.0

Plaform Name:       ATI Stream

Plaform Vendor:   Advanced Micro Devices, Inc.  

Plaform Name:          ATI Stream

Number of devices:    1
Device Type:          CL_DEVICE_TYPE_CPU

Device ID:              4

----

----

Platform ID:  00B51434

Name: Intel(R) Core(TM)2 Quad CPU

Vendor:  GenuineIntel

 

SO, what's the problem?

Thanks a lot!

 

0 Likes

problem is that it find only one device and that is your CPU. so when you change to GPU it can not find and print error.

try reinstall catalyst. and use some driver sweper.

0 Likes
IRSA
Journeyman III

Thanks, Problem solved.

0 Likes

Hi, everybody:

I have similar problem. I am trying to run sample program of ATI Stream SDK on Windows 7. I also installed ATI catalyst 10.2. But when I run the program following error message appear:

CL_DEVICE_NOT_FOUND

Moreover, when I run CLinfo

Number of platforms:                             1
  Plaform Profile:                               FULL_PROFILE
  Plaform Version:                               OpenCL 1.0 ATI-Stream-v2.0.1
  Plaform Name:                                  ATI Stream
  Plaform Vendor:                                Advanced Micro Devices, Inc.
  Plaform Extensions:                    cl_khr_icd


  Plaform Name:                                  ATI Stream
Number of devices:                               1
  Device Type:                                   CL_DEVICE_TYPE_CPU
  Device ID:                                     4098
  Max compute units:                             4
  Max work items dimensions:                     3
    Max work items[0]:                           1024
    Max work items[1]:                           1024
    Max work items[2]:                           1024
  Max work group size:                           1024
  Preferred vector width char:                   16
  Preferred vector width short:                  8
  Preferred vector width int:                    4
  Preferred vector width long:                   2
  Preferred vector width float:                  4
  Preferred vector width double:                 0
  Max clock frequency:                           2127Mhz
  Address bits:                                  32
  Max memeory allocation:                        536870912
  Image support:                                 No
  Max size of kernel argument:                   4096
  Alignment (bits) of base address:              32768
  Minimum alignment (bytes) for any datatype:    128
....


    Profiling :                                  Yes
  Platform ID:                                   00D5A434
  Name:                                          Intel(R) Core(TM) i3 CPU
M 330  @ 2.13GHz
  Vendor:                                        GenuineIntel
  Driver version:                                1.0
  Profile:                                       FULL_PROFILE
  Version:                                       OpenCL 1.0 ATI-Stream-v2.0.1
  Extensions:                                    cl_khr_icd cl_khr_global_int32_
base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomic
s cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store

I cannot figure out how to resolve it. Could you please give me any information regarding this?

Thank you.

0 Likes

Which GPU are you using?

0 Likes

Hi:

Intel Graphics Media accelarator HD is  listed as  the display adapter list in the device manager.

And, When I installed the ATI Stream SDK it Said:

The display driver installed on this system does not have OpenCL support for AMD GPUs. If you continue with the current installation, you will still be able to run OpenCL on compatible x86 CPUs. Do you wish to continue?” I Clicked Yes.

So I assaume that the sample program should run at least on CPU. Isn't it?

The code that I tried is the one that basically provided with the ATI Stream SDK, so it was supposed to work at least with CPU.

Thank you.

0 Likes

To run the samples in CPU, use --device cpu option.

0 Likes

Thanks a lot. My problem is solved.

0 Likes