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

e-SRRF exception memory #3

Open
EsleyGit opened this issue Apr 14, 2022 · 25 comments
Open

e-SRRF exception memory #3

EsleyGit opened this issue Apr 14, 2022 · 25 comments

Comments

@EsleyGit
Copy link

Hi, I have the following exception:

(Fiji Is Just) ImageJ 2.3.0/1.53q; Java 1.8.0_172 [64-bit]; Linux 5.13.0-39-generic; 1225MB of 2332MB (52%)

java.lang.NoClassDefFoundError: com/jogamp/opencl/CLException
at nanoj.liveSRRF.gui.LiveSRRF_optimised_.run(LiveSRRF_optimised_.java:155)
at ij.IJ.runUserPlugIn(IJ.java:243)
at ij.IJ.runPlugIn(IJ.java:204)
at ij.Executer.runCommand(Executer.java:152)
at ij.Executer.run(Executer.java:70)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.jogamp.opencl.CLException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 6 more

Can somebody explain me what is the problem and how solve it?
Thank you a lot.

@ammendes
Copy link
Collaborator

ammendes commented May 3, 2022

A quick look at the eSRRF code points to a possible issue loading OpenCL. Are you sure you have a working installation?

@EsleyGit
Copy link
Author

EsleyGit commented May 3, 2022 via email

@ammendes
Copy link
Collaborator

ammendes commented May 3, 2022

I believe you are running Linux. If so, can you open a new terminal and write "clinfo" without the quotes, then press Enter.
Let me know the output of that.

@EsleyGit
Copy link
Author

EsleyGit commented May 3, 2022 via email

@EsleyGit
Copy link
Author

EsleyGit commented May 3, 2022 via email

@ammendes
Copy link
Collaborator

ammendes commented May 3, 2022

You did not share the screenshot, I think.

For the "Number of platforms 0" error you might want to check this thread: https://stackoverflow.com/questions/54567402/clinfo-shows-number-of-platforms-0

Seems like some issue with your graphics drivers. Do you have an Nvidia or AMD GPU?

@EsleyGit
Copy link
Author

EsleyGit commented May 4, 2022 via email

@ammendes
Copy link
Collaborator

ammendes commented May 5, 2022

I'm not sure, but in theory, yes. OpenCL should detect your CPU as a platform and allow it to be used. I've read multiple recent threads with this issue in Ubuntu and it seems related to your OpenCL SDK.

@EsleyGit
Copy link
Author

EsleyGit commented May 5, 2022 via email

@HannahSHeil
Copy link
Collaborator

HannahSHeil commented May 10, 2022

Hi @EsleyGit, you can find some instructions to set up openCL on linux correctly here: https://clij.github.io/clij2-docs/faq
I hope this helps.

@HannahSHeil
Copy link
Collaborator

Hi @EsleyGit, here you find some information on how to setup you CPU for OpenCL: https://www.intel.com/content/www/us/en/developer/articles/tool/opencl-drivers.html

@MorneArin
Copy link

MorneArin commented Jan 17, 2023

Hi all, I have the same problem, may I ask for your advice how to fix it?

I have Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz 2.90 GHz with 32.0 GB RAM (31.3 GB usable)
My graphics card is NVIDIA GeForce RTX 2070 (driver details say that opencl32 and opencl64 are installed, see screenshot)
I tried to run eSRRF parameters sweep with the raw image (*.czi), tiff (attached as 8 Brady HFFs 7x SRRF C=0.zip), and CLIJ-converted tiff (the one you see on another screenshot).
The error is the same, tho:

(Fiji Is Just) ImageJ 2.9.0/1.53t; Java 1.8.0_322 [64-bit]; Windows 10 10.0; 213MB of 23963MB (<1%)
 
java.lang.NoClassDefFoundError: com/jogamp/opencl/CLMemory
	at nanoj.liveSRRF.gui.ParametersSweep_.run(ParametersSweep_.java:105)
	at ij.IJ.runUserPlugIn(IJ.java:237)
	at ij.IJ.runPlugIn(IJ.java:203)
	at ij.Executer.runCommand(Executer.java:152)
	at ij.Executer.run(Executer.java:70)
	at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.ClassNotFoundException: com.jogamp.opencl.CLMemory
	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	... 6 more

Nvidia

CLIJ

Thanks in advance!

@HannahSHeil
Copy link
Collaborator

