MAGMA

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

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 without restriction to all OSC users. 

Usage on Owens

Set-up

To load the default version of MAGMA module, cuda must first be loaded. Use module load cuda to load 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

Using MAGMA

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

icc $MAGMA_CFLAGS example.c

or

ifort $MAGMA_F90FLAGS example.F90

 

 

Batch Usage

When you log into owens.osc.edu 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:
qsub -I -l nodes=1:ppn=28 -l walltime=1:00:00
which gives you 28 cores (  -l nodes=1:ppn=28  ) with 1 hour (  -l walltime=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
#PBS -N 6pti
#PBS -l nodes=1:ppn=28
#PBS -l walltime=0:20:00
module load cuda
module load magma
# Use TMPDIR for best performance.
cd $TMPDIR
# PBS_O_WORKDIR refers to the directory from which the job was submitted.
cp $PBS_O_WORKDIR/example.c .
icc $MAGMA_CFLAGS example.c

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

Further Reading

Tag: 
Service: 
Technologies: 
Fields of Science: