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

about GVT_force_update #158

Open
Artlantic opened this issue Aug 16, 2019 · 8 comments
Open

about GVT_force_update #158

Artlantic opened this issue Aug 16, 2019 · 8 comments

Comments

@Artlantic
Copy link

Hi, currently I'm using ROSS to drive my simulation. My problem is a little incompatible with ROSS for some events cannot do roll_back. So I add "tw_gvt_force_update" before these events, but it doesn't work. I'm wondering how can I make some LPs wait until gvt_sync ? Thanks.

My codes are like this:
tw_gvt_force_update();
tw_event *e; (the event to be avoided to roll back)
tw_event init;
tw_event_send(e);

@laprej
Copy link
Member

laprej commented Aug 19, 2019

If you cannot rollback events there are a few options: run ROSS in conservative mode (synch=2) or do memcpy() state-saving but remember to undo your rng calls as well.

@Artlantic
Copy link
Author

But conservative mode is really inefficient.
Some event's result in my simulation may lead to two different direction, causing too large number of events to be roll back. So I think state-saving is not reasonable for me.
What's the effect of "tw_gvt_force_update"? Or is there any suggestion? I just want to make the LP blocked until its sequence is right.
Thanks.

@carothersc-zz
Copy link
Member

carothersc-zz commented Aug 20, 2019 via email

@Artlantic
Copy link
Author

@carothersc Thanks for your reply.
Most events of each LP can roll back, but a few point-events may guide the trace of the simulation.(My events comes from a program, its procedure may vary depending on the result of some events)
Could you please give me some suggestion?

@Artlantic
Copy link
Author

@carothersc In some degree, you are right. The "source event generator LPs" (the program) cannot roll back. But they need the results from other LPs to continue.

@carothersc-zz
Copy link
Member

carothersc-zz commented Aug 20, 2019 via email

@carothersc-zz
Copy link
Member

carothersc-zz commented Aug 20, 2019 via email

@markplagge
Copy link
Collaborator

markplagge commented Aug 20, 2019

Would placing the critical functionality in the tw_event_commit function work? It does support sending events, and is only called once the event will not be rolled back

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

4 participants