MAGMA build for Hip without CUDA installed.

Skip to first unread message

Steve East

Aug 2, 2021, 8:18:27 PM8/2/21
to MAGMA User
Should I be able to compile MAGMA on a system with just Hip installed? This is MAGMA 2.6.1 not hipMAGMA. Whenever I try, the Makefile attempts to build interface_cuda and fails because of no cuda.h file. The interface_hip and magmablas_hip directories are being created and built correctly and BACKEND is set to hip.


Stanimire Tomov

Aug 2, 2021, 8:27:27 PM8/2/21
to Steve East, MAGMA User
Yes, you should be able to build it.
There are 3 installation methods - using the makefiles, cmake, and spack.
Looks like you are trying through the makefiles.
In your you have to have 
BACKEND      = hip

You can copy one of the examples and modify it as needed, e.g., 
from the main magma directory you can copy one of the examples:


This example is using OpenBLAS on the CPU (MAGMA needs LAPACK for the CPU). 
There is also MKL example if you have MKL. After that you can follow the 
instructions in README.


You received this message because you are subscribed to the Google Groups "MAGMA User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Austin Harris

Aug 3, 2021, 4:15:33 PM8/3/21
to MAGMA User,, MAGMA User, Steve East
I was having this same problem with the official release version, despite being able to compile from bitbucket without trouble.
The issue seems to be the presence of `Makefile.gen` in the release version. After removing it, I was able to compile successfully.

Stanimire Tomov

Aug 3, 2021, 4:20:17 PM8/3/21
to MAGMA User, Austin Harris, Stanimire Tomov, MAGMA User, Steve East
Very good point. Thanks! We will remove the Makefile.gen from the tarball.
Reply all
Reply to author
0 new messages