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

validation check in loop_in_chunks #2040

Merged
merged 9 commits into from
Apr 14, 2022
Merged

Conversation

mochen4
Copy link
Collaborator

@mochen4 mochen4 commented Apr 13, 2022

Closes #2028. Added validation check to loop_in_chunks.

@@ -406,7 +417,7 @@ void fields::loop_in_chunks(field_chunkloop chunkloop, void *chunkloop_data, con
grid_volume gvu(chunks[i]->gv);
ivec _iscoS(S.transform(gvu.little_owned_corner(cS), sn));
ivec _iecoS(S.transform(gvu.big_owned_corner(cS), sn));
ivec iscoS(max(user_volume.little_owned_corner(cgrid), min(_iscoS, _iecoS))), iecoS(max(_iscoS, _iecoS)); // fix ordering due to to transform
ivec iscoS(max(user_volume.little_owned_corner(cgrid), min(_iscoS, _iecoS))), iecoS(min(user_volume.big_owned_corner(cgrid), max(_iscoS, _iecoS))); // fix ordering due to to transform
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A potential bug of #1895 is exposed and fixed by this PR. Previously, the grid_volume gvu was thought to be always inside the big_owned_corner of the user_volume so min wasn't taken.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be nice to know the source of this being violated…

@stevengj stevengj merged commit e8554aa into NanoComp:master Apr 14, 2022
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.

add validation check to loop_in_chunks
2 participants