2

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?

  • Your link is about an apt repo (apt for rpm) at RPMFORGE mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el7/en/x86_64/… ... with 245 packages , no openCL. ... – Knud Larsen Jun 28 '16 at 15:47
  • ? Have you checked that the headers are present in /usr/local/cuda-7.5/include/CL/ ? – Knud Larsen Jun 28 '16 at 16:18
  • If you're on CentOs you want to be using yum, not apt. Try using yum search and see what packages you can find (e.g. yum search opencl* or yum search ImageMagick*). – tniles Jun 28 '16 at 21:18
1

The cuda opencl should be OK, I think.

Configuring ImageMagick, please try ...

./configure CFLAGS=-I/usr/local/cuda-7.5/include/CL
  • Sorry I am not able to comment @Knud Larsen. It is working. Thank u so much. But still it is showing > checking CL/cl.h usability... yes > checking CL/cl.h presence... no > configure: WARNING: CL/cl.h: accepted by compiler, rejected by the preprocessor! >configure: WARNING: CL/cl.h: proceeding with the compiler's result >checking for CL/cl.h... yes What does this mean? Will it work or not? – user177257 Jun 29 '16 at 4:55
  • @user177257 If this answer solved your issue, please take a moment and accept it by clicking on the check mark to the left. That will mark the question as answered and is the way thanks are expressed on the Stack Exchange sites. If you have another question, pelase ask it separately. – terdon Jun 29 '16 at 8:58
1

Enable epel 7 repo and

yum install opencl-headers

About apt from rpmforge is apt-rpm which be able to install rpms from apt repos and haven't much success. I don't see how that could be useful for you .

The apt-get , as debian do , exist in my copr for example , but apt install won't work because apt database haven't any package , and you will have unmet dependencies ... and more reasons

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.