Integration with XCODE? Anyone created a CUDA template project?
  1 / 7    
Everyone,

First off, CUDA is amazing.. With my 8-Core and the FX5600.. Dang.. Watching the nbody demo is awesome!

Has anyone created a CUDA project template for XCODE 3.0?

At the moment it appears that all the CUDA samples are over make files, but there are no XCODE project templates..

Anyone out there created one? If not, was there a specific IDE/debug environment (Eclipse e.g.) that was used for the MAC OSX inside the Nvidia CUDA group?

Thanks in advance,

Chris Aiken
Aiken Development LLC
Everyone,



First off, CUDA is amazing.. With my 8-Core and the FX5600.. Dang.. Watching the nbody demo is awesome!



Has anyone created a CUDA project template for XCODE 3.0?



At the moment it appears that all the CUDA samples are over make files, but there are no XCODE project templates..



Anyone out there created one? If not, was there a specific IDE/debug environment (Eclipse e.g.) that was used for the MAC OSX inside the Nvidia CUDA group?



Thanks in advance,



Chris Aiken

Aiken Development LLC

#1
Posted 02/21/2008 03:46 AM   
I use CMake (www.cmake.org) and FindCUDA.cmake (http://www.sci.utah.edu/~abe/FindCuda.html) to generate visual studio/makefiles/xcode projects for windows/linux/mac. It works great for me.

Note: I haven't actually tried FindCUDA.cmake on mac os x yet. I don't have an intel mac to try it on. You may need to add a few search paths to FindCUDA.cmake so that it finds the compiler and libraries on mac.
I use CMake (www.cmake.org) and FindCUDA.cmake (http://www.sci.utah.edu/~abe/FindCuda.html) to generate visual studio/makefiles/xcode projects for windows/linux/mac. It works great for me.



Note: I haven't actually tried FindCUDA.cmake on mac os x yet. I don't have an intel mac to try it on. You may need to add a few search paths to FindCUDA.cmake so that it finds the compiler and libraries on mac.

#2
Posted 02/21/2008 02:28 PM   
[quote name='MisterAnderson42' date='Feb 21 2008, 10:28 AM']I use CMake (www.cmake.org) and FindCUDA.cmake (http://www.sci.utah.edu/~abe/FindCuda.html) to generate visual studio/makefiles/xcode projects for windows/linux/mac. It works great for me.

Note: I haven't actually tried FindCUDA.cmake on mac os x yet. I don't have an intel mac to try it on. You may need to add a few search paths to FindCUDA.cmake so that it finds the compiler and libraries on mac.
[right][snapback]330721[/snapback][/right]
[/quote]

Thanks for the help! I will try this and reply back with the results.

Regards,

Chris Aiken
Aiken Development LLC
[quote name='MisterAnderson42' date='Feb 21 2008, 10:28 AM']I use CMake (www.cmake.org) and FindCUDA.cmake (http://www.sci.utah.edu/~abe/FindCuda.html) to generate visual studio/makefiles/xcode projects for windows/linux/mac. It works great for me.



Note: I haven't actually tried FindCUDA.cmake on mac os x yet. I don't have an intel mac to try it on. You may need to add a few search paths to FindCUDA.cmake so that it finds the compiler and libraries on mac.

[snapback]330721[/snapback]






Thanks for the help! I will try this and reply back with the results.



Regards,



Chris Aiken

Aiken Development LLC

#3
Posted 02/22/2008 10:52 PM   
[quote name='MisterAnderson42' date='Feb 21 2008, 02:28 PM']I use CMake (www.cmake.org) and FindCUDA.cmake (http://www.sci.utah.edu/~abe/FindCuda.html) to generate visual studio/makefiles/xcode projects for windows/linux/mac. It works great for me.

Note: I haven't actually tried FindCUDA.cmake on mac os x yet. I don't have an intel mac to try it on. You may need to add a few search paths to FindCUDA.cmake so that it finds the compiler and libraries on mac.
[right][snapback]330721[/snapback][/right]
[/quote]

Good information, thanks!
[quote name='MisterAnderson42' date='Feb 21 2008, 02:28 PM']I use CMake (www.cmake.org) and FindCUDA.cmake (http://www.sci.utah.edu/~abe/FindCuda.html) to generate visual studio/makefiles/xcode projects for windows/linux/mac. It works great for me.



Note: I haven't actually tried FindCUDA.cmake on mac os x yet. I don't have an intel mac to try it on. You may need to add a few search paths to FindCUDA.cmake so that it finds the compiler and libraries on mac.

[snapback]330721[/snapback]






Good information, thanks!

#4
Posted 02/24/2008 04:18 PM   
I have a native Xcode 3.0 plugin for nvcc which I'll post here in a day or two (after a wee bit of testing) ;)

It's missing a few options - mostly for intermediate file handling, but for straight compiles most of it works ok.
I have a native Xcode 3.0 plugin for nvcc which I'll post here in a day or two (after a wee bit of testing) ;)



It's missing a few options - mostly for intermediate file handling, but for straight compiles most of it works ok.

#5
Posted 02/25/2008 01:07 PM   
Here's a snapshot.

Unpack NVCuda.pbplugin.zip and put the bundle into ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins, then restart Xcode.

Xcode should recognise .cu files and add them to the dependancy graph. If you have a target with cuda sources, there should be a CodeGeneration section after the GCC 4.0 sections called "NVIDIA Cuda".

Note that everything in that section is separate from the project wide GCC options, so there are separate preprocessor macros, optimisation etc, however I used the include path from the project settings (i.e. HEADER_SEARCH_PATHS) so you only need to do those once. Adding in dyld or frameworks as usual will sort out the linker flags and search paths.

Also, the dependancy graph at this stage doesn't know about the -hostcompilation option and so defaults to 'ld', in which case you'd have to link against all the relevant libs. But you can force the linker if need be by setting a user defined variable "LD" to either gcc or g++.

I haven't really run anything with this, but let me know if it you have any issues.
Here's a snapshot.



Unpack NVCuda.pbplugin.zip and put the bundle into ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins, then restart Xcode.



Xcode should recognise .cu files and add them to the dependancy graph. If you have a target with cuda sources, there should be a CodeGeneration section after the GCC 4.0 sections called "NVIDIA Cuda".



Note that everything in that section is separate from the project wide GCC options, so there are separate preprocessor macros, optimisation etc, however I used the include path from the project settings (i.e. HEADER_SEARCH_PATHS) so you only need to do those once. Adding in dyld or frameworks as usual will sort out the linker flags and search paths.



Also, the dependancy graph at this stage doesn't know about the -hostcompilation option and so defaults to 'ld', in which case you'd have to link against all the relevant libs. But you can force the linker if need be by setting a user defined variable "LD" to either gcc or g++.



I haven't really run anything with this, but let me know if it you have any issues.

#6
Posted 02/25/2008 01:50 PM   
[quote name='llamatron' date='Feb 25 2008, 09:50 AM']Here's a snapshot.

Unpack NVCuda.pbplugin.zip and put the bundle into ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins, then restart Xcode.

Xcode should recognise .cu files and add them to the dependancy graph.  If you have a target with cuda sources, there should be a CodeGeneration section after the GCC 4.0 sections called "NVIDIA Cuda".

Note that everything in that section is separate from the project wide GCC options, so there are separate preprocessor macros, optimisation etc, however I used the include path from the project settings (i.e. HEADER_SEARCH_PATHS) so you only need to do those once.  Adding in dyld or frameworks as usual will sort out the linker flags and search paths.

Also, the dependancy graph at this stage doesn't know about the -hostcompilation option and so defaults to 'ld', in which case you'd have to link against all the relevant libs.  But you can force the linker if need be by setting a user defined variable "LD" to either gcc or g++.

I haven't really run anything with this, but let me know if it you have any issues.
[right][snapback]333101[/snapback][/right]
[/quote]

llamatron,

I really appreciate the posting. I will try this ASAP and give you the feedback!

This should provide a more much comfortable CUDA development environment.

Unfortunately, I am out of the office and will not be in front of the machine until the early next. As soon as I get back, I will give this a try.

Hopefully, I can return the favor some day.

Regards,

Chris Aiken
Aiken Development LLC
[quote name='llamatron' date='Feb 25 2008, 09:50 AM']Here's a snapshot.



Unpack NVCuda.pbplugin.zip and put the bundle into ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins, then restart Xcode.



Xcode should recognise .cu files and add them to the dependancy graph.  If you have a target with cuda sources, there should be a CodeGeneration section after the GCC 4.0 sections called "NVIDIA Cuda".



Note that everything in that section is separate from the project wide GCC options, so there are separate preprocessor macros, optimisation etc, however I used the include path from the project settings (i.e. HEADER_SEARCH_PATHS) so you only need to do those once.  Adding in dyld or frameworks as usual will sort out the linker flags and search paths.



Also, the dependancy graph at this stage doesn't know about the -hostcompilation option and so defaults to 'ld', in which case you'd have to link against all the relevant libs.  But you can force the linker if need be by setting a user defined variable "LD" to either gcc or g++.



I haven't really run anything with this, but let me know if it you have any issues.

[snapback]333101[/snapback]






llamatron,



I really appreciate the posting. I will try this ASAP and give you the feedback!



This should provide a more much comfortable CUDA development environment.



Unfortunately, I am out of the office and will not be in front of the machine until the early next. As soon as I get back, I will give this a try.



Hopefully, I can return the favor some day.



Regards,



Chris Aiken

Aiken Development LLC

#7
Posted 02/26/2008 03:30 AM   
Anonymous browsers: use the link on the bottom to the lite version of the forum to see the attachments in llamatron's post.
Anonymous browsers: use the link on the bottom to the lite version of the forum to see the attachments in llamatron's post.

#8
Posted 04/11/2008 03:55 AM   
Hi Akin,

Did CMake work for you?
Hi Akin,



Did CMake work for you?

#9
Posted 06/09/2008 05:11 PM   
[quote name='llamatron' date='Feb 25 2008, 08:50 AM']Here's a snapshot.

Unpack NVCuda.pbplugin.zip and put the bundle into ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins, then restart Xcode.

Xcode should recognise .cu files and add them to the dependancy graph.  If you have a target with cuda sources, there should be a CodeGeneration section after the GCC 4.0 sections called "NVIDIA Cuda".

Note that everything in that section is separate from the project wide GCC options, so there are separate preprocessor macros, optimisation etc, however I used the include path from the project settings (i.e. HEADER_SEARCH_PATHS) so you only need to do those once.  Adding in dyld or frameworks as usual will sort out the linker flags and search paths.

Also, the dependancy graph at this stage doesn't know about the -hostcompilation option and so defaults to 'ld', in which case you'd have to link against all the relevant libs.  But you can force the linker if need be by setting a user defined variable "LD" to either gcc or g++.

I haven't really run anything with this, but let me know if it you have any issues.
[right][snapback]333101[/snapback][/right]
[/quote]

llamatron,
Thank you very much for the Xcode plugin! I have installed it as described and it almost works, but I'm having some linker errors when trying to compile one of the basic sample codes from the tutorials. As I am just getting started with CUDA, it is likely a problem with my own code organization, but I can't get it running on the command line either. (The example projects in the SDK compile and run fine.) Do you have a sample Xcode project you could post?

Thanks again,
Aaron
[quote name='llamatron' date='Feb 25 2008, 08:50 AM']Here's a snapshot.



Unpack NVCuda.pbplugin.zip and put the bundle into ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins, then restart Xcode.



Xcode should recognise .cu files and add them to the dependancy graph.  If you have a target with cuda sources, there should be a CodeGeneration section after the GCC 4.0 sections called "NVIDIA Cuda".



Note that everything in that section is separate from the project wide GCC options, so there are separate preprocessor macros, optimisation etc, however I used the include path from the project settings (i.e. HEADER_SEARCH_PATHS) so you only need to do those once.  Adding in dyld or frameworks as usual will sort out the linker flags and search paths.



Also, the dependancy graph at this stage doesn't know about the -hostcompilation option and so defaults to 'ld', in which case you'd have to link against all the relevant libs.  But you can force the linker if need be by setting a user defined variable "LD" to either gcc or g++.



I haven't really run anything with this, but let me know if it you have any issues.

[snapback]333101[/snapback]






llamatron,

Thank you very much for the Xcode plugin! I have installed it as described and it almost works, but I'm having some linker errors when trying to compile one of the basic sample codes from the tutorials. As I am just getting started with CUDA, it is likely a problem with my own code organization, but I can't get it running on the command line either. (The example projects in the SDK compile and run fine.) Do you have a sample Xcode project you could post?



Thanks again,

Aaron

#10
Posted 06/12/2008 09:36 PM   
All: I've finally got a simple project, the matrix multiplication example, building and running correctly on Xcode with the CUDA Xcode plugin! It is attached here. Note that emulation is enabled and I haven't tested it on real NVIDIA hardware. This is working for me on a MacBook Pro with OS 10.5.3 and CUDA 1.1 beta.

Hope this helps!
All: I've finally got a simple project, the matrix multiplication example, building and running correctly on Xcode with the CUDA Xcode plugin! It is attached here. Note that emulation is enabled and I haven't tested it on real NVIDIA hardware. This is working for me on a MacBook Pro with OS 10.5.3 and CUDA 1.1 beta.



Hope this helps!

#11
Posted 06/27/2008 02:41 PM   
I loaded the plugin for Xcode and tried your sample project just by loading it and hitting "build and go". The message I got was build succeeded, but couldn't find the executable. What did i miss?
I loaded the plugin for Xcode and tried your sample project just by loading it and hitting "build and go". The message I got was build succeeded, but couldn't find the executable. What did i miss?

#12
Posted 07/03/2008 02:38 PM   
[quote name='jcheak' date='Jul 3 2008, 09:38 AM']I loaded the plugin for Xcode and tried your sample project just by loading it and hitting "build and go".  The message I got was build succeeded, but couldn't find the executable.  What did i miss?
[right][snapback]404364[/snapback][/right]
[/quote]

Are you using Xcode 3.0 or 3.1? I built this with 3.1 (which comes with the iPhone SDK beta), so it may be a project compatibility issue. Try creating a new project and copying the files in, making sure to set the correct project variables. I've taken notes on what I did to get it running [url="http://web.mac.com/thompsonaaron/Aaron_Thompson/Developing_with_Macs/Entries/2008/5/7_Installing_nVidia_CUDA_on_Leopard.html"]here[/url].
[quote name='jcheak' date='Jul 3 2008, 09:38 AM']I loaded the plugin for Xcode and tried your sample project just by loading it and hitting "build and go".  The message I got was build succeeded, but couldn't find the executable.  What did i miss?

[snapback]404364[/snapback]






Are you using Xcode 3.0 or 3.1? I built this with 3.1 (which comes with the iPhone SDK beta), so it may be a project compatibility issue. Try creating a new project and copying the files in, making sure to set the correct project variables. I've taken notes on what I did to get it running here.

#13
Posted 07/09/2008 01:54 PM   
I am a beginner . Forgive me for my question .
I unpacked NVCuda.pbplugin.zip and got a folder named Contents . But I couldn't find the folder ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins
(may be ~/Library/Application /Support/Developer/Shared/Xcode/Plug-ins
or ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins )
My PC is MacBook Pro, and I am using 0SX 10.5.4 . So maybe the path name is quite different .I tried finding Plug-ins folder, but no proper result . Please tell me how I should do . Thank you very much.
I am a beginner . Forgive me for my question .

I unpacked NVCuda.pbplugin.zip and got a folder named Contents . But I couldn't find the folder ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins

(may be ~/Library/Application /Support/Developer/Shared/Xcode/Plug-ins

or ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins )

My PC is MacBook Pro, and I am using 0SX 10.5.4 . So maybe the path name is quite different .I tried finding Plug-ins folder, but no proper result . Please tell me how I should do . Thank you very much.

#14
Posted 09/22/2008 12:29 PM   
[quote name='belady' date='Sep 22 2008, 07:29 AM']I unpacked NVCuda.pbplugin.zip and got a folder named Contents . But I couldn't find the folder ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins
(may be ~/Library/Application /Support/Developer/Shared/Xcode/Plug-ins
or ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins )
My PC is MacBook Pro, and I am using 0SX 10.5.4 . So maybe the path name is quite different .I tried finding Plug-ins folder, but no proper result . Please tell me how I should do . Thank you very much.
[right][snapback]442816[/snapback][/right]
[/quote]

Just create the folder if it doesn't exist. The correct folder, again, is:
~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins
[quote name='belady' date='Sep 22 2008, 07:29 AM']I unpacked NVCuda.pbplugin.zip and got a folder named Contents . But I couldn't find the folder ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins

(may be ~/Library/Application /Support/Developer/Shared/Xcode/Plug-ins

or ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins )

My PC is MacBook Pro, and I am using 0SX 10.5.4 . So maybe the path name is quite different .I tried finding Plug-ins folder, but no proper result . Please tell me how I should do . Thank you very much.

[snapback]442816[/snapback]






Just create the folder if it doesn't exist. The correct folder, again, is:

~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins

#15
Posted 10/16/2008 02:29 PM   
  1 / 7    
Scroll To Top