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

Remove ambiguous terminology with "restart" across EGSnrc #1215

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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 HEN_HOUSE/doc/src/getting-started/getting-started.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ \section{Navigating egs++ input files}
test1.output
\end{lstlisting}

The \Verb+.egsdat+ file can generally be ignored - it is used by EGSnrc to restart jobs that crashed, or combine parallel runs. The \Verb+.output+ file is where we manually redirected the output from the simulation (if you ran the simulation using the GUI, this file was not created). Looking at the output, we can observe the reflected, deposited and transmitted energy fractions for the simulation of electrons through a single slab. Below this, is the pulse height distribution for region 1 (the slab itself).
The \Verb+.egsdat+ file can generally be ignored - it is used by EGSnrc to resume jobs that crashed, or combine parallel runs. The \Verb+.output+ file is where we manually redirected the output from the simulation (if you ran the simulation using the GUI, this file was not created). Looking at the output, we can observe the reflected, deposited and transmitted energy fractions for the simulation of electrons through a single slab. Below this, is the pulse height distribution for region 1 (the slab itself).

\subsection{Write a new input file}
When writing an egs++ input file, you will find yourself frequently referencing the full online documentation, \Verb+PIRS-898+:
Expand Down
2 changes: 1 addition & 1 deletion HEN_HOUSE/doc/src/pirs3100-g-app/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ QHG_LOCATION =
# Eclipse, the contents of the directory containing the HTML and XML files needs
# to be copied into the plugins directory of eclipse. The name of the directory
# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
# After copying Eclipse needs to be restarted before the help appears.
# After copying Eclipse needs to be relaunched before the help appears.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

Expand Down
8 changes: 4 additions & 4 deletions HEN_HOUSE/doc/src/pirs509a-beamnrc/inputformats/BEAM1.inp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\begin{verbatim}
Next Record
***********
IWATCH,ISTORE,IRESTART,IO_OPT,IDAT,LATCH_OPTION,IZLAST
IWATCH,ISTORE,IRESUME,IO_OPT,IDAT,LATCH_OPTION,IZLAST

IWATCH = 0 for normal output (the default)
= 1 output for every discrete interaction
Expand All @@ -16,8 +16,8 @@
This is a debugging tool. If run quits, rerun with
ISTORE=1, then again ISTORE=-1 and IWATCH = 1/2
and/or the debugger on.
IRESTART = 0 first run for this data set (the default)
= 1 restart of a previous run
IRESUME = 0 first run for this data set (the default)
= 1 resume a previous run
= 2 just create the input file and exit
= 3 read in the raw data from a previous run and do
the statistical analysis on dose etc.
Expand All @@ -26,7 +26,7 @@
with the extension _w#, where #
can be any positive integer. These .egsdat files
will be summed and then the result analyzed similar
to IRESTART=3.
to IRESUME=3.
IO_OPT = 0 phase-space output at each scoring plane(the default)
= 1 no phase-space output when particles cross scoring
plane
Expand Down
4 changes: 2 additions & 2 deletions HEN_HOUSE/doc/src/pirs509a-beamnrc/inputformats/BEAM13.inp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
going on to the next particle.
If NRCYCL is set <=0 then NRCYCL is automatically
calculated to use the entire phase space file with no
restarts. The calculated NRCYCL does not take into
rewinds. The calculated NRCYCL does not take into
account particles that are rejected because they
miss the geometry.
If NRCYCL is set > 0, then the user-input value is
Expand All @@ -23,7 +23,7 @@
then use of NRCYCL is essential for accurate
statistics. If you are unsure of how many times to
recycle, use the automatically-calculated value of
NRCYCL. If this still results in many restarts
NRCYCL. If this still results in many rewinds
(because of multiple passers being rejected and/or
photons rejected because they fall outside the DBS
splitting radius--see below)
Expand Down
95 changes: 47 additions & 48 deletions HEN_HOUSE/doc/src/pirs509a-beamnrc/pirs509a-beamnrc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1102,8 +1102,8 @@ \subsection{BEAMnrc Output Files}
characteristics (number of electrons, number of photons, maximum energy,
\etc) determined from those particles actually used in the simulation.
Some warning messages, such as those printed when all particles in a
phase space source have been used and the source must be restarted with the
\index{restart!phase space file input}
phase space source have been used and the source must be rewinded with the
\index{rewind!phase space file input}
first particle, are printed in this section.

