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

Fix overflows and inconsistencies of integer type use #7

Merged
merged 3 commits into from
Dec 20, 2018

Conversation

devreal
Copy link
Contributor

@devreal devreal commented Dec 20, 2018

I noticed that the computation of the FOM overflows easily (e.g., s=400 on 1k nodes) due to the use of 32-bit integers. Trying to use 64-bit integers by defining Int_t as uint64_t, I noticed that there are several inconsistencies in the use of Int_t that break the build. This PR fixes these problems and changes most of the use of printf to std::cout to silence warnings about wrong format specifiers in that case.

AFAICS, the use of 64-bit integers becomes necessary starting from around 650^3 elements per process to avoid overflows (8*650^3 > INT_MAX). This PR does not change the default of using 32-bit.

Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
…it integers

Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
…ows when building with 64-bit integers

Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
@ikarlin ikarlin merged commit aa066c3 into LLNL:master Dec 20, 2018
@ikarlin
Copy link
Collaborator

ikarlin commented Dec 20, 2018

Thanks for these updates. As far as I know no one has run a problem with that many elements per process before. When we developed the code we never tested at that scale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants