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
I'm trying to integrate ROSS simulations into a workflow, so a set of processes should be able to call a ROSS-based simulation (CODES model-net-mpi-replay) multiple time. This means calling tw_init/tw_end multiple times in a row. I ran into problems and realized ROSS uses many global/static variables (most globals in ross-global.c, but there are also static variables in other files that have a default value at the beginning of a run). While the first run of ROSS works fine, the following don't because some of the variables need to be reinitialized.
Would it be possible to add some kind of tw_reset() function that puts ROSS in the same state it was before the first tw_init call?
The text was updated successfully, but these errors were encountered:
I've added in a tw_reset() function. Everything seems to be working with phold, but I still want to do some more testing before I merge it into master because I may have missed some things. In the meantime, do you mind checking out the tw-reset branch and trying it out with what you're working on? Let me know if there's any issues.
I've made the assumption any model using this functionality will be initializing MPI itself and calling the tw_comm_set() fuction. Then the only thing you need to do is call tw_reset() after tw_end() of the previous simulation and before tw_init() of the next. tw_reset() will (hopefully) take care of everything.
I'm trying to integrate ROSS simulations into a workflow, so a set of processes should be able to call a ROSS-based simulation (CODES model-net-mpi-replay) multiple time. This means calling tw_init/tw_end multiple times in a row. I ran into problems and realized ROSS uses many global/static variables (most globals in ross-global.c, but there are also static variables in other files that have a default value at the beginning of a run). While the first run of ROSS works fine, the following don't because some of the variables need to be reinitialized.
Would it be possible to add some kind of tw_reset() function that puts ROSS in the same state it was before the first tw_init call?
The text was updated successfully, but these errors were encountered: