-
Notifications
You must be signed in to change notification settings - Fork 77
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
Added simple support for Thread Count setter - partially tested #394
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should check after the simulation using massbal_getRoutingTotal to check if the threads are set.
Also, I assume this will overwrite the Threads from INP file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also make sure INP threads are retained with this addition. We should add a test to make sure swmm_setSimulationParam is reading the threads set in the INP file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, Mac probably needs to revert to an older version of the OS supported by actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abhiramm7 when project.c parses the INP file the THREADS are first set there. This feature only avails that change if the user wants to change it through the API. We also set the same limits / rules as the project.c has.. (>=1 and <= Max Threads Available). The mac build finally ran and it checks out
tests/solver/test_toolkit.cpp
Outdated
|
||
#if defined(_OPENMP) | ||
error = swmm_setSimulationParam(SM_THREADS, 2); | ||
error = swmm_setSimulationParam(SM_THREADS, &value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bemcdonnell, can we change line 429 to use swmm_getSimulationParam
? I think you are trying to set the param, then check that it was set properly, but I'm not sure the code does this currently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOOF good catch!!!! Doing that now
Closes #172
Interested in seeing how the unit tests play out.