Presentation is loading. Please wait.

Presentation is loading. Please wait.

May 23, 20071 ALICE Offline Tutorial Markus Oldenburg – CERN May 23, 2007 – University of São Paulo.

Similar presentations


Presentation on theme: "May 23, 20071 ALICE Offline Tutorial Markus Oldenburg – CERN May 23, 2007 – University of São Paulo."— Presentation transcript:

1 May 23, ALICE Offline Tutorial Markus Oldenburg – CERN May 23, 2007 – University of São Paulo

2 May 23, ALICE Offline Tutorial F.Carminati, P.Christakoglou, J.F.Grosse-Oetringhaus, P.Hristov, A.Peters, P.Saiz April 13, 2007 – v1.3 based on:

3 May 23, Part V: AliEn installation and Setup available online at: -> Seminarshttp://cern.ch/Oldenburg

4 May 23, Installation of the AliEn software. Authentication – Possible problems. General description of the shell: Basic commands. Basic functionalities. Working with the file catalogue: Copying files from/to the catalogue. File catalogue structure. Querying the file catalogue. ROOT API News on production. Outline

5 May 23, Remarks Please follow through the tutorial by reading the pages, first. Only then, do the things described in the Try it out sections. Reason: Only the Try it out sections have the correct commands/directories and right version numbers, while the explanatory slides might differ.

6 May 23, Installation – Getting the installer

7 May 23, Installation – Selecting the version

8 May 23, Installation – Reuse of software

9 May 23, All the installation log files are stored in this directory! In case of installation problems please send the error message along with the install.log file Installation – Workspace directory

10 May 23, Installation – Detecting the platftom

11 May 23, Installation – Supported platforms

12 May 23, Installation – Installation directory

13 May 23, Installation – Selecting installation directory

14 May 23, Installation – Overwriting files

15 May 23, Installation – Selecting packages

16 May 23, Installation – Progress bar

17 May 23, Installation – Final window

18 May 23, ROOT application API client Common libraries Globus toolkit Gcc compiler Installation – Directory structure

19 May 23, Download the alien installer from Make the file executable. Run the installer. Select v2-13 Platform should be i686. Select installation directory. Select the following packages: Client gShell ROOT xrootd Installation – Try it out

20 May 23, ROOT compilation with AliEn support If not done already during your local ROOT installation, you have to enable the AliEn support in ROOT. Go to your $ROOTSYS directory and modify the cfg.sh script (see next slide). Execute the cfg.sh script. This will reconfigure ROOT. Recompile ROOT (do make and make map in $ROOTSYS). This will take only a few minutes.

21 May 23, Root Configuration: Example script Put the following lines in a file called cfg.sh. #!/bin/sh ALIEN_ROOT= /alien./configure \ --with-pythia6-uscore=SINGLE \ --enable-cern --enable-rfio \ --enable-mathmore --enable-mathcore --enable-roofit \ --enable-asimage --enable-minuit2 \ --enable-alien \ --with-alien-incdir=${ALIEN_ROOT}/api/include \ --with-alien-libdir=${ALIEN_ROOT}/api/lib The last three lines are the important ones, which you might have ignored/commented out during the ROOT installation! Change the second line (ALIEN_ROOT…) to point to your AliEn installation directory.

22 May 23, Certificates should be stored under $HOME/.globus Globus enforces privacy on your private key! (chmod 400) Authentication – Preparing the certificates

23 May 23, Authentication – Changes in env. variables This should be your user name!

24 May 23, Authentication command – Username is optional (default is the local username) Put certificate password Happens every 24 hours Authentication – Getting a GRID proxy

25 May 23, Authentication – Getting an AliEn token

26 May 23, Globus related: Permissions on $HOME/.globus/userkey.pem are not private to the user – chmod 400 userkey.pem Your certificate authority is exotic and not known to the server. Your certificate has expired. Clock skew: Your local computer time is in the future with respect to the server's time. Your local computer time is more in the past than the certificate life time. Authentication – Authentication problems I

27 May 23, alien-token-init related: You have not gone through all 5 steps of the AliEn user registration. You have not given the AliEn user name as an argument to the token-init command and your local user name is not identical to the AliEn user name. The script wants to bootstrap the installation but you don't have write permissions on the installation path – Avoid bootstrapping by setting the GSHELL_ROOT environment variable. Authentication – Authentication problems II

