printf / cuPrintf on Tesla S2050

Hi people,I want to know how to use printf / cuprintf on my Tesla S2050. My simple code is:

#include <stdio.h>

global void print(){

int main(){
return 0;

and I compile with “nvcc -arch sm_20 …” but don’t print never. Need to enter anything, include a library?
Needs cuPrintf of version of cuda toolkit registered? Thanks for all!

Solved! I must insert cudaDeviceReset(); :P