The Cuda 5 Second execution-time limit Finding a the way to work around the GDI timeout

It just works… External Media

Even the fluids demo etc… (spent more than an hour playing with this cool demo) :">

So it’s not my hardware that is at fault… it’s something wrong with my reasoning

[i]

  • What is the cudaThreadSynchronize() doing in this case?

  • Is it problematic to use a cudaThreadSynchronize between every call?

  • Anyhting else I should worry about?

[/i]

cudaThreadSynchronize() waits for the kernel to finish, you might want to sleep on cudaEvent instead

cudaEvent_t event;

	   cudaEventCreate(&event);

	   while(not_done)

		 {

			 kernel<<< ... , ... >>>(...);

			 cudaEventRecord(event,0);

	  

			 usleep(3450000); // expected time for kernel?

			 // Check that the kernel really has returned

			 while(cudaEventQuery(event) == cudaErrorNotReady)

				 usleep(1000);

		 }

	 

	  cudaEventDestroy( event );

You should worry less about overhead. Save/restore of all registers + shared + relaunch will not tax you more than 50 micro seconds. If you relaunch every 100ms, you can still check your mail and read the forums.

Now that’s a great tip… thanks!

ps: I will toast to your name when I’ll be in Stockholm having dinner on a Strandvägen cruise in exactly two month’s time… to the hour! :)


Mark (from Cambridge)

alternately just use cudaSetDeviceFlags(cudaUseBlockingSync) or whatever the function actually is, and you’ll accomplish the same thing with much less code. or use createEventWithFlags and wait on an event with blocking sync…

You can install Nsight Monitor, and in the option disable driver TDR.