You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SimpleMPS algorithm breaks due to integer overflow of cell coordinates #2
The current SimpleMPS code creates points that lie out of the expected bounding box, i.e. outside the grid coordinates. Particularly if I check all generated points for x > 0 the assertion fails, but only very randomly. I didn't debug further, but if I switch to the commented code with pool updates as defined here https://github.com/sandialabs/DeterministicMPS/blob/main/source/SimpleMPS.cpp#L124-L143 the problem vanishes.
changed the title [-]Algorithm generates points outside of domain[/-][+]Algorithm generates points outside of domain due to integer overflow[/+]on Nov 4, 2024
changed the title [-]Algorithm generates points outside of domain due to integer overflow[/-][+]SimpleMPS algorithm generates points outside of domain due to integer overflow[/+]on Nov 4, 2024
I did the debugging, the problem occurs due to an integer overflow of the cell coordinates. It happens only very rarely for certain choices of random seeds, where a high number of refinements is necessary. When the error occurs here, I'm at refinement level 19. The problem appears in the refine method step when the cell coordinates are doubled https://github.com/sandialabs/DeterministicMPS/blob/main/source/SimpleMPS.cpp#L353-L354
changed the title [-]SimpleMPS algorithm generates points outside of domain due to integer overflow[/-][+]SimpleMPS algorithm breaks due to integer overflow of cell coordinates[/+]on Nov 4, 2024
Activity
[-]Version without pool updates generates erronous points[/-][+]Algorithm generates points outside of domain[/+]drlight-code commentedon Nov 1, 2024
The problem also crops up when using the version with pool updates, so it seems not directly related after all.
[-]Algorithm generates points outside of domain[/-][+]Algorithm generates points outside of domain due to integer overflow[/+][-]Algorithm generates points outside of domain due to integer overflow[/-][+]SimpleMPS algorithm generates points outside of domain due to integer overflow[/+]drlight-code commentedon Nov 4, 2024
I did the debugging, the problem occurs due to an integer overflow of the cell coordinates. It happens only very rarely for certain choices of random seeds, where a high number of refinements is necessary. When the error occurs here, I'm at refinement level 19. The problem appears in the
refinemethod step when the cell coordinates are doubled https://github.com/sandialabs/DeterministicMPS/blob/main/source/SimpleMPS.cpp#L353-L354Defining the cell coordinates as
size_tinstead ofintfixes the issue for me https://github.com/sandialabs/DeterministicMPS/blob/main/source/SimpleMPS.hpp#L28[-]SimpleMPS algorithm generates points outside of domain due to integer overflow[/-][+]SimpleMPS algorithm breaks due to integer overflow of cell coordinates[/+]