CliJ start up not working

Hi,

I’ve updated sites with clij and clij2 and tried to use a some function (like filter) of GPU processing with no success. This is the error that I’m getting:

(Fiji Is Just) ImageJ 2.0.0-rc-71/1.52p; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 670MB of 60000MB (1%)
 
java.lang.NoClassDefFoundError: Could not initialize class net.haesleinhuepf.clij.clearcl.backend.jocl.ClearCLBackendJOCL
	at net.haesleinhuepf.clij.clearcl.backend.ClearCLBackends.getBestBackend(ClearCLBackends.java:117)
	at net.haesleinhuepf.clij.CLIJ.getAvailableDeviceNames(CLIJ.java:206)
	at net.haesleinhuepf.clij.macro.AbstractCLIJPlugin.run(AbstractCLIJPlugin.java:218)
	at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:266)
	at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:114)
	at ij.IJ.runUserPlugIn(IJ.java:232)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:748)

@haesleinhuepf, hope you can help!

Thank you

1 Like

Hi @mmvpgs,

this error message points towards wrong/missing drivers. Can you check which GPU driver is installed? BTW. Which GPU do you have in your computer and which operating system?

Thanks!

Cheers,
Robert

I looked for gpu drivers and they look updated.
I have Geforce GTX 1050 Ti and windows 10.

1 Like

Hey @mmvpgs,

could you please try with a recent driver? The version you have installed looks a bit outdated compared to the website. Furthermore, it is apparently a version shipped by microsoft. You may have to go with the NVidia driver:

https://www.nvidia.com/Download/index.aspx

Let me know if that helps!

Cheers,
Robert

Great,

it solve the problem. Is working fine.

Thanks
Mafalda

1 Like

Great! You’re welcome :slight_smile:

Hi I have been trying to install the clij package and would love some help. I’m having the same error as above:

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52p; Java 1.8.0_172 [64-bit]; Linux 5.4.0-31-generic; 142MB of 95176MB (<1%)

java.lang.NoClassDefFoundError: Could not initialize class net.haesleinhuepf.clij.clearcl.backend.jocl.ClearCLBackendJOCL
at net.haesleinhuepf.clij.clearcl.backend.ClearCLBackends.getBestBackend(ClearCLBackends.java:117)
at net.haesleinhuepf.clij.CLIJ.getAvailableDeviceNames(CLIJ.java:206)
at net.haesleinhuepf.clij.macro.AbstractCLIJPlugin.run(AbstractCLIJPlugin.java:263)
at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:266)
at ij.plugin.filter.PlugInFilterRunner.(PlugInFilterRunner.java:114)
at ij.IJ.runUserPlugIn(IJ.java:232)
at ij.IJ.runPlugIn(IJ.java:193)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)

I think I have the latest drivers installed:

Screenshot from 2020-05-21 12-11-30

At first I thought the issue was the macros because I kept getting a Ext.CLIJ_function not found error. But the plugin is clearly there. So I just tried to apply the function to the image by clicking in the plugin dropdown then got the above error.

Cheers,
Brandon

Hey @brazooky,

glad to hear you want to give clij a try. This error message is classical for driver issues. Two things you can do:

  • Find out how the opencl-package for your linux is called. On Debian/Ubuntu the package name is something like “ocl-icd”. The troubleshooting page may give you further hints.
  • Run clinfo from the command line to find out if OpenCL is properly installed.

Let us know if this helps!

Cheers,
Robert

1 Like

Hi,

Thank you for the quick response!! I’m very new to Ubuntu/Linux in general, so I think I downloaded the ocl-icd package and installed it properly. I just used this link: https://github.com/OCL-dev/ocl-icd, then followed the install instructions and I didn’t get errors.

I also ran clinfo from the command line and got this long list here:

clinfo
Number of platforms 1
Platform Name NVIDIA CUDA
Platform Vendor NVIDIA Corporation
Platform Version OpenCL 1.2 CUDA 10.2.141
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics
Platform Extensions function suffix NV

