Centos – How to install opencl in CentOS 7 using yum

aptcentosimagemagickyum

I need to install opencl in CentOS 7 nvidia. I already installed cuda. But when I try to install ImageMagick with OpenCL, it is showing CL/cl.h not found. But there are files in

/usr/local/cuda-7.5/include/CL

How to resolve it? Whether OpenCL is installed or not? If it is not installed means how to install it?

I know how to install in Ubuntu.

http://arrayfire.com/opencl-on-intel-hd-iris-graphics-on-linux/

But how to use apt-get in CentOS.

I followed the link

http://everyday-tech.com/apt-get-on-centos/

While doing

yum install apt

it is showing

No package apt available.

So apt-get command instruction steps are not the same in CentOS.

Can someone help me with the installation process using yum?

Best Answer

I found this helpful for installing OpenCL: https://www.centos.org/forums/viewtopic.php?t=63270#p266493

Which led me to run:

$ yum install opencl-headers
$ yum provides '*/libOpenCL.so'
Loaded plugins: priorities, update-motd, upgrade-helper 
epel                                                                                                                                                                              
...
ocl-icd-devel-2.2.12-1.el6.i686 : Development files for ocl-icd
Repo        : epel
Matched from:
Filename    : /usr/lib/libOpenCL.so



ocl-icd-devel-2.2.12-1.el6.x86_64 : Development files for ocl-icd
Repo        : epel
Matched from:
Filename    : /usr/lib64/libOpenCL.so

and thus:

$ sudo yum install ocl-icd

There remains an issue in which you may need to symlink whatever libOpenCL.so you install to /usr/lib/ I think? I was able to solve my installation problem after I ran:

$ sudo ln -s /usr/lib64/libOpenCL.so.1 /usr/lib/libOpenCL.so
Related Question