Hello,
I have a problem with JCuda. Whenever I make API calls (such as, cuInit(0) or cudaSetDevice since I have multiple GPUs in my computer), the KernelLauncher.call(…) method does not work. I get an error saying that
“CUDA_ERROR_INVALID_HANDLE .” This ONLY happens if I have a cuInit() or other API call.
According to http://forum.byte-welt.de/showthread.php?p=17741#post17741 it might be the case that you have an outdated version of the KernelLauncher. However, I have to admit that I rarely had the chance to run tests on a multi-GPU platform. Additionally, some methods concerning the context/thread handling (attaching to threads etc) have changed in one of the last CUDA versions, and it might be the case that the KernelLauncher does not yet handle this properly for more complex setups than the ones I tested.
I’ll try to reproduce the error. Any further details (e.g. the order of the cuInit calls, the KernelLauncher initialization and the KernelLauncher#call) might be helpful.