open_run_outputs Subroutine

public subroutine open_run_outputs(app, resumed, resume_batch, is_root, outputs)

root rank で出力先をこの run のものにしてから、設定どおりに history writer を開く。root 以外は全て無効(unit=-1)。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(in) :: app
logical, intent(in) :: resumed
integer(kind=i32), intent(in) :: resume_batch

再開した checkpoint の batch 数(resumed のときだけ使う)。

logical, intent(in) :: is_root
type(run_outputs_type), intent(out) :: outputs

Calls

proc~~open_run_outputs~~CallsGraph proc~open_run_outputs open_run_outputs interface~open_fixed_current_history_writer open_fixed_current_history_writer proc~open_run_outputs->interface~open_fixed_current_history_writer interface~open_history_writer open_history_writer proc~open_run_outputs->interface~open_history_writer interface~open_matching_plane_history_writer open_matching_plane_history_writer proc~open_run_outputs->interface~open_matching_plane_history_writer interface~open_matching_plane_spectrum_history_writer open_matching_plane_spectrum_history_writer proc~open_run_outputs->interface~open_matching_plane_spectrum_history_writer interface~open_potential_history_writer open_potential_history_writer proc~open_run_outputs->interface~open_potential_history_writer interface~open_secondary_emission_history_writer open_secondary_emission_history_writer proc~open_run_outputs->interface~open_secondary_emission_history_writer interface~open_top_reference_history_writer open_top_reference_history_writer proc~open_run_outputs->interface~open_top_reference_history_writer interface~remove_previous_run_outputs remove_previous_run_outputs proc~open_run_outputs->interface~remove_previous_run_outputs interface~trim_history_files trim_history_files proc~open_run_outputs->interface~trim_history_files proc~invalidate_output_checkpoints invalidate_output_checkpoints proc~open_run_outputs->proc~invalidate_output_checkpoints proc~invalidate_checkpoint_directory invalidate_checkpoint_directory proc~invalidate_output_checkpoints->proc~invalidate_checkpoint_directory proc~remove_file_if_exists remove_file_if_exists proc~invalidate_output_checkpoints->proc~remove_file_if_exists proc~invalidate_checkpoint_directory->proc~remove_file_if_exists

Called by

proc~~open_run_outputs~~CalledByGraph proc~open_run_outputs open_run_outputs program~main main program~main->proc~open_run_outputs

Source Code

  subroutine open_run_outputs(app, resumed, resume_batch, is_root, outputs)
    type(app_config), intent(in) :: app
    logical, intent(in) :: resumed, is_root
    integer(i32), intent(in) :: resume_batch
    type(run_outputs_type), intent(out) :: outputs
    logical :: opened
    integer :: unit_id

    outputs%history_stride = app%history_stride
    outputs%mesh_potential = app%write_mesh_potential
    if (.not. is_root) return
    if (app%write_output) call claim_output_dir(app, resumed, resume_batch)
    call open_history_writer(app, resumed, opened, unit_id)
    if (opened) outputs%history_unit = unit_id
    call open_potential_history_writer(app, resumed, opened, unit_id)
    if (opened) outputs%potential_history_unit = unit_id
    call open_top_reference_history_writer(app, resumed, opened, unit_id)
    if (opened) outputs%top_reference_history_unit = unit_id
    call open_matching_plane_history_writer(app, resumed, opened, unit_id)
    if (opened) outputs%matching_plane_history_unit = unit_id
    call open_fixed_current_history_writer(app, resumed, opened, unit_id)
    if (opened) outputs%fixed_current_history_unit = unit_id
    call open_matching_plane_spectrum_history_writer(app, resumed, opened, unit_id)
    if (opened) outputs%matching_plane_spectrum_history_unit = unit_id
    call open_secondary_emission_history_writer(app, resumed, opened, unit_id)
    if (opened) outputs%secondary_emission_history_unit = unit_id
  end subroutine open_run_outputs