MAGMA is a collection of next generation linear algebra (LA) GPU accelerated libraries designed and implemented by the team that developed LAPACK and ScaLAPACK. MAGMA is for heterogeneous GPU-based architectures, it supports interfaces to current LA packages and standards, e.g., LAPACK and BLAS, to allow computational scientists to effortlessly port any LA-relying software components. The main benefits of using MAGMA are that it can enable applications to fully exploit the power of current heterogeneous systems of multi/manycore CPUs and multi-GPUs, and deliver the fastest possible time to an accurate solution within given energy constraints.

Availability and Restrictions


MAGMA is available on Owens, and the following versions are currently available at OSC:

Version Owens
2.2.0 X(I)*
* Current default version; I = avaible with only intel

You can use module spider magma to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.

Access for Academic Users

MAGMA is available to all OSC users. If you have any questions, please contact OSC Help.

Publisher/Vendor/Repository and License Type

Computational Algebra Group, Univ. of Sydney, Open source


Usage on Owens


To load the default version of MAGMA module, cuda must first be loaded. Use module load cuda toload the default version of cuda, or module load cuda/version to load a specific version. Then use module load magma to load MAGMA. To select a particular software version, use module load magma/version. For example, use   module load magma/2.2.0 to load MAGMA version 2.2.0


To run MAGMA in the command line, use the Intel compilers (icc, ifort). 

icc $MAGMA_CFLAGS example.c


ifort $MAGMA_F90FLAGS example.F90

Batch Usage

When you log into you are actually logged into a linux box referred to as the login node. To gain access to the mutiple processors in the computing environment, you must submit your MAGMA simulation to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info. 

Interactive Batch Session
For an interactive batch session, one can run the following command:
sinteractive -A <account> -N 1 -n 28 -t 1:00:00
which gives you 1 node and 28 cores (-N 1 -n 28) with 1 hour (-t 1:00:00). You may adjust the numbers per your need.
Non-interactive Batch Job (Serial Run)

batch script can be created and submitted for a serial or parallel run. You can create the batch script using any text editor you like in a working directory on the system of your choice.

Below is the example batch script (job.txt) for a serial run:

## MAGMA Example Batch Script for the Basic Tutorial in the MAGMA manual
#SBATCH --job-name=6pti
#SBATCH --nodes=1 --ntasks-per-node=28
#SBATCH --time=0:20:00
#SBATCH --account <account>

module load cuda
module load magma
# Use TMPDIR for best performance.
# SLURM_SUMIT_DIR refers to the directory from which the job was submitted.
cp $SLURM_SUMIT_DIR/example.c .
icc $MAGMA_CFLAGS example.c

In order to run it via the batch system, submit the job.txt file with the command: sinteractive job.txt

Further Reading

Fields of Science: