I have been trying to invoke Cuda code thru JNI from java on mac.
This is what I did.
- Declared a simple native method, and called System.loadLibrary in java
- Compiled java file, created header file
- included header file in the cuda code, implemented the native method
- compiled cuda code through nvcc, used g++ -fPIC -o to create output fle (just like what the built in make file does)
- used g++ -shared to create jnilib
I have included all the libraries that the make-file pointed to and also included the jni.h location.
When I run the java code, I get this
Invalid memory access of location 79df8f3c eip=8fe17dc7
Please see that I do not get unsatisfied link error. When I call a different library name in java (something that does not exist), I get unsatisfied link error.
What could be the problem?
Thanks in advance.