Problem compiling MAGMA in ubuntu

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
bear_sun
Posts: 3
Joined: Thu Jul 16, 2020 9:59 am

Problem compiling MAGMA in ubuntu

Post by bear_sun » Thu Jul 16, 2020 10:39 am

Hi,

I am trying to compile and install MAGMA on my ubuntu 20.04.

I have CUDA 11 and openBLAS (for AMD CPU). I used the make.inc.openblas example. However, the error showed up:

"interface_cuda/interface.cpp:461:30: error: 'struct cudaPointerAttributes' has no member named 'memoryType'.

My GPU is GTX 1660Ti 6G.

Could anyone help me with that?
Thank you!

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

Re: Problem compiling MAGMA in ubuntu

Post by mgates3 » Thu Jul 16, 2020 1:59 pm

It looks like CUDA renamed a field from `memoryType` to `type`. Changing that one line should fix the issue (but I haven't tested).

In interface_cuda/interface.cpp, change:
return (attr.memoryType == cudaMemoryTypeDevice);
to:
return (attr.type == cudaMemoryTypeDevice);

Note that CUDA deleted a whole lot of cuSparse things, so MAGMA sparse cannot be compiled.

Mark

bear_sun
Posts: 3
Joined: Thu Jul 16, 2020 9:59 am

Re: Problem compiling MAGMA in ubuntu

Post by bear_sun » Thu Jul 16, 2020 7:51 pm

Hi, Mark,

Thank you! It works. But I get a new error after few seconds...

nvcc -O3 -DNDEBUG -DADD_ -Xcompiler "-fPIC" -std=c++11 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_60,code=compute_60 -I/usr/local/cuda/include -I./include -I./control -c -o magmablas/zaxpycp.o magmablas/zaxpycp.cu
nvcc fatal : Unsupported gpu architecture 'compute_30'
make: *** [Makefile:629: magmablas/zaxpycp.o] Error 1

...I am thinking about going back to CUDA 10.3...it seems like CUDA 11 doesn't work well with other packages...

Stan Tomov
Posts: 283
Joined: Fri Aug 21, 2009 10:39 pm

Re: Problem compiling MAGMA in ubuntu

Post by Stan Tomov » Thu Jul 16, 2020 9:04 pm

Yes, one solution is to move back to CUDA 10.3 until we update support for CUDA 11.

Alternatively, to solve the last problem, you can specify the GPU in your make.inc file. If you specify

Code: Select all

GPU_TARGET  = Turing
the makefile will not add other options. In this case Kepler. Looks like CUDA 11 is depreciating it along with Maxwell:
Support for Kepler sm_30 and sm_32 architecture based products is dropped.

Support for the following compute capabilities are deprecated in the CUDA Toolkit:
sm_35 (Kepler)
sm_37 (Kepler)
sm_50 (Maxwell)

For more information on GPU products and compute capability, see https://developer.nvidia.com/cuda-gpus.

bear_sun
Posts: 3
Joined: Thu Jul 16, 2020 9:59 am

Re: Problem compiling MAGMA in ubuntu

Post by bear_sun » Fri Jul 17, 2020 2:55 am

Thanks! The "Turing" setting works. But I am getting more errors...I will just go back to CUDA 10.2.

Stan Tomov
Posts: 283
Joined: Fri Aug 21, 2009 10:39 pm

Re: Problem compiling MAGMA in ubuntu

Post by Stan Tomov » Fri Jul 17, 2020 10:25 am

Thanks for reporting on this so that we know what to expect!
That's too bad interfaces were changed in CUDA 11 that brake the back compatibility.
We will have to put some more ifs in the next release.

Post Reply