Hi, this could be also the incompatibility issue with CLIJ (see also #2). Could you please try with a Fiji without CLIJ?

@alexeybondar
Copy link

Hi, this could be also the incompatibility issue with CLIJ (see also #2). Could you please try with a Fiji without CLIJ?

Hi -
I'm facing a similar issue both on a Windows machine with AMD Radeon R9 200 / HD 7900 and a MacBook Pro with Intel Iris Plus Graphics 655. I don't have CLIJ on any of these machines. Both throw an apparent OpenCL problem at me. Have you figured out a reason for that and, ideally, a fix? I've tried looking at it briefly but it's beyond my capacity to figure out what exactly is wrong.

Thank you!

The error itself:
Windows:
(Fiji Is Just) ImageJ 2.14.0/1.54f; Java 1.8.0_322 [64-bit]; Windows 10 10.0; 227MB of 49043MB (<1%)

java.lang.NoClassDefFoundError: com/jogamp/opencl/CLMemory
at nanoj.liveSRRF.gui.ParametersSweep_.run(ParametersSweep_.java:105)
at ij.IJ.runUserPlugIn(IJ.java:244)
at ij.IJ.runPlugIn(IJ.java:210)
at ij.Executer.runCommand(Executer.java:152)
at ij.Executer.run(Executer.java:70)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.ClassNotFoundException: com.jogamp.opencl.CLMemory
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
... 6 more

Mac:
(Fiji Is Just) ImageJ 2.14.0/1.54f; Java 1.8.0_172 [64-bit]; Mac OS X 10.16; 150MB of 7902MB (1%)

java.lang.NoClassDefFoundError: com/jogamp/opencl/CLException
at nanoj.liveSRRF.gui.ParametersSweep_.run(ParametersSweep_.java:105)
at ij.IJ.runUserPlugIn(IJ.java:244)
at ij.IJ.runPlugIn(IJ.java:210)
at ij.Executer.runCommand(Executer.java:152)
at ij.Executer.run(Executer.java:70)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.jogamp.opencl.CLException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 6 more

@HannahSHeil
Copy link
Collaborator

Hi, it is hard to pinpoint what exactly is going wrong with openCL. Usually updating everything (Fiji, openCL and JRE) has been a fix for some users.
On your windows machine it seems to be a memory issue, while on the MAC it is openCL itself that is not running.

@DSbioimaging
Copy link

DSbioimaging commented Jul 25, 2023

I encountered the same issue on three Windows 10 machines running Intel CPUs (two) or AMD Threadripper and Nvidia 2070 or 2070S GPUs with nvidia driver version 531. This is a show stopping bug without any recourse from the user.

I lost access to the Threadripper machine but if I remember correctly I worked around the issue by installing the Microsoft DirectX12 wrapper for OpenCL https://apps.microsoft.com/store/detail/opencl%E2%84%A2-and-opengl%C2%AE-compatibility-pack/9NQPSL29BFFF?hl=en-us&gl=us.

I am waiting to get admin access on the Intel machines to test the CPU OpenCL Runtime https://www.intel.com/content/www/us/en/developer/articles/technical/intel-cpu-runtime-for-opencl-applications-with-sycl-support.html

The CPU runtime works fine on my 12th Gen Intel GPU-less laptop (but it runs slower than the IGP), might be a good option to still executed algorithm if the DX12 wrapper fails.

@HannahSHeil
Copy link
Collaborator

Hi
Could you please try the following fix?

  • Go to the folder /.../Fiji.app/jars
    Remove these:
    jogl-all-2.4.0-rc-20211011.jar
    jocl-all-2.4.0-rc-20211011.jar
    joal-all-2.4.0-rc-20211011.jar
    gluegen-rt-2.4.0-rc-20210111.jar

  • Go to:  https://jogamp.org/deployment/archive/rc/v2.5.0-rc-20230523/jar/
    Download the following files: jogl-all.jar, jocl.jar, joal.jar, gluegen.jar
    Place these four files in the folder /.../Fiji.app/jars

  • Go to the folder /.../Fiji.app/jars/win64
     Remove these: 
    gluegen-rt-2.4.0-rc-20210111-natives-windows-amd64.jar
    joal-2.4.0-rc-20210111-natives-windows-amd64.jar
    jocl-2.4.0-rc-20210111-natives-windows-amd64.jar

  • Go to:  https://jogamp.org/deployment/archive/rc/v2.5.0-rc-20230523/jar/
    Download the following files: gluegen-rt-natives-windows-amd64.jar, jocl-natives-windows-amd64.jar, joal-natives-windows-amd64.jar
    Place these three files in the folder /.../Fiji.app/jars/win64

  • Restart Fiji

@HannahSHeil
Copy link
Collaborator

If you are working on Windows 10/11 and you would like to use other NanoJ Plugins aswell you might also need to install the OpenCL™ and OpenGL® Compatibility Pack (https://apps.microsoft.com/store/detail/opencl%E2%84%A2-and-opengl%C2%AE-compatibility-pack/9NQPSL29BFFF?hl=en-us&gl=us&activetab=pivot%3Aoverviewtab)

In that case please make sure to select the following settings: Advanced settings > Processing device > Default device
image

@DSbioimaging
Copy link

Hi Could you please try the following fix?

* Go to the folder /.../Fiji.app/jars
  Remove these:
  jogl-all-2.4.0-rc-20211011.jar
  jocl-all-2.4.0-rc-20211011.jar
  joal-all-2.4.0-rc-20211011.jar
  gluegen-rt-2.4.0-rc-20210111.jar

* Go to:  https://jogamp.org/deployment/archive/rc/v2.5.0-rc-20230523/jar/
  Download the following files: jogl-all.jar, jocl.jar, joal.jar, gluegen.jar
  Place these four files in the folder /.../Fiji.app/jars

* Go to the folder /.../Fiji.app/jars/win64
   Remove these: 
  gluegen-rt-2.4.0-rc-20210111-natives-windows-amd64.jar
  joal-2.4.0-rc-20210111-natives-windows-amd64.jar
  jocl-2.4.0-rc-20210111-natives-windows-amd64.jar

* Go to:  https://jogamp.org/deployment/archive/rc/v2.5.0-rc-20230523/jar/
  Download the following files: gluegen-rt-natives-windows-amd64.jar, jocl-natives-windows-amd64.jar, joal-natives-windows-amd64.jar
  Place these three files in the folder /.../Fiji.app/jars/win64

* Restart Fiji

This fixed my issue, thank you! eSRRF is now running correctly.
While following the steps above I noticed that a few libraries were missing (going by memory they were the jocl files), I thought that I might have failed to enable some update site like the Core or SQUIRREL but they were enabled.

Let me know if you would like to have more precise information regarding the missing libraries, I made a backup of the FIJI folder and could look into that.

Thanks again for helping!

I will look into the compatibility layer since SQUIRREL is crashing FIJI on my Win11 laptop and at least one of the other Win10 machines.

@HannahSHeil
Copy link
Collaborator

Thank you for the fast reply, @DSbioimaging! Glad that it works! I'll try to add the libraries directly to the update site to make sure everyone gets them automatically in the future. The compatibility package should help you with SQUIRREL, just make sure to select the following eSRRF settings: Advanced settings > Processing device > Default device, because there is some overlap in the device names in the resulting OpenCl setup.

@HannahSHeil
Copy link
Collaborator

Hi @DSbioimaging, I've now added the libraries that have been removed with the latest Fiji update to the eSRRF update site. They should be automatically downloaded from now on. Thank you for spotting this! Have a great day! Best, Hannah

@DSbioimaging
Copy link

@HannahSHeil thank you for taking care of the update site and releasing this great tool. I planned to refine my SRRF protocol during this week and you helped me stay on track. The FRC measured around 70nm from a 3 years old slide, it is so cool! :)

There seems to be some hiccups here and there with the Nvidia GPU though. My machine is set by IT to log off after a brief period of inactivity and SRRF occasionally fails to find the device when resuming the session. The parameter sweep is also a bit unreliable (unstable) so I run it with the Intel IGP (HD620). I think this is probably some problem between windows and the graphics card being set to some energy saving state or something about the libraries themselves not playing nice with the Nvidia OpenCL implementation.

Will try a fresh eSRRF installation using the update site and report back if I encounter any issue.

Best,
Donato

@DSbioimaging
Copy link

DSbioimaging commented Jul 27, 2023

Hi again and sorry for coming back, I tried adding the liveSRRF update site on a fresh FIJI folder and the updater complains about a missing gleugen file

image

I checked the website and while gleugen is there, the file has a different version number, I hope it is a quick fix. :)

image

@HannahSHeil
Copy link
Collaborator

Hi @DSbioimaging, did you retry the update? It is a bit strange, as the checksum timestamp is older than the version that is on the update site. I can try to reproduce this. Was it windows or Mac?

@DSbioimaging
Copy link

@HannahSHeil I redownloaded a fresh FIJI folder and verified that SRRF runs on my Intel IGP laptop running Win11.
I think it works OK now, thank you!

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

6 participants