Cuda 10.1 is lack of cublas, which is required by magma-2.5.0 ?

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
jiapei100
Posts: 4
Joined: Thu Oct 27, 2016 5:57 pm
Location: Surrey, BC, Canada
Contact:

Cuda 10.1 is lack of cublas, which is required by magma-2.5.0 ?

Post by jiapei100 » Sun Mar 03, 2019 11:24 pm

Hi:

I'm trying to build magma-2.5.0 with cuda10.1, but failed with the following ERROR messages:
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_device_LIBRARY (ADVANCED)
linked by target "magma_sparse" in directory ....../magma-2.5.0
linked by target "magma" in directory ....../magma-2.5.0
Any suggestions?

cyberwillis
Posts: 4
Joined: Fri Nov 23, 2018 8:59 pm

Re: Cuda 10.1 is lack of cublas, which is required by magma-2.5.0 ?

Post by cyberwillis » Mon Mar 04, 2019 4:59 pm

Hi...

I am new here. but to try to help you at least I did a search on my system.

I have two container one with ubuntu 18.04 and another with ubuntu 16.04

Cublas do exists in both:

In Ubuntu 18.04 (cuda 10.1) and Ubuntu 16.04 (cuda 10.1) are the same

Code: Select all

$ dpkg -l | grep cublas
ii  libcublas-dev              10.1.0.105-1              amd64        CUBLAS native dev links, headers
ii  libcublas10                10.1.0.105-1              amd64        CUBLAS native runtime libraries

Code: Select all

$ ldconfig -p | grep cublas
    libcublasLt.so.10 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcublasLt.so.10
    libcublasLt.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcublasLt.so
    libcublas.so.10 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcublas.so.10
    libcublas.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcublas.so

Code: Select all

$ ls /usr/local/cuda-10.1/lib64 | grep cublas
-------- nothing ------


In Ubuntu 16.04 (cuda10.0)

Code: Select all

$ dpkg -l | grep cublas
ii  cuda-cublas-10-0                  10.0.130-1                         amd64        CUBLAS native runtime libraries
ii  cuda-cublas-dev-10-0              10.0.130-1                         amd64        CUBLAS native dev links, headers

Code: Select all

$ ldconfig -p | grep cublas
libcublas.so.10.0 (libc6,x86-64) => /usr/local/cuda-10.0/targets/x86_64-linux/lib/libcublas.so.10.0
libcublas.so (libc6,x86-64) => /usr/local/cuda-10.0/targets/x86_64-linux/lib/libcublas.so

Code: Select all

$ ls /usr/local/cuda-10.0/lib64 | grep cublas
libcublas.so
libcublas.so.10.0
libcublas.so.10.0.130
libcublas_static.a
So I believe you just need to figure out if its installed on your system too.

What can I see is that the folder has changed from 10.0 to 10.1, so maybe if you create a symlink or if register the LD_LIBRARY_PATH maybe you can compile magma.
Last edited by cyberwillis on Wed Mar 06, 2019 6:53 pm, edited 2 times in total.

jiapei100
Posts: 4
Joined: Thu Oct 27, 2016 5:57 pm
Location: Surrey, BC, Canada
Contact:

Re: Cuda 10.1 is lack of cublas, which is required by magma-2.5.0 ?

Post by jiapei100 » Wed Mar 06, 2019 12:05 am

Thank you for your prompt reply. However, take a look at https://devtalk.nvidia.com/default/topi ... t/5318441/ . Cublas is certainly missing in Cuda 10.1, but Cuda 10.0 still has cublas...

cyberwillis
Posts: 4
Joined: Fri Nov 23, 2018 8:59 pm

Re: Cuda 10.1 is lack of cublas, which is required by magma-2.5.0 ?

Post by cyberwillis » Wed Mar 06, 2019 6:18 pm

Hello again...

The URL you shared contains the same information I just showed you in my previous post.
The libraries is there in other folder.

In Ubuntu 16.04 with cuda 10.1

Code: Select all

$ cd /usr 
$ find -name '*cublas*'