28 May 23, Upload your certificates to your machines: Store them under e.g: /afs/cern.ch/user/ / /.globus/ Check that the key file is read only. Get the setenv.sh file from the agenda (see below) and place it under e.g. /home/ / Modify it accordingly/ Source it to set up your environment variables. Get a valid grid proxy. Get a valid alien token. Check the information of your proxy/token by typing: grid-proxy-info alien-token-info Agenda: Authentication – Try it out

29 May 23, Standard bash shell with grid comands Main bash features are available. Not all shell helper programs are available. Some local commands (like ls, cat etc) are overwritten with the corresponding GRID commands. File/path tab completion in the virtual GRID directory. Message of the day. Shell (1) – Accessing the shell

30 May 23, Tab completion working!!! Shell (1) – Basic commands I

31 May 23, Shell (1) – Basic commands II

32 May 23, Shell (1) – Basic commands III

33 May 23, Shell (1) – whereis command

34 May 23, Shell (1) – Viewing the files I

35 May 23, Shell (1) – Viewing the files II

36 May 23, Define your preferred editor via the variable EDITOR: 'emacs' 'emacs -nw' 'xemacs' 'xemacs -nw' 'pico' 'vi' (DEFAULT) 'vim' The file is temporary in /tmp on your local disk and then is uploaded once you exit the editor! Shell (1) – Editing files

37 May 23, Shell (1) – Clear old versions

38 May 23, Access the alien shell. Check your user name by typing whoami. List the contents of your home directory. Check the working directory. Create the following directory structure in your AliEn space: $HOME/bin (if it is not there) $HOME/Tutorial/ESD and $HOME/Tutorial/Kine $HOME/Tutorial/ESD/output and $HOME/Tutorial/Kine/output Get the information of the file (whereis): /alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/ESD/AliAnalysisTaskPt.cxx Shell (1) – Try it out

39 May 23, GOLDEN RULE If you want to access your local directory structure while you are in the shell you should start by having the prefix file: e.g: cp file:/home/pchrist/gshell.sh gshell.sh Shell (2) – Copying files from/to the F.C.

40 May 23, MARKUS OLDENBURG AN INTERNAL NOTE IS ON THE WAY Shell (2) – File catalogue structure The path name will be: for real data: /data/ / / / for simulated data: /sim/ / / / Subdirectories will be called: Raw/ cond/ reco/ /ESD/ reco/ /AOD/ … File names will look like this:.AliESD.root For further information see:

41 May 23, aliensh:[alice] [1] find -x pp /alice/cern.ch/user/p/pchrista/production/pp/PDC06/* AliESDs.root > pp.xml Redirect the output to the xml collection. Shell (2) – Querying the F.C. I

42 May 23, aliensh:[alice] [1] find -x pp /alice/data/2008/LHC08a/*/reco/Pass3/* AliESDs.root Run:collision_system=pp and Run:stop<" :20:33" and Run:start>" " > pp.xml Shell (2) – Querying the F.C. II

43 May 23, Create the following directory structure locally: $HOME/AliEn/PDC06/001 and $HOME/AliEn/PDC06/002 $HOME/AliEn/Tags $HOME/AliEn/Local/ESD and $HOME/AliEn/Local/Kine $HOME/AliEn/Interactive/ESD and $HOME/AliEn/Interactive/Kine $HOME/AliEn/Batch Copy all the files under the AliEn directory /alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/ESD/ to your local $HOME/AliEn/Local/ESD ESD.par - ANALYSIS.par - AliAnalysisTaskPt.h - AliAnalysisTaskPt.cxx - runESDAnalysis.C - demoLocal.C Shell (2) – Try it out I

44 May 23, Copy all the AliEn files under /alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/Kine/ to your local $HOME/AliEn/Local/Kine: AliAnalysisTaskRLPt.h - AliAnalysisTaskRLPt.cxx - runKineAnalysis.C - demoLocal.C Copy all the AliEn files under /alice/cern.ch/user/p/pchrist/Tutorial/TAGS/ to your local $HOME/AliEn/Tags: ESD.par - CreateTags.C - runTagCreator.C Copy all the root files under /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/001/ and /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/002/ your local $HOME/AliEn/PDC06/001 and $HOME/AliEn/PDC06/002 Shell (2) – Try it out II

45 May 23, Shell (2) – Try it out III Query the f.c. and get all the tag files (*.tag.root) under: /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/* Get the output on your terminal. Redirect the results to the tag10.xml collection: the output will not be stored in your AliEn working directory but rather in your local working directory. Repeat the previous exercise limiting the number of output files to 5 (find -l 5...). Query the f.c. for all the *Merged*.tag.root files under: /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/ and redirect the result to the tag.xml file. Exit the shell and copy the xml to your local $HOME/AliEn/Interactive/ESD and $HOME/AliEn/Interactive/Kine.

46 May 23, p+p min 14TeV --- N Events ~ 50M: /alice/cern.ch/user/a/aliprod/prod2006_2/output_pp/ (5.4M) /alice/sim/2006/pp_minbias/ (~45M) /alice/sim/2006/pp_x_vertex_1cm/ (1.1M) /alice/sim/2006/pp_x_vertex_05cm/ (1.1M) /alice/sim/2006/pp_minbias_full/ (1.1M) All RUNS have been tested and merged tag files have been produced at the RUN level for all RunIds. p+p min 900GeV --- N Events = 200K: /alice/sim/2006/pp_900GeV/ All RUNS have been tested and merged tag files have been produced at the RUN level for all RunIds. Muon events --- N Events = 864K: /alice/sim/2006/muon/ (64K) /alice/sim/2006/muon_signle/ (800K) Production status (= available data)

47 May 23, ROOT – ROOT API

48 May 23, ROOT - Connecting

49 May 23, ROOT – Accessing a GRID file

50 May 23, AliEn software comes with a precompiled library with gcc which is also shipped with AliEn. In the latest AliEn version 2.13 it will check automatically for the correct versions (and recompile if necessary). The following steps are not necessary in this case. Otherwise: if you are using a different version of gcc (check it with gcc –v) then do the following: cd $ALIEN/api/src./recompile.gapi cd $ALIEN/api/lib Copy all the libgapiUI.so.2* files to the libgapiUI.so.3* Or link your gcc to the version shipped with AliEn and compile everything with this. ROOT – Problems with gcc versions

51 May 23, Get the alienroot and alienaliroot executables from indico (= the agenda, see slide 28). Store them under your /home/ /bin Open the setenv.sh file, use it in your own.bashrc (or wherever you set your environment). You might want to modify the path definition: export PATH=$PATH:$ALIEN/api/bin:$ALIEN/globus/bin:/home/ /bin Once finished, get a token, type alienroot and then: root [0] TGrid::Connect(alien://); If it works without error messages you have installed everything successfully. If not then go back to the previous pages of this tutorial. ROOT – Try it out

52 May 23, BACKUP AliEn Exercises

53 May 23, Go to your $ROOTSYS and change the cfg.sh file – change the location where you installed the grid software (it should be e.g. /home/trn2301/alice/AliEn). Source the script and then type make and make map. Write the following script, name it alienroot, make it executable, place it in your $HOME/bin directory and add it in your $PATH. #!/bin/bash export ALIEN=/home/trn2301/alien export ROOTSYS=/home/trn2301/root export PATH=$ROOTSYS/bin:$PATH export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH:$ALIEN/api/lib if [ -e /tmp/gclient_env_$UID ]; then source /tmp/gclient_env_$UID; root.exe $* fi ROOT – Try it out I

54 May 23, AliEn Tutorial Solutions Panos Christakoglou University of Athens - CERN

55 May 23, Download the installer from the web [bash]$ wget 2. Make the file executable [bash]$ chmod a+x alien-installer 3. Run the installer [bash]$./alien-installer For the solutions, we assume that the user name is trn2301 with the following attributes: Local home directory: /home/trn2301 Alien home directory: /alice/cern.ch/user/t/trn2301 change the names accordingly to match your case!!! Installation – Try it out [bash]$ --> Your local bash shell [aliensh]$ --> Your alien bash shell No notation --> inside a file

56 May 23, Upload your certificates to your machines [bash]$ scp 2. Get a valid token [bash]$ alien-token-init trn2301 //the username is optional and should be put if the local username isn't the same as the alien one 3. Get your proxy info [bash]$ grid-proxy-info 4. Get your token info [bash]$ alien-token-info [bash]$ --> Your local bash shell [aliensh]$ --> Your alien bash shell No notation --> inside a file Authentication – Try it out

57 May 23, Access the shell [bash]$ aliensh 2. Check your user name [aliensh]$ whoami 3. List the contents of your alien directory [aliensh]$ ls 4. Check the alien working direcory [aliensh]$ pwd 5. Create the following directory structure in your AliEn space: $HOME/bin (if it is not there) - $HOME/Tutorial/ESD and $HOME/Tutorial/Kine -$HOME/Tutorial/ESD/output and $HOME/Tutorial/Kine/output [aliensh]$ mkdir -p bin Tutorial/ESD/output Tutorial/Kine/output 6. Get the information of the file: /alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/ESD/AliAnalysisTaskPt.cxx [aliensh]$ whereis /alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/ESD/AliAnalysisTaskPt.cxx [bash]$ --> Your local bash shell [aliensh]$ --> Your alien bash shell No notation --> inside a file Shell (1) – Try it out

58 May 23, [bash]$ --> Your local bash shell [aliensh]$ --> Your alien bash shell No notation --> inside a file Shell (2) – Try it out I 1. Create the following directory structure locally: $HOME/AliEn/PDC06/001 and $HOME/AliEn/PDC06/002 - $HOME/AliEn/Tags - $HOME/AliEn/Local/ESD and $HOME/AliEn/Local/Kine - $HOME/AliEn/Interactive/ESD and $HOME/AliEn/Interactive/Kine - $HOME/AliEn/Batch [bash]$ mkdir -p $HOME/AliEn/PDC06/001 $HOME/AliEn/PDC06/002 $HOME/AliEn/Tags $HOME/AliEn/Local/ESD $HOME/AliEn/Local/Kine $HOME/AliEn/Interactive/ESD $HOME/AliEn/Interactive/Kine $HOME/AliEn/Batch 2. Copy all the files under the AliEn directory /alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/ESD/ to your local $HOME/AliEn/Local/ESD [aliensh]$ cp /alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/ESD/ file:/home/trn2301/AliEn/Local/

59 May 23, [bash]$ --> Your local bash shell [aliensh]$ --> Your alien bash shell No notation --> inside a file Shell (2) – Try it out II 3. Copy all the AliEn files under /alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/Kine/ to your local $HOME/AliEn/Local/Kine [aliensh]$ cp /alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/Kine/ file:/home/trn2301/AliEn/Local/ 4. Copy all the AliEn files under /alice/cern.ch/user/p/pchrist/Tutorial/TAGS/ to your local $HOME/AliEn/Tags: [aliensh]$ cp /alice/cern.ch/user/p/pchrist/Tutorial/TAGS/ file:/home/trn2301/AliEn/ 5. Copy all the root files under /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/001/ and /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/002/ your local $HOME/AliEn/PDC06/001 and $HOME/AliEn/PDC06/002 [aliensh]$ cp /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/001/ file:/home/trn2301/AliEn/PDC06/ [aliensh]$ cp /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/002/ file:/home/trn2301/AliEn/PDC06/

60 May 23, [bash]$ --> Your local bash shell [aliensh]$ --> Your alien bash shell No notation --> inside a file Shell (2) – Try it out III 7. Query the f.c. and get all the tag files (*.tag.root) under: /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/* [aliensh]$ find -x tag /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/* *tag.root (Get the output on your terminal) [aliensh]$ find -x tag /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/* *tag.root > tag10.xml (Redirect the results to the tag10.xml collection) 8. Repeat the previous exercise limiting the number of output files to 5 (find -l 5...). [aliensh]$ find -l 5 -x tag /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/* *tag.root > tag10.xml 9. Query the f.c. for all the *Merged*.tag.root files under: /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/ and redirect the result to the tag.xml file. [aliensh]$ find -x tag /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/* *Merged*tag.root > tag.xml 10. Exit the shell and copy the xml to your local $HOME/AliEn/Interactive/ESD and $HOME/AliEn/Interactive/Kine. [aliensh]$ exit [bash]$ cp tag.xml $HOME/AliEn/Interactive/ESD [bash]$ cp tag.xml $HOME/AliEn/Interactive/Kine


Download ppt "May 23, 20071 ALICE Offline Tutorial Markus Oldenburg – CERN May 23, 2007 – University of São Paulo."

Similar presentations


Ads by Google