"Lu, Xinghua" <xing...@pitt.edu> writes: > I am new to pyCuda, and I would appreciate your help in advance. > > I were able to write a few short pyCuda code but run into a roadblock with > one at my hand. > > The code snippet is as follows: > > tumorLnFScore = np.zeros((nTumorMutGenes, > nTumorDEGs)).astype(np.float32) > gpu_tumorLnFScore = cuda.mem_alloc(tumorLnFScore.nbytes) > ## bunch of other initialization of GPU variables for func call > > func = mod.get_function("PanCanTDIMarginalGPU") > func(gpu_mutcnaMatrix, gpu_degMatrix, gpu_nTumors, > gpu_tumormutGeneIndx, gpu_nTumorGTs,\ > gpu_degGeneIndx, gpu_nTumorDEGs, gpu_tumorLnFScore, > gpu_cancerTypeColIndx,\ > gpu_ge1stDriverIndices, gpu_ge2ndDriverIndices, block=(blocksize, > 1, 1), grid=(nBlockInGrid, 1)) > > cuda.memcpy_dtoh(tumorLnFScore, gpu_tumorLnFScore) > > However, pyCuda returned the following error: > > File "/home/kevin/GroupDropbox/TDI/PanCanTDIGPU.py", line 421, in > calcPanCanTDIGPU > > cuda.memcpy_dtoh(tumorLnFScore, gpu_tumorLnFScore) > > pycuda._driver.LogicError: cuMemcpyDtoH failed: invalid/unknown error code > > PyCUDA WARNING: a clean-up operation failed (dead context maybe?) > > cuMemFree failed: invalid/unknown error code > > > My question is: > > What would be most common cause of the above error, on pycuda side or > in Cuda C/C++ side? Thanks in advance for helping.
You probably have a bug in one of your kernel codes, which caused a segfault on the GPU, as a result of which your GPU context got killed. HTH, Andreas
signature.asc
Description: PGP signature
_______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda