# Adding MAGMA 2.5.4 to Abinit 8.10.3

**URL:** <https://discourse.abinit.org/t/adding-magma-2-5-4-to-abinit-8-10-3/70>\
**Category:** Building Abinit\
**Created:** [December 12, 2020, 3:54am UTC](https://discourse.abinit.org/t/adding-magma-2-5-4-to-abinit-8-10-3/70 "2020-12-12T03:54:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cxu](https://discourse.abinit.org/letter_avatar_proxy/v4/letter/c/3ec8ea/32.png) [@cxu](https://discourse.abinit.org/u/cxu)\
**Post date:** [December 12, 2020, 3:54am UTC](https://discourse.abinit.org/t/adding-magma-2-5-4-to-abinit-8-10-3/70/1 "2020-12-12T03:54:03Z")

</div>

Hello,

I am trying to add MAGMA to Abinit. I have installed MAGMA using cmake and did not receive any errors, and I also find it inside of the usr/local directory, so I am assuming MAGMA installed correctly. Abinit runs fine with GPU support when I do not add magma, but when I try and add --with-linalg-flavor=“netlib+magma”, it throws out the error:

```nohighlight
configure: using tarball repository /home/cxu/.abinit/tarballs
checking for the requested linear algebra support... netlib+magma
checking whether to select a fallback for linear algebra... no
checking for AXPBY support in specified BLAS libraries... no
checking for gemm3m in specified libraries... no
checking for library containing zgemm... -lblas
checking for library containing zhpev... -llapack
checking for library containing magmaf_zheevd... no
configure: error: Magma library requested but not found

```

Does anyone know what is wrong?  
Any help would be appreciated.

Thanks. 🙂

---

<div class="post-metadata">

**Author:** ![admin1](https://discourse.abinit.org/user_avatar/discourse.abinit.org/admin1/32/3_2.png) [@admin1](https://discourse.abinit.org/u/admin1)\
**Post date:** [January 3, 2021, 6:20pm UTC](https://discourse.abinit.org/t/adding-magma-2-5-4-to-abinit-8-10-3/70/2 "2021-01-03T18:20:43Z")

</div>

Hi,

You need to specify the path of the magma installation folder.

for example, my config with mkl instead of netlib :

```nohighlight
with_linalg_flavor="mkl+magma"
LINALG_CPPFLAGS="-I${MAGMA_ROOT}/include -I${MKLROOT}/include"
LINALG_FCFLAGS="-I${MAGMA_ROOT}/include -I${MKLROOT}/include"
LINALG_LIBS="-L${MAGMA_ROOT}/lib -Wl,--start-group -lmagma -lcuda -Wl,--end-group -L${MKLROOT}/lib/intel64 -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lgomp -lpthread -lm"

```

and some environmental variables :

```nohighlight
MAGMA_NUM_GPUS=3
MAGMA_NUM_THREADS=1
MAGMA_ROOT=/usr/local/magma2.5_gcc8.3_mkl

```

best,  
jmb
