Multiple CUDA versions? Can they coexist?

I presently have CUDA 3.2 installed and would like to run an app that requires CUDA 3.0. Is it possible to install them side by side or am I looking at something that would cause me a lot of grief? Further, the app requires a 32 bit CUDA installed on a 64 bit OS. (I have 64 bit OS and CUDA installed at the moment.) One possible problem is the display driver version. I am presently running 260.19.29 and the information for the app tells me that CODA 3.0 requires 256 version display drivers (though I could find no mention of that in the information I found for the 3.0 toolkit.)

If different CUDA versions don’t platy well with each other, is it possible to run a different version in a VM? Can the guest directly manipulate the video H/W or would it be constrained to the driver version installed on the host?

If it matters, I’m using a GTX 460 card.

many thanks,
hank

You can install multiple versions alongside one another without too much difficulty (I think I have every release from 2.2 to 3.2, plus both 4.0rc releases installed on my main development box). Drivers are mostly backward compatible, so their usually isn’t a problem running an older toolkit on top of a newer driver, at least going back to the CUDA 2.x series.

On the 32 bit versus 64 bit question, I am not sure. Certainly the VM solution won’t work. I don’t believe there is a GPU pass-through solution for any VM system that will work with CUDA.

I’m currently doing this on OpenSUSE 11.4. I’ve got CUDA 3.1, 3.2 and 4.0 all running on the same machine due to software requiring specific versions.

The main things you need to do:

  1. When you run the .run install script, make sure you a) put each version in a different location - we use /usr/local/cuda-VERSION when it asks as it appends /cuda on the end automatically e.g. /usr/local/cuda-VERSION/cuda
  2. Change your environment variables (we do it in .bashrc) for PATH and LD_LIBRARY_PATH to include the locations of the /bin and /lib64 or /lib for version you want

Everything should then be fine and work side by side.

Many thanks for the quick replies. Even better that they are in the affirmative. :D

I did some more searching on the VM issue and pretty much came up with the same answer: No CUDA in the guest because the video card is not sufficiently virtualized to support that.

best,
hank

Edit: Update: I was able to install CUDA 3.0/32 bit in addition to CUDA 3.2/64 bit without drama. I left 3.2 in the default configuration and installed 3.0/32 bit in an alternate location. To save typing I have a shell alias to modify my PATH and add an LD_LIBRARY_PATH variable to point to the 3.0 library. My application runs without any apparent problems.

Hi, this was a very helpful information. One thing I want to add. When you install an older version of cuda using .run file, (for example, you have already installed cuda 9.2 and the newest driver and want to add cuda 9.0), say ‘no’ when you are asked if you want to install the driver too. As one said above, newer driver (for cuda 9.2) works for cuda 9.0 and if you install older driver, cuda 9.2 will break.

1 Like

Hi

Can I install CUDA 10 alongside CUDA 9.2?

Thanks

1 Like