Running Geant

From New IAC Wiki
Revision as of 21:15, 16 November 2010 by Oborn (talk | contribs) (Created page with '===Using the pre-installed version on aztec.iac.isu.edu=== Aztec has a system-wide installed version of geant4 that may be easier to use than compiling and installing your own v...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Using the pre-installed version on aztec.iac.isu.edu

Aztec has a system-wide installed version of geant4 that may be easier to use than compiling and installing your own version. This version uses qt4, xaw, xm, opengl, raytracer, and openinventor visualization plugins.

The examples need to be copied and Configure run once to set up the environment.

oborn@aztec:~$ mkdir geant4
oborn@aztec:~$ cd geant4/
oborn@aztec:~/geant4$ cp -r /opt/geant4/geant4.9.3.p02/examples ./
oborn@aztec:~/geant4$ /opt/geant4/geant4.9.3.p02/Configure 
                --- Geant4 Toolkit Installation  ---
                 (setting environments for USER )
---------------------------------------------------
The Geant4 toolkit installation was found.
The files env.[c]sh will be copied to your current directory.
For setting Geant4 environments you should make:
. env.sh
It will also check G4WORKDIR setting and set it to
your HOME if needed.
You can use these files also for further modifications
(adding your own environments).
---------------------------------------------------

". env.sh" needs to be run after every login (or it can be added to .bashrc)

oborn@aztec:~/geant4$ . env.sh 
On this machine the G4SYSTEM=Linux-g++
On this machine the G4INSTALL=/opt/geant4/geant4.9.3.p02
On this machine the G4LIB=/opt/geant4/geant4.9.3.p02/lib
On this machine the G4LEVELGAMMADATA=/opt/geant4/PhotonEvaporation2.0
On this machine the G4RADIOACTIVEDATA=/opt/geant4/RadioactiveDecay3.2
On this machine the G4LEDATA=/opt/geant4/G4EMLOW6.9
On this machine the G4NEUTRONHPDATA=/opt/geant4/G4NDL3.13
On this machine the G4ABLADATA=/opt/geant4/G4ABLA3.0
On this machine the G4REALSURFACEDATA=/opt/geant4/RealSurface1.0
On this machine the CLHEP_BASE_DIR=/opt/clhep_2.1.0.1
......
On this machine the QTMOC=/usr/bin/moc-qt4
On this machine the G4LIB_BUILD_SHARED=1

Now the example can be built just by calling make in the directory.

oborn@aztec:~/geant4$ cd examples/novice/N01/
oborn@aztec:~/geant4/examples/novice/N01$ make
Making dependency for file exampleN01.cc ...
......
Using global libraries ...
Linking exampleN01
... Done!

And the example can be run but calling the newly-created excutable:

oborn@aztec:~/geant4/examples/novice/N01$ ~/geant4/bin/Linux-g++/exampleN01 
*************************************************************
Geant4 version Name: geant4-09-03-patch-02    (17-September-2010)
                     Copyright : Geant4 Collaboration
                     Reference : NIM A 506 (2003), 250-303
                           WWW : http://cern.ch/geant4
*************************************************************
========= Table of registered couples ==============================
......
Track (trackID 1, parentID 0) is processed with stopping code 2
NULL returned from G4StackManager.
Terminate current event processing.
Run terminated.
Run Summary
 Number of events processed : 3
 User=0s Real=0.02s Sys=0s
G4 kernel has come to Quit state.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Maximum number of tracks in the urgent stack : 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
oborn@aztec:~/geant4/examples/novice/N01$


Running geant4 with multiple processes

TODO

Running geant4 with slurm on brems

TODO