w90_input_reader Subroutine

public subroutine w90_input_reader(common_data, istdout, istderr, ierr)

Uses

  • proc~~w90_input_reader~2~~UsesGraph proc~w90_input_reader~2 w90_input_reader module~w90_comms w90_comms proc~w90_input_reader~2->module~w90_comms module~w90_error w90_error proc~w90_input_reader~2->module~w90_error module~w90_error_base w90_error_base proc~w90_input_reader~2->module~w90_error_base module~w90_readwrite w90_readwrite proc~w90_input_reader~2->module~w90_readwrite module~w90_wannier90_readwrite w90_wannier90_readwrite proc~w90_input_reader~2->module~w90_wannier90_readwrite module~w90_comms->module~w90_error_base module~w90_constants w90_constants module~w90_comms->module~w90_constants module~w90_error->module~w90_comms module~w90_error->module~w90_error_base module~w90_readwrite->module~w90_comms module~w90_readwrite->module~w90_constants module~w90_types w90_types module~w90_readwrite->module~w90_types module~w90_wannier90_readwrite->module~w90_error module~w90_wannier90_readwrite->module~w90_readwrite module~w90_wannier90_readwrite->module~w90_constants module~w90_wannier90_readwrite->module~w90_types module~w90_wannier90_types w90_wannier90_types module~w90_wannier90_readwrite->module~w90_wannier90_types module~w90_types->module~w90_constants module~w90_wannier90_types->module~w90_constants

mechanism to act upon tokens read from the input ".win" file input is parsed and interpreted (any errors are identified) and the library data structure (variable common_data), already setup by w90_input_setopt, is modified

Arguments

Type IntentOptional Attributes Name
type(lib_common_type), intent(inout) :: common_data
integer, intent(in) :: istdout
integer, intent(in) :: istderr
integer, intent(out) :: ierr

Calls

