JVM fatal error with JCudaDriver

Hi all,

In attempts to get the sample programs running, i’ve experienced another error (along with link error I just posted too related to JCuddpp). This time, when I run the Sample programs that call the JCudaDriver (JCudaDriverCubinSample), I get the following error:

[LEFT]#

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000008515be3, pid=1916, tid=208

JRE version: 6.0_18-b07

Java VM: Java HotSpot™ 64-Bit Server VM (16.0-b13 mixed mode windows-amd64 )

Problematic frame:

C [nvcuda.dll+0x3c5be3]

An error report file with more information is saved as:

C:\work\workspace\jCuda\hs_err_pid1916.log

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

#[/LEFT]

My system is 64bit windows with Cuda 3.0, jCuda 3.0 -x86_64 binary, and the newest Cuda driver (197.13). It looks like it’s having a problem with the driver based on the output, but i’m not sure what’s going on because i’m not that familiar with JNI.

I can paste the error report file into this thread if that would help.

Any feedback would be much appreciated.

Hello,

Did you use the CUBIN file from the samples website? As mentioned there, this CUBIN file is compiled for 32bit systems, so it will not work with Win64. To compile the CUBIN file for your system, the call should roughly be something like
nvcc -64 JCudaCubinSample_kernel.cu -cubin JCudaCubinSample_kernel.cubin
which should create the CUBIN file which may then be loaded by the sample.

Additionally, you may try adding the line
JCudaDriver.setLogLevel(LogLevel.LOG_DEBUGTRACE);
at the beginning of the main method, it will print some program trace which might help to find out where exactly it crashes.

In any case, I already started to modify the JNI part to become more defensive and avoid such crashes: Whenever possible, it should only throw an execption in case of an error. But when the crash comes from the depths of the nvcuda.dll, detecting the error beforehand may not be possible in any case…

bye
Marco

Hi Marco,

Well that would explain it, I guess my eyes passed right over the bit about the cubin file being compiled for 32 bit! I’ll compile for 64bit as you suggested and see if I can get it working.

Thanks!

Hi all,

I compiled the JCudaCubinSample_kernel.cu using:

nvcc -m64 JCudaCubinSample_kernel.cu -cubin

That worked successfully, and running the JCudaDriverCubinSample.java I got „Test PASSED“.

Thanks for the help Marco!