Intro

This is a guide for using Athena on the Tier 3 that all users should follow. Useful webpages:

Step 0.

First, check what releases are available by typing:
ls /msu/data/dzero/ATLAS/programs/athena-t3
If the release you wish to use is not there, contact Charlie Mueller to have it installed.

Step 1.

Setup two areas in your home directory by typing:
cd $HOME
mkdir cmthome
mkdir testarea
mkdir testarea/[release]
cd cmthome

then do

source /afs/usatlas.bnl.gov/sw/contrib/CMT/v1r20p20080222/mgr/setup.sh

Now, create a file called requirements in your cmthome by doing:

vi [or emacs] requirements

and copy the following into the script.

#---------------------------------------------------------------------
set CMTSITE STANDALONE
set SITEROOT /msu/data/dzero/ATLAS/programs/athena-t3/${ATHENA_VERSION}

macro ATLAS_TEST_AREA ${HOME}/testarea
macro ATLAS_DIST_AREA ${SITEROOT}
apply_tag projectArea
macro SITE_PROJECT_AREA ${SITEROOT}
macro EXTERNAL_PROJECT_AREA ${SITEROOT}
apply_tag opt
apply_tag setup
apply_tag simpleTest
use AtlasLogin AtlasLogin-* $(ATLAS_DIST_AREA)
set CMTCONFIG i686-slc4-gcc34-opt
#------------------------------------------------------------------

Now, create a script to source and make things easier by doing

cd ~/testarea/[release]

Using the editor of your choice, create a script named athena_setup.sh by doing

vi [or emacs] athena_setup.sh

and in the script should look like this

#!bin/bash
export ATHENA_VERSION=14.2.23 #export ATHENA_VERSION=[release]
source ~/cmthome/setup.sh -tag=${ATHENA_VERSION}

This will be easier and faster to source than the setup script in cmthome

Now go into cmthome and do:
cmt config

You will only have to follow these procedures once until the version of CMT changes.

Finally, create a directory for running jobs

cd
mkdir testarea/[release]/runArea

Now, copy HelloWorldOptions.py to your runArea by doing
cd ~/testarea/[release]/runArea
cp -r /home/muell149/old_testarea/[release]/runArea/HelloWorldOptions.py .

Note: more help can be found at SoftwareDevelopmentWorkbookCmtTips and WorkBookAdvancedSetup

Note: Athena works best when the names of the release directories, run areas, etc. are named after the general release, for example do:
mkdir 14.2.23
instead of
mkdir 14.2.23.1
when installing release 14.2.23.1, the releases must be consistent.

Step 2.

First, login by doing
kinit -5 login_name@CERN.CH
You need to issue the following command to set your terminal's environment variables to the correct values, and to set up CMT. You should do this every time you start a new terminal window in which you wish to use ATLAS software. You can do this by typing
cd ~/testarea/[release number]
and then source the script
source athena_setup.sh
One thing that you must change each time you use a different release is the ATHENA_VERSION in your athena_setup.sh script, like this
#!bin/bash
export ATHENA_VERSION=14.5.0 #change this to the release that you wish to use
source ~/cmthome/setup.sh -tag=${ATHENA_VERSION}

Now you should test that Athena is working properly by doing
cd runArea
and then
athena HelloWorldOptions.py

The algorithm will first initialise and will then run ten times (during each run it will print various messages and echo the values given in the job options file). Then it will finalise, and stop. You should see something that includes this:
...
HelloWorld           INFO initialize()
HelloWorld           INFO   MyInt =    42
HelloWorld           INFO   MyBool =   1
HelloWorld           INFO   MyDouble = 3.14159
HelloWorld           INFO   MyStringVec[0] = Welcome
HelloWorld           INFO   MyStringVec[1] = to
HelloWorld           INFO   MyStringVec[2] = Athena
HelloWorld           INFO   MyStringVec[3] = Framework
HelloWorld           INFO   MyStringVec[4] = Tutorial
...
AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
AthenaEventLoopMgr   INFO   ===>>>  start of event 1  <<<===
...
HelloWorld           INFO execute()
HelloWorld           INFO An INFO message
HelloWorld        WARNING A WARNING message
HelloWorld          ERROR An ERROR message
HelloWorld          FATAL A FATAL error message
...
This message should end with something like
ChronoStatSvc.f...   INFO  Service finalized succesfully
StatusCodeSvc        INFO initialize
ApplicationMgr       INFO Application Manager Finalized successfully
ApplicationMgr       INFO Application Manager Terminated successfully
Py:Athena            INFO leaving with code 0: "successful run"
If so, you have successfully run Athena HelloWorld The ERROR and FATAL error messages are just examples to show how you can issue such messages.

Running Athena on Condor

A few example scripts for running Athena on Condor are explained at AthenaOnCondor

-- CharlieMueller - 14 Apr 2009
Topic revision: r9 - 22 Oct 2009, JamesKoll
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback