-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnsatisfiedLinkError on linux when opencl is not installed #52
Comments
If you have a fix and submit it via pull request I can approve it rather
quickly and get this fixed for you. Otherwise ill have to take a look when
I get a chance and hopefully implement a fix for you. Thanks for reporting.
…On Tue, Jul 18, 2017 at 3:06 AM, fer-marino ***@***.***> wrote:
Dears,
I'm evaluating aparapi for one of our project, and a requirement for it is
that it runs pure java even if no opencl device is available.
I've designed a simple test case using the guide but the test fails:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.aparapi.natives.util.NativeUtils.loadLibraryFromJar(NativeUtils.java:100)
at com.aparapi.natives.NativeLoader.load(NativeLoader.java:35)
at com.aparapi.internal.opencl.OpenCLLoader.<clinit>(OpenCLLoader.java:43)
at com.aparapi.internal.opencl.OpenCLPlatform.getOpenCLPlatforms(OpenCLPlatform.java:73)
at fr.gael.drb.cortex.topic.sentinel3.AparapiTest.info(AparapiTest.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.TestRunner.beforeRun(TestRunner.java:641)
at org.testng.TestRunner.run(TestRunner.java:609)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
at org.testng.SuiteRunner.run(SuiteRunner.java:254)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)
this exception is thrown when the program its the line:
List<OpenCLPlatform> platforms = (new OpenCLPlatform()).
getOpenCLPlatforms();
Going through the code, it seems that he try to check if opencl is
available on the machine running OpenCLLoader.isOpenCLAvailable(), inside
the init static block of that class it try to load the native library, and
it fails as it's not available. Anyway that exception is not catch and
everything breaks.
It catches IOException but that does not catch the UnsatisfiedLinkError.
Thank you and regards,
Fernando
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#52>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC5JAuv1W3D12Yl8GYpswEfIkhUzWHTSks5sPFltgaJpZM4Oa7Wl>
.
|
there are a few opencl implementations available for linux. i know at least one of them has CPU support. you may only need to install that in the system. https://packages.ubuntu.com/search?keywords=opencl&searchon=names&suite=yakkety§ion=all |
@automenta it's not about opencl support, but opencl device detection by aparapi |
@fer-marino Thanks, pull request merged, this should now be fixed. Will go out in next release. |
@fer-marino release 1.4.0 has just been made and includes the fix for this bug. |
Dears,
I'm evaluating aparapi for one of our project, and a requirement for it is that it runs pure java even if no opencl device is available.
I've designed a simple test case using the guide but the test fails:
this exception is thrown when the program its the line:
List<OpenCLPlatform> platforms = (new OpenCLPlatform()).getOpenCLPlatforms();
Going through the code, it seems that he try to check if opencl is available on the machine running
OpenCLLoader.isOpenCLAvailable()
, inside the init static block of that class it try to load the native library, and it fails as it's not available. Anyway that exception is not caught and everything breaks.It catches IOException but that does not catch the UnsatisfiedLinkError.
Thank you and regards,
Fernando
The text was updated successfully, but these errors were encountered: