1

I am attempting to load the dll for the JCudaDriver which I extracted with the jar.exe tool.

System.loadLibrary("JCudaDriver-0.9.2-windows-x86_64")

That driver is definitely in my java.libary.path because if I remove it manually, I get a not-found type error instead. Now I receive the following error.

Exception in thread "main" java.lang.UnsatisfiedLinkError: myPath.JCudaDriver-0.9.2-windows-x86_64.dll.dll: The specified procedure could not be found

My understanding is that this specified procedure is located in some missing dependency on another dll or there is a version clash. I used the windows utility function on the command line as dumpbin /dependents xx.dll to find the dependent dlls. They are as follows.

Dump of file JCudaDriver-0.9.2-windows-x86_64.dll
Image has the following dependencies:
nvcuda.dll
ADVAPI32.dll
KERNEL32.dll

I can load the nvcuda.dll without error but the latter two are a problem.

fun main(args: Array<String>) {
   //System.loadLibrary("nvcuda")
   System.loadLibrary("ADVAPI32")
   //System.loadLibrary("KERNEL32")
 }

This is the error when trying to load ADVAPI32.dll

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\aaa_eric\code\lib\dlls_x64\advapi32.dll: %1 is not a valid Win32 application

J.E.Tkaczyk
  • 557
  • 1
  • 8
  • 19
  • Can you please run `nvcc --version` to see which CUDA version you have installed? (This is the version of NVCC, the driver version *might* still be different, but ... it may be a first hint: If this prints something else than 9.2, this could explain the error message). In any case, it should **not** be necessary to manually load other DLLs. In fact, it should **not** be necessary to unpack or load the CUDA DLLs. JCuda is unpacking these libraries automatically. Usually, you should just have to add the JCuda JARs (including the `-natives` JAR) to your classpath and should be ready to go. – Marco13 Aug 11 '18 at 09:29
  • Looks right. Cuda compilation tools, release 9.2, V9.2.148 – J.E.Tkaczyk Aug 13 '18 at 14:11

1 Answers1

1

After some effort by the supporter of JCuda, Marco13 who left a comment above, the problem was identified as having updated the graphics driver after having installed Cuda. That changed some of the dlls. The fix was to remove and reinstall Cuda.

I'll reference here the forum link where we iterated to the solution.

J.E.Tkaczyk
  • 557
  • 1
  • 8
  • 19