Presentation on theme: "NGS computation services: API's,"— Presentation transcript:
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: API's, concurrent and parallel jobs Mike Mineter firstname.lastname@example.org
2 Policy for re-use This presentation can be re-used for academic purposes. However if you do so then please let us know. We need to gather statistics of re-use: no. of events, number of people trained. –If you use a significant part of the course, send: mailto:email@example.com?subject=NGSI_course –If just this module: please mailto:firstname.lastname@example.org?subject=NGSI_API –THANK YOU!!!!
3 Overview 3 distinct techniques will be in the practical: APIs to the low-level tools Using multiple processors –Concurrent processing - for many jobs –Parallel processing – to speed execution of one job
5 Job submission so far GLOBUS, etc. Command-line interfaces Portal Browser Users Interface to the grid GLOBUS, etc.
6 Application-specific tools GLOBUS, etc. Command-line interfaces Portal Browser Application Specific and / or Higher generic tools Portal Browser Users Interface to the grid
7 GLOBUS, etc. Application Specific and / or Higher generic tools Application-specific tools Command-line interfaces Portal Browser Users Interface to the grid APIs: Java C …
8 Available APIs Community Grid CoG http://www.cogkit.org/http://www.cogkit.org/ –Java, Python, Matlab –(very limited functionality on Windows – no GSI) C http://www.globus.org/developer/api- reference.htmlhttp://www.globus.org/developer/api- reference.html –Example in the practical
10 High performance computing If run-times are too long, you can –Optimise, re-code –Use HPC Parallel processing: multiple processors cooperate on one task – you run one executable; its distributed for you Concurrent processing: multiple processors, multiple tasks – multiple executables distributed and run by a script you write High-throughput computing: multiple processors, multiple tasks using spare CPU cycles - CPU years in elapsed days. E.g. sensitivity analyses in modelling. Condor, for example.
11 High performance computing HPC –Parallel processing: on NGS, you run one globus-job- submit command – but need to code and build program so it is parallelised –Concurrent processing: on NGS, multiple executables run from a script on the UI –High-throughput computing: Many independent runs using spare CPU cycles - CPU years in days. NGS core nodes open these routes to you – but you have to do a bit of work! (Grid is not magic!...) Watch for addition of Condor pools on the NGS!!!!
12 Concurrent processing UI Internet Head processors of clusters Worker processors of clusters Globus_job_submit via PBS Processes run independently
13 Concurrent processing An approach: –Script 1: to submit multiple jobs and gather their URIs from globus-job-submit –Script 2: to test for completion and gather results –In the practical, the jobs are short, so these scripts are integrated
14 Parallel Processing In early 1990s parallel processing had some similarities to current state of grid computing – if on a smaller scale –National resources begun to be available –Standards were needed –Lot of hype –Early adopters in physics –Inadequate integration with the desktop And from the jungle of conflicting approaches emerged… MPI: Message Passing Interface http://www-unix.mcs.anl.gov/mpi/mpich/ http://www-unix.mcs.anl.gov/mpi/mpich/
15 Parallel processing UI Internet Head processors of clusters Worker processors of clusters Globus_job_submit
16 Parallel processing UI Internet Head processors of clusters Worker processors of clusters MPI
17 Parallel processing UI Internet Head processors of clusters Worker processors of clusters MPI Processes communicate, synchronise (the simpler the better!)
18 MPI concepts Each processor is assigned an ID [0,P-1] for P processors –Used to send/recv messages and to determine processing to be done Usually code so that processor 0 has coordinating role: –Reading input files, Broadcasting data to all other processors –Receiving results Point-to-point Messages are used to exchange data –Either blocking (wait until both processors are ready to send/receive) –Or non-blocking: start the send/recv, continue, check for send/recv completion Collective functions –Broadcast: sends data to all processors –Scatter: sends array elements to different processors –Gather: collects different array elements from different processors –Reduce: collects data and performs operation as dta are received Can group processors for specific purposes (e.g. functional parallelism)
19 MPI notes How does the task split into sub-tasks? –By functions that can 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!
20 Summary Can build user applications and higher level tools on GT2 via APIs NGS core nodes support –concurrent processing (if you do a bit of scripting / coding) –MPI for parallelism (if you parallelise your code) Remember –the CSAR, HPCx services! –NGS is batch oriented at present.
21 Practical http://homepages.nesc.ac.uk/~gcw/NGS/GRAM _II.htmlhttp://homepages.nesc.ac.uk/~gcw/NGS/GRAM _II.html (That II is letters not numbers on the end!)