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

distf integer overflow #801

Open
yslan opened this issue Apr 15, 2023 · 0 comments
Open

distf integer overflow #801

yslan opened this issue Apr 15, 2023 · 0 comments

Comments

@yslan
Copy link
Contributor

yslan commented Apr 15, 2023

This is a minor issue that won't change the result unless the overflow number get exact 0, nchange = 2^32 for example.

In distf (and also in cheap_dist?), we loop through all GLL points and go through their (3^ndim) neighbor so the potential number of changes can up to E * lx1^ndim * 3^ndim.

I have a case with nelgv = 10M, N=7 that print negative count

        1   -79624688  4.5219E-01 max wall distance 2
        2   -50506081  9.1576E-01 max wall distance 2
        3   -61069130  1.3114E+00 max wall distance 2
        4  -749316730  5.9702E-01 max wall distance 2
        5   743722746  5.3373E-01 max wall distance 2
        6   138545728  4.3998E-01 max wall distance 2
        7    37899754  4.2563E-01 max wall distance 2
        8     9461456  4.2106E-01 max wall distance 2
        9     4978723  4.1731E-01 max wall distance 2
       10     2482463  4.1665E-01 max wall distance 2
       11      806825  4.1586E-01 max wall distance 2
       12           0  0.0000E+00 max wall distance 2

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

No branches or pull requests

1 participant