[SOLVED] openCL with AMD HD 7770 ?

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED] openCL with AMD HD 7770 ?

Postby hansmicheelsen » Dec 15th, '17, 23:01

Hi, I I'm interested in experimenting with OpenCL. But cannot get it to work. I have this test program which should tell me which Platform I have. But it return "No platform found...". Does anyone know how to setup OpenCL on Mageia?
Is it at all possible to get it working with RadeonSi. Most of the info I find is on Nvidea.

To your info I'm running Cauldron, but I think this question is more related to setup than to Mga version.

Code: Select all
#include <iostream>
#include <vector>
#include <CL/cl.hpp>

using namespace std;

int main(int argc, char** argv) {
    std::vector<cl::Platform> all_platforms;
    cl::Platform::get(&all_platforms);

    if (all_platforms.size() == 0) {
        std::cout << " No platforms found. Check OpenCL installation!\n";
        exit(1);
    }
    cl::Platform default_platform = all_platforms[0];
    std::cout << "Using platform: " << default_platform.getInfo<CL_PLATFORM_NAME>() << "\n";

    return 0;
}
Last edited by hansmicheelsen on Dec 16th, '17, 12:01, edited 2 times in total.
hansmicheelsen
 
Posts: 55
Joined: Apr 12th, '13, 18:19

Re: openCL with AMD HD 7770 ?

Postby doktor5000 » Dec 16th, '17, 00:34

It might help if you would at least mention what graphics driver you're using and what steps you took to configure OpenCL yet.

If you don't have the AMD SDK installed then you could grab clinfo somewhere and run that, it will possibly output the same which indicates there's something missing on your system.
I believe the problem is that we don't ship the fglrx driver for mga6 as it hasn't been updated for the most recent X server versions, so you would have to install it manually.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: openCL with AMD HD 7770 ?

Postby hansmicheelsen » Dec 16th, '17, 01:16

Sorry for not being precise. I have installed mesa-17.3.0-1.mga7 and lib64opencl1-2.2.11-1.mga6 inclusive their develop packages. And all available mesa packages except osmesa

The clinfo code starts with exactly the same check (although in c instead of c++). And responds with "Number of platforms 0"

Blast, I thought opencl support came with mesa and the lib64opencl1. Does it work on nvidea on Mageia?
hansmicheelsen
 
Posts: 55
Joined: Apr 12th, '13, 18:19

Re: openCL with AMD HD 7770 ?

Postby doktor5000 » Dec 16th, '17, 03:09

Yes, there's at least one thread here where people got it to work with nvidia, see e.g. viewtopic.php?f=15&t=8711

And I believe up to mga5 you could install fglrx-opencl which is the same as if you install the proprietary AMD driver manually plus the necessary opencl stuff for it, I believe.

Regarding libopencl, you may want to read it's man page.
libOpenCL.so is the library linked by OpenCL programs. It does not contains any OpenCL implementation itself, but merly act as a dispatcher to real OpenCL implementations provided as OpenCL Installable Client Driver (ICD). An ICD loader should be able to load ICDs provided by any vendors.


For a general overview, you may also want to look at e.g. https://wiki.tiker.net/OpenCLHowTo
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: openCL with AMD HD 7770 ?

Postby hansmicheelsen » Dec 16th, '17, 11:53

That helped.
I downloaded the latest (15.302) fglrx from AMD and followed instructions in https://wiki.tiker.net/OpenCLHowTo very carefully.
And now I get tons of information from clinfo. I have attached the output if someone would like to see it

So now its time to do some experiments with OpenCL. I found a tutorial here: http://simpleopencl.blogspot.dk/2013/06/tutorial-simple-start-with-opencl-and-c.html

Alas, BOINC says "No usable GPU's found". But that's another story. I'll close this thread with [SOLVED]


Thank you doctor5000. You are truly amazing. You have helped me and many other mga-users so many times. Thank you very much!

Yours sincerely
Hans Micheelsen
Attachments
clinfo.txt
(7.61 KiB) Downloaded 276 times
hansmicheelsen
 
Posts: 55
Joined: Apr 12th, '13, 18:19

Re: [SOLVED] openCL with AMD HD 7770 ?

Postby hansmicheelsen » Dec 16th, '17, 12:04

... and the little tutorial program from http://simpleopencl.blogspot.dk/2013/06/tutorial-simple-start-with-opencl-and-c.html, which adds two vector, works!! Cool!
hansmicheelsen
 
Posts: 55
Joined: Apr 12th, '13, 18:19


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest