![]() |
fpmas 1.6
|
#include <model.h>
Public Member Functions | |
AutoBreakpoint (std::string file_format, api::io::Breakpoint< api::model::Model > &breakpoint, api::model::Model &model) | |
const api::scheduler::Job & | job () const |
An utility class that can be used to easily schedule Model breakpoints.
A job() is built to automatically dump the specified model to a file when it is executed.
|
inline |
AutoBreakpoint constructor.
The specified file_format
is formatted using the fpmas::utils::format(std::string, int, fpmas::api::scheduler::TimeStep) method, so that r
and t
occurrences in the file_format
are automatically replaced by the current process rank and the current date to generate file names.
Since breakpoints can quickly grow in size, a good practice is to use a file_format
such as "breakpoint.%r.bin"
, that does not depend on "%t"
. This way, the last dump always overrides the previous, what might save a consequent amount of memory, while still allowing to recover from the most recent breakpoint in case of crash.
file_format | File name format |
breakpoint | Breakpoint instance used to perform dumps |
model | Model on which breakpoints are performed |
|
inline |
A Job that can be scheduled to automatically dump model breakpoints.