8 Replies Latest reply on Apr 30, 2013 7:03 AM by himanshu.gautam

    OpenCL Requirements for Newbies on Linux

    kjo

      Hi Guys,

       

      I am totally new to OpenCL and GPU Programming. I am working on my Thesis which is Ray Tracing with GLSL and OpenCL. I also want to realise this project with Qt in C/C++. I tried some OpenCL Tutorials on my Laptop with Win 7 but somehow it never worked under Visual Studio, even after visiting different forums. Another Problem is also that under Windows the interoperability between OpenCL and GLSL in Qt doesn't work. Thats why i am changing my operating system to linux and i heard that developing under linux is easier. My Laptop uses two GPUs, the Intel GPU and a ATI Mobility Radeon HD 5650. Under Windows it is always switching between them when the power cable is connected or not. So here is my question. Can Somebody recommend me something like a development requirement for my Project? I mean, what kind of drivers should i use or is there a possibility that in linux i can still switch between those two GPU or do i have to choose my primary GPU? What kind of Linux Distribution should i take? I am asking these kind of Questions because i am really frustrated that not even some OpenCL Tutorials doesn't work after 2-3 Weeks of Research on my Laptop.

       

      Thanks beforehand.

        • Re: OpenCL Requirements for Newbies on Linux
          nou

          I don't think that Qt is problem under windows but switchable graphics. I did OpenGL/OpenCL interoperability under Windows and Linux. AFAIK Linux can't switch between graphics without reboot. I recommend choosing some from supported distro which are RedHat, SUSE, OpenSUSE or Ubuntu.

          1 of 1 people found this helpful
            • Re: OpenCL Requirements for Newbies on Linux
              kjo

              First of all thanks, that was a help. Second, what do you mean with 'AFAIK' ? I also read that linux can't switch between graphics without rebooting. I chose ubuntu as my linux distribution know, so know i am trying to get the drivers right. But i think i said it wrong, i didn't mean that the interoperability between OpenCL/OpenGL under Qt under windows isn't working. I meant it isn't working with the Qt Creator under Windows. And i want to use the Qt Creator. Or do you have a different experience about that too?

            • Re: OpenCL Requirements for Newbies on Linux
              himanshu.gautam

              HI kjo,

              Switchable graphics between intel and AMD GPU itself sounds doubtful.  Probably you should contact your laptop manufacturer.

               

              One suggestion I have is to check the BIOS settings, and try selecting PCI GPU as the primary graphics/video adapter. If you are interested in development on AMD platform, Install latest Catalyst Driver, and AMD APP SDK.

               

              Also try getting just OpenCL work, before diving into CL_GL Interop. Just try keeping the number of variables low. Can you tell what tutorials you tried that did not work for you?

              1 of 1 people found this helpful
                • Re: OpenCL Requirements for Newbies on Linux
                  kjo

                  hi himanshu,

                   

                  Well i tried the first Hello World example from the the Book OpenCL Programming Guide and some different Tutorials on the web, but i dont know which anymore. The Hello World from the book, it worked under Windows with an Nvidia card, I think it was the GTX 560, on a Desktop PC. But the problem is, it isn't my PC. I installed Linux on my Laptop and i switched under BIOS to the ATI Graphics Card. I am still setting up my Linux Desktop and installing the Drivers, so i will tell you more when i finished setting up my environment.

                • Re: OpenCL Requirements for Newbies on Linux
                  kjo

                  I finished setting up my Environment, I am using now ubuntu 12.10, with qt5 and qtcreator 2.7.0. So i tried again the HelloWorld File from the OpenCL Programming Guide book under QtCreator, building went fine, but when i started the project it said "Failed to find any OpenCL platforms" and "Failed to create OpenCL Context". So does it mean i can't use OpenCL on my Graphics card, even if my Mobility Radeon HD 5650 supports OpenCL ? I Attached the HelloWorld.cpp from the book.

                  • Re: OpenCL Requirements for Newbies on Linux
                    kjo

                    So after i installed some drivers from the amd website, i crushed my whole ubuntu, which was Xubuntu. Now i installed it again, Ubuntu 12.04. Installed the fglrx drivers which ubuntu offered me. I installed the newest AMD APP SDK 2.8 and installed Qt 5.0.2. After some linking problems in the Code. Everything went fine. My Hello World example ist now working. So like you said himanshu, the driver for the notebook wasn't installed properly yet. Now everything is working and thank for all your help.

                     

                    Regards

                    kjo