Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
71 Views

cl.h not found compile error

Hi,

  I have installed the Intel® SDK for OpenCL* Applications XE 2013 R2 on Ubuntu and trying to run the "Platform/Device Capabilities Viewer Sample" program. However on compilation this is the error:  CL/ch.h: No such file or directory.

I have added the installation directory (/opt/intel/opencl-1.2-3.1.1.11385/bin) to both $PATH and $LD_LIBRARY_PATH variables. I also edited the Makefile to include the path to: /opt/intel/opencl-1.2-3.1.1.11385/include. But the error still persists.

Any suggestions welcome.

Thanks,

Preethi

 

 

 

 

 

0 Kudos
5 Replies
Highlighted
Employee
71 Views

Hi Preethi, First of all, I need to mention that this release (XE 2013 R2) is not officialy supported on Ubuntu. You probably followed some home-grown recipes to perform installation (like this one - http://software.intel.com/en-us/forums/topic/475762). Having said that, I think the error looks quite trivial. You should check that the header files are indeed present in the directory that you specified and check that you pass exactly the same path with -I flag in your Makefile. Alternatively you could add this path to CPATH environment variable. Thanks, Yuri
0 Kudos
Highlighted
Beginner
71 Views

Hi Yuri,

 Thanks for your response. I realized that the -l flag in the makefile should point to libOpenCL.so file in /opt/intel/opencl-1.2-3.1.1.11385/lib64 folder. So, adding the path to LD_LIBRARY_PATH variable cleared the compilation error. There was a run time error because it could not recognize the path to the intel.icd file. This post gives a solution to this problem - http://software.intel.com/en-us/forums/topic/390630.
Part of the sample program output is as follows:

CL_DEVICE_TYPE_ACCELERATOR: 0

and

CL_DEVICE_TYPE_CPU[0]
CL_DEVICE_NAME: Intel(R) Core(TM) i3-4340 CPU @ 3.60GHz

Why doesn't it recognize the integrated graphics as the CL_DEVICE_TYPE_ACCELERATOR or CL_DEVICE_TYPE?

Many Thanks,

Preethi

 

 

0 Kudos
Highlighted
71 Views

Hi Preethi,

Only CPU device is supported on Linux for now. That's why you will only see the CL_DEVICE_TYPE_CPU.

Raghu

0 Kudos
Highlighted
Beginner
71 Views

Hi,

  What is the difference between running an opencl program with - CL_DEVICE_TYPE_DEFAULT and CL_DEVICE_TYPE_CPU? I see a difference in real, user and sys time when running the same program but with different device types. The processor is an i3-4340 CPU with integrated graphics HD4600, with no other dedicated graphics card.

Thanks,

Preethi

0 Kudos
Highlighted
71 Views

I think we set GPU as the default device. If you want to target the specific device, just don't use DEFAULT.

Raghu

0 Kudos