Previous Up Next

13  GROUP SR—SAVING AND RESTART

SR.10


The following directives allow to save the data during a computation and to the successive restart of the computation.

13.1  SAVING

13.1.1  DEFINING SAVING IN THE INPUT CODE


Object:


To produce a saving file for successive restart, the directive ECRI FICH SAUV has to be inserted in group G of the EUROPLEXUS input data (as part of the ECRI directive). See page G.110 for details on the SAUV directive.

13.1.2  SAVING VIA COMMAND FILE

The code checks the existance of a file called "command.epx" regularly. The intervals can be defined via "OPTI" "CMDF" "NPAS" nn "CPUT" nn. When the file exists, it is read and the containing command are performed. The following commands are possible:


Syntax:
     < "SAVE">
     < "STOP">
     < "PVTK">
       "END"


SAVE

The model is saved at the currend time step.
STOP

The calculation is stoppped after the current time step.
END

End of command file.
PVTK

A PVTK output is written for the current time step.

13.2  RESTART

SR.15


Object:


The REPR keyword, to be inserted in group A, enables to restart a computation which was previously saved.


Syntax:

   ... title ...

    "REPRISE"  nbanrep    "POSI" numer     < "PROT"  'maclef' >

   ... Instructions of the groups C,D,E,F,G that are modified ...
   ... (in particular, if a further saving is desired, repeat
       the ECRI FICH SAUV directive :)                          ...

    < ECRI ... FICH  SAUV <ndsauv>  <PROT 'maclef'>  <LAST>  </CTIM/> >

   ... Instructions of the group H that are modified ...

    "CALCUL"  . . .

    "FIN"


The REPR instruction is described in detail below, Page SR.30.


Warning:


During a restart the structure of the data is very different. In general, only the instructions of the groups C,D,E,F,G,H which are modified have to be repeated. However, note that the directive ECRITURE must be repeated even if it is not changed. All other instructions are useless. Especially, the geometry must NEVER be repeated.


During a restart run, the directive FICH ALIC reads the file produced during the previous run and adds the new results like if a single calculation would have been performed.


Comments:


The various possibilities are described in the following pages.


During the first run, the directive ECRI FICH SAUV FREQ n causes data to be saved once every n time steps, on the default saving file.


During a restart run, the directive REPR ’myfile.sau’ j reads the previously created saving file and re-starts the calculation from the j-th saved data station.


If saving is requested during a restart run, be aware that a saving is not performed at the restart time itself.


During a restart run, all frequencies nf or tf in directives of the type:

       - ECRI FICH SAUV iu FREQ nf
       - ECRI FREQ nf
       - ECRI TFRE tf
       - ECRI FICH ALIC ju FREQ nf
       - ECRI FICH ALIC ju TFRE tf
       - ...

are considered starting from the initial time (or the initial step) of the first run, not of the restart run.


During a restart, if a directive similar to CALC ... NMAX nsteps ... is used, be aware that nsteps is the total number of time steps, not the number of steps during the restart run.


Files:


The listing file is always produced anew during a restart, beginning at the restart time.


The saving file is specified by the instruction ECRI FICH SAUV.


The restart one is specified by the directive REPRISE.


For postprocessing files, see the description of REPRISE below.

13.3  DIRECTIVE "SAUVE" (OBSOLETE FORM)

SR.20


This is the obsolete form of the SAUVER directive, which produces a saving file for subsequent restart of the calculation. It is only included here for compatibility with old input files. For new input files, please use the ECRI ... FICH SAUV directive, described on page G.110.


Object:


This keyword creates a saving file and, in conjunction with the keyword REPR (to be used in a subsequent run), allows splitting a computation in two or more parts.


The results are saved on a file (saving file) at times specified by the user. Each saving corresponds to a number or position on the file (1, 2, 3 etc.), from which a restart of the computation can be carried out (see directive REPR on page SR.30.


Syntax:

   SAUV nbansav   < FREQ > ifreq  < DER >  < PROT 'maclef' >


nbansav

Number of the saving file or name of the file in quotes. If completely omitted, the code will assume the default file name <basename>.sau where <basename> is the root of the input file name (i.e. without extension .epx). However, note that in this case the following keyword FREQ becomes mandatory to introduce the frequency.
ifreq

Frequency of the savings, in time steps. The results are saved each ifreq computation steps. Note that the code always saves the last step of the calculation (if the run is terminated normally), irrespective of the frequency chosen. Therefore, if one is only interested in getting the possibility to continue the calculation further on, a very large frequency may be chosen, larger than the total number of steps expected in the present run.
DER

This keyword indicates that the saving file should contain just one saving station, corresponding to the last saved time station in the present calculation. In other words, each new saving station replaces the former one, if any. This allows to obtain a saving file of the smallest possible size. However, restarting from an intermediate time is obviously not possible in this case: the only possibility to restart the calculation will be REPR ... POSI 1 (see page SR.30).
PROT

Keyword entering a protection on the saving file.
’maclef’

Key of up to 8 characters, enclosed in apostrophes. In order to restart the computation from that file, the instruction REPR must contain the keyword PROT with an identical key.

Comments:


The keyword FREQ introduces a fixed frequency in time steps and has been maintained for backward compatibility (also, if FREQ is missing, and a number is read instead, the program assumes that it indicates a step frequency ifreq). This form of the directive (e.g. SAUV 30 1000) is still accepted for backwards compatibility only but is deprecated.


The keyword PROT is not compulsory. If it is not used, there is no protection (this is equivalent to a key of 8 blanks). If specified, the keyword PROT must be at the end of the SAUV directive (i.e., after DER, if any).


If a unit number is used for nbansav, the saving file and its number must have been defined before on the control cards.


A first saving station (position number 1) containing some header data is always produced at the initial time (step 0 of the calculation). Of course, it is normally meaningless to restart from this time station, unless the DER keyword has been specified (see above), because it would be the same as starting the calculation anew from the initial time. On the contrary, if DER has been specified, the only possibility for restart is to use the first time station which, in this case, will contain the data of the last saving performed (not the first one in general).


Examples:


Assume a calculation performs 4994 time steps to arrive at its final time. The following saving directives are accepted:

The following saving directives are still accepted for backwards compatibility but are strongly deprecated:

13.4  DIRECTIVE "REPRISE"

SR.30


Object:


This option enables a computation to be restarted from a time which was previously saved on a ‘saving’ file. This file now becomes the restart file and contains, besides the computed values at the saved time stations, a certain amount of data of the preceding computation which must not be defined again in the restart input file (see page SR.40).


Syntax:

   REPR  nbanrep  POSI numer  < PROT 'maclef' >


nbanrep

Number of the restart unit, or name of the restart file in quotes.
numer

Number of the saving station which determines the restart (1, 2, 3 etc.). The restart will occur from the numer-th saved time station. If the keyword LAST was used for writing the restart file, numer must be 1.
PROT

Compulsory keyword if there is a protection on the saving file.
’maclef’

Key protecting the saving file.

Comments:


If a unit number is used for nbanrep, the restart file and its unit number must have been defined first in the control cards. The restart file corresponds to the former saving file (i.e., it has the same file name).


During a restart, the user can save data for a further restart. In this case, the logical numbers of the saving and restart files must be different.


As far as data storage for postprocessing purposes (FICH ALIC, TPLOT, XPLOT, K2000 etc.) is concerned, two strategies may be followed during a restart. The first one consists in producing a single results file that after the restart corresponds to the file which would have been produced by a single run. To obtain this behaviour, during the restart use the same storage file which was defined in the previous run. The program will read the previous results file, position the pointer at the correct time (restart time) and then continue writing the data on the file.


The second possibility is that of splitting the results file in several pieces, one for the first run, another for the first restart, and so on. This may be useful e.g. in very large computations, to keep the file size acceptable. To obtain this behaviour, simply change the name of the results file each time you restart the calculations. The program will then produce a new data set containing also the necessary header information (e.g., geometry, etc.).


In case of the ParaView pvtk output the files are already split into several .vtu-files. They are combined later on in ParaView using the file .pvtk. For a restart the vtu files must not be present but the pvtk file. This file will be read by the routine and the new result files will be added.


Examples of both techniques are available in the example files.

13.5  DATA NECESSARY FOR RESTARTS

SR.40


Warning:


The data structure for restarts is different from that of a normal run.


All the EUROPLEXUS data relative to the preceeding computation are written on the restart file.


By explicitly re-defining a directive, the former one is cancelled and replaced. The user can also add some new directives.


The following directives must be repeated:

The following directive is NOT repeated:

The following directives may be defined again:

Comments:


DIMENSIONS: they can be larger (if for example loads are added), or smaller (if too much space had been provided) than the dimension of the preceeding computation. If it is not modified, the word TERM at least must be used.


MATERIALS: the density of the material and the stress-strain law can be changed, but the value of the initial stresses and strains (final value of the saving computation) must be compatible with the new law for all elements.


CONNECTIONS: the user can for example add or suppress a blocked displacement; in this case, do not forget to define again the whole instruction. If he wants to cancel all the connections of the preceeding computation, only the keyword LIAISON is necessary, without any other sub-instruction.


LOADS: the loads may be completely re-defined. Sometimes this is necessary, if the final time defined in the arrays becomes lower than the final time of the instruction CALCUL.


COMPUTATION: the start time corresponds to the time of restart. If it does not, EUROPLEXUS uses the time written on the restart file. The number of time steps takes the preceeding computation into account. If the user stops after 1000 steps, but wants to continue for a further 500 steps, the total number of time steps will be 1500.


Previous Up Next