Skip to content
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

Open
stefan-reich opened this issue Jan 28, 2017 · 10 comments

Comments

@stefan-reich
Copy link

stefan-reich commented Jan 28, 2017

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!!!! :-)

@blueberry
Copy link

Have you checked with clinfo whether any platform is available? I guess you need amd's drivers to use opencl on amd card.

@stefan-reich
Copy link
Author

stefan-reich commented Jan 28, 2017

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:

Package amd-libopencl1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  ocl-icd-opencl-dev:i386 ocl-icd-opencl-dev

ocl-icd-opencl-dev doesn't do it either, program still gives same message.

Oh yeah, and clinfo says "Number of platforms 0".

@blueberry
Copy link

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.

@blueberry
Copy link

BTW, I am not the author of JOCL, just a satisfied user.

@stefan-reich
Copy link
Author

stefan-reich commented Jan 28, 2017

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.

@blueberry
Copy link

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.

@stefan-reich
Copy link
Author

stefan-reich commented Jan 29, 2017

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).

@gpu
Copy link
Owner

gpu commented Jan 29, 2017

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.

@stefan-reich
Copy link
Author

stefan-reich commented Mar 2, 2020

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.

@gpu
Copy link
Owner

gpu commented Mar 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants