MAGMA  1.6.1
Matrix Algebra for GPU and Multicore Architectures
 All Classes Files Functions Friends Groups Pages
Installing MAGMA

First, create a file make.inc, using one of the examples as a template.

Set environment variables for where external packages are installed, either in your .cshrc/.bashrc file, or in the make.inc file itself. For instance, to specify where CUDA and Intel MKL are installed, using csh:

setenv CUDADIR /usr/local/cuda
# sourcing this script sets MKLROOT
source /opt/intel/composer/bin/compilervars.csh intel64

using sh/bash:

CUDADIR=/usr/local/cuda
source /opt/intel/composer/bin/compilervars.sh intel64

If you do not have a Fortran compiler, comment out FORT. MAGMA's Fortran 90 interface and Fortran testers will not be built. Also, many testers will not be able to check their results – they will print an error message, e.g.:

magma/testing> ./testing_dgehrd -N 100 -c
...
Cannot check results: dhst01_ unavailable, since there was no Fortran compiler.
  100     ---   (  ---  )      0.70 (   0.00)   0.00e+00        0.00e+00   ok

To compile shared library, first add -fPIC to CFLAGS, FFLAGS, etc. in make.inc; see example in make.inc.mkl-shared. Then:

make shared
make test
make install prefix=/usr/local/magma

To compile static library:

make lib
make test
make install prefix=/usr/local/magma

This installs libmagma.a and libmagma.so (if compiled) in $(prefix)/lib, and the MAGMA header files in $(prefix)/include. It also installs $(prefix)/lib/pkgconfig/magma.pc for pkg-config.