On Problems in OpenBLAS Library Usage in Productized Code on RISC-V
https://doi.org/10.15514/ISPRAS-2022-35(5)-7
Abstract
The boundary element method usage for the numerical simulation in continuum mechanics problems leads to the need to solve a system of linear algebraic equations with a dense matrix. The de facto standards for the interface of functions over dense matrices and vectors software implementations are BLAS/LAPACK. Among the optimized open-source BLAS/LAPACK implementations, only the OpenBLAS library includes optimizations for the widest range of hardware platforms. This library is optimized for Intel, AMD, ARM and RISC-V architectures. The open RISC-V architecture ecosystem is currently actively developing. European supercomputing centers have opened RISC-V competence centers as part of the government's EuroHPC grant support, since solutions based on the ARM architecture are not recognized as part of the European initiative to develop its own technological independence. Currently, companies included in the international RISC-V consortium are developing not only high-performance RISC-V processors, but also AI accelerators, as well as video cards based on RISC-V architecture. OpenBLAS is actively supported and optimized for emerging RISC-V hardware and extensions. However, libraries used in product code are traditionally subject to strict requirements for stability and reliability in order to minimize possible errors and failures in the product. As it turned out, from this point of view, OpenBLAS has a number of problems that we had to solve in order to productize this library. In this article the OpenBLAS test system is described, the problems of testing the LAPACK functionality of the library and ways to solve them are discussed. In addition, the test coverage of the BLAS functionality is analyzed and the results achieved in increasing it are presented. It is planned to contribute the described changes to the OpenBLAS project.
About the Authors
Ksenia Alexeyevna ZAYTSEVARussian Federation
Junior software engineer of the Department of High Performance
Valeria Valentinovna PUZIKOVA
Russian Federation
Cand. Sci. (Phys.-Math.), Software Development Expert in High Performance Libraries Department, YADRO. Research interests: solvers and preconditioners for SLAE, applied mathematics software development, computational hydrodynamics, physics engines for AR/VR, high performance computations, numerical methods.
Andrey Dmitrievich SOKOLOV
Russian Federation
Software engineer of the Department of High Performance Libraries Development of YADRO. His research interests include development and testing of mathematical libraries, low-level optimizations, GPU computing, convolutional neural networks.
References
1. Charpa S., Canale R. Numerical Methods for Engineers. McGraw Hill, 2014. 992 p.
2. Moin P. Fundamentals of Engineering Numerical Analysis. Cambridge University Press, 2010. 256 p.
3. Zienkiewicz O. C., Taylor R. L. The Finite Element Method: Its Basis and Fundamentals. Butterworth-Heinemann, 2013. 756 p.
4. Katsikadelis J. T. The Boundary Element Method for Engineers and Scientists, Second Edition: Theory and Applications. Academic Press, 2016. 464 p.
5. Brebbia C. A., Walker S. Boundary Element Techniques in Engineering. Newnes, 2016. 210 p.
6. Gwinner J., Stephan E. P. Advanced Boundary Element Methods: Treatment of Boundary Value, Transmission and Contact Problems. Springer, 2018. 670 p.
7. Garney S., Heroux M. A., Li G., Pozo R., Remington K. A., Wu K. A Revised Proposal for a Sparse BLAS Toolkit, Available at: https://sdm.lbl.gov/~kewu/ps/SparseBLAS96.pdf, accessed 23.10.2023.
8. Saad Y., Iterative Methods for Sparse Linear Systems. Society for Industrial and Applied Mathematics, 2003. 184 p.
9. Lawson C. L., Hanson R. J., Kincaid D. R., Krogh F. Basic linear algebra subprograms for FORTRAN usage. ACM Transactions on Mathematical Software, vol. 5, issue 3, 1979, pp. 308-323. DOI: 10.1145/355841.355847.
10. Anderson E., Bai Z., Bischof C., Blackford S., Demmel J., Dongarra J., Croz J. D., Greenbaum A., Hammarling S., McKenney A., Sorensen D. LAPACK Users’ Guide. Society for Industrial and Applied Mathematics, 1987. 429 p.
11. BEM++, Available at: https://github.com/bempp/bempp-legacy/tree/master, accessed 23.10.2023.
12. Лукашин П.С., Стрижак С.В., Щеглов Г.А. Тестирование возможностей открытого кода BEM++ по решению задач акустики. Труды ИСП РАН, том 29, вып. 1, 2017, стр. 39-52. / Lukashin P.S., Strijhak S.V., Shcheglov G.A. Validation of open-source BEM++ code for simulation of acoustics problems. Trudy ISP RAN/Proc. ISP RAS, vol. 29, issue 1, 2017, pp. 39-52 (in Russian).
13. OpenBLAS, Available at: https://github.com/OpenMathLib/OpenBLAS, accessed 23.10.2023.
14. Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms, Available at: https://gitlab.com/libeigen/eigen, accessed 23.10.2023.
15. Armadillo: C++ Library for Linear Algebra & Scientific Computing, Available at: https://gitlab.com/conradsnicta/armadillo-code, accessed 23.10.2023.
16. Cui E., Li T., Wei Q. RISC-V Instruction Set Architecture Extensions: A Survey. IEEE Access, 2023, pp. 1-16. DOI: 10.1109/ACCESS.2023.3246491.
17. The European High Performance Computing Joint Undertaking (EuroHPC JU), Available at: https://eurohpc-ju.europa.eu/index_en, accessed 23.10.2023.
18. Occamy, Available at: https://pulp-platform.org/occamy/, accessed 23.10.2023.
19. The EUPILOT Project, Available at: https://eupilot.eu/, accessed 23.10.2023.
20. PRIMME: PReconditioned Iterative MultiMethod Eigensolver, Available at: https://github.com/primme/primme, accessed 23.10.2023.
21. BLAS-Tester, Available at: https://github.com/xianyi/BLAS-Tester, accessed 23.10.2023.
22. T-HEAD GNU Compiler Toolchain, Available at: https://github.com/T-head-Semi/xuantie-gnu-toolchain, accessed 23.10.2023.
23. LCOV, Available at: https://github.com/linux-test-project/lcov, accessed 23.10.2023.
Review
For citations:
ZAYTSEVA K.A., PUZIKOVA V.V., SOKOLOV A.D. On Problems in OpenBLAS Library Usage in Productized Code on RISC-V. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2023;35(5):91-106. (In Russ.) https://doi.org/10.15514/ISPRAS-2022-35(5)-7