w90_wannier90_readwrite_read_restart Subroutine

private subroutine w90_wannier90_readwrite_read_restart(settings, w90_calculation, seedname, error, comm)

Uses

  • proc~~w90_wannier90_readwrite_read_restart~~UsesGraph proc~w90_wannier90_readwrite_read_restart w90_wannier90_readwrite_read_restart module~w90_error w90_error proc~w90_wannier90_readwrite_read_restart->module~w90_error module~w90_comms w90_comms module~w90_error->module~w90_comms module~w90_error_base w90_error_base module~w90_error->module~w90_error_base module~w90_comms->module~w90_error_base module~w90_constants w90_constants module~w90_comms->module~w90_constants

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(w90_calculation_type), intent(inout) :: w90_calculation
character(len=*), intent(in) :: seedname
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~w90_wannier90_readwrite_read_restart~~CallsGraph proc~w90_wannier90_readwrite_read_restart w90_wannier90_readwrite_read_restart proc~set_error_file set_error_file proc~w90_wannier90_readwrite_read_restart->proc~set_error_file proc~set_error_input set_error_input proc~w90_wannier90_readwrite_read_restart->proc~set_error_input proc~w90_readwrite_get_keyword w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_restart->proc~w90_readwrite_get_keyword proc~comms_sync_error comms_sync_error proc~set_error_file->proc~comms_sync_error proc~set_base_error set_base_error proc~set_error_file->proc~set_base_error proc~set_error_input->proc~comms_sync_error proc~set_error_input->proc~set_base_error proc~w90_readwrite_get_keyword->proc~set_error_input proc~set_error_fatal set_error_fatal proc~w90_readwrite_get_keyword->proc~set_error_fatal proc~set_error_fatal->proc~comms_sync_error proc~set_error_fatal->proc~set_base_error

Called by

proc~~w90_wannier90_readwrite_read_restart~~CalledByGraph proc~w90_wannier90_readwrite_read_restart w90_wannier90_readwrite_read_restart proc~w90_wannier90_readwrite_read w90_wannier90_readwrite_read proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_restart proc~w90_input_reader~2 w90_input_reader proc~w90_input_reader~2->proc~w90_wannier90_readwrite_read proc~w90_input_setopt w90_input_setopt proc~w90_input_setopt->proc~w90_wannier90_readwrite_read proc~w90_input_reader w90_input_reader proc~w90_input_reader->proc~w90_input_reader~2 proc~w90_input_setopt_f w90_input_setopt_f proc~w90_input_setopt_f->proc~w90_input_setopt program~wannier wannier program~wannier->proc~w90_input_reader~2

Source Code

  subroutine w90_wannier90_readwrite_read_restart(settings, w90_calculation, seedname, error, comm)
    !================================================!
    use w90_error, only: w90_error_type
    implicit none

    character(len=*), intent(in)  :: seedname
    type(settings_type), intent(inout) :: settings
    type(w90_calculation_type), intent(inout) :: w90_calculation
    type(w90_comm_type), intent(in) :: comm
    type(w90_error_type), allocatable, intent(out) :: error

    logical :: found, chk_found

    call w90_readwrite_get_keyword(settings, 'restart', found, error, comm, &
                                   c_value=w90_calculation%restart)
    if (allocated(error)) return
    if (found) then
      if ((w90_calculation%restart .ne. 'default') .and. (w90_calculation%restart .ne. 'wannierise') &
          .and. (w90_calculation%restart .ne. 'plot') .and. (w90_calculation%restart .ne. 'transport')) then
        call set_error_input(error, 'Error in input file: value of restart not recognised', comm)
        return
      else
        inquire (file=trim(seedname)//'.chk', exist=chk_found)
        if (.not. chk_found) then
          call set_error_file(error, 'Error: restart requested but '//trim(seedname)//'.chk file not found', comm)
          return
        end if
      end if
    end if
    !post processing takes priority (user is not warned of this)
    if (w90_calculation%postproc_setup) w90_calculation%restart = ' '
  end subroutine w90_wannier90_readwrite_read_restart