Pause and resume simulation
-
[email protected]
- Posts: 54
- Joined: Tue Mar 02, 2021 2:34 am
Pause and resume simulation
Dear STKO Team,
I would like to have the option to pause (save state) and then resume my simulations using openseesmp. Is this possible with some tcl script or is this a feature available as default for opensees? If so, how can it be done?
Thank you for your time!
Bence
I would like to have the option to pause (save state) and then resume my simulations using openseesmp. Is this possible with some tcl script or is this a feature available as default for opensees? If so, how can it be done?
Thank you for your time!
Bence
-
marafini.f
- Posts: 363
- Joined: Fri Nov 13, 2020 1:52 pm
Re: Pause and resume simulation
Dear bence,
I know of a pause command in tcl developed by Alex Baker that you can find here,
https://github.com/ambaker1/public/blob ... /debug.tcl
but I never tried to use it in a parallel process. You can have a look and let us know if it works, you can use it through the custom command in the analysis steps.
Enjoy your modelling.
Francesca
I know of a pause command in tcl developed by Alex Baker that you can find here,
https://github.com/ambaker1/public/blob ... /debug.tcl
but I never tried to use it in a parallel process. You can have a look and let us know if it works, you can use it through the custom command in the analysis steps.
Enjoy your modelling.
Francesca
-
[email protected]
- Posts: 54
- Joined: Tue Mar 02, 2021 2:34 am
Re: Pause and resume simulation
Ok. I'll give it a try.
Thank you!!
Thank you!!
-
[email protected]
- Posts: 54
- Joined: Tue Mar 02, 2021 2:34 am
Re: Pause and resume simulation
The code works for parallel runs. However, it can not be resumed. I mean, it probably can I just faced a variable reference issue within the code. I am attaching the output from openseesmp as well as the code for 'pause' so you can see where the error occurs. If you have a suggestion on what may be going wrong please let me know.
FYI: I am sourcing the debug.tcl (source for "pause") in the main script and issuing the 'pause' statement using custom command in the analysis steps via STKO.
Opensees output: Pause source code with stdin variable:
FYI: I am sourcing the debug.tcl (source for "pause") in the main script and issuing the 'pause' statement using custom command in the analysis steps via STKO.
Opensees output: Pause source code with stdin variable:
-
marafini.f
- Posts: 363
- Joined: Fri Nov 13, 2020 1:52 pm
Re: Pause and resume simulation
Dear Bence,
yes, so I guess that command, get stdin, does not work when the script is run on each processor. If you google it you see that in the manual it is not recommended to use it for a parametric study.
As of now, there is no other way that I can think of, I'll let you know if I find something!
Francesca
yes, so I guess that command, get stdin, does not work when the script is run on each processor. If you google it you see that in the manual it is not recommended to use it for a parametric study.
As of now, there is no other way that I can think of, I'll let you know if I find something!
Francesca
-
[email protected]
- Posts: 54
- Joined: Tue Mar 02, 2021 2:34 am
Re: Pause and resume simulation
I see. That's too bad. I will do without it.
Thanks a lot for the responses!:)
Thanks a lot for the responses!:)
-
marafini.f
- Posts: 363
- Joined: Fri Nov 13, 2020 1:52 pm
Re: Pause and resume simulation
You are welcome!
Let's keep in touch
Francesca
Let's keep in touch
Francesca
Re: Pause and resume simulation
The pause command is used to temporarily stop the Tcl interpreter so that you can query your model or debug it, but it works for interactive mode.
What you are looking for is a method to stop the analysis, save the current state and close opensees. Later on, you may want to start opensees and resume the saved state so that you can start from there... is it correct?
In this case, you should have a look at the DataBase command:
https://opensees.berkeley.edu/wiki/inde ... e_Commands
But I'm pretty sure it will not work well, as it is not mainained from a long time, if I remember correctly
What you are looking for is a method to stop the analysis, save the current state and close opensees. Later on, you may want to start opensees and resume the saved state so that you can start from there... is it correct?
In this case, you should have a look at the DataBase command:
https://opensees.berkeley.edu/wiki/inde ... e_Commands
But I'm pretty sure it will not work well, as it is not mainained from a long time, if I remember correctly
-
[email protected]
- Posts: 54
- Joined: Tue Mar 02, 2021 2:34 am
Re: Pause and resume simulation
Yes, you are right it can not collect the state from multiple cores at the same time. Thank you for the tip though!
Re: Pause and resume simulation
You are welcome 