This wiki has been deprecated and will be removed soon.

The new Advanced Computing and e-Science wiki is located at http://grid.ifca.es/wiki.

Please update your bookmarks.

General Support

De e-Ciencia

This page contains protocols and a number of examples about how to join, login and submit jobs to the IFCA Grid infrastructure.

Tabla de contenidos

Get a Digital Certificate

The same than in any other Grid infrastructure the first step is obtaining in Digital Certificate issued by one of the Certification Authorities supported by the project. Digital Certificates are necessary for users to access the Grid in a secure manner. As a part of our interoperability politics, if you own a digital certificate signed by EGEE, it will also be valid in the int.eu.grid infrastructure.

 For the case of IFCA you have to contact Rafael Marco (ext. 21413)


Join a Virtual Organization

As a second step, the user must join (at least) one of the Virtual Organizations (VO) in which the int.eu.grid applications are grouped. Currently we have the following structure

 Medical Applications: iUSCT for Ultra Sound Computer Tomography
 Medical Applications: ibrain for image aided diagnosis in brain diseases
 High Energy Physics: ihep for HEP applications
 Fusion Physics: ifusion: For Fusion Physics related applications
 Environmental models: ienvmod for delevoping tools to study environmental models
 Astrophysics: iplanck to develop tools oriented to analysis of sky maps from the WMAP and Planck missions


The computing resources are distributed on a per VO basis. Therefore to be able to use some set of resources users must join a VO. If your application is not contained in any of the macro-areas before, we will consider to start a new VO for it.

 For details in this respect contact Isabel Campos ext. 22084

Assuming you already have a Digital Certificate, to join a VO you should follow these steps

  1. Load your digital certificate in your web browser 
     You can normally do this in Preferences --> Security --> Certificates 
     Some browsers accept only the .p12 format for the certificates. You can issue the following command 
     to convert your .pem certificate into .p12 format:
     openssl pkcs12 -export -inkey userkey.pem -in usercert.pem -out my_cert.p12 -name "I2G certificate"
  2. Visit our VO Management Server, 
  3. Click on the left-hand side on the name of the VO you want to join, 
  4. Then click on New user request


This action will trigger an e-mail to the manager of the VO which will (eventually) authorize your request. Once you received a confirmation e-mail that your request has been authorized you can begin to work.


Get an Account on a Grid enabled User Interface

The institute has several user interfaces which can be appropriate. Please contact Rafael Marco for this (ext. 21413).


Working on the Grid

  • Begin your session initializing your proxy. For this login in the User Interface you got the account for

1. Create a directory to stored your digital certificate

  ssh youruserid@ui-i2g
  mkdir .globus

2. Copy there your digital certificates. It should look something like this

   /home/isabel> ll .globus/
   -rw-r--r--    1 isabel   aeuser       3802 Apr 20  2006 usercert.pem
   -r--------    1 isabel   aeuser        951 Apr 20  2006 userkey.pem

Check that the permissions are exactly those

3. Initialize your proxy (using your digital certificate password to encode it) on the Virtual Organization you plan to use. For example, on ifusion VO you would write:

  /home/isabel/voms-proxy-init --voms ifusion
  Your identity: /C=ES/O=DATAGRID-ES/O=BIFI/CN=Isabel Campos Plasencia
  Enter GRID pass phrase:
  Creating temporary proxy ................................................. Done
  Contacting  i2g-voms.lip.pt:20005 [/C=PT/O=LIPCA/O=LIP/OU=Lisboa/CN=i2g-voms.lip.pt] "ifusion" Done
  Creating proxy ................................................. Done
  Your proxy is valid until Tue Dec 19 22:44:45 2006

Your proxy is valid for a 12 hours period. Use the flag -hours H to obtain a proxy valid for H hours.

In the next sections we will show some example about file handling and Job submission. This section is intended to grow driven by users need of support.


Managing Files on the Grid using LCG tools

The storing resources are abstracted by a special node type called “Storage Element” (SE), behind of which may exist a simple disk, a tape server, etc. In this section we will give some working recipes. We refer to the user guide of LCG for further details and more options.

Using LCG tools implies to set a default file catalog location. We can do this by exporting the environment variable LFC_CATALOG

 [isabel@i2gui01 isabel]$ export LFC_CATALOG = lfc01.lip.pt

The first question is to know how much space do we have available to work, and how to access it. This is we know by querying the Information System with the command

 [isabel@i2gui01 isabel]$ lcg-infosites --vo ifusion se
 Avail Space(Kb) Used Space(Kb)  Type    SEs
 ----------------------------------------------------------
 105820688       4431472         n.a     se-ieg.bifi.unizar.es
 8072312         1934324         n.a     se.i2g.cesga.es
 16330000000     3670000000      n.a     dpm.cyf-kr.edu.pl
 1131490256      87716           n.a     i2gse01.ifca.es
 31400000        18580000        n.a     se1.egee.man.poznan.pl


This information refers to the Storage Elements (SE) and the space on them available for the users of the VO ifusion. On every SE there is a directory called /grid/<voname> with writing permisions for all users belonging to the VO=voname

 [isabel@i2gui01 isabel]$ lfc-ls /grid
 ibrain
 ienvmod
 ifusion
 ihep
 iplanck
 iusct
 [isabel@i2gui01 isabel]$ lfc-ls -l /grid/ifusion/
 drwxrwxr-x   3 139      114                       0 Dec 16 17:35 isabel
 drwxrwxr-x   0 101      114                       0 Dec 19 16:23 mdavid


The next step is choosing the SE you want use. This election is based on

 - How much space do I need
 - In you need high transfer speed, which one is the closest to my User Interface
 - etc...

Once you have chosen, you can stored files on it. There are different ways that can be used. Perhaps the most userfriendly is to use the so called Logical Filenames.

Let us suposse we want to copy a particular file on the SE from the CESGA site. The first thing to do is to create a directory on the grid filesystem

 [isabel@i2gui01 isabel]$ lfc-mkdir /grid/ifusion/isabel


Now let us copy and replicate in all the filesystems grid the file /home/isabel/mytarball.tar


 [isabel@i2gui01 isabel]$ lcg-cr --vo ifusion -d se.i2g.cesga.es \\
   -l lfn:/grid/ifusion/isabel/mytarball.tar file:///home/isabel/mytarball.tar
 guid:b70533cf-201b-4f8d-8fed-a33563268fca


The output is the Grid Unique Identifier of the file. However we dont have to carry alone that name, the file will be identified in the future with the Logical Filename (lfn)

Other common operations on files are done through the lcg-* commands. For example, deleting a file and all its replicas is achieved via:

 [isabel@i2gui01 isabel]$ lcg-del -a --vo ifusion lfn:/grid/ifusion/isabel/borrar

Deleting only the replica existing in a particular SE is done via:

 [isabel@i2gui01 isabel]$ lcg-del --vo ifusion -s dpm.cyf-kr.edu.pl lfn:/grid/ifusion/isabel/borrar


Check the lcg-* commands and the [https://edms.cern.ch/file/454439/2/LCG-2-UserGuide.html#SECTION00090000000000000000 corresponding section in the LCG user guide] for more options.

 Some hints for application developpers and Input/Output can de found on 
 this link

Submission of a simple test (no i/o)

Submitting a job implies firstable writing the JDL description of the job. (we refer to the LCG User Guide for details) This is the example of JDL to submit a job which


 # Mandatory attributes
 Executable = "su3serial.sh";
 StdOutput = "su3serial.out";
 StdError = "su3serial.err";
 # I/O files to be staged from/to the User Interface
 InputSandbox = {"su3serial.sh","run32","su3serial_exec.tar"};
 OutputSandbox = {"su3serial.out","su3serial.err","run32.log"};


where the script su3serial.sh is


 [isabel@i2gui01 su3serial]$ cat su3serial.sh
 #!/bin/sh
 # Debug info
 echo \| Execution start: `date` \| Host: `hostname` \| User: `whoami` \| Path: `pwd` \|
 # Program execution
 tar xvf su3serial_exec.tar
 cat /proc/cpuinfo
 chmod u+x run32
 ./run32
 # Debug info
 echo \| Execution end: `date` \|

Submission of a Job reading Input from a Storage Element

In the previosu example all the files staged in the InputSandbox are small (order of KBytes). This is not the most common situation. When we have large files to use along the simulation (libraries, hugue input maps, large executables, etc...) the jobmanager rejects the job for being too large. In this situation we have to copy the necessary files on the grid in the way explained above.

This is a JDL script which submits a job that needs to read the input from a SE:

 # Mandatory attributes
 Executable = "installFusion-ifca.sh";
 StdOutput = "installFusion.out";
 StdError = "installFusion.err";
 # Environment variables
 Environment = {"LFC_HOST=lfc01.lip.pt"};
 # I/O files to be staged from/to the User Interface
 InputSandbox = {"installFusion-ifca.sh"};
 OutputSandbox = {"installFusion.out","installFusion.err"};
 Requirements= other.GlueCEUniqueID == "i2gce01.ifca.es:2119/jobmanager-lcgpbs-ifusion";


Notice the Requirements extra field. It means that we want the job to end up at the IFCA site. In the script we have included the extra commands to do the copy from the SE of the files needed:


  [isabel@i2gui01 Fusion]$ more installFusion-ifca.sh
  #!/bin/sh
  # Debug info
  echo \| Execution start: `date` \| Host: `hostname` \| User: `whoami` \| Path: `pwd` \|
  lcg-cp -v --vo ifusion lfn:/grid/ifusion/isabel/fusionGLUT-0.2.tar.gz file:///tmp/myfile.tar.gz
  cp /tmp/myfile.tar.gz /opt/exp_soft/ifusion/.
  rm /tmp/myfile.tar.gz
  cd /opt/exp_soft/ifusion
  ls -lrt /opt/exp_soft/ifusion
  chmod u+x myfile.tar.gz
  tar xzvf myfile.tar.gz
  rm myfile.tar.gz
  # Debug info
  echo \| Execution end: `date` \|

Checking the status of your submissions

The command edg-job-status <https> checks the status of the job. When we submit a job:


 [isabel@i2gui01 Fusion]$ edg-job-submit installFusion-cesga.jdl
 Selected Virtual Organisation name (from proxy certificate extension): ifusion
 Connecting to host i2grb01.ifca.es, port 7772
 Logging to host i2grb01.ifca.es, port 9002
 *******************************************************************************
                              JOB SUBMIT OUTCOME
  The job has been successfully submitted to the Network Server.
  Use edg-job-status command to check job current status. Your job
  identifier (edg_jobId) is:
   - https://i2grb01.ifca.es:9000/1k_qksI5SCyVvW-c3UcK2A
 *******************************************************************************


We check the status typing:

 [isabel@i2gui01 Fusion]$ edg-job-status https://i2grb01.ifca.es:9000/1k_qksI5SCyVvW-c3UcK2A
 *************************************************************
 BOOKKEEPING INFORMATION:
 Status info for the Job : https://i2grb01.ifca.es:9000/1k_qksI5SCyVvW-c3UcK2A
 Current Status:     Scheduled
 Status Reason:      Job successfully submitted to Globus
 Destination:        ce.i2g.cesga.es:2119/jobmanager-lcgpbs-ifusiongrid
 reached on:         Wed Dec 20 16:11:25 2006
 *************************************************************


Controlling the status of many jobs may become cumbersome. The is a tool in the edg command which helps managing a large number of jobs. The -o option appends on a file the https link describing the Job.

For example if we submit two jobs:

 -bash-2.05b$ edg-job-submit -o jid well.jdl
 Selected Virtual Organisation name (from proxy certificate extension): ifusion
 Connecting to host i2g-rb01.lip.pt, port 7772
 Logging to host i2g-rb01.lip.pt, port 9002
 ============================ edg-job-submit Success ============================
 The job has been successfully submitted to the Network Server.
 Use edg-job-status command to check job current status. Your job identifier (edg_jobId) is:
 - https://i2g-rb01.lip.pt:9000/mGbOWrPmX-v6haZsX4rEXg
 The edg_jobId has been saved in the following file:
 /home/csys/goncalo/i2g-rb01-tests/simple_jobs/jid
 ================================================================================

and a second job

 -bash-2.05b$ edg-job-submit -o jid well.jdl
 Selected Virtual Organisation name (from proxy certificate extension): ifusion
 Connecting to host i2g-rb01.lip.pt, port 7772
 Logging to host i2g-rb01.lip.pt, port 9002
 ============================ edg-job-submit Success ============================
 The job has been successfully submitted to the Network Server.
 Use edg-job-status command to check job current status. Your job identifier (edg_jobId) is:
 - https://i2g-rb01.lip.pt:9000/W7AGjCjKZPLcIHv1nsLPeg
 The edg_jobId has been saved in the following file:
 /home/csys/goncalo/i2g-rb01-tests/simple_jobs/jid
 ================================================================================


You can check the status of your Job using the command edg-job-status -i fileID with the flag

 -bash-2.05b$ edg-job-status -i fileID
 ------------------------------------------------------------------
 1 : https://i2g-rb01.lip.pt:9000/mGbOWrPmX-v6haZsX4rEXg
 2 : https://i2g-rb01.lip.pt:9000/W7AGjCjKZPLcIHv1nsLPeg
 a : all
 q : quit
 ------------------------------------------------------------------
 Choose one or more edg_jobId(s) in the list - [1-5]all:a

Retrieve your Output

The files you specified in the output Sandbox of the job can be retrieved by the command

 edg-job-get-output <https>

The rest of the output has to be writen onto Storage Elements, and have to be retrieve using lcg-commands.

Herramientas personales
Grid Administration
Users Support