bem_restart Module

チェックポイントファイルの保存/復元を扱う補助モジュール。


Uses

  • module~~bem_restart~~UsesGraph module~bem_restart bem_restart ieee_arithmetic ieee_arithmetic module~bem_restart->ieee_arithmetic module~bem_app_config_types bem_app_config_types module~bem_restart->module~bem_app_config_types module~bem_charge_ledger bem_charge_ledger module~bem_restart->module~bem_charge_ledger module~bem_checkpoint_contract bem_checkpoint_contract module~bem_restart->module~bem_checkpoint_contract module~bem_kinds bem_kinds module~bem_restart->module~bem_kinds module~bem_mpi bem_mpi module~bem_restart->module~bem_mpi module~bem_types bem_types module~bem_restart->module~bem_types module~bem_app_config_types->module~bem_kinds module~bem_app_config_types->module~bem_types module~bem_physics_config_types bem_physics_config_types module~bem_app_config_types->module~bem_physics_config_types module~bem_charge_ledger->ieee_arithmetic module~bem_charge_ledger->module~bem_kinds module~bem_checkpoint_contract->module~bem_kinds module~bem_filesystem bem_filesystem module~bem_checkpoint_contract->module~bem_filesystem iso_fortran_env iso_fortran_env module~bem_kinds->iso_fortran_env module~bem_mpi->module~bem_kinds module~bem_types->module~bem_kinds iso_c_binding iso_c_binding module~bem_filesystem->iso_c_binding module~bem_physics_config_types->ieee_arithmetic module~bem_physics_config_types->module~bem_kinds module~bem_physics_config_types->module~bem_types module~bem_string_utils bem_string_utils module~bem_physics_config_types->module~bem_string_utils

Used by

  • module~~bem_restart~~UsedByGraph module~bem_restart bem_restart module~bem_periodic_checkpoint bem_periodic_checkpoint module~bem_periodic_checkpoint->module~bem_restart module~bem_restart_contract bem_restart_contract module~bem_restart_contract->module~bem_restart module~bem_restart_injection bem_restart_injection module~bem_restart_injection->module~bem_restart module~bem_restart_records bem_restart_records module~bem_restart_records->module~bem_restart program~main main program~main->module~bem_restart program~main->module~bem_periodic_checkpoint module~bem_simulator_loop bem_simulator_loop module~bem_simulator_loop->module~bem_periodic_checkpoint

Variables

Type Visibility Attributes Name Initial
integer(kind=i32), public, parameter :: restart_contract_ok = 0_i32
integer(kind=i32), public, parameter :: restart_contract_mismatch = 1_i32
integer(kind=i32), public, parameter :: restart_contract_unsupported_schema = 2_i32
integer(kind=i32), public, parameter :: restart_contract_malformed = 3_i32

Interfaces

interface

  • public module function restart_rng_state_path(out_dir, mpi_rank, mpi_size, mpi) result(path)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: out_dir
    integer(kind=i32), intent(in), optional :: mpi_rank
    integer(kind=i32), intent(in), optional :: mpi_size
    type(mpi_context), intent(in), optional :: mpi

    Return Value character(len=1024)

interface

  • public module function restart_macro_residual_path(out_dir, mpi_rank, mpi_size, mpi) result(path)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: out_dir
    integer(kind=i32), intent(in), optional :: mpi_rank
    integer(kind=i32), intent(in), optional :: mpi_size
    type(mpi_context), intent(in), optional :: mpi

    Return Value character(len=1024)

interface

  • public module subroutine write_rng_state_file(out_dir, mpi_rank, mpi_size, mpi)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: out_dir
    integer(kind=i32), intent(in), optional :: mpi_rank
    integer(kind=i32), intent(in), optional :: mpi_size
    type(mpi_context), intent(in), optional :: mpi

interface

  • public module subroutine write_macro_residuals_file(out_dir, state, mpi_rank, mpi_size, mpi)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: out_dir
    type(injection_state), intent(in) :: state
    integer(kind=i32), intent(in), optional :: mpi_rank
    integer(kind=i32), intent(in), optional :: mpi_size
    type(mpi_context), intent(in), optional :: mpi

interface

  • public module subroutine validate_restart_contract(path, mesh, app, status, message)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: path
    type(mesh_type), intent(in) :: mesh
    type(app_config), intent(in) :: app
    integer(kind=i32), intent(out) :: status
    character(len=*), intent(out) :: message

Subroutines

public subroutine load_restart_checkpoint(out_dir, mesh, stats, has_restart, state, mpi_rank, mpi_size, mpi, require_checkpoint, app, charge_ledger)

既存チェックポイントディレクトリから統計・要素電荷・乱数状態を復元する。

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: out_dir

チェックポイントを探索するディレクトリ。

type(mesh_type), intent(inout) :: mesh

現在のメッシュ。q_elem を復元値で上書きする。

type(sim_stats), intent(out) :: stats

復元された統計値。

logical, intent(out) :: has_restart

復元可能なチェックポイントが存在したか。

type(injection_state), intent(inout), optional :: state

種別ごとのマクロ粒子残差(指定時のみ復元)。

integer(kind=i32), intent(in), optional :: mpi_rank
integer(kind=i32), intent(in), optional :: mpi_size
type(mpi_context), intent(in), optional :: mpi
logical, intent(in), optional :: require_checkpoint
type(app_config), intent(in), optional :: app
type(charge_ledger_type), intent(inout), optional :: charge_ledger