Instructions for Geant4 administrators
These instructions are confusing. Local installation and installation at CERN are mixed.
1) Geant4 installation
Geant4 has to be installed in a directory with at least 200 MBytes of free disk space. Make sure that the platform and the compiler, which you are using, are supported and up-to-date, and that CLHEP is installed on your machine or that you have access to CERN AFS.
For the typical installation of Geant4 version n
.m
on lxplus
- Check the version of g++, which should be 3.2
> g++ -v
- Download the Geant4 installation tarball from the Geant4 web site (get the tarball in "Unix tar format")
http://cern.ch/geant4/support/download.shtml
- Untar the G4 tar file
> tar zxf geant4.n.m.tar.gz
- Move to the source directory of the G4 distribution
> cd geant4.n.m
> export G4INSTALL=`pwd`
> cd source - Set the environment variables needed for building G4.
The most important ones are
G4SYSTEM
andCLHEP_BASE_DIR
, the CLHEP installation directory. Make sure that you are building G4 against the same version of CLHEP used by the rest of the ATLAS s/w.> export G4SYSTEM=Linux-g++ [only for lxplus]
> export CLHEP_BASE_DIR=/afs/cern.ch/sw/lhcxx/specific/redhat73/gcc-3.2/CLHEP/1.8.0.2
> export G4LIB_BUILD_SHARED=1 [build shared libraries instead of archives]
> export G4VIS_BUILD_DAWN_DRIVER=1
> export G4VIS_BUILD_DAWNFILE_DRIVER=1
> export G4VIS_BUILD_VRMLFILE_DRIVER=1
> export G4VIS_BUILD_VRML_DRIVER=1
- Build global libraries and get all header files installed in the appropriate directory.
> gmake glob
> gmake includes
2) Installing Geant4 in the external area
At CERN Geant4 is installed in the "external" directory
/afs/cern.ch/atlas/offline/external/geant4
.
Make sure that you have write access to this area; contact Andrea Dell'Acqua if you want to be granted permission.
> EXTERNAL = /afs/cern.ch/atlas/offline/externalCopy recursively from the G4 distribution the directories
or
> setenv EXTERNAL /afs/cern.ch/atlas/offline/external
> cd $EXTERNAL/geant4/releases
> mkdir specific/redhat73/gcc-3.2/geant4.n.m
> mkdir share/geant4.n.m
include
and source
,
and directories lib
and bin
.
> cd $G4INSTALL
> cp -r include $EXTERNAL/releases/share/geant4.n.m/
> cp -r source $EXTERNAL/releases/share/geant4.n.m/
> cp -r lib $EXTERNAL/releases/specific/redhat73/gcc-3.2/geant4.n.m/
> cp -r bin $EXTERNAL/releases/specific/redhat73/gcc-3.2/geant4.n.m/
Disk space in the geant4 external area is extremely limited. Additional volumes (volume1-4) have been added to increase the space. Releases can be copied to one of the additional volumes and links established to set up the requested directory structure.
3) Update Geant4 version in a release
A CMT interface package, External/Geant4, in the ATLAS CVS repository is used to set up the environment needed for running Geant4 in the ATLAS s/w. Change the Geant4 version as follows:
- Check out the Geant4 interface package
> cmt co External/Geant4
- Edit the requirements file of this package. Only the macro, which defines the Geant4 version, has to be changed
macro Geant4_native_version "geant4.n.m"
- Commit the changes and create a new tag for External/Geant4 using the tag collector.