7 Replies Latest reply on May 9, 2011 6:41 AM by ritesh.india

    Need help: Shifting from CUDA to OpenCL

    ritesh.india
      Platform::get() failed (-1001), tried forum suggestions but still having the same problem

      Hi

      Now that I am convinced  investing time in OpenCL is going to pay, just running my first program from APP SDK 2.4(on RHEL 5.5).  

      1- I have installed SDK in /root/AMD


      2- The icd-registration is unzipped in/etc:

      Here are the contents of icd-registration:
       
      [root@localhost /]# cd  etc/OpenCL/vendors
      [root@localhost vendors]# ls
      atiocl32.icd  atiocl64.icd


      3-  The exports are like this:

       i) export AMDAPPSDKSAMPLESROOT=/root/AMD/AMD-APP-SDK-v2.4-lnx32


      ii) export AMDAPPSDKROOT=/root/AMD/AMD-APP-SDK-v2.4-lnx32

      iii) export LD_LIBRARY_PATH=$AMDAPPSDKROOT/lib/x86


      Additional Information:

      [root@localhost x86]# ldd $AMDAPPSDKROOT/lib/x86/libamdocl32.so
              linux-gate.so.1 =>  (0x002a7000)
              libGL.so.1 => /usr/lib/libGL.so.1 (0x008d4000)
              libX11.so.6 => /usr/lib/libX11.so.6 (0x00110000)
              libpthread.so.0 => /lib/libpthread.so.0 (0x00213000)
              libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x002a8000)
              librt.so.1 => /lib/librt.so.1 (0x0022b000)
              libdl.so.2 => /lib/libdl.so.2 (0x00234000)
              libm.so.6 => /lib/libm.so.6 (0x00238000)
              libc.so.6 => /lib/libc.so.6 (0x004eb000)
              /lib/ld-linux.so.2 (0x00bba000)
              libXext.so.6 => /usr/lib/libXext.so.6 (0x0025f000)
              libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0026f000)
              libXau.so.6 => /usr/lib/libXau.so.6 (0x008a6000)
              libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0027b000)


      This shows no " not found". This is explained here: http://forums.amd.com/devforum/messageview.cfm?catid=390&threadid=147002&highlight_key=y
       


      When I run the binary I get the error:

       
      [root@localhost x86]# ./HelloCL
      HelloCL!
      Getting Platform Information
      Platform::get() failed (-1001)

      [root@localhost x86]# ./clinfo
      terminate called after throwing an instance of 'cl::Error'
        what():  clGetPlatformIDs
      Aborted

      Any Idea why this is happening?


      Thanks in advance,

      Ritesh