Introduction

This twiki page explains the process to statically link Geant 4 in a large dynamic library.

Recipe to link G4 in a large dynamic library

<!-- Add the main topic here. i.e. create some new headings as follows: -->

#grab the desired copy of geant4
cp -r /afs/cern.ch/atlas/offline/external/geant4/g4.9.6/geant4.9.6.patch02.atlas03/ .

# get build_geant4.py and change CLHEP version from 1.9.4.7 to the appropriate one (in our example 2.1.2.3-atl01)

asetup 19.0.1 here

svn co ${SVNGROUPS}/Computing/Simulation/Geant4/BuildScripts

vi BuildScripts/build_geant4.py

...


#build it with build_geant4.py (compare CompilingG4ForAtlas):

./BuildScripts/build_geant4.py -s $PWD/geant4.9.6.patch02.atlas03/ geant4.9.6.patch02.atlas03

#set link to data directory
mkdir -p InstallArea/external/Geant4/releases/share/geant4.9.6.patch02.atlas03/

cd InstallArea/external/Geant4/releases/share/geant4.9.6.patch02.atlas03/

ln -s /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc47-opt/19.0.1/AtlasSimulation/19.0.1/InstallArea/external/Geant4/releases/share/geant4.9.6.patch02.atlas03/data/ data

#Copy linking script from my public folder (CLHEP, Xerces and Expat versions are hardcoded in this script!)

cp /afs/cern.ch/work/r/rlangenb/public/makeFatDynamicLibrary.py .

#create dynamic library by executing script from workspace folder. It prints out all included files (which is a lot). it excludes all clhep libraries in G4.

./makeFatDynamicLibrary.py

#execute Sim_tf.py to get runwrapper.EVNTtoHITS.sh

...

#edit runwrapper.EVNTtoHITS.sh to add libGeant4Complete.so to the preloads
….
#execute runwrapper.EVNTtoHITS.sh
./runwrapper.EVNTtoHITS.sh

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2014-05-14 - RobertLangenberg
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback