Skip to content

Commit 9426115

Browse files
committed
Add MPI-MCI section to docs
1 parent e6ff019 commit 9426115

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

doc/user_manual.pdf

3.07 KB
Binary file not shown.

doc/user_manual.tex

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,34 @@ \subsection{Multidimensional estimations} % (fold)
568568
Data (\verb+x+) are supposed to be organised as a $\verb+n+ \times \verb+ndim+$ matrix.
569569
% subsection multidimensional_estimations (end)
570570

571+
\section{MPI-MCI} % (fold)
572+
\label{sec:mpimci}
573+
574+
It is possible to use Message Passing Interface (MPI) for evaluating the MC integrals
575+
in parallel. The library provides a namespace \verb+MPIMCI+ that contains a few
576+
simple methods to use for creating a parallel MC program. Although the MCI library can be
577+
compiled without any MPI implementation present, to use the MPIMCI methods in
578+
executable code you need OpenMPI or an alternative implementation.
579+
\\\\Then just use MPIMCI in your code as follows and compile\&run the executable with your system's MPI wrappers (e.g mpic++ and mpirun).
580+
581+
\begin{verbatim}
582+
#include "MPIMCI.hpp"
583+
// start of main
584+
const int myrank = MPIMCI::init();
585+
// ...
586+
MPIMCI::integrate(mci, Nmc, average, error);
587+
// ...
588+
if (myrank==0) { /* printout etc. */ }
589+
// ...
590+
MPIMCI::finalize();
591+
// end of main
592+
\end{verbatim}
593+
Remember not to encapsulate any code within \verb+if (myrank==0){}+ clauses,
594+
that is actually relevant to all threads. Typically this means only file and
595+
console output belongs there.
596+
\\\\For further information on options and use, check out \verb+ex2+ and the \verb+MPIMCI.hpp+ header file.
597+
598+
% section mpivmc (end)
571599

572600

573601
\printindex

0 commit comments

Comments
 (0)