proc~~w90_input_reader~2~~CallsGraph proc~w90_input_reader~2 w90_input_reader proc~prterr prterr proc~w90_input_reader~2->proc~prterr proc~set_error_fatal set_error_fatal proc~w90_input_reader~2->proc~set_error_fatal proc~valid_communicator valid_communicator proc~w90_input_reader~2->proc~valid_communicator proc~w90_readwrite_clean_infile w90_readwrite_clean_infile proc~w90_input_reader~2->proc~w90_readwrite_clean_infile proc~w90_readwrite_in_file w90_readwrite_in_file proc~w90_input_reader~2->proc~w90_readwrite_in_file proc~w90_wannier90_readwrite_read w90_wannier90_readwrite_read proc~w90_input_reader~2->proc~w90_wannier90_readwrite_read interface~comms_no_sync_bcast comms_no_sync_bcast proc~prterr->interface~comms_no_sync_bcast interface~comms_no_sync_recv comms_no_sync_recv proc~prterr->interface~comms_no_sync_recv interface~comms_no_sync_send comms_no_sync_send proc~prterr->interface~comms_no_sync_send proc~mpirank mpirank proc~prterr->proc~mpirank proc~mpisize mpisize proc~prterr->proc~mpisize proc~comms_sync_error comms_sync_error proc~set_error_fatal->proc~comms_sync_error proc~set_base_error set_base_error proc~set_error_fatal->proc~set_base_error proc~set_error_dealloc set_error_dealloc proc~w90_readwrite_clean_infile->proc~set_error_dealloc proc~set_error_input set_error_input proc~w90_readwrite_clean_infile->proc~set_error_input proc~w90_readwrite_clear_keywords w90_readwrite_clear_keywords proc~w90_readwrite_clean_infile->proc~w90_readwrite_clear_keywords proc~set_error_alloc set_error_alloc proc~w90_readwrite_in_file->proc~set_error_alloc proc~set_error_file set_error_file proc~w90_readwrite_in_file->proc~set_error_file proc~utility_lowercase utility_lowercase proc~w90_readwrite_in_file->proc~utility_lowercase proc~w90_wannier90_readwrite_read->proc~set_error_input proc~w90_readwrite_read_algorithm_control w90_readwrite_read_algorithm_control proc~w90_wannier90_readwrite_read->proc~w90_readwrite_read_algorithm_control proc~w90_readwrite_read_dis_manifold w90_readwrite_read_dis_manifold proc~w90_wannier90_readwrite_read->proc~w90_readwrite_read_dis_manifold proc~w90_readwrite_read_explicit_kpath w90_readwrite_read_explicit_kpath proc~w90_wannier90_readwrite_read->proc~w90_readwrite_read_explicit_kpath proc~w90_readwrite_read_fermi_energy w90_readwrite_read_fermi_energy proc~w90_wannier90_readwrite_read->proc~w90_readwrite_read_fermi_energy proc~w90_readwrite_read_gamma_only w90_readwrite_read_gamma_only proc~w90_wannier90_readwrite_read->proc~w90_readwrite_read_gamma_only proc~w90_readwrite_read_kpath w90_readwrite_read_kpath proc~w90_wannier90_readwrite_read->proc~w90_readwrite_read_kpath proc~w90_readwrite_read_units w90_readwrite_read_units proc~w90_wannier90_readwrite_read->proc~w90_readwrite_read_units proc~w90_readwrite_read_verbosity w90_readwrite_read_verbosity proc~w90_wannier90_readwrite_read->proc~w90_readwrite_read_verbosity proc~w90_readwrite_read_ws_data w90_readwrite_read_ws_data proc~w90_wannier90_readwrite_read->proc~w90_readwrite_read_ws_data proc~w90_wannier90_readwrite_read_band_plot w90_wannier90_readwrite_read_band_plot proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_band_plot proc~w90_wannier90_readwrite_read_bloch_phase w90_wannier90_readwrite_read_bloch_phase proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_bloch_phase proc~w90_wannier90_readwrite_read_constrained_centres w90_wannier90_readwrite_read_constrained_centres proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_constrained_centres proc~w90_wannier90_readwrite_read_disentangle w90_wannier90_readwrite_read_disentangle proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_disentangle proc~w90_wannier90_readwrite_read_dist_cutoff w90_wannier90_readwrite_read_dist_cutoff proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_dist_cutoff proc~w90_wannier90_readwrite_read_fermi_surface w90_wannier90_readwrite_read_fermi_surface proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_fermi_surface proc~w90_wannier90_readwrite_read_hamil w90_wannier90_readwrite_read_hamil proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_hamil proc~w90_wannier90_readwrite_read_one_dim w90_wannier90_readwrite_read_one_dim proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_one_dim proc~w90_wannier90_readwrite_read_outfiles w90_wannier90_readwrite_read_outfiles proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_outfiles proc~w90_wannier90_readwrite_read_plot_info w90_wannier90_readwrite_read_plot_info proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_plot_info proc~w90_wannier90_readwrite_read_post_proc w90_wannier90_readwrite_read_post_proc proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_post_proc proc~w90_wannier90_readwrite_read_restart w90_wannier90_readwrite_read_restart proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_restart proc~w90_wannier90_readwrite_read_sym w90_wannier90_readwrite_read_sym proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_sym proc~w90_wannier90_readwrite_read_transport w90_wannier90_readwrite_read_transport proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_transport proc~w90_wannier90_readwrite_read_w90_calcs w90_wannier90_readwrite_read_w90_calcs proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_w90_calcs proc~w90_wannier90_readwrite_read_wann_plot w90_wannier90_readwrite_read_wann_plot proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_wann_plot proc~w90_wannier90_readwrite_read_wannierise w90_wannier90_readwrite_read_wannierise proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_wannierise proc~comms_no_sync_bcast_char comms_no_sync_bcast_char interface~comms_no_sync_bcast->proc~comms_no_sync_bcast_char proc~comms_no_sync_bcast_cmplx comms_no_sync_bcast_cmplx interface~comms_no_sync_bcast->proc~comms_no_sync_bcast_cmplx proc~comms_no_sync_bcast_int comms_no_sync_bcast_int interface~comms_no_sync_bcast->proc~comms_no_sync_bcast_int proc~comms_no_sync_bcast_logical comms_no_sync_bcast_logical interface~comms_no_sync_bcast->proc~comms_no_sync_bcast_logical proc~comms_no_sync_bcast_real comms_no_sync_bcast_real interface~comms_no_sync_bcast->proc~comms_no_sync_bcast_real proc~comms_no_sync_recv_char comms_no_sync_recv_char interface~comms_no_sync_recv->proc~comms_no_sync_recv_char proc~comms_no_sync_recv_cmplx comms_no_sync_recv_cmplx interface~comms_no_sync_recv->proc~comms_no_sync_recv_cmplx proc~comms_no_sync_recv_int comms_no_sync_recv_int interface~comms_no_sync_recv->proc~comms_no_sync_recv_int proc~comms_no_sync_recv_logical comms_no_sync_recv_logical interface~comms_no_sync_recv->proc~comms_no_sync_recv_logical proc~comms_no_sync_recv_real comms_no_sync_recv_real interface~comms_no_sync_recv->proc~comms_no_sync_recv_real proc~comms_no_sync_send_char comms_no_sync_send_char interface~comms_no_sync_send->proc~comms_no_sync_send_char proc~comms_no_sync_send_cmplx comms_no_sync_send_cmplx interface~comms_no_sync_send->proc~comms_no_sync_send_cmplx proc~comms_no_sync_send_int comms_no_sync_send_int interface~comms_no_sync_send->proc~comms_no_sync_send_int proc~comms_no_sync_send_logical comms_no_sync_send_logical interface~comms_no_sync_send->proc~comms_no_sync_send_logical proc~comms_no_sync_send_real comms_no_sync_send_real interface~comms_no_sync_send->proc~comms_no_sync_send_real proc~set_error_alloc->proc~comms_sync_error proc~set_error_alloc->proc~set_base_error proc~set_error_dealloc->proc~comms_sync_error proc~set_error_dealloc->proc~set_base_error proc~set_error_file->proc~comms_sync_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_clear_keywords->proc~set_error_alloc proc~w90_readwrite_clear_keywords->proc~set_error_dealloc proc~clear_block clear_block proc~w90_readwrite_clear_keywords->proc~clear_block proc~w90_readwrite_get_keyword w90_readwrite_get_keyword proc~w90_readwrite_clear_keywords->proc~w90_readwrite_get_keyword proc~w90_readwrite_get_keyword_vector w90_readwrite_get_keyword_vector proc~w90_readwrite_clear_keywords->proc~w90_readwrite_get_keyword_vector proc~w90_readwrite_get_range_vector w90_readwrite_get_range_vector proc~w90_readwrite_clear_keywords->proc~w90_readwrite_get_range_vector proc~w90_readwrite_read_algorithm_control->proc~w90_readwrite_get_keyword proc~w90_readwrite_read_dis_manifold->proc~set_error_input proc~w90_readwrite_read_dis_manifold->proc~w90_readwrite_get_keyword proc~w90_readwrite_read_explicit_kpath->proc~set_error_alloc proc~w90_readwrite_read_explicit_kpath->proc~set_error_dealloc proc~w90_readwrite_get_block_length w90_readwrite_get_block_length proc~w90_readwrite_read_explicit_kpath->proc~w90_readwrite_get_block_length proc~w90_readwrite_get_keyword_explicit_kpath w90_readwrite_get_keyword_explicit_kpath proc~w90_readwrite_read_explicit_kpath->proc~w90_readwrite_get_keyword_explicit_kpath proc~w90_readwrite_read_explicit_kpath_points w90_readwrite_read_explicit_kpath_points proc~w90_readwrite_read_explicit_kpath->proc~w90_readwrite_read_explicit_kpath_points proc~w90_readwrite_read_fermi_energy->proc~set_error_alloc proc~w90_readwrite_read_fermi_energy->proc~set_error_input proc~w90_readwrite_read_fermi_energy->proc~w90_readwrite_get_keyword proc~w90_readwrite_read_gamma_only->proc~set_error_input proc~w90_readwrite_read_gamma_only->proc~w90_readwrite_get_keyword proc~w90_readwrite_read_kpath->proc~set_error_alloc proc~w90_readwrite_read_kpath->proc~set_error_dealloc proc~w90_readwrite_read_kpath->proc~set_error_input proc~w90_readwrite_read_kpath->proc~w90_readwrite_get_block_length proc~w90_readwrite_read_kpath->proc~w90_readwrite_get_keyword proc~w90_readwrite_get_keyword_kpath w90_readwrite_get_keyword_kpath proc~w90_readwrite_read_kpath->proc~w90_readwrite_get_keyword_kpath proc~w90_readwrite_read_units->proc~set_error_input proc~w90_readwrite_read_units->proc~w90_readwrite_get_keyword proc~w90_readwrite_read_verbosity->proc~mpirank proc~w90_readwrite_read_verbosity->proc~w90_readwrite_get_keyword proc~w90_readwrite_read_ws_data->proc~set_error_input proc~w90_readwrite_read_ws_data->proc~w90_readwrite_get_keyword proc~w90_readwrite_read_ws_data->proc~w90_readwrite_get_keyword_vector proc~w90_readwrite_get_vector_length w90_readwrite_get_vector_length proc~w90_readwrite_read_ws_data->proc~w90_readwrite_get_vector_length proc~w90_wannier90_readwrite_read_band_plot->proc~set_error_alloc proc~w90_wannier90_readwrite_read_band_plot->proc~set_error_dealloc proc~w90_wannier90_readwrite_read_band_plot->proc~set_error_input proc~w90_wannier90_readwrite_read_band_plot->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_band_plot->proc~w90_readwrite_get_range_vector proc~w90_wannier90_readwrite_read_bloch_phase->proc~set_error_input proc~w90_wannier90_readwrite_read_bloch_phase->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_constrained_centres->proc~set_error_input proc~w90_wannier90_readwrite_read_constrained_centres->proc~w90_readwrite_get_block_length proc~w90_readwrite_get_centre_constraints w90_readwrite_get_centre_constraints proc~w90_wannier90_readwrite_read_constrained_centres->proc~w90_readwrite_get_centre_constraints proc~w90_wannier90_readwrite_read_disentangle->proc~set_error_alloc proc~w90_wannier90_readwrite_read_disentangle->proc~set_error_input proc~w90_wannier90_readwrite_read_disentangle->proc~w90_readwrite_get_keyword proc~w90_readwrite_get_keyword_block w90_readwrite_get_keyword_block proc~w90_wannier90_readwrite_read_disentangle->proc~w90_readwrite_get_keyword_block proc~w90_wannier90_readwrite_read_dist_cutoff->proc~set_error_input proc~w90_wannier90_readwrite_read_dist_cutoff->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_fermi_surface->proc~set_error_input proc~w90_wannier90_readwrite_read_fermi_surface->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_hamil->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_hamil->proc~w90_readwrite_get_keyword_vector proc~w90_wannier90_readwrite_read_one_dim->proc~set_error_input proc~w90_wannier90_readwrite_read_one_dim->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_outfiles->proc~set_error_input proc~w90_wannier90_readwrite_read_outfiles->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_plot_info->proc~set_error_input proc~w90_wannier90_readwrite_read_plot_info->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_post_proc->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_restart->proc~set_error_file proc~w90_wannier90_readwrite_read_restart->proc~set_error_input proc~w90_wannier90_readwrite_read_restart->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_sym->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_transport->proc~set_error_input proc~w90_wannier90_readwrite_read_transport->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_w90_calcs->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_wann_plot->proc~set_error_alloc proc~w90_wannier90_readwrite_read_wann_plot->proc~set_error_dealloc proc~w90_wannier90_readwrite_read_wann_plot->proc~set_error_input proc~w90_wannier90_readwrite_read_wann_plot->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_wann_plot->proc~w90_readwrite_get_keyword_vector proc~w90_wannier90_readwrite_read_wann_plot->proc~w90_readwrite_get_range_vector proc~w90_wannier90_readwrite_read_wann_plot->proc~w90_readwrite_get_vector_length proc~w90_wannier90_readwrite_read_wannierise->proc~set_error_alloc proc~w90_wannier90_readwrite_read_wannierise->proc~set_error_input proc~w90_wannier90_readwrite_read_wannierise->proc~w90_readwrite_get_keyword proc~clear_block->proc~set_error_input proc~w90_readwrite_get_block_length->proc~set_error_input proc~w90_readwrite_get_centre_constraints->proc~set_error_alloc proc~w90_readwrite_get_centre_constraints->proc~set_error_dealloc proc~w90_readwrite_get_centre_constraints->proc~set_error_input proc~get_centre_constraint_from_column get_centre_constraint_from_column proc~w90_readwrite_get_centre_constraints->proc~get_centre_constraint_from_column proc~utility_frac_to_cart utility_frac_to_cart proc~w90_readwrite_get_centre_constraints->proc~utility_frac_to_cart proc~w90_readwrite_get_keyword->proc~set_error_fatal proc~w90_readwrite_get_keyword->proc~set_error_input proc~w90_readwrite_get_keyword_block->proc~set_error_fatal proc~w90_readwrite_get_keyword_block->proc~set_error_input proc~w90_readwrite_get_keyword_explicit_kpath->proc~set_error_input proc~w90_readwrite_get_keyword_kpath->proc~set_error_input proc~w90_readwrite_get_keyword_vector->proc~set_error_fatal proc~w90_readwrite_get_keyword_vector->proc~set_error_input proc~w90_readwrite_get_range_vector->proc~set_error_input proc~w90_readwrite_get_range_vector->proc~w90_readwrite_get_keyword_vector proc~w90_readwrite_get_range_vector->proc~w90_readwrite_get_vector_length proc~w90_readwrite_get_vector_length->proc~set_error_fatal proc~w90_readwrite_get_vector_length->proc~set_error_input proc~w90_readwrite_read_explicit_kpath_points->proc~set_error_alloc proc~w90_readwrite_read_explicit_kpath_points->proc~set_error_dealloc proc~w90_readwrite_read_explicit_kpath_points->proc~set_error_input proc~w90_readwrite_read_explicit_kpath_points->proc~w90_readwrite_get_block_length proc~w90_readwrite_read_explicit_kpath_points->proc~w90_readwrite_get_keyword_block proc~get_centre_constraint_from_column->proc~set_error_input

Called by

proc~~w90_input_reader~2~~CalledByGraph proc~w90_input_reader~2 w90_input_reader proc~w90_input_reader w90_input_reader proc~w90_input_reader->proc~w90_input_reader~2 program~wannier wannier program~wannier->proc~w90_input_reader~2

Source Code

  subroutine w90_input_reader(common_data, istdout, istderr, ierr)
    !! mechanism to act upon tokens read from the input ".win" file
    !! input is parsed and interpreted (any errors are identified) and
    !! the library data structure (variable common_data), already setup by w90_input_setopt, is modified

    ! w90_input_setopt() processes options stored in common_data%settings (must be empty here; emptied by w90_input_setopt call)
    ! w90_input_reader() processes options stored in common_data%in_data (from .win file)

    use w90_comms, only: valid_communicator
    use w90_error_base, only: w90_error_type
    use w90_error, only: set_error_input, set_error_fatal, set_error_alloc, code_mpi
    use w90_readwrite, only: w90_readwrite_in_file, w90_readwrite_clean_infile
    use w90_wannier90_readwrite, only: w90_wannier90_readwrite_read

    implicit none

    ! arguments
    integer, intent(in) :: istdout, istderr
    integer, intent(out) :: ierr
    type(lib_common_type), intent(inout) :: common_data

    ! local variables
    type(w90_error_type), allocatable :: error
    logical :: cp_pp

    ierr = 0

    if (.not. valid_communicator(common_data%comm)) then
      ! this is a problem: how do we exit using the parallel error handler when the communicator is unknown?
      write (istderr, *) ' Error: parallel Wannier90 library invoked with invalid communicator, exiting.  Use w90_set_comm()!'
      ierr = code_mpi
      return
    end if

    if (allocated(common_data%settings%entries)) then
      call set_error_fatal(error, &
                           'Error: input reader called when unspent options present (setopt must be called first)', &
                           common_data%comm)
      call prterr(error, ierr, istdout, istderr, common_data%comm)
      return
    end if

    ! read data from .win file to internal string array
    call w90_readwrite_in_file(common_data%settings, common_data%seedname, error, common_data%comm)
    if (allocated(error)) then
      call prterr(error, ierr, istdout, istderr, common_data%comm)
      return
    end if

    ! set options corresponding to string array from .win file
    call w90_wannier90_readwrite_read(common_data%settings, common_data%band_plot, &
                                      common_data%dis_control, common_data%dis_spheres, &
                                      common_data%dis_manifold, common_data%fermi_energy_list, &
                                      common_data%fermi_surface_data, common_data%output_file, &
                                      common_data%wvfn_read, common_data%wann_control, &
                                      common_data%real_space_ham, common_data%kpoint_path, &
                                      common_data%w90_system, common_data%tran, &
                                      common_data%print_output, common_data%wann_plot, &
                                      common_data%ws_region, common_data%real_lattice, &
                                      common_data%w90_calculation, common_data%physics%bohr, &
                                      common_data%sitesym%symmetrize_eps, common_data%num_bands, &
                                      common_data%num_kpts, common_data%num_wann, &
                                      common_data%optimisation, common_data%calc_only_A, cp_pp, &
                                      common_data%gamma_only, common_data%lsitesymmetry, &
                                      common_data%use_bloch_phases, common_data%seedname, &
                                      istdout, error, common_data%comm)
    if (allocated(error)) then
      call prterr(error, ierr, istdout, istderr, common_data%comm)
      return
    end if

    ! remove any remaining acceptable keywords; anything that remains is an input error
    call w90_readwrite_clean_infile(common_data%settings, istdout, common_data%seedname, error, &
                                    common_data%comm)
    if (allocated(error)) then
      call prterr(error, ierr, istdout, istderr, common_data%comm)
      return
    end if

    if (allocated(common_data%settings%in_data)) deallocate (common_data%settings%in_data)
  end subroutine w90_input_reader