Page 1 of 2

Restart on CS3.0 after interruption

Posted: Wed Jul 17, 2013 5:26 pm
by zeph67
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.

Re: Restart on CS3.0 after interruption

Posted: Thu Jul 18, 2013 1:11 am
by Yvan Fournier
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

Re: Restart on CS3.0 after interruption

Posted: Thu Jul 18, 2013 7:55 pm
by zeph67
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.

Re: Restart on CS3.0 after interruption

Posted: Fri Jul 19, 2013 1:33 am
by Yvan Fournier
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

Re: Restart on CS3.0 after interruption

Posted: Fri Jul 19, 2013 5:50 pm
by zeph67
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.

Re: Restart on CS3.0 after interruption

Posted: Mon Jul 22, 2013 1:49 pm
by Yvan Fournier
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

Re: Restart on CS3.0 after interruption

Posted: Mon Jul 22, 2013 2:14 pm
by zeph67
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.

Re: Restart on CS3.0 after interruption

Posted: Mon Jul 22, 2013 4:34 pm
by Yvan Fournier
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

Re: Restart on CS3.0 after interruption

Posted: Mon Jul 22, 2013 5:00 pm
by zeph67
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.

Re: Restart on CS3.0 after interruption

Posted: Mon Jul 22, 2013 8:45 pm
by Jacques Fontaine
Hello,

You should complete "domain.restart_input" in the function "define_domain_parameters" line 141 in ur script.
Regards,