ngs computation services: apis and parallel jobs

12
http://www.ngs.ac.uk http://www.grid- support.ac.uk http://www.eu- egee.org/ http:// www.pparc.ac.uk/ http:// www.nesc.ac.uk/ NGS computation services: APIs and Parallel Jobs Richard Hopkins [email protected] NGS Induction – Rutherford Appleton Laboratory, 2 nd / 3 rd November 2005

Upload: august-hendrix

Post on 31-Dec-2015

29 views

Category:

Documents


0 download

DESCRIPTION

NGS computation services: APIs and Parallel Jobs. Richard Hopkins [email protected] NGS Induction – Rutherford Appleton Laboratory, 2 nd / 3 rd November 2005. Overview. The C and Java API’s to the low-level tools Using multiple processors. Job submission so far. Command-line interfaces. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: NGS computation services: APIs and Parallel Jobs

http://www.ngs.ac.ukhttp://www.grid-support.ac.uk

http://www.eu-egee.org/http://www.pparc.ac.uk/http://www.nesc.ac.uk/

NGS computation services: APIs and Parallel Jobs

Richard [email protected]

NGS Induction – Rutherford Appleton Laboratory, 2nd / 3rd November 2005

Page 2: NGS computation services: APIs and Parallel Jobs

NGS Induction, RAL 2nd/3rd Nov 2005 – Computation Services – Richard Hopkins

3

Overview

• The C and Java API’s to the low-level tools• Using multiple processors

Page 3: NGS computation services: APIs and Parallel Jobs

NGS Induction, RAL 2nd/3rd Nov 2005 – Computation Services – Richard Hopkins

4

Job submission so far

GLOBUS, etc.

Command-line interfaces

User’s Interface to the grid

GLOBUS, etc.

Page 4: NGS computation services: APIs and Parallel Jobs

NGS Induction, RAL 2nd/3rd Nov 2005 – Computation Services – Richard Hopkins

5

Application-specific tools

GLOBUS, etc.

Command-line interfaces

Application Specificand / orHigher generic tools

e.g. BRIDGES

User’s Interface to the grid

Page 5: NGS computation services: APIs and Parallel Jobs

NGS Induction, RAL 2nd/3rd Nov 2005 – Computation Services – Richard Hopkins

6

GLOBUS, etc.

Application-specific tools

Command-line interfaces

User’s Interface to the grid

API’s:

•Java

•C

•…Application Specificand / orHigher generic tools

e.g. BRIDGES

Page 6: NGS computation services: APIs and Parallel Jobs

NGS Induction, RAL 2nd/3rd Nov 2005 – Computation Services – Richard Hopkins

7

Available API’s

• C http://www.globus.org/developer/api-reference.html

• “Community Grid” CoG http://www.cogkit.org/– Java, Python, Matlab

– (very limited functionality on Windows – no GSI)

Page 7: NGS computation services: APIs and Parallel Jobs

NGS Induction, RAL 2nd/3rd Nov 2005 – Computation Services – Richard Hopkins

8

Non-communicating

Processes

UI

Internet

Head processors of clusters

Worker processors of clusters

Globus_job_submit

Processes run without any communication between them

Page 8: NGS computation services: APIs and Parallel Jobs

NGS Induction, RAL 2nd/3rd Nov 2005 – Computation Services – Richard Hopkins

9

Communicating Processes

UI

Internet

Head processors of clusters

Worker processors of clusters

Globus_job_submit

Processes send messages to each other – Must run on same cluster

Page 9: NGS computation services: APIs and Parallel Jobs

NGS Induction, RAL 2nd/3rd Nov 2005 – Computation Services – Richard Hopkins

10

Communicating Processes

UI

Internet

Head processors of clusters

Worker processors of clusters

MPI

Processes send messages to each other – Must run on same cluster

Page 10: NGS computation services: APIs and Parallel Jobs

NGS Induction, RAL 2nd/3rd Nov 2005 – Computation Services – Richard Hopkins

11

Modes of Parallelism

– Communicating processes: on NGS, you run one globus-job-submit command – but need to code and build program so it is parallelised - MPI

– Communicating processes: on NGS, multiple executables run from a script on the UI

The NGS nodes open these routes to you – but you have to do a bit of work! (Grid is not magic!...)

Page 11: NGS computation services: APIs and Parallel Jobs

NGS Induction, RAL 2nd/3rd Nov 2005 – Computation Services – Richard Hopkins

12

MPI notes• How could the task be split into sub-tasks?

– By functions that could run in parallel??!– By sending different subsets of data to different processes?

More usual ! Overheads of scatter and gather• Need to design and code carefully: be alert to

– sequential parts of your program (if half your runtime is sequential, speedup will never be more than 2)

– how load can be balanced (64 processes with 65 tasks will achieve no speedup over 33 processes)

– Deadlock! • MPI functions are usually invoked from C, Fortran programs,

but also Java• Several example patterns are given in the practical.

Many MPI tutorials are on the Web!

Page 12: NGS computation services: APIs and Parallel Jobs

NGS Induction, RAL 2nd/3rd Nov 2005 – Computation Services – Richard Hopkins

13

Practical

1. C API Example

2. Java API usage

3. Concurrent processing

4. MPI example

• Follow link from http://homepages.nesc.ac.uk/~gcw/NGS/