w90_readwrite_read_chkpt Subroutine

public subroutine w90_readwrite_read_chkpt(dis_manifold, exclude_bands, kmesh_info, kpt_latt, wannier_data, m_matrix, u_matrix, u_matrix_opt, real_lattice, omega_invariant, mp_grid, num_bands, num_exclude_bands, num_kpts, num_wann, checkpoint, have_disentangled, ispostw90, seedname, stdout, error, comm)

Uses

  • proc~~w90_readwrite_read_chkpt~~UsesGraph proc~w90_readwrite_read_chkpt w90_readwrite_read_chkpt module~w90_error w90_error proc~w90_readwrite_read_chkpt->module~w90_error module~w90_utility w90_utility proc~w90_readwrite_read_chkpt->module~w90_utility 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_utility->module~w90_comms module~w90_constants w90_constants module~w90_utility->module~w90_constants module~w90_comms->module~w90_constants module~w90_comms->module~w90_error_base

Read checkpoint file This is used to allocate the matrices.

Note on parallelization: this function should be called from the root node only!

Arguments

Type IntentOptional Attributes Name
type(dis_manifold_type), intent(inout) :: dis_manifold
integer, intent(inout), allocatable :: exclude_bands(:)
type(kmesh_info_type), intent(in) :: kmesh_info
real(kind=dp), intent(in) :: kpt_latt(:,:)
type(wannier_data_type), intent(inout) :: wannier_data
complex(kind=dp), intent(inout) :: m_matrix(:,:,:,:)
complex(kind=dp), intent(inout) :: u_matrix(:,:,:)
complex(kind=dp), intent(inout) :: u_matrix_opt(:,:,:)
real(kind=dp), intent(in) :: real_lattice(3,3)
real(kind=dp), intent(inout) :: omega_invariant
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: num_bands
integer, intent(in) :: num_exclude_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_wann
character(len=20), intent(inout) :: checkpoint
logical, intent(out) :: have_disentangled
logical, intent(in) :: ispostw90
character(len=*), intent(in) :: seedname
integer, intent(in) :: stdout
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~w90_readwrite_read_chkpt~~CallsGraph proc~w90_readwrite_read_chkpt w90_readwrite_read_chkpt proc~w90_readwrite_read_chkpt_header w90_readwrite_read_chkpt_header proc~w90_readwrite_read_chkpt->proc~w90_readwrite_read_chkpt_header proc~w90_readwrite_read_chkpt_matrices w90_readwrite_read_chkpt_matrices proc~w90_readwrite_read_chkpt->proc~w90_readwrite_read_chkpt_matrices proc~mpirank mpirank proc~w90_readwrite_read_chkpt_header->proc~mpirank proc~set_error_file set_error_file proc~w90_readwrite_read_chkpt_header->proc~set_error_file proc~utility_recip_lattice utility_recip_lattice proc~w90_readwrite_read_chkpt_header->proc~utility_recip_lattice proc~w90_readwrite_read_chkpt_matrices->proc~mpirank proc~set_error_alloc set_error_alloc proc~w90_readwrite_read_chkpt_matrices->proc~set_error_alloc proc~w90_readwrite_read_chkpt_matrices->proc~set_error_file proc~comms_sync_error comms_sync_error proc~set_error_alloc->proc~comms_sync_error proc~set_base_error set_base_error proc~set_error_alloc->proc~set_base_error proc~set_error_file->proc~comms_sync_error proc~set_error_file->proc~set_base_error proc~set_error_fatal set_error_fatal proc~utility_recip_lattice->proc~set_error_fatal proc~utility_recip_lattice_base utility_recip_lattice_base proc~utility_recip_lattice->proc~utility_recip_lattice_base proc~set_error_fatal->proc~comms_sync_error proc~set_error_fatal->proc~set_base_error proc~utility_inv3 utility_inv3 proc~utility_recip_lattice_base->proc~utility_inv3

Called by

proc~~w90_readwrite_read_chkpt~~CalledByGraph proc~w90_readwrite_read_chkpt w90_readwrite_read_chkpt proc~read_chkpt read_chkpt proc~read_chkpt->proc~w90_readwrite_read_chkpt program~postw90 postw90 program~postw90->proc~w90_readwrite_read_chkpt program~wannier wannier program~wannier->proc~read_chkpt

Source Code

  subroutine w90_readwrite_read_chkpt(dis_manifold, exclude_bands, kmesh_info, kpt_latt, &
                                      wannier_data, m_matrix, u_matrix, u_matrix_opt, &
                                      real_lattice, omega_invariant, mp_grid, num_bands, &
                                      num_exclude_bands, num_kpts, num_wann, checkpoint, &
                                      have_disentangled, ispostw90, seedname, stdout, error, comm)
    !================================================!
    !! Read checkpoint file
    !! This is used to allocate the matrices.
    !!
    !! Note on parallelization: this function should be called
    !! from the root node only!
    !!
    !================================================!

    use w90_error, only: w90_error_type, set_error_file, set_error_file, set_error_alloc
    use w90_utility, only: utility_recip_lattice

    implicit none

    ! arguments
    type(dis_manifold_type), intent(inout) :: dis_manifold
    type(kmesh_info_type), intent(in) :: kmesh_info
    type(w90_comm_type), intent(in) :: comm
    type(w90_error_type), allocatable, intent(out) :: error
    type(wannier_data_type), intent(inout) :: wannier_data

    integer, allocatable, intent(inout) :: exclude_bands(:)
    integer, intent(in) :: mp_grid(3)
    integer, intent(in) :: num_bands
    integer, intent(in) :: num_exclude_bands
    integer, intent(in) :: num_kpts
    integer, intent(in) :: num_wann
    integer, intent(in) :: stdout

    complex(kind=dp), intent(inout) :: u_matrix(:, :, :)
    complex(kind=dp), intent(inout) :: u_matrix_opt(:, :, :)
    complex(kind=dp), intent(inout) :: m_matrix(:, :, :, :)

    real(kind=dp), intent(in) :: kpt_latt(:, :)
    real(kind=dp), intent(inout) :: omega_invariant
    real(kind=dp), intent(in) :: real_lattice(3, 3)

    character(len=20), intent(inout) :: checkpoint
    character(len=*), intent(in)  :: seedname

    logical, intent(in) :: ispostw90 ! Are we running postw90?
    logical, intent(out) :: have_disentangled

    ! local variables
    integer :: chk_unit

    call w90_readwrite_read_chkpt_header(exclude_bands, kmesh_info, kpt_latt, real_lattice, &
                                         mp_grid, num_bands, num_exclude_bands, num_kpts, &
                                         num_wann, checkpoint, have_disentangled, ispostw90, &
                                         seedname, chk_unit, stdout, error, comm)
    if (allocated(error)) return

    call w90_readwrite_read_chkpt_matrices(dis_manifold, kmesh_info, wannier_data, m_matrix, &
                                           u_matrix, u_matrix_opt, omega_invariant, num_bands, &
                                           num_kpts, num_wann, have_disentangled, seedname, &
                                           chk_unit, stdout, error, comm)
  end subroutine w90_readwrite_read_chkpt