Solution for CUDA SDK's relative path problem CUDA SDK relative path problem

The CUDA SDK templates are internally dependent upon the cuda libraries. Hence they use relative path names to refer to these libraries and header files. So, if a person wants to create a new library, then he can either copy the template provided by the SDK, or can create his own template (but then needs to specify the location of the libraries where and when required).

Also, one needs to set a lot of environment variables in order to make the CUDA work!

This package is a ‘hack’ solution to all these problems.

Please download this package and see the README.txt for more information and usage.

Dont’ forget to send me the feedbacks! :)
cudaLib.zip (7.96 KB)

Well done, this is a great idea. Those linking errors are enough to drive any man insane :D

@ajes:
Thanks!
Any suggestions?

CUDA-LIB released!

GENERAL INFORMATION:
This package is the combination of the scripts uploaded in the following two threads:

  1. [url=“http://forums.nvidia.com/index.php?showtopic=77743”]http://forums.nvidia.com/index.php?showtopic=77743[/url]
  2. [url=“http://forums.nvidia.com/index.php?showtopic=78107”]http://forums.nvidia.com/index.php?showtopic=78107[/url]

DELIVERABLES:
This package consists of 3 scripts: cudaInstall.sh, cu.sh and libGen.sh.

  1. cudaInstall.sh: This is the script which is a one command install to all of the cuda driver, api and toolkit.
  2. cu.sh: This is the script which takes care of the dependencies which I mentioned previously. But, this script looks for a particular organization inside your project folder. For more details, please open this script and go through its preamble or type ‘cu.sh -h’ in your command line.
  3. libGen.sh: Since, ‘cu.sh’ is more concerned about the project folder organization, many users might find it difficult to stick to this format. Here’s the place where this script fits in. This scripts generates the project folders as demanded by the ‘cu.sh’. Again, for more details, please open this script and go through its preamble or type ‘libGen.sh -h’ in your command line. (To understand this command, run this and look into the folders which this script has created)

NEW FEATURES:
‘cudaInstall.sh’ no changes. The previous version has been used unchanged.
‘cu.sh’ no changes. The previous version has been used unchanged.
‘libGen.sh’ has undergone a major improvisation in order to generate a project folder for cuda which contains:

  1. configuration files for emacs, so that when you open the CUDA code they’ll automatically be syntax highlighted, you can switch between different files and modify them and then compile them (in emacs window itself)! And finally you can even execute the executable generated after the compilation.
  2. Well written (auto-generated) README files inside the project folder, which is very helpful for documentation.

INSTALLATION: (A piece of cake!)
There’s no need for any installations for this package! However, for safe execution, one has to follow the guidelines below:

  1. Unpack the zip file.
  2. Give execution permission to all of the above scripts. (chmod +x *.sh)
  3. Add the location of this package into the ‘PATH’ environment variable.

LIMITATIONS:

  1. Currently, this package is helpful for projects which use either ‘.c’ or ‘.cu’ (or both)
    file extensions.
  2. These scripts currently don’t check apriori, for the CUDA installation.
  3. You need to work on either the linux platform or on the linux emulators (viz. cygwin).

CONTACT:
I’ll be more than happy to receive your feedbacks, suggestions, queries and bug-reports.

                                             Thejaswi. N. S  (snanditale@nvidia.com)

cuda_lib.zip (16.1 KB)

Why don’t you post the README file here? I’m still not too clear about what this does (although that second post gives a much better idea than the first). Now I’m a windows user, but i’d like to know more about this for when I move to linux. (it’s for linux, right? despite being a .zip file? see, you’ve gotta explain this stuff.)

@alex:

  1. The first post was full of these mistakes you mentioned! :( Hence, I posted the second release of these scripts under the 4th post.
  2. Yea, its for linux environment. Some other limitations have been listed out under the ‘LIMITATIONS’ section.
  3. Please refer to the 4th post under this thread for a stable release. 4th post also contains a detailed README posted.

Well, again, it was something about organization in the project folder and then “download and see for yourself.” But I have no idea why i need it. What is it about my project folder than needs organizing?? (The ‘new features’ section said some pretty intriguing stuff – but what are all the “old” features??)

Start from the beginning. Think of it as you’re trying to sell a product and you want people to use it. Think of all the cool open source projects you miss out on because they kind of expect everyone to take time to investigate them and don’t try to grab ppls’ attention.