Geant4
vm-submitter.itservices.manchester.ac.uk
Overview
Geant 4 is a toolkit for the simulation of the passage of particles through matter developed at CERN. Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science.
Restrictions on use/License information
Geant 4 is free software as defined by the terms of the Geant4 software license.
There is no restriction on the number of simultaneously running programs on HTCondor.
You can see which nodes have which GEANT4 versions available via:
submitter ~]$ condor_status -long | grep GEANT
Versions installed
Geant4 version | HTCondor ClassAd |
---|---|
10.06 | HAS_GEANT4_10_6 |
10.05 | HAS_GEANT4_10_5 |
10.04 | HAS_GEANT4_10_4S |
10.02 | HAS_GEANT4_10_2 |
Set up procedure on submit node
To access the software you must first run the commands:
module load gcc/6.4.0 module load geant4/<Geant4 version>
Running the application
In order to run Geant4 jobs on HTCondor, it is first necessary to compile the Geant4 code on the HTCondor submit node. This is because the version of Geant4 deployed has been compiled using version 6.4.0 of the GNU Compiler suite.
Step 1 – Compiling your Geant4 code
Geant4 requires its executable codes be built in a separate folder from the program source code. Assuming that the source code is in <source folder> then from a linux terminal prompt, run the following commands from inside your <build folder>:
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ <source folder> make
where
- -DCMAKE_C_COMPILER=gcc specifies that cmake should use the GNU compiler on the current path (and not the default /usr/bin/cc).
- -DCMAKE_CXX_COMPILER=g++ specifies that cmake should use the GNU C++ compiler on the current path (and not the default /usr/bin/c++).
- <source folder> is the location of the folder containing the program source code.
Step 2 – Submitting your job to run on HTCondor
It is necessary to submit your Geant4 executable using a wrapper script that configures various Geant4 environment variables. This wrapper script should work with all Geant4 codes. The following lines are the contents of a simple generic HTCondor submit text file for a Geant4 job:
Universe = vanilla Requirements = (Target.Opsys == "LINUX" && Target.Arch == "X86_64" && <HTCondor ClassAd>=?=True) Request_Memory = 1000 Log = geant4.log Output = geant4.out Error = geant4.error Notification = Error Should_Transfer_Files = Yes When_To_Transfer_Output = ON_EXIT Environment = LD_LIBRARY_PATH=/opt/gcc-6.4.0/lib64 Executable = <wrapper_script>.sh Transfer_Executable = True Arguments = <Geant4 executable> <input file(s)> Transfer_Input_Files = <Geant4 executable>,<input file(s)> Queue
If your submit file is called submit.txt then your job can be submitted to HTCondor using the command condor_submit submit.txt.
Sample Geant4 HTCondor job(s)