I have recently learned about CUDA and am trying first just to get simple operations to work so I can learn. Currently, I am trying to just run the “increment array example” from the “getting started with CUDA” pdf on the nvidia site. I rewrote the code into notepad, assigned the variables arbitrarily, and saved it as test.cu However, when I went to compile it, I came across a few errors. I did not #include any files, and I am only using the standard namespace (using namespace std)
The first was a simple path error for cl.exe, which I believe to have fixed (It wasn’t included in the path). That may have caused the second issue, but I don’t believe so. I felt it might be important though, so I’m including it in this post.
The second is when I input ‘nvcc -g test.cu’ I get the following output:
c1xx : fatal error C1083: Cannot open source file: ‘test.cu’: No such file or directory.
I have tried moving the file to a new folder (whose path is C:\TEST), since I found there may be a path char limit when searching for the error. After switching the directory cmd is in (using ‘cd C:\TEST’) and trying the same input ‘nvcc -g test.cu’, I get the exact same error.
I am not very experienced with C, C++ (and obviously CUDA), or using cmd, so I may be missing something rather obvious. I am including test.cu in case there are any errors in it causing this problem (though I doubt it as the file supposedly isn’t found). It would be great if someone could scan through it quickly for me though and make sure it will work.
I was hoping that I could get some help with this problem here. Thanks in advance.
test.cu.txt (376 Bytes)