(→Interactive) |
|||
(25 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Template:CCMissing}} | ||
{{Software | {{Software | ||
|package_name=GEANT4 | |package_name=GEANT4 | ||
Line 6: | Line 7: | ||
=Introduction= | =Introduction= | ||
− | |||
− | =Usage= | + | Geant4 is a toolkit for the simulation of the passage of particles through matter. Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science. |
+ | |||
+ | =Usage on graham and cedar= | ||
+ | |||
+ | Geant4 is installed as a module on cedar and graham. | ||
+ | |||
+ | To see which versions are available, execute: | ||
+ | |||
+ | module avail geant4 | ||
+ | |||
+ | To then use a particular version, execute for example: | ||
+ | |||
+ | module load geant4/10.02.p03 | ||
+ | |||
+ | After you load the module, you can see where the software is installed by executing: | ||
+ | |||
+ | echo $EBROOTGEANT4 | ||
+ | |||
+ | To see the useful examples included with the version we have loaded, execute: | ||
+ | |||
+ | ls $EBROOTGEANT4/share/Geant4-10.2.3/examples | ||
+ | |||
+ | Consider the AnaEx01 example as follows: | ||
+ | |||
+ | mkdir -p ~/samples/geant4/test-100202 | ||
+ | cd ~/samples/geant4/test-100202 | ||
+ | module load geant4/10.02.p03 | ||
+ | cp -r $EBROOTGEANT4/share/Geant4-10.2.3/examples/extended/analysis/AnaEx01 . | ||
+ | source $EBROOTGEANT4/share/Geant4-10.2.3/geant4make/geant4make.sh | ||
+ | cd AnaEx01 | ||
+ | mkdir build | ||
+ | cd build | ||
+ | cmake .. | ||
+ | make | ||
+ | |||
+ | This creates the executable ''AnaEx01'' in the current (build) folder. You can run it by: | ||
+ | |||
+ | ./AnaEx01 | ||
+ | |||
+ | You run this executable and enter "help" for the available actions. | ||
+ | |||
+ | Once the binary runs interactively as desired you can submit it as a job. (see [https://docs.computecanada.ca/wiki/Running_jobs Running jobs] page). | ||
+ | |||
+ | =Usage on older SHARCNET systems= | ||
+ | |||
+ | SHARCNET provides a build of geant4 on sharcnet CentOS clusters . | ||
Geant4 comes with many examples useful for testing purposes: | Geant4 comes with many examples useful for testing purposes: | ||
Line 17: | Line 62: | ||
==Interactive== | ==Interactive== | ||
− | Consider | + | Consider the AnaEx01 example as follows: |
− | + | mkdir -p ~/samples/geant4/test-100202 | |
− | module load gcc/4.9.3 geant4/10.02.02 | + | cd ~/samples/geant4/test-100202 |
+ | module unload intel | ||
+ | module load ldwrapper gcc/4.9.3 geant4/10.02.02 | ||
cp -r /opt/sharcnet/geant4/10.02.02/share/Geant4-10.2.2/examples/extended/analysis/AnaEx01 . | cp -r /opt/sharcnet/geant4/10.02.02/share/Geant4-10.2.2/examples/extended/analysis/AnaEx01 . | ||
− | source | + | source geant4make.sh |
cd AnaEx01 | cd AnaEx01 | ||
gmake clean_setup | gmake clean_setup | ||
Line 28: | Line 75: | ||
gmake | gmake | ||
+ | where ... | ||
[roberpj@vdi-centos6:~/samples/geant4/test-100202/AnaEx01] which AnaEx01 | [roberpj@vdi-centos6:~/samples/geant4/test-100202/AnaEx01] which AnaEx01 | ||
~/geant4_workdir/bin/Linux-g++/AnaEx01 | ~/geant4_workdir/bin/Linux-g++/AnaEx01 | ||
+ | |||
+ | To run the binary do: | ||
+ | |||
+ | [roberpj@vdi-centos6:~/samples/geant4/test-100202/AnaEx01] AnaEx01 | ||
+ | Idle> help | ||
+ | Command directory path : / | ||
+ | Sub-directories : | ||
+ | 1) /control/ UI control commands. | ||
+ | 2) /units/ Available units. | ||
+ | 3) /process/ Process Table control commands. | ||
+ | 4) /analysis/ ...Title not available... | ||
+ | 5) /particle/ Particle control commands. | ||
+ | 6) /geometry/ Geometry control commands. | ||
+ | 7) /tracking/ TrackingManager and SteppingManager control commands. | ||
+ | 8) /event/ EventManager control commands. | ||
+ | 9) /cuts/ Commands for G4VUserPhysicsList. | ||
+ | 10) /run/ Run control commands. | ||
+ | 11) /random/ Random number status control commands. | ||
+ | 12) /material/ Commands for materials | ||
+ | 13) /N03/ UI commands of this example | ||
+ | 14) /physics_lists/ commands related to the physics simulation engine. | ||
+ | 15) /gun/ Particle Gun control commands. | ||
+ | 16) /heptst/ Controls for the hadronic energy/momentum test | ||
+ | 17) /physics_engine/ ...Title not available... | ||
+ | 18) /vis/ Visualization commands. | ||
+ | Commands : | ||
+ | Type the number ( 0:end, -n:n level back ) : | ||
==Cluster== | ==Cluster== | ||
+ | |||
+ | Once the binary runs interactively as desired submit it to the serial queue: | ||
sqsub -q serial -r 5m -o file.%J ~/geant4_workdir/bin/Linux-g++/AnaEx01 | sqsub -q serial -r 5m -o file.%J ~/geant4_workdir/bin/Linux-g++/AnaEx01 | ||
Line 41: | Line 118: | ||
=Notes= | =Notes= | ||
− | + | None at this time. | |
=References= | =References= |
Latest revision as of 09:11, 6 June 2019
This page is will be deleted pending it's creation on the CC wiki. |
Contents
GEANT4 |
---|
Description: Suite of programs for the simulation of the passage of particles through matter |
SHARCNET Package information: see GEANT4 software page in web portal |
Full list of SHARCNET supported software |
Introduction
Geant4 is a toolkit for the simulation of the passage of particles through matter. Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science.
Usage on graham and cedar
Geant4 is installed as a module on cedar and graham.
To see which versions are available, execute:
module avail geant4
To then use a particular version, execute for example:
module load geant4/10.02.p03
After you load the module, you can see where the software is installed by executing:
echo $EBROOTGEANT4
To see the useful examples included with the version we have loaded, execute:
ls $EBROOTGEANT4/share/Geant4-10.2.3/examples
Consider the AnaEx01 example as follows:
mkdir -p ~/samples/geant4/test-100202 cd ~/samples/geant4/test-100202 module load geant4/10.02.p03 cp -r $EBROOTGEANT4/share/Geant4-10.2.3/examples/extended/analysis/AnaEx01 . source $EBROOTGEANT4/share/Geant4-10.2.3/geant4make/geant4make.sh cd AnaEx01 mkdir build cd build cmake .. make
This creates the executable AnaEx01 in the current (build) folder. You can run it by:
./AnaEx01
You run this executable and enter "help" for the available actions.
Once the binary runs interactively as desired you can submit it as a job. (see Running jobs page).
Usage on older SHARCNET systems
SHARCNET provides a build of geant4 on sharcnet CentOS clusters .
Geant4 comes with many examples useful for testing purposes:
[roberpj@vdi-centos6:/opt/sharcnet/geant4/10.02.02/share/Geant4-10.2.2/examples/extended/analysis] ls AnaEx01 AnaEx02 AnaEx03 B1Con CMakeLists.txt History README shared
Interactive
Consider the AnaEx01 example as follows:
mkdir -p ~/samples/geant4/test-100202 cd ~/samples/geant4/test-100202 module unload intel module load ldwrapper gcc/4.9.3 geant4/10.02.02 cp -r /opt/sharcnet/geant4/10.02.02/share/Geant4-10.2.2/examples/extended/analysis/AnaEx01 . source geant4make.sh cd AnaEx01 gmake clean_setup gmake setup gmake
where ...
[roberpj@vdi-centos6:~/samples/geant4/test-100202/AnaEx01] which AnaEx01 ~/geant4_workdir/bin/Linux-g++/AnaEx01
To run the binary do:
[roberpj@vdi-centos6:~/samples/geant4/test-100202/AnaEx01] AnaEx01 Idle> help Command directory path : / Sub-directories : 1) /control/ UI control commands. 2) /units/ Available units. 3) /process/ Process Table control commands. 4) /analysis/ ...Title not available... 5) /particle/ Particle control commands. 6) /geometry/ Geometry control commands. 7) /tracking/ TrackingManager and SteppingManager control commands. 8) /event/ EventManager control commands. 9) /cuts/ Commands for G4VUserPhysicsList. 10) /run/ Run control commands. 11) /random/ Random number status control commands. 12) /material/ Commands for materials 13) /N03/ UI commands of this example 14) /physics_lists/ commands related to the physics simulation engine. 15) /gun/ Particle Gun control commands. 16) /heptst/ Controls for the hadronic energy/momentum test 17) /physics_engine/ ...Title not available... 18) /vis/ Visualization commands. Commands : Type the number ( 0:end, -n:n level back ) :
Cluster
Once the binary runs interactively as desired submit it to the serial queue:
sqsub -q serial -r 5m -o file.%J ~/geant4_workdir/bin/Linux-g++/AnaEx01
Graphical
None at this time.
Notes
None at this time.
References
o Geant4 Homepage
http://geant4.web.cern.ch/geant4/
o Online User Documentation
http://geant4.web.cern.ch/geant4/support/userdocuments.shtml