w90_readwrite_read_verbosity Subroutine

public subroutine w90_readwrite_read_verbosity(settings, print_output, svd_omega, error, comm)

Uses

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

read verbosity "iprint" and timing "timing_level" variables if iprint>2 svd_omega printing is enabled printing is supressed on all non-root MPI ranks

Also reads the developer-only keyword "unlucky", which is not part of the user interface and is deliberately absent from the user guide. Its value is the MPI rank that must raise an error, and it exists purely to exercise the parallel error-handling path (see the partestw90_mpierr test). The rank is smuggled to the main program in "timing_level", stored negated so that it cannot be confused with a genuine timing level; wannier_prog.F90 then calls set_error_input on that rank.

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(print_output_type), intent(inout) :: print_output
logical, intent(inout) :: svd_omega
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~w90_readwrite_read_verbosity~~CallsGraph proc~w90_readwrite_read_verbosity w90_readwrite_read_verbosity proc~mpirank mpirank proc~w90_readwrite_read_verbosity->proc~mpirank proc~w90_readwrite_get_keyword w90_readwrite_get_keyword proc~w90_readwrite_read_verbosity->proc~w90_readwrite_get_keyword proc~set_error_fatal set_error_fatal proc~w90_readwrite_get_keyword->proc~set_error_fatal proc~set_error_input set_error_input proc~w90_readwrite_get_keyword->proc~set_error_input 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_input->proc~comms_sync_error proc~set_error_input->proc~set_base_error

Called by

proc~~w90_readwrite_read_verbosity~~CalledByGraph proc~w90_readwrite_read_verbosity w90_readwrite_read_verbosity proc~w90_postw90_readwrite_read w90_postw90_readwrite_read proc~w90_postw90_readwrite_read->proc~w90_readwrite_read_verbosity proc~w90_wannier90_readwrite_read w90_wannier90_readwrite_read proc~w90_wannier90_readwrite_read->proc~w90_readwrite_read_verbosity 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 program~postw90 postw90 program~postw90->proc~w90_postw90_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_readwrite_read_verbosity(settings, print_output, svd_omega, error, comm)
    !! read verbosity "iprint" and timing "timing_level" variables
    !! if iprint>2 svd_omega printing is enabled
    !! printing is supressed on all non-root MPI ranks
    !!
    !! Also reads the developer-only keyword "unlucky", which is not part of the
    !! user interface and is deliberately absent from the user guide. Its value
    !! is the MPI rank that must raise an error, and it exists purely to exercise
    !! the parallel error-handling path (see the partestw90_mpierr test). The
    !! rank is smuggled to the main program in "timing_level", stored negated so
    !! that it cannot be confused with a genuine timing level; wannier_prog.F90
    !! then calls set_error_input on that rank.
    use w90_error, only: w90_error_type
    use w90_comms, only: mpirank
    implicit none

    logical, intent(inout) :: svd_omega
    type(print_output_type), intent(inout) :: print_output
    type(settings_type), intent(inout) :: settings
    type(w90_comm_type), intent(in) :: comm
    type(w90_error_type), allocatable, intent(out) :: error

    integer :: unlucky_rank
    logical :: found

    call w90_readwrite_get_keyword(settings, 'timing_level', found, error, comm, &
                                   i_value=print_output%timing_level)
    if (allocated(error)) return

    ! special test case; use the timing_level variable to
    ! communicate a kill to remote process, testing error handling.
    ! Developer-only, not documented in the user guide; see the header above.
    call w90_readwrite_get_keyword(settings, 'unlucky', found, error, comm, i_value=unlucky_rank)
    if (found) then
      if (unlucky_rank > 0) then
        print_output%timing_level = -unlucky_rank
      end if
    end if

    call w90_readwrite_get_keyword(settings, 'iprint', found, error, comm, &
                                   i_value=print_output%iprint)
    if (allocated(error)) return

    if (print_output%iprint >= 2) svd_omega = .true. ! a printout that does not have its own option flag

    if (mpirank(comm) /= 0) print_output%iprint = 0 ! supress printing non-rank-0
  end subroutine w90_readwrite_read_verbosity