This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
matlab [2022/06/05 14:39] root |
matlab [2022/06/05 19:44] (current) root |
||
---|---|---|---|
Line 11: | Line 11: | ||
</ | </ | ||
- | Matlab in recent years has recently added a number of modern features such as GPU support, data analysis and machine learning. | + | ==Benchmarks== |
+ | |||
+ | Matlab in recent years has recently added a number of modern features such as GPU support, | ||
< | < | ||
Line 20: | Line 22: | ||
b = eig(a); | b = eig(a); | ||
toc; | toc; | ||
- | quit() | ||
$ matlab -nodesktop -nosplash < eigcpu.m | $ matlab -nodesktop -nosplash < eigcpu.m | ||
</ | </ | ||
- | This requires about 2700 seconds | + | This requires about 2700 sec on 32-core Intel nodes and 5300 sec on 64-core AMD nodes. Matlab matrix functions make extensive use of Intel MKL and are often more performant on Intel systems. To what degree that is deliberate on the part of Intel is disputed. |
- | The GPU version is selected in code, commands are the same. Initializing the first array as gpuArray is sufficient to use the available | + | < |
+ | module load mkl/19.0.5 matlab/ | ||
+ | </ | ||
+ | |||
+ | Matlab doesn' | ||
+ | |||
+ | < | ||
+ | MKL_DEBUG_CPU_TYPE=5 | ||
+ | </ | ||
+ | |||
+ | which improves the performance on AMD of MKL versions less than 20, which correspond to Matlab versions less than 2020. | ||
+ | |||
+ | ==GPU computing== | ||
+ | |||
+ | The GPU version is selected in code, commands are the same. Initializing the first array as gpuArray is sufficient to use the available | ||
< | < | ||
Line 35: | Line 50: | ||
b = eig(a); | b = eig(a); | ||
toc; | toc; | ||
- | quit() | ||
$ matlab -nodesktop -nosplash < eiggpu.m | $ matlab -nodesktop -nosplash < eiggpu.m | ||
</ | </ | ||
This requires about 850 seconds on V100 gpu nodes and 700 seconds on A100 single gpu nodes. | This requires about 850 seconds on V100 gpu nodes and 700 seconds on A100 single gpu nodes. | ||
+ | |||
+ | ==Parallel Computing== | ||
+ | |||
+ | Matlab has several forms of parallel computing. | ||
+ | |||
+ | See also [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// |