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

limited size of int type #1

Open
Ethan999 opened this issue Jan 28, 2019 · 0 comments
Open

limited size of int type #1

Ethan999 opened this issue Jan 28, 2019 · 0 comments

Comments

@Ethan999
Copy link

Ethan999 commented Jan 28, 2019

When setting:
NSCALES=4
NMOMENTS=3
NX=4096
NY=4096

Run test_cleaners.sh, will occurs error:
terminate called after throwing an instance of 'std::bad_array_new_length'

Because in the code, we need to calculate the value of
nscales * nscales * nmoments * nmoments * ny * nx, which is beyond the limit of int type.
Changed the type from 'int' to 'long', it can run successfully. But "Cleaners Error" is huge.

Test Cleaners
================
Cleaners Error (m_model, relative) : 1
Cleaners Error (residual): 8.78635e+97

So what will be the reason of such big error?

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