I am trying to install this https://github.com/NVlabs/ssn_superpixels but get the error below.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cublas_LIBRARY (ADVANCED)
linked by target "caffe" in directory /home/haziq/ASTAR/scripts/ssn_superpixels/lib/video_prop_networks/lib/caffe/src/caffe
I can run PyTorch GPU fine meaning I have the GPU and CUDA stuffs installed. How do I check if the CUDA_cublas_LIBRARY has been installed? I am using Ubuntu 18.04.
I found a libcublas.so.9.1
and libcublas.so.9.1.85
. How do I know which is the correct one?
(base) haziq@mdeep:~/ASTAR/scripts/ssncaffe$ ls /usr/lib/x86_64-linux-gnu/libcublas.so.9.1
libcublas.so.9.1 libcublas.so.9.1.85
Also, what do I need to do after finding these files? How do I tell cmake where these files are?
You have the libcublas9 libraries in the standard library location. There are other ways to install CUDA however, which may put those libraries elsewhere. The makefile handles this possibility by having you tell it where the libraries are -- the CUDA_cublas_LIBRARY variable. This variable may be set in the makefile, or perhaps it may be picked up from your environment (you set in your .profile). You edit the makefile and define the location in CUDA_cublas_LIBRARY. It should look something like:
If you do this in your .profile, remember to add it to an export line:
export CUDA_cublas_LIBRARY
Your .profile is just a text file. Use a text editor (vim, zile, ...) and add things at the bottom. Don't use a word processor like LibreWrite because it tends to perform unwanted actions like breaking lines or adding characters.
Libraries get revisions all the time, and typically get a new version number added to their name. You wouldn't want to keep all the old versions, so when you link, you want a name that does not change so frequently -- Ubuntu typically provides links for these more stable names. Libraries ending in .so or .so.x are typically links to the .so.x.version library.
The locations of the libcublas files you listed are in the normal place for libraries for Ubuntu 64 bit architecture, so a normal link should pick them up. If they were in another place, like a location you picked to install all the CUDA files (which you can do by unpacking the CUDA deb files instead of installing them), then you'd add that ...cuda/lib location to your LD_LIBRARY_PATH environment variable (as the CUDA instructions tell you). If the makefile expects to find those libraries in /usr/lib, then you either fix the makefile, or for a real kluge, just add another link to the library in the expected (wrong) place.
From your other question trying to give cmake the information from the CUDA_cublas_LIBRARY variable, you may either put it into your enviromnent by adding it to your .profile, or define it first on the cmake line, instead of after the cmake command.
Updated things a bit now that I know it's CUDA9 you are using. Things look a bit confused, but I think you have the necessary files, just set the CUDA_cublas_LIBRARY variable as described above.