javamacosgpuopenclaparapi

Error: "UnsatisfedLinkError: com.aparapi.internal.jni.OPENCLJNI.getPlatforms()" JNI configuration


I would try to execute an example script based on Aparapi, on MAC OS. I'm using the last version of Eclipse, but when I execute DeviceInfo example to get all the available devices:

public class DeviceInfo {
    public static void main(String[] args) {
        KernelPreferences preferences = KernelManager.instance().getDefaultPreferences();
        System.out.println("-- Devices in preferred order --");
        for (Device device : preferences.getPreferredDevices(null)) {
            System.out.println(device);
        }
    }
}

it generates the

java.lang.UnsatisfiedLinkError: com.amd.aparapi.OpenCLJNI.getPlatforms()Ljava/util/List"

Is there someone who can help me?


Solution

  • Despite macOS Mojave 10.14.4 don't support directly OpenCL, I've executed Aparapi Framework.

    I founded that the problem is the Aparapi Library. In particular, to resolve generated error I followed these steps: