Presentation is loading. Please wait.

Presentation is loading. Please wait.

AliEn Tutorial ALICE workshop Sibiu 20 th August, 2008 Pablo Saiz.

Similar presentations


Presentation on theme: "AliEn Tutorial ALICE workshop Sibiu 20 th August, 2008 Pablo Saiz."— Presentation transcript:

1 AliEn Tutorial ALICE workshop Sibiu 20 th August, 2008 Pablo Saiz

2 2 Pablo.Saiz@cern.ch20 August 2008 Installation of the AliEn software. AliEn and the GRID Authentication – Possible problems. General description of the shell: Working with the file catalogue: Submitting jobs References Outline I

3 3 Pablo.Saiz@cern.ch20 August 2008 Installation Please, do it now! It might take ~10 min...

4 4 Pablo.Saiz@cern.ch20 August 2008 AliEn, AliEn 2 ALICE ENvironment on the GRID GRID middleware Developed as single entry point to the GRID for ALICE Used also by other VOs All the components necessary to build a GRID and interact with other GRIDs File System with metadata Authorization, authentication, job optimization and execution, storage management Audit, quotas, monitoring Interfaces to various GRID implementations Used since: 2002 for centrally managed productions 2006 for user analysis http://alien.cern.ch

5 5 Pablo.Saiz@cern.ch20 August 2008 AliEn 2 File Catalogue Mapping from LFN to SE and PFN UNIX-like file system Metadata GUID Used by all other services ALICE USERS ALICE SIM Tier1 ALICE LOCAL |--./ | |--cern.ch/ | | |--user/ | | | |--a/ | | | | |--admin/ | | | | | | | | | |--aliprod/ | | | | | |--f/ | | | | |--fca/ | | | | | |--p/ | | | | |--psaiz/ | | | | | |--as/ | | | | | | | | |--dos/ | | | | | | | | |--local/ |--simulation/ | |--2001-01/ | | |--V3.05/ | | | |--Config.C | | | |--grun.C | |--36/ | | |--stderr | | |--stdin | | |--stdout | | |--37/ | | |--stderr | | |--stdin | | |--stdout | | |--38/ | | |--stderr | | |--stdin | | |--stdout | | | | | |--b/ | | | | |--barbera/

6 6 Pablo.Saiz@cern.ch20 August 2008 Certificates should be stored under $HOME/.globus Globus enforces privacy on your private key! (chmod 400) Authentication – Preparing the certificates You have to be registered as an ALICE user

7 7 Pablo.Saiz@cern.ch20 August 2008 Registering as an ALICE user http://alien.cern.ch/twiki/bin/view/Alice/UserRegistration

8 8 Pablo.Saiz@cern.ch20 August 2008 Authentication – Changes in env. variables

9 9 Pablo.Saiz@cern.ch20 August 2008 Authentication command – Username is optional (default is the local username) Put certificate password Happens every 24 hours Authentication – Getting a GRID proxy

10 10 Pablo.Saiz@cern.ch20 August 2008 Authentication – Getting an AliEn token

11 11 Pablo.Saiz@cern.ch20 August 2008 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

12 12 Pablo.Saiz@cern.ch20 August 2008 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

13 13 Pablo.Saiz@cern.ch20 August 2008 Upload your certificates to your machines: Store them under e.g: $HOME/.globus/ Check that the key file is read only. Setup the environment export PATH=$HOME/alien/i686-pc-linux- gnu/3.4.6/bin/:$PATH:$HOME/alien/api/bin (if your local user is different from your alien user) export ALIEN_USER=psaiz Get a valid alien token alien-token-init Authentication – Try it out

14 14 Pablo.Saiz@cern.ch20 August 2008 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 – Accessing the shell

15 15 Pablo.Saiz@cern.ch20 August 2008 Tab completion working!!! Shell – Basic commands I

16 16 Pablo.Saiz@cern.ch20 August 2008 Shell – Basic commands II

17 17 Pablo.Saiz@cern.ch20 August 2008 Shell – Basic commands III

18 18 Pablo.Saiz@cern.ch20 August 2008 Shell – whereis command

19 19 Pablo.Saiz@cern.ch20 August 2008 Shell – Viewing the files I

20 20 Pablo.Saiz@cern.ch20 August 2008 Shell – Viewing the files II

21 21 Pablo.Saiz@cern.ch20 August 2008 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 – Editing files

22 22 Pablo.Saiz@cern.ch20 August 2008 Shell – Clear old versions

23 23 Pablo.Saiz@cern.ch20 August 2008 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 – Copying files from/to the F.C.

24 24 Pablo.Saiz@cern.ch20 August 2008 Shell – 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: http://indico.cern.ch/conferenceDisplay.py?confId=3280 http://cern.ch/Oldenburg/MetaData/MetaData.doc Directories for Software packages: /alice/packages

25 25 Pablo.Saiz@cern.ch20 August 2008 aliensh:[alice] [1] find -x pp /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/* *Merged*tag.root > pp.xml Redirect the output to the xml collection. Shell – Querying the F.C. I

26 26 Pablo.Saiz@cern.ch20 August 2008 aliensh:[alice] [1] find -x pp /alice/data/2008/LHC08a/*/reco/Pass3/* *Merged*tag.root Run:collision_system=”pp” and Run:stop<"2008-03-20 10:20:33" and Run:start>"2008-03-19" > pp.xml Shell – Querying the F.C. II

27 27 Pablo.Saiz@cern.ch20 August 2008 Access the alien shell. aliensh Check your user name: whoami List the contents of your home directory ls Print the working directory pwd Create the following directory structure in your AliEn space: $HOME/bin (if it is not there) $HOME/macros and $HOME/jdl Get the information of the file: whereis /alice/bin/aliroot Shell – Try it out I

28 28 Pablo.Saiz@cern.ch20 August 2008 See the file /alice/bin/aliroot cat /alice/bin/aliroot Copy the file to your local machine cp /alice/bin/aliroot file:/tmp/aliroot Exit the shell and check the file Access the shell again and query the f.c. and get all the tag files (*.tag.root) under: /alice/sim/PDC_08/LHC08b1/3000001/* Get the output on your terminal (find /alice/…) Get the output on your terminal in a xml format (find -x tag /alice/…) Redirect the results to the tag.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...). Shell – Try it out II

29 29 Pablo.Saiz@cern.ch20 August 2008 Submitting jobs Jobs TaskQueue Job Broker Job Manager CE JA Central services Site services SplittingExpired PrioritiesMerging Zombies Job optimizers File catalogue LFN GUID Meta data FTD Packman MonALISA JA CE SE Packman MonALISA FTD SE Site A Site B

30 30 Pablo.Saiz@cern.ch20 August 2008 Executable: Compulsory field where we give the lfn of the executable that should be stored in /bin or $V0/bin or $HOME/bin. Arguments: They will be passed to the executable. Packages: Type packages in the shell to see what kind of packages are installed. InputFile: The files that will be transported to the node where the job will run. InputData: It will require that the job will be executed in a site close to the files specified here. InputDataList: The filename in which the Job Agent will write the InputData list. InputDataListFormat: The format of the InputData list. JDL fields I

31 31 Pablo.Saiz@cern.ch20 August 2008 OutputFile: The files that will be registered in the catalog once the job finishes. OutputArchive: What files will be archived in a zip file. Validationcommand: Specifies the script to be used as a validation script. Email: Receive a mail when the job finishes. TTL: The maximum run time of your job. Split: Split the jobs in several sub jobs. JDL fields II

32 32 Pablo.Saiz@cern.ch20 August 2008 Batch analysis – Job status

33 33 Pablo.Saiz@cern.ch20 August 2008 If everything is ok with your jdl then your job is submitted and a.is assigned to it. You get a submission error message if: i)a file listed in the jdl is missing ii)a package defined in the jdl is not listed in the packman Submitting jobs

34 34 Pablo.Saiz@cern.ch20 August 2008 Checking the job status I

35 35 Pablo.Saiz@cern.ch20 August 2008 Checking the job status II

36 36 Pablo.Saiz@cern.ch20 August 2008 Checking the priority

37 37 Pablo.Saiz@cern.ch20 August 2008 Checking the job output I

38 38 Pablo.Saiz@cern.ch20 August 2008 Checking the job output II

39 39 Pablo.Saiz@cern.ch20 August 2008 Submit the following JDL: Executable = “date"; OutputArchive = {"log_archive:stderr,stdout,*.log@ALICE::Niham::File"}; Email=" "; Once the job finishes, retrieve the output It should be in /proc/ / /job-output Where was the job executed? What does the job ‘date’ do? Submitting jobs – Try it out I

40 40 Pablo.Saiz@cern.ch20 August 2008 Create the file analysis.jdl in your local directory, with the content: Packages = { "APISCONFIG::V2.4", "VO_ALICE@ROOT::v5-21-01-alice" }; Executable = "Sh_AnaESD_MC_CheckGenCascade.sh"; InputFile = {"LF:/alice/cern.ch/user/p/psaiz/macros/runBatchESD_MC_CheckGenCascade.C", "LF:/alice/cern.ch/user/p/psaiz/macros/STEERBase.par", "LF:/alice/cern.ch/user/p/psaiz/macros/ESD.par", "LF:/alice/cern.ch/user/p/psaiz/macros/ANALYSIS.par","LF:/alice/cern.ch/user/p/psaiz/macros/AOD.par", "LF:/alice/cern.ch/user/p/psaiz/macros/ANALYSISalice.par","LF:/alice/cern.ch/user/p/psaiz/macros/AliTaskESD_ MC_CheckGenCascade.h","LF:/alice/cern.ch/user/p/psaiz/macros/AliTaskESD_MC_CheckGenCascade.cxx"}; OutputArchive = {"log_archive.zip:*.log,stdout,stderr@ALICE::CERN::SE", "root_archive.zip:*.root@ALICE::CERN::SE"}; InputDataListFormat = "xml-single"; InputDataList = "wn.xml"; InputData = { "LF:/alice/sim/PDC_08/LHC08q/230009/134/Run230009.Event0_100.ESD.tag.root,nodownload", "LF:/alice/sim/PDC_08/LHC08q/230009/177/Run230009.Event0_100.ESD.tag.root,nodownload"}; OutputDir= "/alice/cern.ch/user/ p/psaiz/TutorialOuptut"; Email=" "; Submitting jobs – Try it out II Change /p/psaiz/ by your username Thanks to Antonin Maire for this example

41 41 Pablo.Saiz@cern.ch20 August 2008 Enter alien aliensh Copy the files from /alice/cern.ch/user/p/psaiz/tutorial/files/ mkdir macros bin jdl cp /alice/user/p/psaiz/tutorial/files/* macros/ cp /alice/user/p/psaiz/bin/Sh_AnaESD_MC_CheckGenCascade.sh bin/ Upload the file analysis.jdl into jdl/ cp ffle:analysis.jdl jdl/analysis.jdl Once finished, submit your batch job by typing: submit jdl/analysis.jdl Running jobs– Try it out III

42 42 Pablo.Saiz@cern.ch20 August 2008 Check your job priority by typing: “queue priority jobs $username”. Display the jdl of your job by typing: “ps -jdl $jobid”. Trace the status of your job by typing: “ps -trace $jobid”. When the job 's status turns to RUNNING you can get the stdout and stderr of the job by typing: “spy $jobid stdout”. “spy $jobid stderr”. When the job finishes, check the output in $HOME/TutorialOutput, and get it into your machine Running jobs– Try it out IV

43 43 Pablo.Saiz@cern.ch20 August 2008 Conclusion AliEn Interface to the GRID Developed by ALICE Usable by any VO In production since 2002 File Catalogue File and Metadata Job submission model Data movement and replication

44 44 Pablo.Saiz@cern.ch20 August 2008 Registration – Certificates: http://alien.cern.ch/twiki/bin/view/Alice/UserRegistration https://ca.cern.ch/ca/ AliEn: http://alien.cern.ch User's guide: http://aliceinfo.cern.ch/export/download/OfflineDownload/OfflineBible.pdf Previous tutorials: http://aliceinfo.cern.ch/Offline/AliRoot/Manual.html References

45 45 Pablo.Saiz@cern.ch20 August 2008 http://alien.cern.ch


Download ppt "AliEn Tutorial ALICE workshop Sibiu 20 th August, 2008 Pablo Saiz."

Similar presentations


Ads by Google