\item [Number, Fluence, Average Energy and Average Angle Results]
Expand Down Expand Up @@ -1185,11 +1185,11 @@ \subsection{BEAMnrc Output Files}
errors, occurred. When using a phase space file for the source,
the log file contains a warning
line every time all particles in the phase space source have been
used, necessitating a restart of the source from the beginning.
\index{phase space sources!when restarted}
used, necessitating a rewind of the source from the beginning.
\index{phase space sources!when rewinded}

\item [.egsdat]
This file contains all of the information required to restart a run and
This file contains all of the information required to resume a run and
also the information required to obtain dose and fluence when parallel
jobs are recombined. Data stored in the {\tt .egsdat}
file include:
Expand All @@ -1205,7 +1205,7 @@ \subsection{BEAMnrc Output Files}
\item state of the random number generator at the end of the last batch
\index{batches}
\end{enumerate}
When a run is restarted, BEAMnrc reads the energy deposited and
When a run is resumed, BEAMnrc reads the energy deposited and
fluence data (item 1 above) for the previous run from the {\tt .egsdat}
file and then adds it to the current results before calculating
doses, fluence values and uncertainties~\cite{Wa02a}. When
Expand All @@ -1215,9 +1215,9 @@ \subsection{BEAMnrc Output Files}
(without running any further simulations)
calculates the doses, fluence values and uncertainties
for the complete simulation.
See section~\ref{IRESTART} about the input variable IRESTART and
See section~\ref{IRESUME} about the input variable IRESUME and
Section~\ref{parallelcalc} about parallel runs.
\index{restart!.egsdat}
\index{resume!.egsdat}
\index{.egsdat}

\index{.egsrns}
Expand All @@ -1226,7 +1226,7 @@ \subsection{BEAMnrc Output Files}
at the start the current batch
(\verb+ISTORE=0+) or current history (\verb+ISTORE=1+) in a simulation.
This is only used for debugging when problems occur.
These data are used to restart the run with this RNG
These data are used to resume the run with this RNG
when \verb+ISTORE+ is set to -1. Note that running with \verb+ISTORE=1+ slows
down a simulation significantly.
\index{ISTORE}
Expand Down Expand Up @@ -1825,7 +1825,7 @@ \section{Description of main BEAMnrc input file}
\begin{small}
\input{./inputformats/BEAM0.inp}
%\newline
\index{IWATCH} \index{ISTORE} \index{IRESTART} \index{IO\_OPT}
\index{IWATCH} \index{ISTORE} \index{IRESUME} \index{IO\_OPT}
\index{IDAT} \index{LATCH!LATCH\_OPTION} \index{IZLAST}
\index{.egsgph}
\input{./inputformats/BEAM1.inp}
Expand Down Expand Up @@ -2849,7 +2849,7 @@ \subsection{ISOURC=21: Phase Space Source}
on to the next one. If set $\leq$ 0, then BEAMnrc will automatically
calculate a value of {\tt NRCYCL} based on the number of incident histories
and the number of particles in the phase space file that should prevent
restarting of the phase space source. If set $>$ 0, the user-input value
rewinding of the phase space source. If set $>$ 0, the user-input value
is used. See below for details.
\index{NRCYCL}
\item [IPARALLEL] No longer necessary if using BEAMnrc's built-in
Expand Down Expand Up @@ -2901,28 +2901,28 @@ \subsection{ISOURC=21: Phase Space Source}
uncertainty will also be governed by the latent variance of the phase space file (see the
report on history by history
statistics in BEAMnrc and DOSXYZnrc\cite{Wa02a}).
In addition to recycling, particles are also re-used whenever a phase space source is restarted
In addition to recycling, particles are also re-used whenever a phase space source is rewinded
(which happens automatically when the simulation has used all particles in the
source). However, restarting may result in an underestimate of
source). However, rewinding may result in an underestimate of
uncertainties~\cite{Wa02a}, making it important to choose a value
of {\tt NRCYCL} that both ensures adequate sampling of the phase space
source and also prevents restarting.
source and also prevents rewinding.

