Hello,
I'd like to restart a calculation, after an interruption due to an electrical power outage.
I guess I must put the "checkpoint" folder into the DATA directory (am I wrong ?)
But I need to know exactly at which time step the restart will be made. I couldn't find this information neither in "main" nor in "auxiliary". NTSUIT is set to 0, which corresponds to a periodic saving. But how can I get the precise information I need ?
Thanks in advance.
Restart on CS3.0 after interruption
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Restart on CS3.0 after interruption
Hello,
The answer depends on the version of the code you are using. That is why providing the information specified in the forum recommendations is useful.
Regards,
Yvan
The answer depends on the version of the code you are using. That is why providing the information specified in the forum recommendations is useful.
Regards,
Yvan
Re: Restart on CS3.0 after interruption
The version is 3.0.0 (I mentionned 3.0 in the subject title).
Do you need the listing file ? It is heavy, I prefer not to post it here, by default, but if it is necessary, I'll do it.
Some samples parameters :
NTSUIT = 0
NTMABS = 142411
Thanks a lot, best regards.
Do you need the listing file ? It is heavy, I prefer not to post it here, by default, but if it is necessary, I'll do it.
Some samples parameters :
NTSUIT = 0
NTMABS = 142411
Thanks a lot, best regards.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Restart on CS3.0 after interruption
Hello,
Sorry, I missed the title.
With version 3.0, you do not need to put the checkpoint directory in DATA anymore, but simply select a previous checkpoint directory using the GUI (checkpoint/restart section), or provide its path in cs_user_scripts.py if you are not using the GUI (an example is provided in that file).
By default, 4 evenly spaced checkpoints are done for each run (at least above 10 time steps). This may be changed either in the GUI or in cs_user_parameters.f90 (ntsuit).
To check the time step of a given checkpoint file, you may run
<install_prefix>/libexec/code_saturne/cs_io_dump -n <path_to_checkpoint>/main
to obtain a dump of binary file info, in which the time step will appear near the top.
The simplest is just to use a checkpoint and see at which time step the calculation restarts.
Regards,
Yvan
Sorry, I missed the title.
With version 3.0, you do not need to put the checkpoint directory in DATA anymore, but simply select a previous checkpoint directory using the GUI (checkpoint/restart section), or provide its path in cs_user_scripts.py if you are not using the GUI (an example is provided in that file).
By default, 4 evenly spaced checkpoints are done for each run (at least above 10 time steps). This may be changed either in the GUI or in cs_user_parameters.f90 (ntsuit).
To check the time step of a given checkpoint file, you may run
<install_prefix>/libexec/code_saturne/cs_io_dump -n <path_to_checkpoint>/main
to obtain a dump of binary file info, in which the time step will appear near the top.
The simplest is just to use a checkpoint and see at which time step the calculation restarts.
Regards,
Yvan
Re: Restart on CS3.0 after interruption
Thank you.
One thing I don't understand, is how to put the path to the desired 'checkpoint' is cs_user_scripts.py. Sorry, but I just don't understand the domain_auto_restart part...
Especially, isuite is defined nowhere, and it seems it doesn't matter if I specify isuite=1 in cs_user_parameters.f90
Thanks in advance.
One thing I don't understand, is how to put the path to the desired 'checkpoint' is cs_user_scripts.py. Sorry, but I just don't understand the domain_auto_restart part...
Especially, isuite is defined nowhere, and it seems it doesn't matter if I specify isuite=1 in cs_user_parameters.f90
Thanks in advance.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Restart on CS3.0 after interruption
Hello,
The domain/auto_restart part is an example of how a user can run successive restarts, without needing to modify the xml or user subroutines to increase the number of time steps; it is useful when time slots are a bit short using a batch system, but you can ignore it in your case.
And forget about setting isuite. Starting with Code_Saturne 3.0, it has become an internal variable, whose value is determined by the existence of the "restart" directory (or symbolic link to a directory) in the execution directory. This allows managing restart behavior using just the path of the file, instead of requiring both a path and a keyword.
Regards,
Yvan
The domain/auto_restart part is an example of how a user can run successive restarts, without needing to modify the xml or user subroutines to increase the number of time steps; it is useful when time slots are a bit short using a batch system, but you can ignore it in your case.
And forget about setting isuite. Starting with Code_Saturne 3.0, it has become an internal variable, whose value is determined by the existence of the "restart" directory (or symbolic link to a directory) in the execution directory. This allows managing restart behavior using just the path of the file, instead of requiring both a path and a keyword.
Regards,
Yvan
Re: Restart on CS3.0 after interruption
Thanks for your explanations. So, what must I do ?
To be clear, I just do not understand how to tell CS that I'd like to restart from a given checkpoint.
My idea :
cd DATA/
mkdir restart/
cp <the checkpoint I want to start from>/* restart/.
Is this right ?
Thanks.
To be clear, I just do not understand how to tell CS that I'd like to restart from a given checkpoint.
My idea :
cd DATA/
mkdir restart/
cp <the checkpoint I want to start from>/* restart/.
Is this right ?
Thanks.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Restart on CS3.0 after interruption
Hello,
No, do not copy anything in DATA. As explained in my previous posts, this is not necessary anymore with Code_Saturne 3.0.
Just select your checkpoint directory using the GUI, and run the code.
If you are not using the GUI, adapt domain.restart_input in cs_user_scripts.py (but if you are not comfortable with cs_user_scripts.py, you should be using the GUI).
Regards,
Yvan
No, do not copy anything in DATA. As explained in my previous posts, this is not necessary anymore with Code_Saturne 3.0.
Just select your checkpoint directory using the GUI, and run the code.
If you are not using the GUI, adapt domain.restart_input in cs_user_scripts.py (but if you are not comfortable with cs_user_scripts.py, you should be using the GUI).
Regards,
Yvan
Re: Restart on CS3.0 after interruption
I just insisted on copying because I didn't understand other solutions. Your last explanation is clearer now.
Nevertheless, I don't use the GUI because I don't feel comfortable with it, and thus did not install it.
Anyway, I tried what you told me. It still does not work. The calculation restarts from NTCABS = 1, although I modified domain.restart_input.
Here you'll find my cs_user_scripts.py
Thanks in advance.
Nevertheless, I don't use the GUI because I don't feel comfortable with it, and thus did not install it.
Anyway, I tried what you told me. It still does not work. The calculation restarts from NTCABS = 1, although I modified domain.restart_input.
Here you'll find my cs_user_scripts.py
Thanks in advance.
- Attachments
-
- cs_user_scripts.py.txt
- (12.89 KiB) Downloaded 400 times
-
- Posts: 118
- Joined: Mon Feb 20, 2012 2:07 pm
Re: Restart on CS3.0 after interruption
Hello,
You should complete "domain.restart_input" in the function "define_domain_parameters" line 141 in ur script.
Regards,
You should complete "domain.restart_input" in the function "define_domain_parameters" line 141 in ur script.
Regards,