This project is read-only.

Error with SynchronizeStream

Mar 14, 2013 at 10:04 PM
Hi!

I have a problem. unknown exception occurs at first call of gpu.SynchronizeStream(i) when i executed next code:
            for (int i = 0; i < 16; i++)
            {
                gpu.LaunchAsync(16, 1024, i, "Func", arguments);
            }

            for (int i = 0; i < 16; i++)
            {
                gpu.SynchronizeStream(i);                
            }
At first I thought that the problem is that I exceed the maximum number of streams that can launch at once.
But then I discovered an interesting phenomenon. If you remove the 10 argument, then it will work. But the arguments are filled in the loop. Why 10 is a special argument? Also, if I run this kernel separately, that will be ok.

In what could be the problem?
Mar 15, 2013 at 2:40 AM
If you’re getting an ErrorUnknown after either launching your kernel or (if launching it asynchronously) on the next cudafy instruction, that means that your kernel aborted unexpectedly. There could be a plethora of reasons for that, but the most frequent is memory access violations. Use emulation mode to pinpoint your problem. The CUDA Toolkit “cuda-memcheck.exe” can also help you there. Other frequent reasons for ErrorUnknown are calling “return” on only a few of the threads within the block, or dividing by zero, or even launching a kernel with an excessively large blockDim*GridDim.
Mar 17, 2013 at 6:43 PM
Thank you! The problem was with the data that I passed to the function. Emulation really helped.