\index{NRCYCL! calculation of}
If you are unsure of the value of {\tt NRCYCL} to use, set
{\tt NRCYCL}$\leq$ 0 and BEAMnrc will automatically calculate its value
based on the number of histories and the total number of particles in the
phase space file. Even with an automatically-calculated value of
{\tt NRCYCL}, the phase space source may still restart, either because
{\tt NRCYCL}, the phase space source may still rewind, either because
the algorithm used to calculate {\tt NRCYCL} has determined that
setting {\tt NRCYCL}$>$ 0 will cause the phase space source to
be undersampled, or because some incident particles were
multiple-passers (i.e., had crossed the phase space scoring plane
more than once) and were rejected from the simulation. If the
phase space source has only been restarted once and only a small fraction
phase space source has only been rewinded once and only a small fraction
of it has been re-used on the second pass, the effect on uncertainty will not
be significant. However, if a significant portion of the source has been
re-used on the second pass, or if the source has been restarted more than
re-used on the second pass, or if the source has been rewinded more than
once, we recommend re-running the simulation with a new value of
{\tt NRCYCL} given by:
%\begin{footnotesize}
Expand Down Expand Up @@ -4619,7 +4619,7 @@ \subsection{Maximum Size of Phase Space Files}
the header, which will require other modifications to codes using this phase space
file as a source since, currently, BEAMnrc (and other EGSnrc user codes) compares
the number of histories run to {\tt NPPHSP} in order to determine whether the
source needs to be restarted from the beginning or not, or
source needs to be rewinded from the beginning or not, or
\item redefine {\tt NPPSHP} as a 4-byte real variable, in the process losing
precision in terms of the actual number of particles stored in the file.
\end{itemize}
Expand Down Expand Up @@ -5309,21 +5309,21 @@ \subsection{ISTORE}
\index{random number generator}
\end{description}

\subsection{IRESTART}
\label{IRESTART}
\index{IRESTART}
\subsection{IRESUME}
\label{IRESUME}
\index{IRESUME}

IRESTART controls how BEAMnrc treats the current run - either as new or as a
continuation of a previous run. The possible settings of IRESTART are:
IRESUME controls how BEAMnrc treats the current run - either as new or as a
continuation of a previous run. The possible settings of IRESUME are:
\begin{description}
\item [= 0] (default) BEAMnrc initiates a new run, deleting all of the output
files from previous runs of the same name if present
(\verb+.egslog+, \verb+.egslst+, \verb+.egsrns+, \verb+.egsphsp1+,
\etc).
\index{.egsphsp1}
\index{random number generator}
\index{restart}
\item [= 1] Restart of a previous run; BEAMnrc reads fluence and dose data
\index{resume}
\item [= 1] Resume a previous run; BEAMnrc reads fluence and dose data
from the previous run, the number of histories already run, the time
taken by the previous run, and the state of the random number generator from
the last
Expand Down Expand Up @@ -5371,8 +5371,8 @@ \subsection{IDAT}
\index{IDAT}

