Hi,
In my program, I have to call cudppSort, cudppScan and custom kernel launcher.
If I independently run the kernel launcher, it fines.
However , I run all the functions accordingly, it throws exception
Exception in thread "Main Thread" jcuda.CudaException: CUDA_ERROR_LAUNCH_FAILED
at jcuda.driver.JCudaDriver.checkResult(JCudaDriver.java:164)
at jcuda.driver.JCudaDriver.cuCtxSynchronize(JCudaDriver.java:1288)
at jcuda.utils.KernelLauncher.call(KernelLauncher.java:859)
Do you have any idea why I have this exception?
Is it possible I have not much device memory to call the function since I am processing a huge set of data ?
Regards,
Lemon
Hello Lemon,
Yes, this is possible. You should make sure that you delete/free as much data as possible before each new step. (For example, you should destroy all handles and plans that you no longer need).
BTW: I’ll respond to you E-Mail as soon as possible.
bye
Marco
Thanks~ The question in email is not urgent, I know you are very busy, so that task can be low priority.
One more question want to ask free data.
If I create a Pointer
Pointer deviceId = new Pointer();
cudaMalloc(deviceId , memSize);
is it just call the cudaFree can free out the memory?
cudaFree(deviceId);
Same question about CUdeviceptr
CUdeviceptr deviceId = new CUdeviceptr();
cuMemAlloc(deviceId , memSize);
//.....
cuMemFree(deviceId);
Is the above code can free out the memory clearly???
Regards,
Lemon
Hello,
Yes, calling cudaFree or cuMemFree should be enough. But note that for CUDPP, you also have to call “cudppDestroyPlan” with the plan handles that you no longer need. CUDPP internally allocates memory (and sometimes, it allocates quite a lot of memory -_- ) for the plans. This memory is freed by calling cudppDestroyPlan.
bye
Marco
Hi Marco,
I found the problem, it is the bug of my kernel , not related to memory in this time.
Thanks for your help again.
Lemon