P-GRADE Portal tutorial
Updated on 29/04/2008 for P-GRADE Portal 2.6+

Length: approx. 60-80 minutes


The P-GRADE Grid Portal is an open source workflow-oriented Grid portal that enables the development, execution and monitoring of workflows composed of sequential jobs, parallel jobs and application services. The P-GRADE Portal can be used to develop and execute workflow applications on Grid systems built with Globus, EGEE (LCG or gLite) and ARC middleware technologies. The aim of this tutorial is to demonstrate the EGEE capabilities of the P-GRADE Portal using the GILDA training infrastructure.

The tutorial covers the following P-GRADE Portal features:

  • Managing user certificates
  • Importing workflows
  • Developing, executing and monitoring workflows
  • Using Storage Elements
For a detailed overview of all the capabilities of the P-GRADE Portal please visit its official homepage.

Prerequisites of the tutorial:
  1. GILDA specific prerequisites. If you already have access to GILDA (e.g. you are a participant of an EGEE training course) then you can skip this part:
    • You must have user certificates for GILDA (userkey.pem and usercert.pem files) and you must be member of the GILDA VO. Instructions on how to obtain GILDA certificate and join GILDA VO can be found on the GILDA homepage.
  2. P-GRADE Portal specific prerequisites:
    • You must have a graphical Web browser with a Java 2 plug-in installed on your desktop computer.
    • Your GILDA certificate files (userkey.pem and usercert.pem) must be available on your desktop computer.
    • You must have a user account on the GILDA P-GRADE Portal. To request an account please follow the instructions on the login page of the GILDA P-GRADE Portal.

Login to the GILDA P-GRADE Portal
  1. Open the URL: http://portal.p-grade.hu/gilda


  2. Login with your GILDA P-GRADE Portal account
Upload your certificate files into the GILDA MyProxy server

This step is required only if you are using the portal for the first time. The certificate will remain in the MyProxy server until you revoke it.
  1. Open the "Certificates" tab


  2. Click on the "Upload" button


  3. With the "browse" button locate your userkey.pem file in the local file system and hit OK


  4. Specify the passphrase of your private key
  5. (This passphrase was chosen when you requested your GILDA certificate.)

  6. With the "browse" button locate your usercert.pem file in the local file system and hit OK


  7. Submit the upload form with the following values:
    • Hostname: myproxy.ct.infn.it
    • Port: 7512
    • Login: choose a unique user name
    • Password: choose a password (at least 6 character long)
    • Lifetime: 100
Import a workflow

In this excercise you will download and then import an example workflow into your GILDA P-GRADE Portal account. The workflow was created by the Centre of Parallel Computing at the University of Westminster. The workflow simulates the development of traffic on a city road network. The result of the workflow is a JPG file that graphically present the density of cars on the roads. Further information on the workflow can be found here.
  1. Download the archive file of the traffic simulation workflow onto your desktop computer. The archive file can be found here.


  2. Go back to the portal and click on the "Upload" submenu of the "Workflow" tab


  3. Select the previously downloaded archive file using the "Browse" button and click OK


  4. Click on the "Workflow manager" submenu of the "Workflow" tab


  5. Click on the "Workflow editor" button and open the previously imported workflow ("Open" item in the Workflow menu)


  6. Map the jobs of the workflow onto the "gilda_GLITE_BROKER" grid ("Workflow properties" item in the "Workflow" menu)


  7. Save the workflow ("Save" or "Save as" in the "Workflow" menu)
Download a short-term proxy credential into the Portal
  1. Open on the "Certificates" tab


  2. Click on the "Download" button


  3. Submit the download form with the following values:
    • Hostname: myproxy.ct.infn.it
    • Port: 7512
    • Login: The username you chose for certificate upload.
    • Password: The password you chose for certificate upload.
    • Lifetime: 10
    • Description: optional

  4. If download is successful then set your proxy for the "gilda_GLITE_BROKER" Grid
Execute and monitor the Traffic simulation workflow
  1. Go back to the Web interface of the portal and click on the "Refresh" button on the "Workflow" tab


  2. Click on the "Submit" button of the workflow


  3. Monitor the progress of the workflow from the Workflow Editor and using the "Workflow portlet" (Click on "Details" then on "Visualize")
Define a new workflow: Matrix multiplication

Note: The "Matrix operations" batch program will be used as the jobs of the workflow. Please read the description of this program here, and download the program with two sample input matrixes onto your desktop computer from here.
  1. Open a new workflow (Workflow menu in the Editor) and define a new job with the following parameters:
    • Name: Multiplication
    • Job type: SEQ
    • Job executable: local path of the previously downloaded matrix_operations file
    • Attributes: M V
    • Grid: gilda_GLITE_BROKER


  2. Define a port for the job with the following parameters:
    • Port Name: 0
    • Type: In
    • File type: Local
    • File: local path of the previously downloaded INPUT1 file
    • Internal File Name (case sensitive): INPUT1


  3. Define a second port to the job with the following parameters
    • Port Name: 1
    • Type: In
    • File type: Local
    • File: local path of the previously downloaded INPUT2 file
    • Internal File Name (case sensitive): INPUT2


  4. Define a third port to the job with the following parameters:
    • Port Name: 2
    • Type: Out
    • File type: Local
    • Internal File Name (case sensitive): OUTPUT
    • File storage type: Permanent


  5. Save your workflow as Multiply, go back to the browser, click "Refresh" then "Submit" on the "Workflow manager" panel.


  6. Monitor the execution from the workflow editor and from the browser


  7. After the workflow reached fininshed state download and unzip its result file.
Save the multiplication into a Grid file
  1. Save the Multiply workflow as Multiply_remoteout ("Save as" in the "Workflow" menu)


  2. Modify port 2 to a remote file:
    • Double click on port 2
    • Set the "File type" parameter to Remote
    • Set the "File" field to lfn:/grid/gilda/your_own_subdirectory
      (E.g. lfn:/grid/gilda/your_family_name)

  3. Save your workflow.


  4. Submit your workflow and monitor its execution from the workflow editor and from the browser.


  5. Please note that after the execution there is no result file to download!.


  6. Check the existence of the result Grid file from the File Management portlet:

    • Open the File Management portlet
    • Set Select Grid listbox to gilda, then click on View in the same line
    • Set Select VO listbox to gilda, then click on View in the same line
    • Select lfc-gilda.ct.infn.it LFC host and click on List

    Be patient and then navigate into /grid/gilda/your_own_subdirectory using the �File Browser� and the �Change Directory� buttons.
    Download the matrix_output file to your desktop and check its content. It should be the same as earlier when local output file were used.

Define a matrix operations workflow

In this exercise you should define a workflow which computes the following expression: AB[*, 0]T * AB[*, 1]
(A and B represent the previously downloaded INPUT1 and INPUT2 matrixes)

Hint: The "Matrix operations" program reads and produces files in the same format. Add the matrix_operation program 4 times to the Multiply workflow as it is shown in the figure below.


The jobs should compute the following operations:
  • Multip: A*B   (command line parameter: M)
  • Column0: A*B[*, 0]   (command line parameters: C 0)
  • Column1: A*B[*, 1]   (command line parameters: C 1)
  • Transpose: A*B[*, 0]T   (command line parameter: T)
  • Multip.2: A*B[*, 0]T * A*B[*, 1]   (command line parameter: M)


Figure 1: Matrix workflow to compute AB[*, 0]T * AB[*, 1]

The complete workflow can be downloaded from here.
Do not forget to reallocate the jobs to the "gilda_GLITE_broker" Grid after importing the workflow!