-
Notifications
You must be signed in to change notification settings - Fork 33
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
java.lang.UnsupportedOperationException: The function clGetPlatformIDs is not supported #14
Comments
Have you checked with clinfo whether any platform is available? I guess you need amd's drivers to use opencl on amd card. |
Wow quick answer!! Thanks a lot. Are you the author of JOCL? I am trying to find the ATI drivers for Peppermint 7/64. What I want is ATIStream, right? However, apt doesn't help:
ocl-icd-opencl-dev doesn't do it either, program still gives same message. Oh yeah, and clinfo says "Number of platforms 0". |
I don't think you need ATIStream. You need AMD's opencl implementation, which comes with AMD's proprietary drivers. Depending on your GPU, that's either Catalyst, or AMDGPU-PRO. ocl-icd is just an "interface" that delegates to the proper opencl platform implementation. You don't have any, thus clinfo returns 0 platforms, and that seems to be the reason you get the exception when you try to access the info of a platform that does not exist. |
BTW, I am not the author of JOCL, just a satisfied user. |
Thanks blueberry! AMD drivers seem like a nightmare. I am trying to find the Linux driver for my A6-7310 APU here. No idea how to get through that form to get that. I am talking to the Peppermint Linux support, and they say AMD drivers are not available in Peppermint 7, just in Peppermint 6. I can almost not believe that. |
As Peppermint is based on Ubuntu, you should be covered, since it's AMD's primary target when releasing for Linux. I know nothing more, I can just confirm that Arch Linux covers Catalyst quite well through pacman & AUR. |
Thanks blueberry, I'm trying AMD suppport. Could I get in touch with you? I really want to get JOCL up and working. I see you have a cloned JOCL repository? What is that about? Are you distributing any JOCL-based applications? I have to figure out how to tell people how to set up JOCL (and requirements!) if I want to seriously make use of it (as I'm programming for other people too, not just for myself). |
Thanks @blueberry for jumping in here so quickly! I could only have made the vague guess what might be wrong here - namely, that there is no OpenCL implementation available (as blueberry suggested, and as it is confirmed by "0 platforms"). In general, there should hardly be specific requirements for JOCL: As soon as there is any OpenCL implementation available, it should work - and usually, such an implementation will be installed together with the driver, regardless of whether it's AMD or NVIDIA or any other platform. But ... for you, it did not seem to work. Interestingly, websearching for "amd A6-7310 APU driver linux" yields your thread at https://community.amd.com/thread/211567 (Could it be that this a very specific issue? And... was the link that you received there helpful?). Beyond that, for further details about "Peppermint" or driver versions, I can hardly help. |
I now have the same issue with a new notebook (Ryzen 5 2500U). According to this, AMD just in general doesn't supply Linux drivers for its mobile CPUs. Which procludes me from programming the GPU in Java? How sad. |
If so, it does not only mean that you can't do GPU computing in Java, but with this setup in general. I'm afraid I cannot provide really focused help here. A quick websearch reveals this thread (in German), https://forums.gentoo.org/viewtopic-t-1105078-start-0.html , where someone talks about some hassle of compiling things on his own, but I didn't look into the details. |
Hello there! The title gives the gist of the problem... a Java exception I get with JOCL 0.2.0 RC before anything really starts. What does this message mean?
BTW, I am porting JOCL (using the RC version to avoid Maven) to my language (JavaX). Main change to stock JOCL is that I load the native library dynamically. Testing on Peppermint 7 (64 Bit Linux), trying to calculate on an AMD Puma+ APU. libopencl from apt-get.
My ported source
Only change I made in JOCL sources is to remove the static initializer in CL.java.
Stack trace:
java.lang.UnsupportedOperationException: The function clGetPlatformIDs is not supported
at org.jocl.CL.clGetPlatformIDsNative(Native Method)
at org.jocl.CL.clGetPlatformIDs(CL.java:2152)
at main.main(main.java:86)
Please advise!!!! :-)
The text was updated successfully, but these errors were encountered: