task farming for embarrassingly parallel processing
play

Task Farming For Embarrassingly Parallel Processing Ivan Giro*o - PowerPoint PPT Presentation

Task Farming For Embarrassingly Parallel Processing Ivan Giro*o igiro*o@ictp.it Informa(on & Communica(on Technology Sec(on (ICTS) Interna(onal Centre for Theore(cal Physics (ICTP) Mul(-core system Vs Serial Programming Xeon E5650


  1. Task Farming For Embarrassingly Parallel Processing Ivan Giro*o – igiro*o@ictp.it Informa(on & Communica(on Technology Sec(on (ICTS) Interna(onal Centre for Theore(cal Physics (ICTP)

  2. Mul(-core system Vs Serial Programming Xeon E5650 hex-core processors (12GB - RAM) Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 2 igiroLo@ictp.it

  3. Mul(-core system Vs // Programming Xeon E5650 hex-core processors (12GB - RAM) Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 3 igiroLo@ictp.it

  4. NETWORK Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 4 igiroLo@ictp.it

  5. I don’t know about // Programming Deadline: 15/05!! Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 5 igiroLo@ictp.it

  6. ... but I’m lucky!! • I am working on an embarrassing parallel problem • I can divide the work in independent tasks (no communica(on) that can be performed in parallel • Quite common in Computer Graphics, Bioinforma(cs, Genomics, HEP, anything else requiring processing of large data-set, sampling, ensemble modeling Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 6 igiroLo@ictp.it

  7. Single Program on Mul(ple Data • performing the same program (set of instruc(ons) among different data • Same model adopted by the MPI library • A parallel tool is needed to handle the different processes working in parallel • The MPI library provides the mpirun applica(on to execute parallel instances of the same program Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 7 igiroLo@ictp.it

  8. $ mpirun -np 12 my_program.x mynode01 mynode02 Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 8 Ivan GiroLo igiroLo@ictp.it igiroLo@ictp.it

  9. [igirotto@mynode01 ~]$ mpirun -np 12 /bin/hostname mynode01 mynode02 mynode01 mynode02 mynode01 mynode02 mynode01 mynode02 mynode01 mynode02 mynode01 mynode02 Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 9 igiroLo@ictp.it

  10. Parallel Opera(ons in Prac(ce • Parallel reading and compu(ng in parallel is always allowed • Parallel wri(ng is extremely dangerous! • To control the parallel flow each process should be unique and iden(fiable (ID) • The OpenMPI implementa(on of the MPI library provides a series of environment variables defined for each MPI process Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 10 igiroLo@ictp.it

  11. OMPI_COMM_WORLD_SIZE - the number of processes in this process' MPI Comm_World OMPI_COMM_WORLD_RANK - the MPI rank of this process OMPI_COMM_WORLD_LOCAL_RANK - the rela(ve rank of this process on this node within its job. For example, if four processes in a job share a node, they will each be given a local rank ranging from 0 to 3. OMPI_UNIVERSE_SIZE - the number of process slots allocated to this job. Note that this may be different than the number of processes in the job. OMPI_COMM_WORLD_LOCAL_SIZE - the number of ranks from this job that are running on this node. OMPI_COMM_WORLD_NODE_RANK - the rela(ve rank of this process on this node looking across ALL jobs. hLp://www.open-mpi.org Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 11 igiroLo@ictp.it

  12. In Python import os myid = os.environ['OMPI_COMM_WORLD_RANK'] [...] In BASH #!/bin/bash myid=${OMPI_COMM_WORLD_RANK} [...] [igirotto@mynode01 ~]$ mpirun ./myprogram.[py/sh...] Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 12 igiroLo@ictp.it

  13. Possible Applica(ons • Execu(ng mul(ple instances on the same program with different inputs/ini(al cond. • Reading large binary files by splilng the workload among processes • Searching elements on large data-sets • Other parallel execu(on of embarrassingly parallel problem (no communica(on among tasks) Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 13 igiroLo@ictp.it

  14. Conclusions • Task Farming is a simple model to parallelize simple problems that can be divided in independent task • The mpirun applica(on aids to easily perform mul(ple processes, includes environment selng • Load balancing remains a main problem, but moving from serial to parallel processing can substan(ally speed-up (me of simula(on Ivan GiroLo Task Farming For Embarrassingly Parallel Processing 14 igiroLo@ictp.it

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend