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.


The following steps are needed to create/setup the environment:

# create working directory
mkdir -p ~/atlas/tutorial
cd ~/atlas/tutorial

#
# 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:
source setup-10.0.3.sh


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 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


# append to setup script:
export LD_LIBRARY_PATH=${HOME}/lib:$LD_LIBRARY_PATH



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):
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:
To compile it simply do:
cd Control/AthenaExamples/AthExHelloWorld/AthExHelloWorld-00-01-11/cmt
gmake
source setup.sh
i686-rh73-gcc32-opt


athena.py share/HelloWorldOptions.py	

Exercise:






GD, last modified 02/08/2005