Thanks, Andreas.
I find the region of the code causing problem, which puzzles me even more
because it is a simple matrix look up. The question is: under what
situation a memory read/write cause segfault? Does Cuda keep track of array
size? Thanks in advance for helping.
Best,
Xinghua
The code is as follows:
// vectors to hold tumors with GT == 1 and GT == 0
int* vecTumorWithGT = new int[nTumors];
int* vecTumorWithoutGT = new int[nTumors];
if (myThreadID < nTumorDEGs)
{
// loop through GTs rows
for (int g = 0; g < nTumorGTs; g++)
{
int curGTIndx = tumormutGeneIndx[g]; // look up row
// scan rows with a particular GT == 1 and 0
int nTumorGTOnes = 0;
int nTumorGTZeros = 0;
int myRowStart = nTumors * curGTIndx;
//scan through cols
for (int n = 0; n < nTumors; n++)
{
if (mutcnaMatrix[ myRowStart + n] == 1){
vecTumorWithGT[nTumorGTOnes++] = n;
}
else
vecTumorWithoutGT[nTumorGTZeros++] = n;
}
}
--
View this message in context:
http://pycuda.2962900.n2.nabble.com/PyCUDA-How-to-debug-cuMemcpyDtoH-failed-tp7575572p7575574.html
Sent from the PyCuda mailing list archive at Nabble.com.
_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda