Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling an OpenCL program using a CL/cl.h file

Tags:

gpu

opencl

I have sample "Hello, World!" code from the net and I want to run it on the GPU on my university's server. When I type "gcc main.c," it responds with:

CL/cl.h: No such file or directory

What should I do? How can I have this header file?

like image 764
sandra Avatar asked Jan 23 '14 07:01

sandra


1 Answers

Are you using Ubuntu or Debian distro? Then you could use this package to solve the problem with missing header file:

apt-get install opencl-headers

You must install opencl library to solve linking issues using that Debian and Ubuntu package:

apt-get install ocl-icd-libopencl1

You can also use these nonfree libraries: nvidia-libopencl1 (Debian) or nvidia-libopencl1-xx (Ubuntu).

like image 104
OscarGarcia Avatar answered Sep 18 '22 21:09

OscarGarcia