Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an idea regarding precision to step-15. #15244

Merged
merged 2 commits into from May 23, 2023
Merged

Conversation

bangerth
Copy link
Member

No description provided.

here is a different approach: Storing the system matrix (the "Jacobian")
in single-precision instead of double precision floating point numbers
(i.e., using `float` instead of `double` as the data type). This reduces
the amount of memory necessary by a factor of two, and consequently
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not entirely correct, because the column indices in the matrix take the same space (4 bytes per entry) irrespective of the number type (4 or 8 bytes per entry). Thus, the saving is around a factor of 1.3-1.5. I agree we should not make the discussion here more complicated than necessary, so I suggest to add a short note towards the end of this paragraph that explains that a sparse matrix storage also consists of other terms. An interesting follow-up question would be to which extent one could compress the integer part of a sparse matrix more. There have been some papers in 2008-2009, but I never wanted to implement those because we would need them in Trilinos/PETSc and not in deal.II, and then matrix-free methods give even bigger gains.

*as long as one stores the right hand side in double precision*.
A great overview of why this is so, along with numerical
experiments that also consider "half precision" floating point
numbers can be found in @cite Kelley2022 .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
numbers can be found in @cite Kelley2022 .
numbers, can be found in @cite Kelley2022 .

@bangerth
Copy link
Member Author

Good point about the column indices. I've reworded this.

Copy link
Member

@kronbichler kronbichler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@masterleinad masterleinad merged commit 5851dc6 into dealii:master May 23, 2023
10 of 14 checks passed
@bangerth bangerth deleted the 15 branch May 23, 2023 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants