2.8 Advanced Options¶
Interrupting a Run¶
The user can pause the run by pressing ctrl+c. This will bring up the FEBio prompt, and the user can enter a command. The FEBio prompt will also be shown when FEBio reaches a break point. See Section The FEBio Prompt for a list of available commands. Note that it may take a while before the FEBio prompt is displayed after the user requests a ctrl+c interruption. This may be because the program is in the middle of a call to the linear solver or another time-consuming part of the analysis procedure that cannot be interrupted. NOTE: This feature may not work properly on all systems, although it should always work on Windows systems.
Debugging a Run¶
As stated in Section The Command Line, FEBio can be run in debug-mode by specifying one of the –g options on the command line. When running in debug mode, FEBio performs additional checks and prints out more information to the screen and to the plot file. It will also store all non-converged states to the plot file. These non-converged states can be very useful for determining the cause of non-convergence or slow convergence. Because of this additional work, the problem may run slightly slower. Note that debug mode can be turned on/off while running an analysis by first interrupting the run with ctrl+c and then using the debug command to toggle the debug mode on or off. It is important to note that since FEBio will store all non-converged states to the plot file, this file may become very large in a short number of time steps. An alternative approach is to use the plot command to write out select non-converged states.
Setting break points¶
Although ctrl+c can be used to interrupt a run, it might sometimes be difficult to interrupt a run at a desired point. For this reason, you can set break points that will pause the execution and bring up the FEBio prompt. Breakpoints are set on the command line using the -break option, followed by the break condition. In addition, breakpoints can also be set via the FEBio prompt using the break option.
To break at a particular time point, simply add the value of the time after the -break option. This example will pause the run after time 0.45 completed (or the first time point past 0.45):
>febio -i input.feb -break 0.45
Instead of pausing at a particular time, you can also interrupt the run when a certain event happens. To break at an event, specify the event name at which to pause the run. The following list of events are defined.
| Event | Description |
|---|---|
| ALWAYS | break on any event |
| INIT | break after model initialization |
| STEP_ACTIVE | break after step activation |
| MAJOR_ITERS | break after major iteration (i.e. time step) converged |
| MINOR_ITERS | break after minor iteration (i.e. Newton iteration) |
| SOLVED | break after the model is solved |
| UPDATE_TIME | break before time is incremented |
| AUGMENT | break before augmentation |
| STEP_SOLVED | break after step is solved |
| REFORM | break after global matrix and right hand side is reformed |
| MATRIX_SOLVE | break right before the linear system solve |
For example, to pause the execution after a matrix reformation (and right-hand-side evaluation), enter the following command line.
>febio -i input.feb -break REFORM
Once the code reaches a breakpoint, the febio prompt will be presented. There are several commands that relate to breakpoints.
break Add a breakpoint
breaks Prints list of current breakpoints.
clear Clear one or all breakpoints.
Restarting a Run¶
When the creation of a restart dump file is requested, the analysis can be restarted from the last converged timestep. This is useful when the run terminated unexpectedly or when the user wishes to modify some parameters during the analysis. To request the creation of a dump file, simply add the -dump flag on the command line. This will generate a dump file which then can be used to restart the analysis. You can specify an optional dump level, which sets how often the dump file is created, and an optional dump file name.
> febio -i input.feb -dump
With the optional arguments, the complete syntax would be:
>febio -i input.feb -dump=1 out.dmp
The dump level can be set to the following values:
-
write dump file after each converged time step
-
write dump file after each completed analysis step
-
write dump file after each converged must-point
To restart an analysis, use the -r command line option. This option requires a filename as a parameter, and this name can be either the name of a dump file or the name of a restart input file. The latter case is a text file that allows the user to redefine some parameters when restarting the run. The format of this file is described in Chapter 5.