cl.h not found compile error

cl.h not found compile error

Portrait de abbybaby

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

 

 

 

 

 

6 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Yuri Kulakov (Intel)

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

Portrait de abbybaby

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

 

 

Portrait de Raghu Muthyalampalli (Intel)

Hi Preethi,

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

Raghu

Portrait de abbybaby

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

Portrait de Raghu Muthyalampalli (Intel)

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

Raghu

Connectez-vous pour laisser un commentaire.