MATLAB on UL HPC
Checkpointing & parallel execution
UL High Performance Computing (HPC) Team Valentin Plugaru University of Luxembourg (UL), Luxembourg http://hpc.uni.lu
1 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
MATLAB on UL HPC Checkpointing & parallel execution UL High - - PowerPoint PPT Presentation
MATLAB on UL HPC Checkpointing & parallel execution UL High Performance Computing (HPC) Team Valentin Plugaru University of Luxembourg (UL), Luxembourg http://hpc.uni.lu Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC 1 / 21
UL High Performance Computing (HPC) Team Valentin Plugaru University of Luxembourg (UL), Luxembourg http://hpc.uni.lu
1 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
https://github.com/ULHPC/tutorials
https://hpc.uni.lu/hpc-school
https://github.com/ULHPC/tutorials/tree/devel/advanced/MATLAB2 2 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
1 Pre-requisites 2 Objectives 3 Checkpointing Example 1 revisited 4 Parallelization Example 2 revisited 5 Conclusion
3 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Pre-requisites
1 Pre-requisites 2 Objectives 3 Checkpointing Example 1 revisited 4 Parallelization Example 2 revisited 5 Conclusion
4 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Pre-requisites
(frontend)$> mkdir $HOME/matlab-tutorial2 (frontend)$> cd $HOME/matlab-tutorial2 (frontend)$> wget https://raw.github.com/ULHPC/tutorials/devel/advanced/MATLAB2/code/example1.m (frontend)$> wget https://raw.github.com/ULHPC/tutorials/devel/advanced/MATLAB2/code/example2.m (frontend)$> wget https://raw.github.com/ULHPC/tutorials/devel/advanced/MATLAB2/code/google_finance_data.m
(frontend)$> git clone https://github.com/ULHPC/tutorials.git (frontend)$> ln -s tutorials/advanced/MATLAB2/
$HOME/matlab-tutorial2
5 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Pre-requisites
http://xquartz.macosforge.org/landing/
http://sourceforge.net/projects/vcxsrv/
$> ssh access-gaia.uni.lu -X
6 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Objectives
1 Pre-requisites 2 Objectives 3 Checkpointing Example 1 revisited 4 Parallelization Example 2 revisited 5 Conclusion
7 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Objectives
8 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Objectives
8 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Objectives
8 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
1 Pre-requisites 2 Objectives 3 Checkpointing Example 1 revisited 4 Parallelization Example 2 revisited 5 Conclusion
9 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
10 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
10 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
11 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
11 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
exist(’save.mat’,’file’)
load(’save.mat’) 12 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
exist(’save.mat’,’file’)
load(’save.mat’)
12 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
exist(’save.mat’,’file’)
load(’save.mat’)
save(’save.tmp’)
save(’save.tmp’, ’var1’, ’var2’) 12 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
exist(’save.mat’,’file’)
load(’save.mat’)
save(’save.tmp’)
save(’save.tmp’, ’var1’, ’var2’)
system(’mv save.tmp save.mat’)
12 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
13 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
13 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Checkpointing
14 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Parallelization
1 Pre-requisites 2 Objectives 3 Checkpointing Example 1 revisited 4 Parallelization Example 2 revisited 5 Conclusion
15 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Parallelization
http://www.mathworks.nl/help/distcomp/index.html
http://www.mathworks.nl/help/distcomp/getting-started-with-parfor.html
http://www.mathworks.nl/discovery/matlab-gpu.html 16 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Parallelization
17 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Parallelization
17 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Parallelization
including discrete Fourier transform, matrix multiplication, left matrix division 17 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Parallelization
including discrete Fourier transform, matrix multiplication, left matrix division
17 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Parallelization
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 Number of cores Parallel speedup parfor−based parallel speedup vs serial execution speedup speedup with overhead
18 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Parallelization
18 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Conclusion
1 Pre-requisites 2 Objectives 3 Checkpointing Example 1 revisited 4 Parallelization Example 2 revisited 5 Conclusion
19 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Conclusion
20 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC
Thank you for your attention...
Valentin Plugaru Mail: valentin.plugaru@uni.lu Office: MNO, E04 0445-070 Maison du Nombre 6, Avenue de la Fonte L-4364 Esch-sur-Alzette UL HPC Management Team mail: hpc-sysadmins@uni.lu
1
Pre-requisites
2
Objectives
3
Checkpointing Example 1 revisited
4
Parallelization Example 2 revisited
5
Conclusion 21 / 21 Valentin Plugaru (University of Luxembourg) MATLAB on UL HPC