Skip to content

Commit d640180

Browse files
authored
Merge pull request #2403 from willend/main
Minor manual patches
2 parents cdec6bc + 4f7bff9 commit d640180

8 files changed

Lines changed: 137 additions & 24 deletions

File tree

docs/manuals/mcstas/abstractpage.tex

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,24 @@
1818
Emmanuel Farhi \verb+<emmanuel.farhi@synchrotron-soleil.fr>+ \\
1919
Synchrotron SOLEIL, Saint-Aubin, France
2020

21+
Kim Lefmann \verb+<lefmann@nbi.dk>+ \\
22+
Niels Bohr Institute, University of Copenhagen, Denmark
23+
24+
\end{quote}
25+
as well as authors who left the project:
26+
\begin{quote}
2127
Erik Knudsen \verb+<erkn@fysik.dtu.dk>+ \\
2228
Physics Department, Technical University of Denmark, Kongens Lyngby, Denmark
23-
2429
Jakob Garde \verb+<jaga@fysik.dtu.dk>+\\
2530
Physics Department, Technical University of Denmark, Kongens Lyngby, Denmark
26-
27-
Kim Lefmann \verb+<lefmann@fys.ku.dk>+ \\
28-
Niels Bohr Institute, University of Copenhagen, Denmark
29-
3031
Jonas Stein \verb+<Jonas.Stein@uni-koeln.de>+ \\
3132
Institute of Physics II, University of Cologne, Germany
32-
\end{quote}
33-
as well as authors who left the project:
34-
\begin{quote}
3533
Peter Christiansen \verb+<pchristi@hep.lu.se>+\\
3634
Materials Research Department, Ris{\o} National Laboratory, Roskilde, Denmark\\
3735
Present address: University of Lund, Lund, Sweden\\
38-
Klaus Lieutenant \verb+<klaus.lieutenant@helmholtz-berlin.de>+ \\
36+
Klaus Lieutenant \verb+<k.lieutenant@fz-juelich.de>+ \\
3937
Institut Laue-Langevin, Grenoble, France \\
40-
Present address: Helmotlz Zentrum Berlin, Germany \\
38+
Present address: Forschungs-Zentrum J\"ulich, Germany \\
4139
Kristian Nielsen \verb+<kristian-nielsen@mail.tele.dk>+ \\
4240
Materials Research Department, Ris{\o} National Laboratory, Roskilde, Denmark\\
4341
Presently associated with: MySQL AB, Sweden

docs/manuals/mcstas/abstractpage_comp.tex

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,22 @@
1616
Emmanuel Farhi \verb+<emmanuel.farhi@synchrotron-soleil.fr>+ \\
1717
Synchrotron SOLEIL, Saint-Aubin, France
1818

19-
Erik Knudsen \verb+<erkn@fysik.dtu.dk>+ \\
20-
Physics Department, Technical University of Denmark, Kongens Lyngby, Denmark
21-
22-
Jakob Garde \verb+<jaga@fysik.dtu.dk>+\\
23-
Physics Department, Technical University of Denmark, Kongens Lyngby, Denmark
24-
2519
Kim Lefmann \verb+<lefmann@nbi.dk>+ \\
2620
Niels Bohr Institute, University of Copenhagen, Denmark
2721

2822
\end{quote}
2923
as well as authors who left the project:
3024
\begin{quote}
25+
Erik Knudsen \verb+<erkn@fysik.dtu.dk>+ \\
26+
Physics Department, Technical University of Denmark, Kongens Lyngby, Denmark
27+
Jakob Garde \verb+<jaga@fysik.dtu.dk>+\\
28+
Physics Department, Technical University of Denmark, Kongens Lyngby, Denmark
3129
Peter Christiansen \verb+<pchristi@hep.lu.se>+\\
3230
Materials Research Department, Ris{\o} National Laboratory, Roskilde, Denmark\\
3331
Present address: University of Lund, Lund, Sweden\\
34-
Klaus Lieutenant \verb+<klaus.lieutenant@helmholtz-berlin.de>+ \\
32+
Klaus Lieutenant \verb+<k.lieutenant@fz-juelich.dee>+ \\
3533
Institut Laue-Langevin, Grenoble, France \\
36-
Present address: Helmotlz Zentrum Berlin, Germany \\
34+
Present address: Forschungs-Zentrum J\"ulich, Germany \\
3735
Kristian Nielsen \verb+<kristian-nielsen@mail.tele.dk>+ \\
3836
Materials Research Department, Ris{\o} National Laboratory, Roskilde, Denmark\\
3937
Presently associated with: MySQL AB, Sweden

docs/manuals/mcstas/intro.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,13 @@ \section{Overview}
297297
present here an extensive list of corrections, and we let the reader
298298
refer to this bug reporting service for details. Only important
299299
changes are indicated in the CHANGES document.
300+
In addition to this manual, extensive and up-to-date documentation is
301+
maintained on the \McStas/McCode GitHub wiki~\cite{Wiki}:
302+
\begin{center}
303+
\url{https://github.com/mccode-dev/McCode/wiki}
304+
\end{center}
305+
The wiki covers end-user tutorials, component development guides, GPU
306+
acceleration, and migration from \McStas~2.x to 3.x.
300307
\item Chapter~\ref{s:MCtechniques} concerns Monte Carlo techniques
301308
and simulation strategies in general
302309
\item Chapter~\ref{c:running} includes a brief introduction to the

docs/manuals/mcstas/mcstas.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ @MISC{mcnsi_webpage
512512
}
513513

514514
@MISC{mcstas_webpage,
515-
note = {See \url{http://www.mcstas.org}}
515+
note = {See \url{https://www.mcstas.org}}
516516
}
517517

518518
@MISC{github_issue_webpage,

docs/manuals/mcstas/preamble_manual.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
colorlinks=false, %
2525
pdfpagemode=UseNone, % PDF-Viewer TOC settings
2626
pdfstartview=FitH, % PDF-Viewer
27-
pdfauthor={P. Willendrup, E. Farhi, E. Knudsen, U. Filges, K. Lefmann, J. Stein},%
27+
pdfauthor={P. Willendrup, E. Farhi, K. Lefmann},%
2828
pdftitle=User and programmers guide to the neutron ray-tracing package McStas%
2929
}
3030

docs/manuals/mcstas/preface.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ \chapter*{Preface and acknowledgments}
2222
community, too numerous to mention here.
2323

2424
In case of errors, questions, or suggestions, do not hesitate to
25-
contact the authors at \verb+mcstas-support@mcstas.org+
25+
contact the authors at \verb+mcstas-users@mcstas.org+
2626
or consult the \MCS home page~\cite{mcstas_webpage}.
2727
A special bug/request reporting service is available \cite{github_issue_webpage}.
2828

docs/manuals/mcstas/running.tex

Lines changed: 112 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,32 @@ \section{Installation and updates}
5656
In case of problems, write the support mailing list,
5757
or contact the authors.
5858

59-
%-------------------------------------------------------------------------------
59+
% -------------------------------------------------------------------------------
60+
\subsubsection{Installation via conda-forge (recommended)}
61+
\label{s:install-conda}
62+
63+
The recommended installation method for all supported platforms---Linux,
64+
macOS, and Windows---is via the \texttt{conda-forge} channel. Once a
65+
conda-compatible environment manager such as Miniforge or Mambaforge is
66+
available, \McStas can be installed into a fresh conda environment:
67+
68+
\begin{verbatim}
69+
conda create -n mcstas -c conda-forge mcstas
70+
conda activate mcstas
71+
mcgui
72+
\end{verbatim}
73+
74+
On Windows a dedicated \texttt{mcstas-conda} batch script is provided by
75+
the installer. After it completes, use the \emph{mcstas-shell} desktop
76+
shortcut and issue \texttt{mcgui} to start the graphical interface.
77+
Arm64 Windows is also supported via this route.
78+
79+
For full platform-specific installation instructions, including Linux
80+
package management and macOS options, see:
81+
\begin{center}
82+
\url{https://github.com/mccode-dev/McCode/tree/main/INSTALL-McStas}
83+
\end{center}
84+
6085
\subsection{Important note for Windows users}
6186
\index{Windows!file and directory names with spaces}
6287
\index{Windows!Perl distribution}
@@ -245,6 +270,33 @@ \subsection{Code generation options}
245270
Finally, the \verb+--verbose+ option will list the components and libraries being
246271
included in the instrument.
247272

273+
\subsubsection{Alternative code generator: \texttt{mccode-antlr}}
274+
\label{s:antlr}
275+
276+
From \McStas~3.5 onwards an alternative code generator,
277+
\texttt{mcstas-antlr}, is available alongside the classic generator.
278+
It is built on the ANTLR parser framework rather than the traditional
279+
\texttt{lex}/\texttt{yacc} toolchain, is implemented primarily in Python,
280+
and is a candidate replacement for the default generator in future releases.
281+
282+
Select it on a per-run basis with the \texttt{--cogen} flag:
283+
\begin{verbatim}
284+
mcrun --cogen=mcstas-antlr MyInstrument.instr -n 1e8
285+
\end{verbatim}
286+
287+
The active code generator can also be set permanently by editing the
288+
\texttt{MCCOGEN} field in \texttt{mccode\_config.json}. This file is
289+
accessible from the command line with:
290+
\begin{verbatim}
291+
mcrun --edit-user-config
292+
\end{verbatim}
293+
or via the \emph{Save/Edit configuration} dialogue inside \texttt{mcgui}.
294+
295+
At the time of the \McStas~3.6 release, \texttt{mcstas-antlr} is close to
296+
feature-complete for CPU simulations with a few more issues for GPU/OpenACC
297+
simulations.
298+
299+
248300
%-------------------------------------------------------------------------------
249301
\subsection{Specifying the location of files}
250302
\label{s:files}
@@ -883,7 +935,7 @@ \section{Using simulation front-ends}
883935
mcdaemon Instrument results on-line plotting
884936
When used with the -h flag, all tools display a specific help.
885937
SEE ALSO: mcstas, mcdoc, mcplot, mcrun, mcgui, mcresplot, mcstas2vitess
886-
DOC: Please visit http://www.mcstas.org
938+
DOC: Please visit https://www.mcstas.org
887939
\end{lstlisting}
888940

889941
%-------------------------------------------------------------------------------
@@ -1247,6 +1299,54 @@ \subsection{Running simulations on the commandline (mcrun)}
12471299
The \verb+-h+ option will list valid options. The \verb+mcrun+ front-end
12481300
requires a working installation of Perl to run.
12491301

1302+
\subsection{GPU acceleration via OpenACC}
1303+
\label{s:gpu}
1304+
1305+
\McStas~3.x supports GPU-accelerated simulations through the OpenACC
1306+
framework, enabling substantial speed-ups over CPU-only execution on
1307+
compatible NVIDIA hardware.
1308+
1309+
\subsubsection{Requirements}
1310+
1311+
\begin{itemize}
1312+
\item \textbf{Compiler:} NVIDIA HPC SDK version~20.x or newer. The
1313+
free Community Edition is sufficient.
1314+
\item \textbf{Hardware:} A CUDA-capable NVIDIA GPU with an up-to-date
1315+
driver.
1316+
\item \textbf{Platform:} GPU support is currently available on Linux
1317+
only. Windows is not yet supported for OpenACC by NVIDIA; Windows
1318+
users wishing to use GPU acceleration should do so via
1319+
WSL~2 running a Linux distribution.
1320+
\end{itemize}
1321+
1322+
\subsubsection{Running a GPU-accelerated simulation}
1323+
1324+
Pass the \texttt{--openacc} flag to \texttt{mcrun}:
1325+
\begin{verbatim}
1326+
mcrun --openacc MyInstrument.instr -n 1e9
1327+
\end{verbatim}
1328+
1329+
\paragraph{Combined multi-core + GPU execution.}
1330+
It is also possible to use both CPU cores and the GPU simultaneously.
1331+
Enable this by adding the following to the \texttt{OACCFLAGS} field of
1332+
your \texttt{mccode\_config.json}:
1333+
\begin{verbatim}
1334+
"OACCFLAGS": "-fast -Minfo=accel -acc=gpu,multicore
1335+
-gpu=managed -DOPENACC -DMULTICORE"
1336+
\end{verbatim}
1337+
1338+
\subsubsection{Further information}
1339+
1340+
GPU terminology specific to \McStas/McXtrace~3 and detailed debugging
1341+
tips are documented on the McCode wiki:
1342+
\begin{itemize}
1343+
\item GPU terminology table:\\
1344+
\url{https://github.com/mccode-dev/McCode/wiki/McStas-McXtrace-3-and-GPU-terminology-(table)}
1345+
\item GPU debugging tips:\\
1346+
\url{https://github.com/mccode-dev/McCode/wiki/GPU-Debugging-tips}
1347+
\end{itemize}
1348+
1349+
12501350

12511351
%-------------------------------------------------------------------------------
12521352
\subsection{Graphical display of simulations (mcdisplay)}
@@ -1532,6 +1632,16 @@ \subsection{Creating and viewing the library, component/instrument help and
15321632
format. To use the \verb+mcdoc+ front-end, the program Perl should be
15331633
available.
15341634

1635+
\paragraph{Online wiki.}
1636+
In addition to this manual, extensive and frequently updated documentation
1637+
is maintained on the McCode GitHub wiki~\cite{Wiki}:
1638+
\begin{center}
1639+
\url{https://github.com/mccode-dev/McCode/wiki}
1640+
\end{center}
1641+
The wiki includes end-user guides, component development howtos, GPU
1642+
acceleration information, and migration guides from \McStas~2.x to 3.x.
1643+
1644+
15351645
%-------------------------------------------------------------------------------
15361646
\subsection{Translating \MCS components for Vitess (mcstas2vitess)}
15371647
\label{s:mcstas2vitess}

docs/manuals/mcstas/title.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
\includegraphics[width=50mm]{figures/mcstas_logo_reflection.png}\\[4mm]
44
\end{center}
55
}
6-
\author{P. Willendrup, E. Farhi, E. Knudsen, U. Filges, K. Lefmann, J. Stein}
6+
\author{P. Willendrup, E. Farhi, K. Lefmann}
77
\date{\reldate}
88

99
\titlehead{

0 commit comments

Comments
 (0)