\verb+IDAT+ controls output of the \verb+.egsdat+ file, which contains data
from a previous run so that BEAMnrc is able to restart this run
\index{restart}
from a previous run so that BEAMnrc is able to resume this run
\index{resume}
if required. The {\tt .egsdat} files from parallel jobs are
required for recombining to obtain the final results (see section~\ref{parallelcalc}).
Possible settings of \verb+IDAT+ are:
Expand Down Expand Up @@ -5447,7 +5447,7 @@ \subsection{NCASE}
Starting with BEAM99, {\tt NCASE} and other variables related to the
number of histories,
such as {\tt IHSTRY}, were made {\tt INTEGER*8} variables. This allows
$>$2x10$^9$ total histories, and is particularly useful for restarts and
$>$2x10$^9$ total histories, and is particularly useful for resuming and for
parallel runs, where a large number of total histories can be accrued quite
easily. However, {\tt INTEGER*8} may cause problems for some Fortran compilers.
For a more detailed description of this problem and how to fix it if it does
Expand Down Expand Up @@ -5481,10 +5481,9 @@ \subsection{IXXIN, JXXIN}
the random number generator, and, during a simulation, they no longer
reflect the values of the seeds that are actually used to generate
the random numbers.
During restarts
({\tt IRESTART} = 1), the state of the random number generator at the end
of the previous run is read from the {\tt .egsdat} file and is used at the
beginning of the restart. Thus, a restarted run with a total of, eg,
When resuming
({\tt IRESUME} = 1), the state of the random number generator at the end
of the previous run is read from the {\tt .egsdat} file and is used for resuming. Thus, a resumed run with a total of, eg,
10000+10000 histories should generate results identical to a single run
of the same simulation with 20000 histories. Also note that when running
parallel simulations with BEAMnrc (see section~\ref{parallelcalc}), {\tt IXXIN}
Expand Down Expand Up @@ -5520,8 +5519,8 @@ \subsection{TIMMAX}
At the end of each batch, an estimate is made of how much time is needed
to complete another batch. If the next batch cannot be completed within
\verb+TIMMAX+ for the current run, then BEAMnrc terminates the run and
analyses the results for the shortened run. The restart feature (see
section~\ref{IRESTART} on \verb+IRESTART+) can be used to continue the
analyses the results for the shortened run. The resume feature (see
section~\ref{IRESUME} on \verb+IRESUME+) can be used to continue the
run if needed and if \verb+IDAT+ (section~\ref{IDAT}) is set to 0 (\ie\ the
{\tt .egsdat} files are created).
Note that the total CPU time
Expand Down Expand Up @@ -6464,7 +6463,7 @@ \subsection{Phase Space Sources with Parallel Jobs}
Note that particles may be recycled within a partition, depending on
the setting of {\tt NRCYCL} (see section~\ref{phspsrcsect}). Also, if
all the particles in a partition are used up during a run, the partition
is restarted at its first particle
is rewinded at its first particle
(ie {\tt INPHSP = (n\_run\_chunk-1)*p\_per\_phsp\_chunk+1)}.

\subsection{Combining Results from Parallel Jobs}
Expand Down Expand Up @@ -6508,17 +6507,17 @@ \subsection{Combining Results from Parallel Jobs}
are output (see section~\ref{IDAT}, page~\pageref{IDAT} for more
information about {\tt IDAT}).

