imodpasteur / imodpasteur/ZOLA-3D

Cuda 10.1 libraries working in linux; not windows for GPU drift correction

Open
#9 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
19
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Using the 10.1 lib/jars in Linux worked great; in Windows 10 x64 GPU drift correction is not working. The Cuda 10.1 .jars and .dlls (and only these versions) come from the .zip file distributed with Zola and are present in the correct folders.

Zola exception --

```
(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52p; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 150MB of 24403MB (<1%)

java.lang.UnsatisfiedLinkError: Error while loading native library "JCusparse-10.1.0-windows-x86_64"
Operating system name: Windows 10
Architecture : amd64
Architecture bit size: 64
---(start of nested stack traces)---
Stack trace from the attempt to load the library as a file:
java.lang.UnsatisfiedLinkError: C:\Fiji.app\lib\JCusparse-10.1.0-windows-x86_64.dll: The specified procedure could not be found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at jcuda.LibUtils.loadLibrary(LibUtils.java:143)
at jcuda.jcusparse.JCusparse.initialize(JCusparse.java:77)
at jcuda.jcusparse.JCusparse.(JCusparse.java:62)
at org.pasteur.imagej.cuda.MyCudaStream.init(MyCudaStream.java:77)
at org.pasteur.imagej.ZOLA.driftCorrection(ZOLA.java:2773)
at org.pasteur.imagej.ZOLA.run(ZOLA.java:439)
at ij.IJ.runUserPlugIn(IJ.java:230)
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)
Stack trace from the attempt to load the library as a resource:
java.io.IOException: No resource found with name '/lib/JCusparse-10.1.0-windows-x86_64.dll'
at jcuda.LibUtils.writeResourceToFile(LibUtils.java:323)
at jcuda.LibUtils.loadLibraryResource(LibUtils.java:255)
at jcuda.LibUtils.loadLibrary(LibUtils.java:158)
at jcuda.jcusparse.JCusparse.initialize(JCusparse.java:77)
at jcuda.jcusparse.JCusparse.(JCusparse.java:62)
at org.pasteur.imagej.cuda.MyCudaStream.init(MyCudaStream.java:77)
at org.pasteur.imagej.ZOLA.driftCorrection(ZOLA.java:2773)
at org.pasteur.imagej.ZOLA.run(ZOLA.java:439)
at ij.IJ.runUserPlugIn(IJ.java:230)
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)
---(end of nested stack traces)---

at jcuda.LibUtils.loadLibrary(LibUtils.java:193)
at jcuda.jcusparse.JCusparse.initialize(JCusparse.java:77)
at jcuda.jcusparse.JCusparse.(JCusparse.java:62)
at org.pasteur.imagej.cuda.MyCudaStream.init(MyCudaStream.java:77)
at org.pasteur.imagej.ZOLA.driftCorrection(ZOLA.java:2773)
at org.pasteur.imagej.ZOLA.run(ZOLA.java:439)
at ij.IJ.runUserPlugIn(IJ.java:230)
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)
```

Cuda version --

```
C:\Users\zach>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:12:52_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.1, V10.1.243
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with org.pasteur.imagej.cuda.MyCudaStream.init in MyCudaStream.java and the drift-correction call in ZOLA.java. Reproduce the Windows 10 x64 failure using the reported CUDA 10.1 setup and inspect the JCusparse native-library loading path. Done means GPU drift correction no longer fails with the reported UnsatisfiedLinkError on Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.