diff --git a/tao/code/tao_lattice_calc_mod.f90 b/tao/code/tao_lattice_calc_mod.f90 index 921cd3829..ecf6ae3ef 100644 --- a/tao/code/tao_lattice_calc_mod.f90 +++ b/tao/code/tao_lattice_calc_mod.f90 @@ -198,7 +198,7 @@ subroutine tao_single_track (tao_lat, calc_ok, ix_branch, print_err) endif mode_flip = any(branch%ele(1:branch%n_ele_track)%mode_flip) - if (mode_flip .and. .not. tao_branch%mode_flip_here) then + if (mode_flip .and. .not. tao_branch%mode_flip_here .and. .not. s%com%optimizer_running) then call out_io(s_warn$, r_name, '*Mode flip* detected! Care must be used in interpreting Twiss parameter!', & 'See the Bmad manual on linear optics for more information.') endif diff --git a/tao/code/tao_quiet_set.f90 b/tao/code/tao_quiet_set.f90 index 39849a959..25d1f5ad4 100644 --- a/tao/code/tao_quiet_set.f90 +++ b/tao/code/tao_quiet_set.f90 @@ -34,7 +34,7 @@ subroutine tao_quiet_set (set) name = set else - call match_word (set, [character(12):: 'off', 'all'], ix, .false., .true., name) + call match_word (set, [character(12):: 'off', 'all', 'warnings'], ix, .false., .true., name) if (ix < 1) then call out_io (s_error$, r_name, 'BAD "quiet" COMMAND ARGUMENT: ' // set) return @@ -49,7 +49,9 @@ subroutine tao_quiet_set (set) select case (name) case ('off') call output_direct (set = out_dir_save) -case default +case ('warnings') + call output_direct (-1, .false., s_warn$, s_dwarn$) ! Do not print +case ('all', 'ALL') call output_direct (-1, .false., s_blank$, s_dwarn$) ! Do not print end select diff --git a/tao/doc/command-list.tex b/tao/doc/command-list.tex index e576cc654..c1bb29e93 100644 --- a/tao/doc/command-list.tex +++ b/tao/doc/command-list.tex @@ -169,13 +169,16 @@ \section{call}\index{commands!call} When using the \vn{-no_calc} option, at the end of the command file the \vn{lattice_calc_on} and \vn{plot_on} logicals will be toggled back to their initial values. -To suppress the output when running a command file use the command: +To suppress all the output when running a command file use the command: \begin{example} - set global quiet = all + set global quiet = all ! Suppress everything except errors + set global quiet = warnings ! Suppress just warnings. \end{example} -Note: the \vn{all} setting is automatically switched to \vn{off} at the end when a command file -exits back to the terminal level. To prevent this reset, set to \vn{ALL} instead. See the -\vn{Tao_global_struct Structure} section (\sref{s:tao.global.struct}) for more details. +Note: the \vn{all} setting (but not the \vn{warnings} setting) is automatically switched to \vn{off} +at the end when a command file exits back to the terminal level. To prevent this reset, set to +\vn{ALL} instead. See the \vn{Tao_global_struct Structure} section (\sref{s:tao.global.struct}) for +more details. + Examples: \begin{example} diff --git a/tao/doc/cover-page.tex b/tao/doc/cover-page.tex index b1b3d0d37..0eac9a643 100644 --- a/tao/doc/cover-page.tex +++ b/tao/doc/cover-page.tex @@ -2,7 +2,7 @@ \begin{flushright} \large -Revision: August 16, 2024 \\ +Revision: August 17, 2024 \\ \end{flushright} \vfill diff --git a/tao/doc/initialization.tex b/tao/doc/initialization.tex index 166600a77..ac73856e2 100644 --- a/tao/doc/initialization.tex +++ b/tao/doc/initialization.tex @@ -752,10 +752,10 @@ \subsection{Tao\_global\_struct Structure} \item{\vn{global%quiet}} \Newline For use with command files. May be set to one of: \begin{example} - off ! Normal verbose output - all ! Suppress command echo and other output. - ALL ! Suppress command echo and other output. - output ! Suppress output except for command echo. + off ! Normal verbose output + all ! Suppress command echo and other output. + ALL ! Suppress command echo and other output. + warnings ! Suppress warnings. \end{example} If set to \vn{all}, output to the terminal during command file running will be suppressed (except for warning and error messages) until the command file (or files) returns to the command line level diff --git a/tao/version/tao_version_mod.f90 b/tao/version/tao_version_mod.f90 index e6751d545..ed0d0e5fb 100644 --- a/tao/version/tao_version_mod.f90 +++ b/tao/version/tao_version_mod.f90 @@ -6,5 +6,5 @@ !- module tao_version_mod -character(*), parameter :: tao_version_date = "2024/08/14 23:51:16" +character(*), parameter :: tao_version_date = "2024/08/16 22:16:33" end module