Using
ATLAS Software / ATHENA (10.0.3)
1. Installation
and setup on LMU cluster Garching
ATLAS software installation is made relatively easy with the
distribution kit, which is available for the more frequently used
relases.
- Currently we have installed version 10.0.3
- The standard setup is for etppc43
which still runs (RH 7.3)
The following steps
are needed to create/setup the environment:
- create directory once at the beginning
# create working directory
mkdir -p ~/atlas/tutorial
cd ~/atlas/tutorial
- put this in script to setup the
environment (/software/atlas/dist-kit/AtlasReleases/setup_10.0.3.sh)
#
# setup script for release 10.0.3
#
# GD 26/7/05
#
# 1. setup GCC & Python
export GCC_DIR=/share/gcc/gcc-3.2.2
export PATH=${GCC_DIR}/bin:${PATH}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GCC_DIR}/lib
PYTHON2=/software/atlas/external/Python/2.2.2/rh73_gcc32
export PATH=${PYTHON2}/bin:${PATH}
# setup CMT & Athena env
pushd /software/atlas/dist-kit/AtlasReleases/10.0.3
source setup.sh
source dist/10.0.3/Control/AthenaRunTime/AthenaRunTime-00-00-05/cmt/setup.sh
popd
# setup CVS access for CERN server
# set your cern user account
# detailed instructions see https://uimon.cern.ch/twiki/bin/view/Atlas/CvsAccess
#############################################
### fill here you CERN account name !!! ####
cernusername=gduck
#############################################
export CVSROOT=":ext:${cernusername}@atlas-sw.cern.ch:/atlascvs"
export CVS_RSH="ssh"
# add current path to CMT
export CMTPATH=`pwd`:${CMTPATH}
Now source this setup
script:
- The CVS setup is needed to check out packages from the CERN CVS
repository. For this to work you need setup once the ssh environment at CERN as described
in CVS-Setup
Now you are ready to go !
You can also run the ATLAS software on the standard RH 9
desktops. However, there's a slight difference in setup:
- create soft link to libs: (needed only once)
# create user lib dir
mkdir ~/lib
cd ~/lib
ln -s /lib/libssl.so.4 libssl.so.2
ln -s /lib/libcrypto.so.4 libcrypto.so.2
- include this PATH in your LD_LIBRARY_PATH
# append to setup script:
export LD_LIBRARY_PATH=${HOME}/lib:$LD_LIBRARY_PATH
- Use this setup script: /software/atlas/dist-kit/AtlasReleases/setup_10.0.3_rh9.sh (no extra gcc/python setup needed)
You can also install it on your laptop,
most straightforward is to take same directory structure as on etppc43
and copy it over to your laptop:
laptop > mkdir /software/atlas/dist-kit/AtlasReleases
laptop > cd /software/atlas/dist-kit/AtlasReleases
laptop > scp -pr ectpp43:/software/atlas/dist-kit/AtlasReleases/10.0.3 .
Depending on your installation you might also need GCC3.2 and the
libssl/libcrypto trick.
2. A simple Example: Running
"Hello World !"
athena.py AthExHelloWorld/HelloWorldOptions.py
What happens (roughly):
- ATHENA is actually a Python scripts which gets called
- It executes some initialization scripts and the the joboption
python script given on the command line
- A few default locations for job-option files are setup
($JOBOPTSEARCHPATH)
- You can also get a local copy of the job-option script:
get_joboptions HelloWorldOptions.py
###############################################################
#
# Job options file
#
#==============================================================
#--------------------------------------------------------------
# ATLAS default Application Configuration options
#--------------------------------------------------------------
theApp.setup( MONTECARLO )
#--------------------------------------------------------------
# Private Application Configuration options
#--------------------------------------------------------------
#load relevant libraries
theApp.Dlls += [ "AthExHelloWorld" ]
#top algorithms to be run
theApp.TopAlg = [ "HelloWorld" ]
HelloWorld = Algorithm( "HelloWorld" )
#--------------------------------------------------------------
# Set output level threshold (DEBUG, INFO, WARNING, ERROR, FATAL)
#--------------------------------------------------------------
MessageSvc.OutputLevel = INFO
#--------------------------------------------------------------
# Event related parameters
#--------------------------------------------------------------
# Number of events to be processed (default is 10)
theApp.EvtMax = 10
#--------------------------------------------------------------
# Algorithms Private Options
#--------------------------------------------------------------
# For the HelloWorld algorithm
HelloWorld.MyInt = 42
HelloWorld.MyBool = 1
HelloWorld.MyDouble = 3.14159
HelloWorld.MyStringVec = [ "Welcome", "to", "Athena", "Framework", "Tutorial" ]
#--------------------------------------------------------------
# Batch/Interactive Control (uncomment the lines for batch mode)
#--------------------------------------------------------------
####theApp.run( theApp.EvtMax )
####theApp.exit()
#==============================================================
#
# End of job options file
#
###############################################################
Exercise: Change variables
(=properties) defined in the joboption script
theApp.EvtMax,
HelloWorld.MyDouble, ...
3. Developing code within
ATHENA: Modify HelloWorld
Check out the HelloWorld example package from the CVS repository (now
correct CVS/CERN ssh setup is required)
cmt co Control/AthenaExamples/AthExHelloWorld
Will create subdirectory:
Control/AthenaExamples/AthExHelloWorld/AthExHelloWorld-00-01-11
and in this directory further subdirs:
- AthExHelloWorld : header files
- src : source files
- cmt : configuration stuff
- i686-rh73-gcc32-opt : binaries, shared libs
- share : joboptions files and other data stuff
To compile it simply do:
cd Control/AthenaExamples/AthExHelloWorld/AthExHelloWorld-00-01-11/cmt
gmake
source setup.sh
- gmake compiles the sources and creates a shared lib
- the shared lib libAthExHelloWorld.so
is installed in
- to make this visible in the LD_LIBRARY_PATH the source setup.sh is needed.
- Executing ATHENA once again should take the newly created libAthExHelloWorld.so:
athena.py share/HelloWorldOptions.py
Exercise:
- Try it out, modify the source/header files
- introduce further property variables.
- Re-make and re-run.
GD,
last modified 02/08/2005