User Tools

Site Tools


matlab

**This is an old revision of the document!**

Matlab

Matlab is a matrix-oriented computing language. UA/Fayetteville has a campus-wide license. We have permission from Mathworks to serve this program to in-state users but not to users outside of Arkansas who are not affiliated with UAF.

The GUI version of Matlab is best accessed via interactive batch job on OpenOnDemand (pinnacle-portal). The text version may be accessed via batch job or interactive batch job with terminal.

Usually the latest installed version is the best, though multiple older versions are installed.

module load matlab/r2022a

Matlab in recent years has recently added a number of modern features such as GPU support, data analysis and machine learning. A simple benchmark follows for CPU vs GPU code.

$ cat eigcpu.m
a=rand(32768,32768);
b=zeros(size(a));
tic;
b = eig(a);
toc;
quit()
$ matlab -nodesktop -nosplash < eigcpu.m

This requires about 2700 seconds on 32-core Intel nodes and 5300 seconds on 64-core AMD nodes.

The GPU version is selected in code, commands are the same. Initializing the first array as gpuArray is sufficient to use the available gpu methods, see https://www.mathworks.com/help/parallel-computing/gpu-computing-in-matlab.html

$ cat eiggpu.m
a=gpuArray(rand(32768,32768));
b=zeros(size(a));
tic;
b = eig(a);
toc;
quit()
$ matlab -nodesktop -nosplash < eiggpu.m

This requires about 850 seconds on V100 gpu nodes and 700 seconds on A100 single gpu nodes.

matlab.1654439956.txt.gz · Last modified: 2022/06/05 14:39 by root