I should mention that with the project template, if you want to write your program in C, it works just fine, but ONLY if you make sure to leave at least one .cpp file in the project with the ‘target’ box checked. I’m not sure why, but if there isn’t a cpp file, xcode balks and you get a linking error. There doesn’t have to be anything in this .cpp file, and your main can be a main.c. You just have to have it there.
I’m not clear on what you’re asking. Do you mean the path for nvcc to use to search for libraries, etc, or the path to nvcc itself?
If you mean the path for nvcc to use to search for libraries… like if you have additional non-standard libraries that you want to include in your project, and you don’t store them in the project folder itself, then you might have to pass a path flag to nvcc… something like a “-P /blah/moreblah/thatfolderinblah/stuff/” or something.
If you mean the path to nvcc itself, then you can use a symbolic link file (like an alias, but unix style) in your /usr/local/bin/ folder to point to the actual location of nvcc. Do some googling and you should be able to figure out how to do that (I forget off the top of my head).
Ok, so i have downloaded the two files and put them in the folders said below. Now as i enter Xcode i can choose the CUDA template alright and i can also compile the “hello world” program while including <omp.h>. the only problem is that in the information section of my project, the variables and configurations are different. i dont have a section called “Custom settings for NVCC” or sth like it. does this mean that i have a problem? i have not yet checked any actual CUDA code with this.
Sorry, haven’t been checking the forums lately. I actually haven’t used cuda at all in months, due to classes getting in the way (in final semester atm). If I recall correctly, the cuda specific settings would only show up if you had a particular file type in the project. It may have been a .c, or a .cu, or .cpp. If you fool around with different combinations of dummy files, in addition to the normal hello world files, it might show up properly. However, since we’re now two or three cuda releases past the one that the plugin was made for, and at least two past the one I made the templates for, it’s probably rather likely that the stuff is simply broken.
What we REALLY need is either someone from Apple, or someone else who knows the Xcode plugin system REALLY well, to start maintaining the plugin and templates. Honestly, I’m not sure why there isn’t already some official plug in. The only thing I can guess is that Apple refuses to make it since they want to push OpenCL, and NVIDIA doesn’t have access to the guts of Xcode to make it less than a major pain in the butt to do.
Maybe we should all start emailing apple though? I’d personally really like to see better support for scientific programming in xcode, including fortran support, cuda support, etc. There’s really no good reason that mac using scientists should be stuck with technology from 30 years ago when we want to write programs. Give us a little love!
Paul
PS another possibility might be that you have the wrong version of the plugin and templates. I modified the original plugin and that is how it came to have the line for custom nvcc tags, or whatever it was. So also sift back through the posts and see if you’ve got the version I posted.
Double check both the user specific library folder (in my case it’s /Users/TraxusIV/Library/Application Support/Developer/Shared/Xcode/) as well as the root library folder (/Library/Application Support/Developer/Shared/Xcode). Sometimes the plugin may be in one, or both locations. After making sure that the stuff is gone from there, I’d reinstall Xcode. You can download the latests version from Apple’s ADCM site if you have access, or perhaps from the downloads section of the main site… lemme see… Hmmm, go here: http://developer.apple.com/mac/ though you may have to register (can be free) to download it. Otherwise, xcode is included on every OS X install disk, so just grab the latest version you have and install. Should be in the Optional Installs folder or something.
That’s my best recommendation, unfortunately. Sorry I can’t be any more help. :(
You must download and copy “CUDA Projects” folder to “$HOME/Library/Application Support/Developer/Shared/Xcode/Project Templates”.
But it not works too. At first - “warning: no rule to process file…” to .cu-files during translation.
It’s interesting, when NVIDIA developers will say something about SLeo+Xcode3.2.1+CUDA3? And it will be a great deal to make Xcode 3.2.1 templates for Cocoa and Carbon projects with CUDA (Current state of integration is natural nightmare)