1 Reply Latest reply on Sep 26, 2016 4:53 AM by dipak

    General purpose computing using OpenCL with Radeon R5 M330 on Ubuntu 16.04.1 LTS (64-bit): Error: clGetPlatformIDs(-1001)

    kkmtech

      Hi, I have the Radeon R5 M330 GPU with Intel core i5-5200U CPU in my Lenovo G50-80 notebook. The OS is Ubuntu 16.04.1 LTS (64-bit).

      I wish to utilize my Radeon for computational purposes only on Ubuntu and am not bothered with graphics/gaming. I have installed both the AMDAPPSDK-3.0 for AMD’s OpenCL driver support and Intel’s OpenCL SDK.

       

      lspci successfully recognizes the GPU:

      04:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] (rev ff)


      I was able to successfully compile my OpenCL program (the host routines are in C++) with both AMD’s and Intel’s OpenCL libraries SEPARATELY. However, on executing both these versions (even with sudo), I get the following error message:

      Error: clGetPlatformIDs(-1001)

       

      On running clinfo as sudo in /opt/AMDAPPSDK-3.0/bin/x86_64, I get the following message:

      terminate called after throwing an instance of 'cl::Error'

      what(): clGetPlatformIDs

      Aborted (core dumped)

       

      I am unable to find any specific help on the internet with this issue, as they are mostly windows-based like the following one: https://community.amd.com/message/1103301

       

      Also, as this is an AMD developers’ forum, let me reiterate that I am NOT seeking help for my Intel version: I just wanted to state the bare facts. I would really like to use my Radeon’s 320 cores to accelerate my embarrasingly parallel application and any kind of help will be greatly appreciated.

        • Re: General purpose computing using OpenCL with Radeon R5 M330 on Ubuntu 16.04.1 LTS (64-bit): Error: clGetPlatformIDs(-1001)
          dipak

          Hi Krishna,

           

          -1001 means CL_PLATFORM_NOT_FOUND_KHR. So, it seems that the ICD loader is unable to find any platform on your setup. Actually, on Linux, the ICD loader scans the files in the path /etc/OpenCL/vendors to find vendor specific ICDs and libraries. For example, if the following file exists /etc/OpenCL/vendors/VendorA.icd and contains the text libVendorAOpenCL.so then the ICD Loader will load the library "libVendorAOpenCL.so". So, please make sure vendor specific ICDs are there and those are pointing to right library paths. [ For more details, please check cl_khr_icd ]

          It may be an installation issue. So, I would suggest to install one SDK at a time and check whether everything is working fine. Then install another one and check the overall setup.

           

          P.S. AMD APP SDK can be used to access the Intel CPUs as well.

           

          Regards,