cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

slefevre
Journeyman III

OpenCL installed but won't run anything

I'm learning about OpenCL and crypto currencies and trying to setup a system to learn on.

I'm using Ubuntu 12.04 x64 with the AMD Catalyst Drivers 13.1 installed and AMD APP SDK 2.8 installed with an ATI Radeon HD 6350 w/ 1GB RAM.  I can run 'clinfo' and it shows the GPU and CPU are available.

To test OpenCL, I found this wiki page ( OpenCLHowTo - Andreas Klöckner's wiki ) and downloaded the code and built the samples cleanly.  From this I get:

$ ./print-devices

platform 0: vendor 'Advanced Micro Devices, Inc.'

  device 0: 'Cedar'

  device 1: 'Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz'

So this and clinfo, it all looks good.

I then run the demo.

$ ./cl-demo 1000000 10

Choose platform:

[0] Advanced Micro Devices, Inc.

Enter choice: 0

Choose device:

[0] Cedar

[1] Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz

Enter choice: 0

---------------------------------------------------------------------

NAME: Cedar

VENDOR: Advanced Micro Devices, Inc.

PROFILE: FULL_PROFILE

VERSION: OpenCL 1.2 AMD-APP (1214.3)

EXTENSIONS: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_amd_image2d_from_buffer_read_only

DRIVER_VERSION: 1214.3

Type: GPU

EXECUTION_CAPABILITIES: Kernel

GLOBAL_MEM_CACHE_TYPE: None (0)

CL_DEVICE_LOCAL_MEM_TYPE: Local (1)

SINGLE_FP_CONFIG: 0x3e

QUEUE_PROPERTIES: 0x2

VENDOR_ID: 4098

MAX_COMPUTE_UNITS: 2

MAX_WORK_ITEM_DIMENSIONS: 3

MAX_WORK_GROUP_SIZE: 128

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: 650

ADDRESS_BITS: 32

MAX_MEM_ALLOC_SIZE: 134217728

IMAGE_SUPPORT: 1

MAX_READ_IMAGE_ARGS: 128

MAX_WRITE_IMAGE_ARGS: 8

IMAGE2D_MAX_WIDTH: 16384

IMAGE2D_MAX_HEIGHT: 16384

IMAGE3D_MAX_WIDTH: 2048

IMAGE3D_MAX_HEIGHT: 2048

IMAGE3D_MAX_DEPTH: 2048

MAX_SAMPLERS: 16

MAX_PARAMETER_SIZE: 1024

MEM_BASE_ADDR_ALIGN: 2048

MIN_DATA_TYPE_ALIGN_SIZE: 128

GLOBAL_MEM_CACHELINE_SIZE: 0

GLOBAL_MEM_CACHE_SIZE: 0

GLOBAL_MEM_SIZE: 536870912

MAX_CONSTANT_BUFFER_SIZE: 65536

MAX_CONSTANT_ARGS: 8

LOCAL_MEM_SIZE: 32768

ERROR_CORRECTION_SUPPORT: 0

PROFILING_TIMER_RESOLUTION: 1

ENDIAN_LITTLE: 1

AVAILABLE: 1

COMPILER_AVAILABLE: 1

MAX_WORK_GROUP_SIZES: 128 128 128

---------------------------------------------------------------------

*** build of 'sum' on 'Cedar' said:

"/tmp/OCLUCIPUW.cl", line 1: error: can't enable all OpenCL extensions or

          unrecognized OpenCL extension

  #pragma OPENCL EXTENSION cl_khr_fp64: enable

                           ^

"/tmp/OCLUCIPUW.cl", line 4: error: identifier "double" is undefined

      __global const double *a,

                     ^

"/tmp/OCLUCIPUW.cl", line 5: error: identifier "double" is undefined

      __global const double *b,

                     ^

"/tmp/OCLUCIPUW.cl", line 6: error: identifier "double" is undefined

      __global double *c,

               ^

4 errors detected in the compilation of "/tmp/OCLUCIPUW.cl".

Frontend phase failed compilation.

*** (end of message)

*** 'clBuildProgram' in 'cl-helper.c' on line 470 failed with error 'build program failure'.

Aborted (core dumped)

So that ain't good.  I can run the demo just fine if I select the CPU.

Also, I've tried a crypto miner (bfgminer) that utilizes OpenCL/GPU and I'm getting know where with that either.  When it runs, I get a error of:

OCL 0 failure, attempting to reinitialize

Error -55: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)

OCL 0 failure, disabling!

OCL 0 being disabled

Attempting to reinitialize OCL 0

OCL 0 being re-enabled

Error -55: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)

OCL 0 failure, disabling!

OCL 0 being disabled

Attempting to reinitialize OCL 0

So it appears that the various tools see OpenCL is available on the GPU but when I try run anything on it I get errors.

What am I missing?

0 Likes
Reply
1 Reply
himanshu_gautam
Grandmaster

Re: OpenCL installed but won't run anything

Hi

The extenstion cl_khr_fp64 is not supported here, you can check this with clinfo.

double precision storage is not supported . Check the the opencl 1.2 spec.

0 Likes
Reply