Platform Name NVIDIA CUDA
Number of devices 1
Device Name GeForce RTX 2070 SUPER
Device Vendor NVIDIA Corporation
Device Vendor ID 0x10de
Device Version OpenCL 1.2 CUDA
Driver Version 440.64
Device OpenCL C Version OpenCL C 1.2
Device Type GPU
Device Topology (NV) PCI-E, 09:00.0
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 40
Max clock frequency 1770MHz
Compute Capability (NV) 7.5
Device Partition (core)
Max number of sub-devices 1
Supported partition types None
Supported affinity domains (n/a)
Max work item dimensions 3
Max work item sizes 1024x1024x64
Max work group size 1024
Preferred work group size multiple 32
Warp size (NV) 32
Preferred / native vector sizes
char 1 / 1
short 1 / 1
int 1 / 1
long 1 / 1
half 0 / 0 (n/a)
float 1 / 1
double 1 / 1 (cl_khr_fp64)
Half-precision Floating-point support (n/a)
Single-precision Floating-point support (core)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Correctly-rounded divide and sqrt operations Yes
Double-precision Floating-point support (cl_khr_fp64)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Address bits 64, Little-Endian
Global memory size 8361279488 (7.787GiB)
Error Correction support No
Max memory allocation 2090319872 (1.947GiB)
Unified memory for Host and Device No
Integrated memory (NV) No
Minimum alignment for any data type 128 bytes
Alignment of base address 4096 bits (512 bytes)
Global Memory cache type Read/Write
Global Memory cache size 1310720 (1.25MiB)
Global Memory cache line size 128 bytes
Image support Yes
Max number of samplers per kernel 32
Max size for 1D images from buffer 268435456 pixels
Max 1D or 2D image array size 2048 images
Max 2D image size 32768x32768 pixels
Max 3D image size 16384x16384x16384 pixels
Max number of read image args 256
Max number of write image args 32
Local memory type Local
Local memory size 49152 (48KiB)
Registers per block (NV) 65536
Max number of constant args 9
Max constant buffer size 65536 (64KiB)
Max size of kernel argument 4352 (4.25KiB)
Queue properties
Out-of-order execution Yes
Profiling Yes
Prefer user sync for interop No
Profiling timer resolution 1000ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
Kernel execution timeout (NV) Yes
Concurrent copy and kernel execution (NV) Yes
Number of async copy engines 3
printf() buffer size 1048576 (1024KiB)
Built-in kernels (n/a)
Device Extensions cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics

NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, …) NVIDIA CUDA
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, …) Success [NV]
clCreateContext(NULL, …) [default] Success [NV]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) Invalid device type for platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) No platform

ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.2.11
ICD loader Profile OpenCL 2.1

Some of the parts say invalid device etc. I can try reinstalling the ocl-icd.

More importantly, after installing ocl-icd, does CLIJ in Fiji throw a different error message?

1 Like

If I just try to analyze an image by clicking through the plugin pull down I get the same error:

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52p; Java 1.8.0_172 [64-bit]; Linux 5.4.0-31-generic; 143MB of 95176MB (<1%)

java.lang.NoClassDefFoundError: Could not initialize class net.haesleinhuepf.clij.clearcl.backend.jocl.ClearCLBackendJOCL
at net.haesleinhuepf.clij.clearcl.backend.ClearCLBackends.getBestBackend(ClearCLBackends.java:117)
at net.haesleinhuepf.clij.CLIJ.getAvailableDeviceNames(CLIJ.java:206)
at net.haesleinhuepf.clij.macro.AbstractCLIJPlugin.run(AbstractCLIJPlugin.java:263)
at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:266)
at ij.plugin.filter.PlugInFilterRunner.(PlugInFilterRunner.java:114)
at ij.IJ.runUserPlugIn(IJ.java:232)
at ij.IJ.runPlugIn(IJ.java:193)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)

If I try to run a macro like this:

input=getTitle();
run(“CLIJ Macro Extensions”, “cl_device=HD”);
Ext.CLIJ_clear();
Ext.CLIJ_push(input);
Ext.CLIJ_reportMemory();

I get this error:

is it possible i didn’t install the ocl-icd correctly? is there a quick way to check that?

Did you install it with a command like

sudo yum install ocl-icd-devel

… as written on the troubleshooting page ?

1 Like

It’s working now! I guess when I did the original install with the ocl-icd from github I thought I wouldn’t need the ocl-icd-devel-openCL as well. I thought it was all contained but putting in sudo apt install ocl-icd-devel did it. Thanks!

Awesome! So that was all?

sudo apt install ocl-icd-devel

Awesome :slight_smile:

Thanks!

Cheers,
Robert