Teaching Parallel Programming on the CPU Based on Matrix Multiplication Using MKL, OpenMP and SYCL Libraries
Emilia Bober, Beata Bylina
2025
Abstract
Matrix multiplication is a fundamental operation in engineering computations. With the widespread use of modern multi-core processors, this operation can be significantly accelerated through parallel programming. Consequently, it is essential to acquaint computer science students with parallel programming techniques. Matrix multiplication is well known to students, while additionally offering numerous possibilities for parallelisation. This makes it an ideal example for introducing parallel programming while highlighting key considerations such as execution time, accuracy of the calculations, code complexity and the impact of the hardware architecture on the results obtained. Students can implement and test such software themselves. In this paper, the performance and accuracy of the MKL, SYCL and OpenMP libraries are investigated using matrix multiplication of different sizes as an example. OpenMP is discussed at some universities, so it may already be familiar to students, whereas SYCL is a newer and less commonly used standard but it offers great possibilities. Square matrices with double-precision elements and dimensions of 4096×4096, 8192×8192, and 16384×16384 were selected for testing. The experiments revealed significant computational speed-ups than OpenMP, but the calculations performed with MKL are by far the fastest. Additionally, the results indicated that doubling the number of threads does not directly correlate to a twofold increase in execution speed, and doubling the matrix size in each dimension leads to an approximately tenfold increase in execution time.
DownloadPaper Citation
in Harvard Style
Bober E. and Bylina B. (2025). Teaching Parallel Programming on the CPU Based on Matrix Multiplication Using MKL, OpenMP and SYCL Libraries. In Proceedings of the 17th International Conference on Computer Supported Education - Volume 2: CSEDU; ISBN 978-989-758-746-7, SciTePress, pages 713-720. DOI: 10.5220/0013279100003932
in Bibtex Style
@conference{csedu25,
author={Emilia Bober and Beata Bylina},
title={Teaching Parallel Programming on the CPU Based on Matrix Multiplication Using MKL, OpenMP and SYCL Libraries},
booktitle={Proceedings of the 17th International Conference on Computer Supported Education - Volume 2: CSEDU},
year={2025},
pages={713-720},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0013279100003932},
isbn={978-989-758-746-7},
}
in EndNote Style
TY - CONF
JO - Proceedings of the 17th International Conference on Computer Supported Education - Volume 2: CSEDU
TI - Teaching Parallel Programming on the CPU Based on Matrix Multiplication Using MKL, OpenMP and SYCL Libraries
SN - 978-989-758-746-7
AU - Bober E.
AU - Bylina B.
PY - 2025
SP - 713
EP - 720
DO - 10.5220/0013279100003932
PB - SciTePress