Can't find cudablas_v2.h

Hi,

I followed the installation instructions for Ubuntu 14.04 with apt-get and everything seems OK, however I can’t locate the header files during compile time.
fatal error: cublas_v2.h: No such file or directory
locate also fails to find the header files.

Can I install them separately, and where should I put them?

Thanks

Those header files (and cublas) should have been installed as part of the CUDA toolkit install. There is no separate install mechanism for them.

When you say “the instructions”, which instructions were you following exactly?

Are you compiling with nvcc?

What is the result of running:

which nvcc

?

1 Like

I used:
Installation Instructions:
sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install cuda

Yeah nvcc was also not installed.

I’ve worked around it temporarily by doing a partial install (just the toolkit) from the runfile, but would have expected everything to get installed using above method.

I don’t believe that is the correct .deb file.

You may want to take a look at the instructions that are provided by NVIDIA:

http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu-installation

I believe the correct sequence should be something like this:

sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install cuda

= ubuntu1404
= 7.5-18
= amd64

Which would suggest the following .deb:

cuda-repo-ubuntu1404_7.5-18_amd64.deb

yeah that’s odd and inconsistent but https://developer.nvidia.com/cuda-downloads provides the other file for download
with (local) and the one you mention with (network), switching the file at this point has not made a difference. (i uninstalled and repeated with the new file).

There may be something about the history of your machine or actual distro that is not what is expected by the installer. For example, if you had previously installed anything (driver, toolkit) using the runfile installer method, then the repo method may not work correctly. This is covered in the installation guide I linked.

Interesting, the workaround works for now, so it will have to do. Thank you for your help!

I also meet this problem .But what amazing me is that when i compiler cuda ,everything is ok ,however ,the problem happened when i complier caffe again . Do you know the reason ,Thanks.

I just wanted to bump this for 2019. I had the same issue on Ubuntu 1804 / Pop! OS 1804. Got the error message when running the CUDA samples makefile.

I tried many different installation methods and used the package manager. Did a lot of purging and reinstall. Nothing. I did have NVCC and other files.

I did a partial install of the cuda toolkit using the latest runfile for my system (10.1). This was able to fix it. THis is the same workaround posted above.

Just so that this gets into the search engines:

cublas_v2.h: no such file or directory was my error. I was missing cublas_v2.h in cuda 10.1

See the answer here:

Here I put the final solution:

  • Step1: Run find
find /usr/local/ -name cublas_v2.h

And we find the path of the file:

/usr/local/cuda-10.2/targets/x86_64-linux/include/cublas_v2.h

  • Step2: export the path
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/cuda-10.2/targets/x86_64-linux/include/

OK! Problem solved.

2 Likes