jcpalmer
unread,May 20, 2010, 1:26:13 PM5/20/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to NativeLibs4Java, mb...@fh-landshut.de
First the good news (you cannot solve a problem until you identify
it), the problem with JavaCL on Linux / NVidia has been identified.
As I understand it, the problem where the JVM and device driver are
listening for the same OS signals. Eventually, the device steals a
message meant for the JVM or maybe the other way & death is
instantaneous with no diagnostic file ever written out. The issue is
also a potential problem with AMD.
When I ran an OpenCL test program with a kernel loop in Netbeans
(implemented by 'ant run'), I was getting a "Java Result: 139"
written into System.Error by Ant. Some web searches suggested I put
use the "-Xcheck:jni" option. I got 5 warnings that looked like:
Warning: SIGSEGV handler expected:libjvm.so+0x54ac80 found:libnvidia-
compiler.so.256.22+0x6df830
Some more web searches showed that Michael Bien had started
communicating about this 2 weeks ago. Doing anything more myself
(other than this thread) was not likely to yield a faster result, so I
am leaving management of this to him.
Even better is there is a work around today with caveats. If the
environment variable LD_PRELOAD is set to the path of the file
libjsig.so, the JVM changes so this is not a problem. This is NOT
possible to do with JWS, so the demo apps will not work (FYI, they are
out of commission right now, anyway). The second caveat is it makes
testing while developing in an IDE more difficult, at least Netbeans.
Here is what I do for Netbeans. Maybe some else can post for other
IDE's. Create a script file on the desktop to build/run your project
outside. Should look like:
#!/bin/bash
export LD_PRELOAD=/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libjsig.so
cd myProjectDir
ant run
Do a file save in Netbeans, then double click the script file's icon,
& select "Run in Terminal". You probably also need to edit the
properties of Terminal, setting "When command exits" to "Hold the
terminal open". If you leave -Xcheck:jni as an option of the project,
you will see this as the first line of execution output:
[java] Info: libjsig is activated, all active signal checking is
disabled
I just ran a 250,000 kernel execution loop with no problems.