@@ -56,7 +56,32 @@ \section{Installation and updates}
5656In case of problems, write the support mailing list,
5757or 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}
245270Finally, the \verb +--verbose + option will list the components and libraries being
246271included 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)}
12471299The \verb +-h + option will list valid options. The \verb +mcrun + front-end
12481300requires 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
15321632format. To use the \verb +mcdoc + front-end, the program Perl should be
15331633available.
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 }
0 commit comments