Home > Software engineering >  Several cuda directories found in /usr/local/
Several cuda directories found in /usr/local/

Time:10-06

after installing cuda in ubuntu 20.04, i can see that there are 3 folders named cuda, cuda 11.0 and cuda 11.4 are found in /usr/local/

How to find which is the working cuda directory

CodePudding user response:

The installer usually arranges it so that /usr/local/cuda is actually a symlink (that is a linux concept, please just google "linux symlink" to learn about it). Therefore the conventional wisdom would be that whatever that symlink points to (either the cuda-11.0 directory or the cuda-11.4 directory) would be the "working" directory.

However none of this really matters, what matters is the setting of your LD_LIBRARY_PATH and PATH environment variables. If these don't point to any of this, then your installation is broken.

If they do point to one of them, whichever they reference "first" is the working directory.

Of course if you have some kind of environment management system like python virtual environments or conda, that could override any of this.

  • Related