Warp Illegal Address

when I run my executable cuda file in cuda-gdb, I get error:

CUDA Exception: Warp Illegal Address
The exception was
 triggered at PC 0x1015608
Program received signal CUDA_EXCEPTION_14, Warp Illegal Address.
[Switching focus to CUDA kernel 0, grid 206, block (13,0,0), thread (90,0,0), device 0, sm 0, warp 2, lane 26]
0x0000000001015630 in searchline(float4*, float4*, float4*, int*, float*)<<<(25,1,1),(1024,1,1)>>> ()
(cuda-gdb) quit

Here is my kernel code:

__device__ int snum[2];
__global__ void searchline(float4 *data1,float4 *data2,float4* data3,int *num,float *odata)
{
    int index=threadIdx.x+blockDim.x*blockIdx.x;
    float temp=0;
    float4 temp1;
    if(index<25600)
    {    
        temp=odata[index];
        temp1=data1[index];
        if(temp>50&&temp<300)
        {    
            data2[snum[0]]=temp1;
                 
            atomicAdd(&snum[0],1);
            __syncthreads();
        }    
        else if(temp>500)
        {    
            data2[snum[1]]=temp1;
            atomicAdd(&snum[1],1);
            __syncthreads();
        }    
    }    
    __syncthreads();
    if(threadIdx.x==0)
    {
        snum[0]=ssnum[0];
        snum[1]=ssnum[1];
    }
}

How can I solve this error? Thanks!

Hi,

From your log:

triggered at PC 0x1015608

It looks like you launch cuda-gdb from a desktop environment.
Do you want to use it to cross-compile a program on TX2?
Or you try to check a program also running on an x86-machine?

Thanks.

I have found that the cause of the problem is that it appears on atomic operations. Thank you!