Squisher: thanks for the reply but way too cryptic for me to understand. where? how? I am running VS2010 under Win 7. cant find “terminal redirection” anywhere. can you give more detailed response ?
Has anybody resolved this? Squisher’s answer is fine, but I would like more control than that – for example, I would like different kernels to output to different files. Like jm@imagemining.net, I am using VS2010, Win7, and my printf output goes into the ether when using freopen.
__global__ void printfTst()
{
printf("This is the Kernel Output");
}
void main()
{
cudaSetDevice(0);
printf ("CPU output before redirection.");
printfTst<<<1,1>>>();
cudaDeviceSynchronize();
freopen ("d:myfileStdOut.txt","w",stdout);
freopen ("d:myfileStdErr.txt","w",stderr);
printf ("CPU output redirected to a file stdout.");
printfTst<<<1,1>>>();
cudaDeviceSynchronize();
cudaDeviceReset();
fclose (stdout);
fclose(stderr);
}