MDCS with GPUs

From HPC users
Revision as of 15:55, 25 January 2018 by Harfst (talk | contribs) (created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This is experimemtal currently

SLURM Integration

In order to use GPUs within a Matlab worker you need to use a slightly modified client configuration by replacing the files from the SLURM integration with the files from this file. Currently only R2017b is supported. Everything else is unchanged regarding the configuration of MDCS and everything that worked before will still work.

Running a GPU Job

Here is an example job script to test GPU use:

% little example to te:st GPU computing with Matlab
gpuinfo = gpuDevice;
% example from https://blogs.mathworks.com/loren/2012/02/06/using-gpus-in-matlab/
% first do a CPU FFT calculation
A1 = rand(3000,3000);
tic;
B1 = fft(A1);
time1 = toc;

% now copy A1 to GPU and repeat FFT
A2 = gpuArray(A1);
tic;
B2 = fft(A2);
time2 = toc; 

% calculate speedup of FFT (ignores overhead from data transfer time)
speedUp = time1/time2;

Copy this to a file named 'test_gpu.m'. Then