The Impact of Compilation Flags and Choosing Single- or Double-Precision Variables in Linear Systems Solvers
DOI:
https://doi.org/10.5540/tcam.2023.024.02.00319Keywords:
Linear systems, Compiler flags, Optimization, Variable precisionAbstract
This paper intends to show the impact of compiler optimization flags and the variable's precision on direct methods to solve linear systems. The chosen six methods are simple direct methods, so our work could be a study for new researchers in this field. The methods are LU decomposition, LDU decomposition, Gaussian Elimination, Gauss-Jordan Elimination, Cholesky decomposition, and QR decomposition using the Gram-Schmidt orthogonalization process. Our study showed a huge difference in time between single- and double-precision in all methods, but the error encountered in the single-precision was not so high. Also, the best flags to these methods were the `-O3' and the `-Ofast' ones.References
G. H. Golub and C. F. Van Loan, Matrix Computations (3rd Ed.). Baltimore, MD, USA: Johns Hopkins University Press, 1996.
J. W. Demmel, Applied Numerical Linear Algebra. SIAM, Jan. 1997.
D. S. Watkins, Fundamentals of matrix computations. Pure and applied mathematics, New York: Wiley-Interscience, 2nd ed ed., 2002.
M. C. C. Cunha, Métodos numéricos. Editora da UNICAMP, 2003.
D. A. Patterson and J. L. Hennessy, Organização e projeto de computadores: interface hardware/software. Elsevier Brasil, 2014.
A. F. G. Ascencio and E. A. V. d. Campos, Fundamentos da programação de computadores: algoritmos, Pascal, C/C++ e Java. São Paulo: Pearson Prentice Hall, 2008.
T. Botor and H. Habiballa, “Compiler optimization for scientific computation in C/C++,” (Thessaloniki, Greece), p. 030004, 2018.
K. Hoste and L. Eeckhout, “Cole: compiler optimization level exploration,” in Proceedings of the 6th annual IEEE/ACM international symposium on Code generation and optimization, pp. 165–174, ACM, 2008.
https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/, 2016 (accessed December 6, 2018).
https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/, 2017 (accessed December 6, 2018).
M. A. G. Ruggiero and V. L. d. R. Lopes, Cálculo numérico: aspectos teóricos e computacionais. Makron Books do Brasil, 1997.
Downloads
Published
How to Cite
Issue
Section
License
Copyright
Authors of articles published in the journal Trends in Computational and Applied Mathematics retain the copyright of their work. The journal uses Creative Commons Attribution (CC-BY) in published articles. The authors grant the TCAM journal the right to first publish the article.
Intellectual Property and Terms of Use
The content of the articles is the exclusive responsibility of the authors. The journal uses Creative Commons Attribution (CC-BY) in published articles. This license allows published articles to be reused without permission for any purpose as long as the original work is correctly cited.
The journal encourages Authors to self-archive their accepted manuscripts, publishing them on personal blogs, institutional repositories, and social media, as long as the full citation is included in the journal's website version.