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
Authors who publish in this journal agree to the following terms:
Authors retain copyright and grant the journal the right of first publication, with the work simultaneously licensed under the Creative Commons Attribution License that allows the sharing of the work with acknowledgment of authorship and initial publication in this journal.
Authors are authorized to assume additional contracts separately, for non-exclusive distribution of the version of the work published in this journal (eg, publish in an institutional repository or as a book chapter), with acknowledgment of authorship and initial publication in this journal.
Authors are allowed and encouraged to publish and distribute their work online (eg, in institutional repositories or on their personal page) at any point before or during the editorial process, as this can generate productive changes as well as increase impact and the citation of the published work (See The effect of open access).
This is an open access journal which means that all content is freely available without charge to the user or his/her institution. Users are allowed to read, download, copy, distribute, print, search, or link to the full texts of the articles, or use them for any other lawful purpose, without asking prior permission from the publisher or the
author. This is in accordance with the BOAI definition of open access
Intellectual Property
All the contents of this journal, except where otherwise noted, is licensed under a Creative Commons Attribution License under attribution BY.