Profiling Java application with nvvp

Hello
I’m trying to profile an JAVA application that calls CUDA functions via JNI.

When I launch my application with nvvp it runs well, but I get the following error message:
“======== Warning: No CUDA application was profiled, exiting” and, of course, there is no profiling.

I also tried with the cmd line profiler. It works but Metrics cannot be obtained by this way and I miss a lot of information…

An other one asked almost the same question here: https://devtalk.nvidia.com/default/topic/522815/?comment=3707664. Nobody answered him, so I’m starting a new topic.

Does anyone know how to profile an JAVA application with nvvp ? Is it possible ?

PS: I’m using CUDA 5.0 and the latest nvvp version

Thanks in advance
Guix

Generally, it shouldn’t matter if the application is in Java or Python or CUDA C. Are you sure your CUDA code is executed properly (e.g. do you check return values from all your CUDA calls)? Is your CUDA code executed in the same process as JVM (e.g. using plain JNI calls) or you spawn a separate process and use some form of IPC to drive it?

Hi to all, I have a similar problem, trying to profile a cuda shared lib that is called from Java.
@eugeno: could you please roughly outline how to proceed in this case!
thanks in advance -

Make sure your CUDA code output matches the expectations and check error codes of the CUDA runtime calls.

In most cases, the easiest approach is to create a harness (e.g. a simple unit-test, e.g. using CPP unit) that would call the shared library directly from the native code. This way it would be much easier to use CUDA tools like Nsight and memcheck to troubleshoot issues in CUDA code.