./lib/x86_64-linux-gnu/libcublasLt_static.a
./lib/x86_64-linux-gnu/libcublasLt.so
./lib/x86_64-linux-gnu/stubs/libcublas.so
./lib/x86_64-linux-gnu/stubs/libcublasLt.so
./lib/x86_64-linux-gnu/libcublas.so.10.1.0.105
./lib/x86_64-linux-gnu/libcublas_static.a
./lib/x86_64-linux-gnu/libcublasLt.so.10.1.0.105
./lib/x86_64-linux-gnu/libcublas.so.10
./lib/x86_64-linux-gnu/libcublasLt.so.10
./lib/x86_64-linux-gnu/libcublas.so
./lib/pkgconfig/cublas-10.1.pc
./local/cuda-10.1/doc/man/man7/libcublas.7
./local/cuda-10.1/doc/man/man7/libcublas.so.7
./local/cuda-10.1/doc/html/cublas
./local/cuda-10.1/doc/html/cublas/graphics/cublasmg_gemm.jpg
./include/cublas_api.h
./include/cublas_v2.h
./include/cublasLt.h
./include/cublasXt.h
./include/cublas.h
./share/doc/libcublas-dev
./share/doc/libcublas10

I was able to build magma-2.4.0 with it. I am not using Magma-2.5.0 yet.

I am sorry if I cannot help you with TensorFlow, I use PyTorch.

Try to make sure you have this information on your .bashrc

Code: Select all

export PATH=/usr/local/cuda-10.1/bin:${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:/usr/lib/x86_64-linux-gnu/${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export LIBRARY_PATH=/usr/local/cuda-10.1/lib64/stubs
export CUPIT_LIB_PATH=/usr/local/cuda-10.1/extras/CUPTI/lib64/
export LD_LIBRARY_PATH=${CUPIT_LIB_PATH}:${LD_LIBRARY_PATH}

qhaas
Posts: 2
Joined: Wed Apr 15, 2020 1:26 pm

Re: Cuda 10.1 is lack of cublas, which is required by magma-2.5.0 ?

Post by qhaas » Wed Apr 15, 2020 1:38 pm

I encountered said 'CUDA_cublas_device_LIBRARY' error while attempting to build MAGMA 2.5.3 with cmake inside a ppc64le cuda 10.1 development ubuntu 18.04 container. I cleared the issue by using a newer version of cmake, per this thread. The default version of cmake in Ubuntu 18.04 is 3.10; 3.14 (which fixed this problem for me) is available in the EL7 EPEL yum repository as an RPM. I downloaded the RPMs and converted them into deb packages with alien. I needed both the cmake3-data and cmake3 packages. One could also build a newer cmake from source, 3.14.x was apparently the last version to work with the system libraries of Ubuntu 18.04 from my brief testing, and their scripts package the binaries into a nice DEB package using cpack that can be installed with APT.

eajkkk
Posts: 1
Joined: Fri Apr 17, 2020 11:15 am

Re: Cuda 10.1 is lack of cublas, which is required by magma-2.5.0 ?

Post by eajkkk » Fri Apr 17, 2020 11:37 am

same issue here..... how to fix?

corew2020
Posts: 1
Joined: Wed May 27, 2020 7:31 pm

Re: Cuda 10.1 is lack of cublas, which is required by magma-2.5.0 ?

Post by corew2020 » Wed May 27, 2020 10:49 pm

found a solution to the problem?

mgates3
Posts: 915
Joined: Fri Jan 06, 2012 2:13 pm

Re: Cuda 10.1 is lack of cublas, which is required by magma-2.5.0 ?

Post by mgates3 » Thu May 28, 2020 10:41 am

This is an issue with CUDA, not with MAGMA. See:
https://forums.developer.nvidia.com/t/c ... sing/71015

What specific OS are you using (e.g., Ubuntu 20.04)?

What did you do to install cuda and cublas? From the link above, it sounds like these may be separate packages that need to be both installed.

Are the cublas libraries installed somewhere? E.g., search /usr for them, per discussion at link above.

What version of CMake are you using? Per previous posts, you made need a newer version.

Mark

Post Reply