I’m on a shared machine and don’t have root.
My code dies with the following CUDA error
CUDA driver version is insufficient for CUDA runtime version
I want to build my program for the older toolkit. I would assume that this is possible as commercial applications are distributed with support for something earlier then the latest toolkit (?).
I have played around with the arch flag, but have no success.
nvcc -arch=compute_13 fun.cu
nvcc -arch=compute_20 fun.cu
Whats the flag to compile to an earlier toolkit version?
In my case I have a version 4 toolkit, but I believe the driver only does version 3.
I’m not aware of command line flags or similar options to tell a CUDA 4.x toolkit to behave as if it were a CUDA 3.x toolkit, for example.
And as you’ve discovered, for a particular version of the toolkit, a particular driver version (or newer) is required.
One approach would be to install your desired toolkit on your own. You don’t need root privilege for this, but you will need some disk space in your user directories. Select a desired toolkit from the archive and install it onto a local directory in your user directory space. (The toolkit will prompt you for an install location, and to get additional toolkit install options you can do:
sh <toolkit filename> --help). Once you have installed the toolkit to your local directory, e.g. /home/user/cuda, then modify your PATH to include /home/user/cuda/bin (before any other cuda directories, such as /usr/local/cuda/bin) and your LD_LIBRARY_PATH to include /home/user/cuda/lib and /home/user/cuda/lib64 (before any other cuda lib directories.) If you want to make these permanent you can edit your .bashrc file or use a similar approach, depending on distro/shell. You should then be able to type your nvcc compile commands normally. If you are linking in any specific libraries like cublas, etc. you will need to point to the cublas library in your local directory using the -L compiler/linker switches as usual.The driver is not affected by any of this, nor is the cuda toolkit installed in a community location such as /usr/local/cuda. If you revert your PATH and LD_LIBRARY_PATH environment variables, you should restore the previous functionality of using the cuda toolkit installed in the community location.