4 Replies Latest reply on Jan 5, 2011 6:31 PM by hd

    Aparapi not working with GPU

    hd

      Hello,

      Im trying to use Aparapi, but when im testing it with some simple kernels, aparapi always execute the Kernels in Java Thread Pool mode, when i use  kernel.setExecutionMode(EXECUTION_MODE.GPU); it gives me an Exception

      "Exception in thread "main" java.lang.UnsatisfiedLinkError: com.amd.aparapi.KernelRunner.initJNI(Lcom/amd/aparapi/Kernel;ZJ)J"

      SKD is installed and all the samples are running. Im using Ubuntu 64 bits with mobility 5650.  Any ideas ?

      Is there any way to see if my GPU is beeing detected by aparapi ?

        • Aparapi not working with GPU
          gfrostamd

          @hd

          To execute on the GPU (or indeed OpenCL on the CPU) we need to set the LD_LIBRARY_PATH to include the libaparapi.so (for your x86/x64 Linux) and also you will need the opencl libs in your path.

          Take a look at the .sh files that are shipped with the two Aparapi samples. 

          Do you get the same error when running the samples that came with Aparapi? 

           

            • Aparapi not working with GPU
              hd

              Hello, i just tested the samples that shipped with aparapi with Eclipse using Windows 7 64. SDK is installed and opencl is working. But i get exactly the same Exception. Any ideas ?

              I tested the samples with eclipse, they only run in JTP mode.

                • Aparapi not working with GPU
                  gfrostamd

                  In eclipse you will have to ensure that the directory including your aparapi.so/dll and the directories containing your opencl.so/dll and bin are in your path when eclipse runs your sample.

                  The .bat file in the sample dir does this for you, but you will need to do this yourself for eclipse.  Can you confirm whether the bat files supplied with the samples work for you?

                  To make this work in eclipse look for the 'Environment' tab in your 'Run configuration' and add an entrye for a 'PATH' variable.

                  So your PATH will need to be something like 

                  C:\Program Files\ATI Stream\lib\x86;C:\Program Files\ATI Stream\bin\x86;C:\aparapi-Windows-x86\

                   

                    • Aparapi not working with GPU
                      hd

                      Its now working in Linux, had to change the script, the line that refers to java path was not the correct line for Ubuntu.

                      With windows the bat file gives me an PATH error.

                       

                      Only need to make it work with ecplise. Its giving me the same error.

                       

                      Thanks alot for your help gfrostamd