Warning, /geant4/examples/extended/parallel/MPI/exMPI03/README.md is written in an unsupported language. File is not indexed.
0001 MPI/Examples : exMPI03
0002 ======================
0003
0004 Description
0005 -----------
0006 An example of dosimetry in a water phantom.
0007 The example has same geometry and physics as exMPI02, only the analysis part
0008 is different.
0009
0010 ### Configuration:
0011 - Geometry : water phantom
0012 - Primary : broad beam (200 MeV proton)
0013 - Physics List : FTFP_BERT
0014 - Analysis : g4tools histogramming
0015
0016 The environment variables, *G4LEDATA*, *G4LEVELGAMMADATA* and *G4SAIDXSDATA*
0017 are required for data files.
0018
0019 ### Features:
0020 - Score dose distribution in a water phantom.
0021 - Learn how to paralleized your applications.
0022 - Create a ROOT file containing histograms/trees in each node.
0023 Each slave node generate a ROOT file, whose file name is different
0024 from each other.
0025 - MT is enabled.
0026 - One of each object supported by g4tools is instantiated: 1D, 2D and 3D
0027 histograms and 1D and 2D profiles.
0028 - Histograms and profiles are merged first among threads of the same
0029 MPI-rank and then across MPI-ranks. See RunActionMaster class for
0030 an example on how to use the mergers.
0031 - G4Run object and scorers (command line ones) are also merged via
0032 MPI.
0033 - Output: several root files are created: dose-rank*.root thread-merged
0034 histograms for each rank; dose-merged.root, merged across threads and
0035 across ranks.
0036
0037 How to build
0038 ------------
0039 Use CMake on Geant4 library installed with CMake build.
0040
0041 This example requires G4mpi library to be installed
0042 (see examples/extended/parallel/MPI/source/REDME.md)
0043
0044 Follow these commands,
0045
0046 > mkdir build
0047 > cd build
0048 > cmake -DG4mpi_DIR=<where-G4mpi-wasintalled>/lib[64]/G4mpi -DCMAKE_CXX_COMPILER=mpicxx \
0049 -DGeant4_DIR=<your Geant4 install path>/lib[64]/Geant4-V.m.n <path-to-source>
0050 (V.m.n is the version of Geant4, eg. Geant4-9.6.0)
0051 > make
0052 > make install
0053
0054 Replace mpicxx with your MPI-compiler wrapper.
0055
0056 How to run
0057 ----------
0058
0059 > mpiexec -n # ./exMPI03 [run.mac]