P-GRADE Portal tutorial (hands-on)
Application Developer Training Day IV.
Ankara, Turkey, 26. October 2007

 



 

 

The P-GRADE Grid Portal is a 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. Exercises of this tutorial use the TR-GRID P-GRADE Portal connected both to the SEE-GRID and the TR-GRID infrastructure

The tutorial covers the following P-GRADE Portal features:

  • Managing user certificates
  • Importing workflows
  • Developing, executing and monitoring workflows

For a detailed overview of all the capabilities of the P-GRADE Portal please visit its official homepage.

Login to the TR-GRID P-GRADE Portal

  1. Open the URL: http://portal.grid.org.tr:8080/gridsphere/gridsphere



Login name: egitimXY
Password: _________

 

I.       Practice – Use an existing workflow

1.           Import a workflow

In this exercise you will download and then import an example workflow into your TR-GRID 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.

  1. The workflow file is accessible from here.

 

  1. Save the file to your computer.

 

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

 

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

 

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

 

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

 

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

 

  1. Save the workflow ("Save" or "Save as" in the "Workflow" menu)

2.           Download a short-term proxy credential into the Portal

Note: The tutors already uploaded a proxy certificate into the TR-GRID MyProxy server prior to the course. You are going to download this proxy. Normally users do the upload process right after they get their P-GRADE Portal account. (Proxy upload is necessary only once, when you first use the portal.)

  1. Open on the "Certificates" tab

 

  1. Click on the "Download" button

 

  1. Submit the download form with the following values:
    • Hostname: myproxy.ulakbim.gov.tr
    • Port: 7512
    • Login: egitimXY
    • Password: ________
    • Lifetime: 10
    • Description: optional

 

  1. If download is successful then set your proxy for the " sgdemo_GLITE_BROKER " Grid

3.           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

 

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

 

  1. Monitor the progress of the workflow from the Workflow Editor and using the "Workflow portlet" (Click on "Details" then on "Visualize")

II.     Practice – Define and use a new single job workflow

1.           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. The matrix_operations executable can be found here and two input files can be found here and 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 matrix_operations file)
    • Attributes: M V
    • Grid: sgdemo_GLITE_BROKER

 

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

 

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

 

  1. 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

 

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

 

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

 

  1. After the workflow reached finished state download and unzip its result file.

III.  Practice – Define and use a new multi-job workflow

1.           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)

It sounds quite complicated but it is not!

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.


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

 

Let’s reuse the “Multiply” workflow created before.

Create the missing four jobs in the workflow according to the requirements defined below and at the end save the workflow as “Matrix_workflow”.

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)


The complete workflow is also stored on your computer here.
Do not forget to reallocate the jobs to the "sgdemo_GLITE_BROKER" Grid after importing the workflow!