Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Now have setting for global%quiet. #1157

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tao/code/tao_lattice_calc_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions tao/code/tao_quiet_set.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
13 changes: 8 additions & 5 deletions tao/doc/command-list.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion tao/doc/cover-page.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

\begin{flushright}
\large
Revision: August 16, 2024 \\
Revision: August 17, 2024 \\
\end{flushright}

\vfill
Expand Down
8 changes: 4 additions & 4 deletions tao/doc/initialization.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tao/version/tao_version_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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