AtlasKlientdriftWalkthrough

From ift
Revision as of 16:04, 10 March 2009 by Kka054 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Walkthrough: Setting up ATHENA on a central managed computers

The purpose of this walk through is to create a working *ATHENA* setup on the scratch disk of one of the centrally managed *Fedora 8* machines. This walk through works successfully on on my desktop machine iftsub041012. I've assumed you are using bash, if you're using csh, change *.sh to *.csh, and all variable definitions from export A=b to set A b. If you are not using a Fedora 8 machine, things may not work. In the case of using a Scientific Linux 4 machine, you can skip the legacy compiler step and the --pretend-platform flag to pacman.

Installing ATHENA

The ATLAS offline software ATHENA can be installed by following the steps described in this section. For your convenience the steps are also implemented in the following script [%ATTACHURL%/setup_install.sh setup_install.sh]

Decide on a version to use and set up directories

The latest stable version of ATHENA when writing this was 13.0.40. You'll need a writable directory on a disk with lots of available space to install (~6.5 Gb), for this an external disk or the /scratch partition is very useful. To simplify things declare some environment variables and create the directory

export VERSION=13.0.40
export BASEDIR=/scratch/ATLAS
export INSTALL=${BASEDIR}/ATLAS_${VERSION}
mkdir -p ${INSTALL}

Legacy compilers

Fedora 8 is almost compatible with slc4 if you use the _legacy compilers_ gcc34 and g++34 (gcc 3.4.6) instead of the default compilers gcc and g++ (gcc 4.1.2). To do this place links in to the legacy compilers named as the default compilers in front of your path

mkdir -p ${INSTALL}/mybin
cd ${INSTALL}/mybin
ln -s /usr/bin/g++34/g++
ln -s /usr/bin/gcc34/gcc
export PATH=${INSTALL}/mybin/:$PATH

Install and run pacman

pacman is a package installer available from http://physics.bu.edu/pacman/ . Install it by running

cd ${INSTALL}
wget http://physics.bu.edu/pacman/sample_cache/tarballs/pacman-latest.tar.gz
tar xfvz pacman-latest.tar.gz

To install run

cd ${INSTALL}/pacman-*
source setup.sh
cd ${INSTALL}
VERSION_=`echo ${VERSION} | sed 's,\.,_,g'`
pacman -allow trust-all-caches -pretend-platform SLC-4 -V -get am-CERN:AtlasOffline_${VERSION_}_i686_slc4_gcc34_opt

answer yall to say yes to all questions (safe for a fresh install).

Note: Installing ATHENA takes a while (even with a fast internet connection)

Creating a workarea to work on

A workarea using the ATHENA installation can be created by the steps in this section For your convenience the steps are also implemented in the following script [[%ATTACHURL%/setup_workarea.sh][setup_workarea.sh]]


Prepare environment

First set environment variables and create a workarea directory

export VERSION=13.0.40
export BASE=/scratch/ATLAS
export WORKAREA=${BASE}/workarea_${VERSION}
export INSTALL=${BASE}/ATLAS_${VERSION}
export PATH=${INSTALL}/mybin:${PATH}
mkdir -p ${WORKAREA}

Create a requirements file

The requirements file is used by cmt, it must have the path $WORKAREA/requirements. The following file was adapted from https://twiki.cern.ch/twiki/bin/view/Atlas/WorkBookSetAccount (note that SITEROOT should match your $INSTALL directory)

set CMTSITE STANDALONE
set SITEROOT /scratch/ATLAS/
macro ATLAS_TEST_AREA /scratch/workarea
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

It is important to get set SITEROOT /scratch/ATLAS/ and macro ATLAS_TEST_AREA /scratch/workarea to point to your ATLAS software installation and workarea correct.

Prepare workspace

Use CMT to prepare for running

cd /scratch/workarea
source /scratch/ATLAS/CMT/*/mgr/setup.sh
cmt config
. setup.sh -tag=$VERSION
mkdir $VERSION

once this is done, you can run the root bundled with the production packages directly from the prompt.

You have to initialize the environment before each use, to make things easier create a script mysetup.sh that does all the steps for you

export VERSION=13.0.40
export BASE=/scratch/ATLAS
export WORKAREA=${BASE}/workarea_${VERSION}
export INSTALL=${BASE}/ATLAS_${VERSION}
source setup.sh -tag=${VERSION}
export PATH=${INSTALL}/mybin:${PATH}

and before using your environment just do source mysetup.sh

Adding packages to workspace

How to install packages is also described in the wiki page GettingStartedWithAthena, remeber to source to /scratch/workarea/mysetup.sh before compiling! Packages are availible in the cvs http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/offline/ Make sure that the version of the packages you download are compatible with your ATHENA release! Add the cvs sub-directory to the workspace and unpack downloaded tar-ball there

mkdir -p ${WORKAREA}/${VERSION}/SubDirectory
cd mkdir ${WORKAREA}/${VERSION}/SubDirectory
#download package here
tar xfvz Package.tar.gz

it is not safe to remove the tar-ball. Next configure and build package

cd Package/cmt
cmt config
source setup.sh
gmake

Adding SUSYDPDMaker to your workarea

These instructions are based on text found on the twiki page https://twiki.cern.ch/twiki/bin/view/AtlasProtected/SusyDPDMaker and requires ATHENA 13.0.40 release to work. Before running remember to do source mysetup.sh in your workspace.

Make sure you have the PhysicsAnalysis directory in your workarea

pa_dir=${WORKAREA}/${VERSION}/PhysicsAnalysis
mkdir -p ${pa_dir}

then download unpack and install DPDUtils-00-00-09

cd ${pa_dir}
wget "http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/offline/PhysicsAnalysis/DPDUtils.tar.gz?view=tar&pathrev=DPDUtils-00-00-09"
tar xfvz DPDUtils.tar.gz*
rm DPDUtils.tar.gz*
cd DPDUtils/cmt
cmt config
source setup.sh
gmake

and SUSYPhys/SUSYDPDMaker-00-00-04

mkdir -p ${pa_dir}/SUSYPhys
cd ${pa_dir}/SUSYPhys
wget "http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/offline/PhysicsAnalysis/SUSYPhys/SUSYDPDMaker.tar.gz?view=tar&pathrev=SUSYDPDMaker-00-00-04"
tar xfvz SUSYDPDMaker.tar.gz*
rm SUSYDPDMaker.tar.gz*
cd SUSYDPDMaker/cmt
cmt config
source setup.sh
gmake