Installing CUDA 4.0 over 3.2

Hi,

I am currently using CUDA 3.2 and would like to try out CUDA 4.0. Do I simply install CUDA 4.0 over 3.2? Will I need to remove anything, e.g. drivers etc?

Thank you.

Regards,
Rayne

You must update the driver, that can safely be installed over the top of the old driver. I find it good practice to keep a copy of the installer for the driver I am about to replace somewhere easy to find in case things don’t work and I need to roll back. For toolkits, I would recommend installing the 4.0rc kit in an alternative path and having both. You only need to change path settings to switch back and forth: CUDA 3.2 runs fine with the newer driver, and if you find a bug, you can just switch back to 3.2. I keep a lot of toolkits installed at the same time for testing purposes, something like Modules is an excellent tool for managing this sort of thing.

Which path settings should I change? nvcc? Directories of where the header files, e.g. cuda.h are stored? Any others?

At the bare minimum

    LD_LIBRARY_PATH to point to the correct path containing the CUDA runtime libraries (so installpath/lib or installpath/lib64)

    PATH to point to the correct path holding nvcc and the other executables from the toolkit (so installpath/bin)

If you have makefiles, then you probably also need to change the “prefix path” in those.

I find it good practice to define a top level environment variable which leads to the install path of the CUDA version I am using, and then just have makefiles use that.

The equivalent module file for CUDA 3.2 on our cluster looks like this:

#%Module1.0

## cuda modulefile

##

module-whatis "Loads the CUDA 3.2 gpu computing environment"

set      cuda_root         /export/opt/cuda-3.2

setenv   CUDA_INSTALL_PATH  $cuda_root

setenv   CUBLAS_INSTALL_PATH  $cuda_root                                    

setenv   CUBLAS_LIBRARIES    "-L$cuda_root/lib64 -lcublas -lcudart"         

setenv   CUBLAS_INCLUDES     -I$cuda_root/include                           

append-path PATH $cuda_root/bin:$cuda_root/cudaprof/bin                     

append-path LD_LIBRARY_PATH $cuda_root/lib64:$cuda_root/cudaprof/bin

that defines everything our standard makefiles, job scripts, etc need to build and run against the 3.2 toolkit.