About Geant4

Geant4 https://https://geant4.web.cern.ch/about/ is a toolkit to create simulations of the passage of particles or radiation through matter. Applications built on Geant4 can simulate any setup or detector and radiation source, and record the chosen output of physical quantities due to source particles and secondaries interacting with the material of the setup.

On LENGAU, Geant4 has been built from source and a module file has been created for the application. Users can simply load the Geant4 module into their shell environment:

module avail 2>&1 | grep -i geant4
module load chpc/phys/geant4/11.1.2-gcc13
# Run Geant4
./mygeant4

Batch Script Example

This is just a simple example which will be improved as testing commences:

geant4.qsub
#!/bin/bash 
#PBS -P projectid
#PBS -l select=3:ncpus=24:mpiprocs=24:nodetype=haswell_reg
#PBS -q normal
#PBS -l walltime=01:00:00
#PBS -o /mnt/lustre/users/username/rootJobs/job01/stdout
#PBS -e /mnt/lustre/users/username/rootJobs/job01/stderr
#PBS -m abe
#PBS -M username@email.co.za
### Load the Geant4 module file into your shell environment:
 module load chpc/phys/geant4/11.1.2-gcc13
##### Running commands
# Set this environment variable explicitly.
export PBS_JOBDIR=/mnt/lustre/users/username/rootJobs/job01
# Explicitly change to the job directory
cd $PBS_JOBDIR
nproc=`cat $PBS_NODEFILE | wc -l`
exe=geant4
mpirun -np $nproc ./exe > geant4.out

Instructions on how to create and submit a batch job will follow as collaborative testing commences…