errors in cuda 4.0

I’m just trying the cuda 4.0 on my macbook. And, as usual, i’m too lazy to read the “what’s new” page or doc. Just go straight to test it until got stuck with the errors.. 😀

Here, I’ll list any kind of errors i experienced with, and hopefully it’ll come along with solution.. 😛

First, i’m trying to compile an old simple code. This code was fine using cuda 3.2, but when I compile it using cuda 4.0, this kind of error comes out..

cudaLK.o:1203:53: warning: null character(s) ignored
cudaLK.o:1203:101: warning: null character(s) ignored
cudaLK.o:1203:112: warning: null character(s) preserved in literal
cudaLK.o:1203:112: warning: missing terminating ' character
cudaLK.o(1): error: unrecognized token

whoaa…… this forced me to read the programming guide, again..

Finally, when my eyes went to nvcc section, I got the clue… It looks like nvidia change the format of nvcc command.. In earlier version, simple nvcc command was

nvcc -c <cudacodefile>.cu -o <cudacodefile>.o

But for cuda 4.0, you don’t need to define the object file. nvcc will automatically define the object file based on the .cu file name. So, it should be simply..

nvcc -c <cudacodefile>.cu

to be continued later..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s