Page 1 of 1

Problem compiling MAGMA in ubuntu

Posted: Thu Jul 16, 2020 10:39 am
by bear_sun
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!

Re: Problem compiling MAGMA in ubuntu

Posted: Thu Jul 16, 2020 1:59 pm
by mgates3
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

Re: Problem compiling MAGMA in ubuntu

Posted: Thu Jul 16, 2020 7:51 pm
by bear_sun
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...

Re: Problem compiling MAGMA in ubuntu

Posted: Thu Jul 16, 2020 9:04 pm
by Stan Tomov
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.

Re: Problem compiling MAGMA in ubuntu

Posted: Fri Jul 17, 2020 2:55 am
by bear_sun
Thanks! The "Turing" setting works. But I am getting more errors...I will just go back to CUDA 10.2.

Re: Problem compiling MAGMA in ubuntu

Posted: Fri Jul 17, 2020 10:25 am
by Stan Tomov
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.