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.
| Type | Intent | Optional | 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 |
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