Right, the part of the stack trace that says “Cant find dependent libraries” indicates that it cannot find one of the libraries that
JCublas-0.8.0-windows-x86_64.dll depends on. But the native JCublas library does not depend on the native JCuda library. The dependency from JCublas to JCuda only refers to the Java world - that is, to the JARs, but not to the natives. So manual preloading should not be necessary.
The library that is missing there is actually the native CUBLAS library.
Side note: If you have Visual Studio installed, you can actually look them up, with
dumpbin /DEPENDENTS JCublas-0.8.0-windows-x86_64.dll
Image has the following dependencies:
Depending on how you installed the CUDA 9 toolkit, the version 8 should still be available, and the required
cublas64_80.dll could be located in
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\cublas64_80.dll
There are some options for making this “visible” to Java:
- You could add the directory to your PATH environment variable (although this might cause some confusion, because your
PATH now likely contains the corresponding directory of the CUDA 9 toolkit)
- You could just copy the CUBLAS DLL into your project root. (This is somewhat ““pragmatic”” - it’s 39MB…)
- You could start with
-Djava.library.path=/path/to/DLL, which should allow Java to find the right DLL
In any case, the update of JCuda for CUDA 9 is on its way (although I’m a bit short on time right now)