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

Change int to uint64_t in TaskManager for high number of periods #152

Open
Bondoki opened this issue Feb 23, 2023 · 0 comments
Open

Change int to uint64_t in TaskManager for high number of periods #152

Bondoki opened this issue Feb 23, 2023 · 0 comments

Comments

@Bondoki
Copy link
Member

Bondoki commented Feb 23, 2023

Problem: the call of the run(int x) function in TaskManager has an overflow condition as the counter "nCircles" is an signed int.
If this value exceeds 2147483647 it's wrapped to negative number. As this is a barely seldom case in the most simulation, the TaskManager is only executed once.

Solution: Change all occurrence of "int" to "uint64_t".

void run(int nPeriods);

void TaskManager::run(int nPeriods)

int actualCircles=nCircles;

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