Unspecified Launch error with histogram256 Unspecified launch error occurs in histogram256 sample.

Hi all,

I tried to call the histogram256 kernel (provided with nVidia CUDA SDK). During the execution it either shows “unspecified launch error” or BSOD. When I checked the DUMP, it shows that the “stop error message” THREAD_STUCK_IN_DEVICE_DRIVER_M and DEFAULT_BUCKET_ID: GRAPHICS_DRIVER_FAULT

I’m calling the kernel something 1000 iterations with fixed data

[codebox]

// srand(2007);

// for(i = 0; i < DATA_N; i++)

// h_Data[i] = rand() % 256;

memset( h_Data, 0, DATA_SIZE ); // instead of 0 we can give any values[/font]

[/codebox]

It show unspecified launch error. What could be the reason for this?

I checked the CUDA kernel code and found that the following function making the problem

[codebox]

device inline void addData256(volatile unsigned int *s_WarpHist, unsigned int data, unsigned int threadTag)

{

    unsigned int count;

    do{

        count = s_WarpHist[data] & 0x07FFFFFFU;

        count = threadTag | (count + 1);

        s_WarpHist[data] = count;

   }while(s_WarpHist[data] != count);

}

[/codebox]

when I commented as follows, the it resolved this issue (even if I wont get the correct output).

[codebox]device inline void addData256(volatile unsigned int *s_WarpHist, unsigned int data, unsigned int threadTag){

    unsigned int count;

 //   do{

        count = s_WarpHist[data] & 0x07FFFFFFU;

        count = threadTag | (count + 1);

        s_WarpHist[data] = count;

   // }while(s_WarpHist[data] != count);

}[/codebox]

What could be the reason for this?

I’m running the program under

nVidia 8880 GT - 512 MB

BIOS Version: 62.92.16.00.05

Driver Version: nv4_disp 6.14.11.7813 (Forceware 178.13) /XP

Windows XP - SP3

I’ve attached the problematic source code.

Thanks in Advance
histogram256.rar (15.5 KB)