Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
state_recover_checkpoint::state_recover_checkpoint_t Type Referenceabstract
Inheritance diagram for state_recover_checkpoint::state_recover_checkpoint_t:
Collaboration diagram for state_recover_checkpoint::state_recover_checkpoint_t:

Public Member Functions

procedure, pass(this), public init (this, neko_case, params)
 Initialization from a JSON file.
 
procedure, pass(this), public init_from_components (this, neko_case, algorithm, n_saves_memory, path, filename, fmt, keep_checkpoints, extra_fields)
 Initialization from components.
 
procedure, pass(this), public free (this)
 Free.
 
procedure, pass(this), public reset (this)
 Reset the checkpoint data.
 
procedure, pass(this), public restore (this, tstep)
 Save the current state of the simulation to disk.
 
procedure, pass(thissave_data (this, index)
 Save current data to the ram checkpoint at index.
 
procedure, pass(thisload_data (this, index)
 Restore data from the ram checkpoint at index to the current state.
 
procedure(state_recover_init), deferred, pass, public init (this, neko_case, params)
 
procedure(state_recover_free), deferred, pass, public free (this)
 
procedure(state_recover_reset), deferred, pass, public reset (this)
 
procedure(state_recover_restore), deferred, pass, public restore (this, tstep)
 
procedure, pass, public get_n_timesteps (this)
 Get the number of states recorded by this recovery strategy.
 
procedure, pass, public set_n_timesteps (this, n)
 Set the number of states recorded by this recovery strategy.
 

Public Attributes

character(len=256) filename = "forward_checkpoint"
 The name of the checkpoint file.
 
character(len=256) path = "checkpoints/"
 The path to the checkpoint file (directory)
 
character(len=8) fmt = "chkp"
 The format of the checkpoint file.
 
integer n_saves_memory = 10
 Number of checkpoints to keep in memory.
 
logical keep_checkpoints = .false.
 Whether to keep the checkpoint files on disk after the simulation ends.
 
integer algorithm_id = 0
 
integer n_saves_disc = 0
 
integer first_valid_timestep = 2
 
integer loaded_checkpoint = -1
 
type(field_list_t) state_list
 
type(host_array_t), dimension(:,:), allocatable state_storage
 
type(chkp_output_t) chkp_output
 
class(case_t), pointer, public neko_case => null()
 Case associated with this recovery strategy at initialization.
 
integer n_timesteps = 0
 Number of states recorded by this recovery strategy.
 

Detailed Description

Definition at line 61 of file checkpoint.f90.

Member Function/Subroutine Documentation

◆ free() [1/2]

procedure, pass(this), public state_recover_checkpoint::state_recover_checkpoint_t::free ( class(state_recover_checkpoint_t), intent(inout this)
Parameters
[in,out]thisCheckpointing implementation.

Definition at line 100 of file checkpoint.f90.

◆ free() [2/2]

procedure(state_recover_free), deferred, pass, public state_recover::state_recover_t::free ( class(state_recover_t), intent(inout this)
pure virtualinherited

Definition at line 62 of file state_recover.f90.

◆ get_n_timesteps()

procedure, pass, public state_recover::state_recover_t::get_n_timesteps ( class(state_recover_t), intent(in this)
inherited
Parameters
[in]thisState recovery instance.

Definition at line 66 of file state_recover.f90.

◆ init() [1/2]

procedure, pass(this), public state_recover_checkpoint::state_recover_checkpoint_t::init ( class(state_recover_checkpoint_t), intent(inout this,
class(case_t), intent(inout), target  neko_case,
type(json_file), intent(inout params 
)

Restore the forward simulation state in a linear fashion Initialization

Parameters
[in,out]thisCheckpointing implementation.
[in,out]neko_caseCase data structure.
[in,out]paramsJSON parameters.

Definition at line 95 of file checkpoint.f90.

◆ init() [2/2]

procedure(state_recover_init), deferred, pass, public state_recover::state_recover_t::init ( class(state_recover_t), intent(inout this,
class(case_t), intent(inout), target  neko_case,
type(json_file), intent(inout params 
)
pure virtualinherited

Definition at line 61 of file state_recover.f90.

◆ init_from_components()

procedure, pass(this), public state_recover_checkpoint::state_recover_checkpoint_t::init_from_components ( class(state_recover_checkpoint_t), intent(inout), target  this,
class(case_t), intent(inout), target  neko_case,
character(len=*), intent(in algorithm,
integer, intent(in), optional  n_saves_memory,
character(len=*), intent(in), optional  path,
character(len=*), intent(in), optional  filename,
character(len=*), intent(in), optional  fmt,
logical, intent(in), optional  keep_checkpoints,
type(field_list_t), intent(inout), optional  extra_fields 
)
Parameters
[in,out]thisCheckpointing implementation.
[in,out]neko_caseCase data structure.
[in]algorithmCheckpointing algorithm identifier.
[in]n_saves_memoryNumber of checkpoints in memory.
[in]pathOutput directory for checkpoint files.
[in]filenameCheckpoint base filename.
[in]fmtCheckpoint file format.
[in]keep_checkpointsWhether to keep checkpoint files on disk.
[in,out]extra_fieldsAdditional fields to include in checkpoints.

Definition at line 97 of file checkpoint.f90.

◆ load_data()

procedure, pass(this) state_recover_checkpoint::state_recover_checkpoint_t::load_data ( class(state_recover_checkpoint_t), intent(inout this,
integer, intent(in index 
)
Parameters
thisThe checkpoint object.
indexThe index in the RAM checkpoint to restore from.

Definition at line 111 of file checkpoint.f90.

◆ reset() [1/2]

procedure, pass(this), public state_recover_checkpoint::state_recover_checkpoint_t::reset ( class(state_recover_checkpoint_t), intent(inout this)
Parameters
[in,out]thisCheckpointing implementation.

Definition at line 102 of file checkpoint.f90.

◆ reset() [2/2]

procedure(state_recover_reset), deferred, pass, public state_recover::state_recover_t::reset ( class(state_recover_t), intent(inout this)
pure virtualinherited

Definition at line 63 of file state_recover.f90.

◆ restore() [1/2]

procedure, pass(this), public state_recover_checkpoint::state_recover_checkpoint_t::restore ( class(state_recover_checkpoint_t), intent(inout this,
integer, intent(in tstep 
)

Restore the forward simulation state

Definition at line 106 of file checkpoint.f90.

◆ restore() [2/2]

procedure(state_recover_restore), deferred, pass, public state_recover::state_recover_t::restore ( class(state_recover_t), intent(inout this,
integer, intent(in tstep 
)
pure virtualinherited

Definition at line 65 of file state_recover.f90.

◆ save_data()

procedure, pass(this) state_recover_checkpoint::state_recover_checkpoint_t::save_data ( class(state_recover_checkpoint_t), intent(inout this,
integer, intent(in index 
)
Parameters
thisThe checkpoint object.
indexThe index in the RAM checkpoint to save to.

Definition at line 109 of file checkpoint.f90.

◆ set_n_timesteps()

procedure, pass, public state_recover::state_recover_t::set_n_timesteps ( class(state_recover_t), intent(inout this,
integer, intent(in n 
)
inherited
Parameters
[in,out]thisState recovery instance.
[in]nNumber of recorded states.

Definition at line 68 of file state_recover.f90.

Member Data Documentation

◆ algorithm_id

integer state_recover_checkpoint::state_recover_checkpoint_t::algorithm_id = 0

Definition at line 81 of file checkpoint.f90.

◆ chkp_output

type(chkp_output_t) state_recover_checkpoint::state_recover_checkpoint_t::chkp_output

Definition at line 91 of file checkpoint.f90.

◆ filename

character(len=256) state_recover_checkpoint::state_recover_checkpoint_t::filename = "forward_checkpoint"

Definition at line 70 of file checkpoint.f90.

◆ first_valid_timestep

integer state_recover_checkpoint::state_recover_checkpoint_t::first_valid_timestep = 2

Definition at line 83 of file checkpoint.f90.

◆ fmt

character(len=8) state_recover_checkpoint::state_recover_checkpoint_t::fmt = "chkp"

Definition at line 74 of file checkpoint.f90.

◆ keep_checkpoints

logical state_recover_checkpoint::state_recover_checkpoint_t::keep_checkpoints = .false.

Definition at line 78 of file checkpoint.f90.

◆ loaded_checkpoint

integer state_recover_checkpoint::state_recover_checkpoint_t::loaded_checkpoint = -1

Definition at line 84 of file checkpoint.f90.

◆ n_saves_disc

integer state_recover_checkpoint::state_recover_checkpoint_t::n_saves_disc = 0

Definition at line 82 of file checkpoint.f90.

◆ n_saves_memory

integer state_recover_checkpoint::state_recover_checkpoint_t::n_saves_memory = 10

Definition at line 76 of file checkpoint.f90.

◆ n_timesteps

integer state_recover::state_recover_t::n_timesteps = 0
inherited

Definition at line 59 of file state_recover.f90.

◆ neko_case

class(case_t), pointer, public state_recover::state_recover_t::neko_case => null()
inherited

Definition at line 57 of file state_recover.f90.

◆ path

character(len=256) state_recover_checkpoint::state_recover_checkpoint_t::path = "checkpoints/"

Definition at line 72 of file checkpoint.f90.

◆ state_list

type(field_list_t) state_recover_checkpoint::state_recover_checkpoint_t::state_list

Definition at line 87 of file checkpoint.f90.

◆ state_storage

type(host_array_t), dimension(:,:), allocatable state_recover_checkpoint::state_recover_checkpoint_t::state_storage

Definition at line 88 of file checkpoint.f90.


The documentation for this type was generated from the following file: