dllimportjcuda

The specified procedure could not be found: for jcuda 9.2


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


Solution

  • 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.