cudaPrintfDisplay

Hi,

I have a small problem with cudaPrintfDisplay and cuda 1.1. Should cudaPrintfInit be called everytime after a cudaPrintfDisplay? If I call the same kernel twice and did a cudaPrintfDisplay without cudaPrintfInit as shown below, I get only the first display. If I add cudaPrintfInit before the second display call it works as expected. But I read that the init is to be called once unless one wants to increase buffer size, so I am confused.

#include "cuPrintf.cu"

__global__ 

void testKernel(int val) {

	cuPrintf ("Value is:% d \n", val);

}

int main () {

	cudaPrintfInit ();

	testKernel <<< 2, 3 >>> (10);

	cudaPrintfDisplay (stdout, true);

	printf("===============\n");

	testKernel <<< 2, 3 >>> (10);

	cudaPrintfDisplay (stdout, true);

	cudaPrintfEnd ();

	return 0;

}

Thanks.

It is indeed a bug as reported here.
http://forums.nvidia.com/index.php?showtopic=152643&st=0&p=1072637&fromsearch=1&#entry1072637
Changing that line fixes the problem.