Name Last Update
inc Loading commit data...
src Loading commit data...
test Loading commit data...
validation Loading commit data...
CMakeLists.txt Loading commit data...
README Loading commit data... Loading commit data...
history Loading commit data...
| How to build and run vecphys with/without GeantV |

1. setup 

   #gcc (if 4.8+ is not a default)
   export CXX=/usr/local/gcc-4.8.2/bin/g++
   export CC=/usr/local/gcc-4.8.2/bin/gcc
   export LD_LIBRARY_PATH=/usr/local/gcc-4.8.2/lib64:${LD_LIBRARY_PATH}
2. How to build and run vecphys with GeantV

   2.1 build GeantV with additional cmake switches

   -DGUBENCHMARK=[Model|Process] (build benchmarker executables. see 3.3 how to run it)

   2.2 run one of example macros under vecprot_v2: for example,

   - load libs inside run.C 


   - activate vector physics process

     prop->fVectorPhysicsProcess = new GVectorPhysicsProcess(prop->fEmin, nthreads);

   - run the macro

    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:<path_to_geantV_install/lib>
    root.exe -b -l -q 'run.C(4)'

3. How to build and run standalone vecphys without GeantV

   3.1 setup

   #cmake required: Vc and VecGeom (include path to VecCore)
   export Vc_DIR=${VC_INSTALL_DIR}
   export VecGeom_DIR=${VECGEOM_INSTALL_DIR}

   #root (if ROOT=ON) (turn on histogramming with GUBENCHMARK=ON)
   source ${ROOT_INSTALL_DIR}/bin/

   #cuda (if CUDA=ON)
   require VecGeom built with CUDA=ON

   3.2 how to build 

   cd vecphys ; mkdir build ; cd build
   cmake -DVc_DIR=${Vc_DIR} -DVecGeom_DIR=${VecGeom_DIR} -DVecGeom_SRC=${VecGeom_SRC} \
         -DROOT=ON -DCUDA=ON -DGUBENCHMARK=[Model|Process] ..

   3.3 how to run benchmarker 

   ./GUModelBenchmark [ntracks] [nrepetitions] [minEnergy] [maxEnergy] [samplingType] [model] [materialMode]
   ./ProcessBenchmark [ntracks] [nrepetitions] [minEnergy] [maxEnergy] [ProcessType] [runmode] [materialMode]

   where the valid argument for 
   samplingType: [0=kAlias, 1=kRejection, 2=kUnpack]      
   model: [-1=AllModels, 0=KleinNishina, 1= BetheHeitler, 2=SauterGavrila, 3=MollerBhabha, 4=SeltzerBerger]
   materialMode: [0=Multiple elements from a table, 1=One Material] 

   3.4 data file
   Download required data files for testing the SeltzerBerger model
   tar xzf G4EMLOW.6.42.tar.gz brem_SB
   mkdir data ; cp -r G4EMLOW6.42/brem_SB data/brem_SB
   (will introduce the env for the target data directory and put an option
   to get the file through cmake configuration)

4. Other important options

   # set the build type to Release, especially for testing the CUDA backend

   # set a vector instruction set

   # set the Vc lib for KNC (Xeon Phi)

5. How to build and run the benchmaker (GUModelBenchmark) on Intel Xeon Phi
export CXX_FLAGS="-mmic"