\index{IRESTART=4}
\index{IRESUME=4}
\index{combining parallel runs}
Parallel runs can be combined manually by re-running your accelerator
with the input variable {\tt IRESTART}=4 (in the GUI, this is equivalent
with the input variable {\tt IRESUME}=4 (in the GUI, this is equivalent
to setting the Run option to ``analyze parallel jobs") after all parallel
jobs have finished. Use of {\tt IRESTART}=4 is generally not necessary
jobs have finished. Use of {\tt IRESUME}=4 is generally not necessary
since the last job automatically combines parallel results, however,
it may be useful if, for some reason, all of the {\tt .egsdat} files were
not moved out of their temporary working directories or if you wish to
add more {\tt .egsdat} files from a separate group of parallel runs.
For more information on {\tt IRESTART} options, see section~\ref{IRESTART}.
For more information on {\tt IRESUME} options, see section~\ref{IRESUME}.

\index{phase space files! from parallel jobs}
The process of combining parallel runs described above does not
Expand Down Expand Up @@ -6615,20 +6614,20 @@ \subsection{Parallel Jobs Run from the GUI}
to PBS, unless specified otherwise by the {\tt \$EGS\_BATCH\_SYSTEM}
environmental variable.

\subsection{Restarting Parallel Jobs}
\index{restarting parallel jobs}
\subsection{Resuming Parallel Jobs}
\index{resuming parallel jobs}

Parallel runs can be restarted (by setting {\tt IRESTART}=1 in
Parallel runs can be resumed (by setting {\tt IRESUME}=1 in
{\tt inputfile.egsinp}) provided that you have the {\tt .egsdat} files
from all of the previous individual parallel jobs available in your
{\tt \$EGS\_HOME/BEAM\_myaccel} directory. If you are using a
phase space source, however, restarting presents a problem in that a
phase space source, however, resuming presents a problem in that a
particular partition of the source may get used by a different job the
second time around. At the end of the run, results from the second
use of this partition will be recombined with those from its first use
with no attention paid to the correlation between the two results. This
will result in the uncertainties being underestimated. We recommend that
you do not restart a parallel run if you are using a phase space source.
you do not resume a parallel run if you are using a phase space source.

\section{Statistics in BEAMnrc}

Expand Down Expand Up @@ -10010,7 +10009,7 @@ \section{Known Problems/Restrictions}
Variables related to the number of particle histories, such as
the input variable {\tt NCASE}, the variable {\tt IHSTRY}, etc, have been
changed to {\tt INTEGER*8} to allow for $>$ 2x10$^9$ histories. This is
particularly useful for restarts and recombining parallel jobs, where a large
particularly useful for resuming and recombining parallel jobs, where a large
number of histories may be accrued. However,
some Fortran compilers do not support {\tt INTEGER*8}. We have compiled
with {\tt INTEGER*8} successfully on Linux PC, SGI, DEC Alpha, and Sun sparc
Expand Down Expand Up @@ -10044,11 +10043,11 @@ \section{Known Problems/Restrictions}
\index{EGS\_Windows}


A restarted run that uses a phase space source with particle recycling will
A resumed run that uses a phase space source with particle recycling will
not produce dose/uncertainty results identical to a single run with
the same total number of histories. This is because the last particle
used before the restart may not have been recycled the full
{\tt NRCYCL} times, and restarting automatically skips to the next particle.
used before resuming may not have been recycled the full
{\tt NRCYCL} times, and resuming automatically skips to the next particle.
Results will agree within uncertainty, however.

\section{History of Revisions}
Expand Down
5 changes: 2 additions & 3 deletions HEN_HOUSE/doc/src/pirs623-gui/maintenance.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ \subsection{Main parameters}
values(2) & MEDIUM for nominal air \\
values(3) & IWATCH \\
values(4) & ISTORE \\
values(5) & IRESTART\\
values(5) & IRESUME\\
values(6) & IO\_OPT\\
values(7) & IDAT\\
values(8) & LATCH\_OPTION\\
Expand Down Expand Up @@ -1650,7 +1650,7 @@ \subsection{Main}
values(9) & inseed2 \\
values(10) & beam\_size \\
values(11) & ismooth \\
values(12) & irestart \\
values(12) & iresume \\
values(13) & idat \\
values(14) & ireject \\
values(15) & esave\_global \\
Expand Down Expand Up @@ -1779,4 +1779,3 @@ \subsection{Define voxel media}


\end{document}

2 changes: 1 addition & 1 deletion HEN_HOUSE/doc/src/pirs623-gui/pirs623-gui.tex
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ \subsection{Simulation parameters}
enter general simulation parameters, such as the number of histories,
IWATCH output, maximum CPU time, random number generator seeds,
incident beam size, phase space
redistribution, run option, output restart data, range rejection and ESAVE
redistribution, run option, output data for resuming, range rejection and ESAVE
inputs. The help buttons to the left of each parameter will
provide you with the information necessary to properly specify these
values.
Expand Down
Loading