write_checkpoint_state_files Subroutine

public subroutine write_checkpoint_state_files(out_dir, mesh, stats, cfg, mpi_world_size, charge_ledger)

再開に必要な root-rank 共通状態だけをチェックポイントへ保存する。

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: out_dir
type(mesh_type), intent(in) :: mesh
type(sim_stats), intent(in) :: stats
type(app_config), intent(in) :: cfg
integer(kind=i32), intent(in), optional :: mpi_world_size
type(charge_ledger_type), intent(in), optional :: charge_ledger

Calls

proc~~write_checkpoint_state_files~~CallsGraph proc~write_checkpoint_state_files write_checkpoint_state_files proc~begin_checkpoint_publish begin_checkpoint_publish proc~write_checkpoint_state_files->proc~begin_checkpoint_publish proc~ensure_output_dir ensure_output_dir proc~write_checkpoint_state_files->proc~ensure_output_dir proc~atomic_rename atomic_rename proc~begin_checkpoint_publish->proc~atomic_rename proc~create_directories create_directories proc~ensure_output_dir->proc~create_directories

Called by

proc~~write_checkpoint_state_files~~CalledByGraph proc~write_checkpoint_state_files write_checkpoint_state_files proc~maybe_write_periodic_checkpoint maybe_write_periodic_checkpoint proc~maybe_write_periodic_checkpoint->proc~write_checkpoint_state_files

Source Code

  subroutine write_checkpoint_state_files(out_dir, mesh, stats, cfg, mpi_world_size, charge_ledger)
    character(len=*), intent(in) :: out_dir
    type(mesh_type), intent(in) :: mesh
    type(sim_stats), intent(in) :: stats
    type(app_config), intent(in) :: cfg
    integer(i32), intent(in), optional :: mpi_world_size
    type(charge_ledger_type), intent(in), optional :: charge_ledger

    call ensure_output_dir(out_dir)
    call begin_checkpoint_publish(out_dir)
    call write_summary_file( &
      out_dir, mesh, stats, cfg, mpi_world_size=mpi_world_size, charge_ledger=charge_ledger &
      )
    call write_charges_file(out_dir, mesh)
    if (present(charge_ledger)) call write_charge_ledger_file(out_dir, charge_ledger)
  end subroutine write_checkpoint_state_files