1 / 27

UNIVERSITA’ DEGLI STUDI DI ROMA “La Sapienza” Facoltà di Scienze Matematiche, Fisiche e Naturali

UNIVERSITA’ DEGLI STUDI DI ROMA “La Sapienza” Facoltà di Scienze Matematiche, Fisiche e Naturali Corso di Laurea Specialistica in Informatica Formal Verification of Parallel Computing : ISP – In-Situ Model Checker. Relatore Prof. Enrico Tronci Prof. Ganesh Gopalakrishnan. Candidato

caron
Télécharger la présentation

UNIVERSITA’ DEGLI STUDI DI ROMA “La Sapienza” Facoltà di Scienze Matematiche, Fisiche e Naturali

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UNIVERSITA’ DEGLI STUDI DI ROMA “La Sapienza” Facoltà di Scienze Matematiche, Fisiche e Naturali Corso di Laurea Specialistica in Informatica FormalVerificationofParallelComputing: ISP –In-SituModelChecker Relatore Prof. Enrico Tronci Prof. GaneshGopalakrishnan Candidato Simone Atzeni Anno Accademico 2008/2009

  2. Introduzione • ISP –In-SituModelChecker • Gestione delle MPI Collective Routine • Conclusioni

  3. Introduzione • Introduzione • ISP –In-SituModelChecker • Gestione delle MPI Collective Routine • Conclusioni

  4. Introduzione Introduzione MPI –MessagePassing Interface • standard de-facto per programmi paralleli • impiego su cluster, supercomputer, etc. • API per C/C++/Fortran • semantica complessa delle funzioni ModelChecking • verifica di sistemi concorrenti a stati finiti • riduzione dello spazio degli stati • deadlock • assertionviolation • resource leak 1/18

  5. [ISP –In-SituModelChecker] • Introduzione • ISP –In-SituModelChecker • Gestione delle MPI Collective Routine • Conclusioni

  6. [ISP –In-SituModelChecker] ISP - In-SituModelChecker - • Verifica di programmi MPI Two-SidedCommunication • Cattura 45 chiamate MPI differenti Individua deadlock, resource leak, assertion violation Esploratutti e solo gliinterleavings rilevanti 2/18

  7. [ISP –In-SituModelChecker] ISP - In-SituModelChecker - • Verifica di programmi MPI Two-SidedCommunication • Cattura 45 chiamate MPI differenti Individua deadlock, resource leak, assertion violation Esploratutti e solo gliinterleavings rilevanti 2/18

  8. [ISP –In-SituModelChecker] ISP - In-SituModelChecker - • Verifica di programmi MPI Two-SidedCommunication • Cattura 45 chiamate MPI differenti Individua deadlock, resource leak, assertion violation Esploratutti e solo gliinterleavings rilevanti 2/18

  9. [ISP –In-SituModelChecker] POE - PartialOrderreductionavoiding Elusive interleavings - Programmi MPI Due passi di verifica 1° Passo - Profiler • intercetta le MPI_f fino al raggiungimento di una FENCE per ogni processo Fence Una fenceè una funzione MPI bloccante, deve essere quindi completata prima che lo stesso processo effettui una qualsiasi altra chiamata MPI. Esempi di fence sono MPI_Barrier, MPI_Wait, MPI_Recv, ecc.. 2° Passo - Scheduler • esegue l’algoritmo POE - se trova un match-set per ogni MPI_fintercettata riprende dal passo 1 - altrimenti termina l’esecuzione e segnala il DEADLOCK 3/18

  10. [ISP –In-SituModelChecker] POE at work sendNext Process0 Process1 Process2 Scheduler NO FENCE Isend(1,req) Isend(1,req) Irecv(*,req) Barrier Barrier FENCE Isend(1,req) Barrier Barrier Wait(req) Recv(2) Wait(req) Wait(req) MPI Runtime 4/18

  11. [ISP –In-SituModelChecker] POE at work sendNext Process0 Process1 Process2 Scheduler Isend(1,req) Isend(1,req) Irecv(*,req) Barrier Barrier Barrier Barrier Isend(1,req) NO FENCE Irecv(*,req) Barrier FENCE Wait(req) Recv(2) Wait(req) Wait(req) MPI Runtime 5/18

  12. [ISP –In-SituModelChecker] POE at work Process0 Process1 Process2 Scheduler Isend(1,req) Isend(1,req) Irecv(*,req) Barrier Barrier Barrier Barrier Isend(1,req) Irecv(*,req) Barrier Wait(req) Recv(2) Wait(req) Barrier Wait(req) FENCE MPI Runtime 6/18

  13. [ISP –In-SituModelChecker] POE at work MATCH-SET Process0 Process1 Process2 Scheduler Isend(1,req) Isend(1,req) Irecv(*,req) Barrier Barrier Barrier Barrier Isend(1,req) Irecv(*,req) Barrier Wait(req) Recv(2) Wait(req) Barrier Wait(req) MPI Runtime 7/18

  14. [ISP –In-SituModelChecker] POE at work sendNext Process0 Process1 Process2 Scheduler Isend(1,req) Isend(1,req) Irecv(*,req) Barrier Barrier Wait(req) FENCE Barrier Barrier Isend(1,req) Irecv(*,req) Barrier Wait(req) Recv(2) Wait(req) Recv(2) FENCE Barrier Wait(req) NO FENCE Isend(1,req) FENCE Wait(req) MPI Runtime 8/18

  15. [ISP –In-SituModelChecker] POE at work MATCH-SET Process0 Process1 Process2 Scheduler Isend(1,req) Isend(1,req) Irecv(*,req) Barrier Barrier Wait(req) Barrier Barrier Isend(1,req) Irecv(*,req) Barrier Wait(req) Recv(2) Wait(req) NO MATCH-SET Recv(2) Barrier DEADLOCK Wait(req) Isend(1,req) Wait(req) MPI Runtime 9/18

  16. Gestione delle MPI Collective Routine • Introduzione • ISP –In-SituModelChecker • Gestione delle MPI Collective Routine • Conclusioni

  17. Gestione delle MPI Collective Routine • MPI Bcast • MPI Reduce • MPI Scatter • MPI Gather • MPI Barrier CollectiveRoutinesBehavior Una CollectiveCommunicationè una comunicazione che coinvolge tutti i processi in un comunicatore. L’MPI Standard definisce le Collective Routine come funzioni bloccanti. • Risultati sperimentali • MPI Forum MPI Bcast e MPI Reduce, sono bloccanti solo per il processo root. 10/18

  18. Gestione delle MPI Collective Routine • ISP gestisce ogni Collective Routine come se fosse bloccante per ogni processo CollectiveRoutinesBehavior Problema Non rileva alcuni DEADLOCK nei programmi che utilizzano MPI Bcast e MPI Reduce intMPI_Bcast(void*message, … , introot, …); intMPI_Reduce(void*message, … , introot, …, MPI_Opoperator, …); Modifica dell’algoritmo POE MPI_f è bloccante • process ID == root • process ID <> root MPI_f è non-bloccante 11/18

  19. Gestione delle MPI Collective Routine Esempio P0: MPI_Recv(DATA1, from *, ...); MPI_Reduce(..., ROOT = 0, ...); MPI_Recv(DATA2, from *, ...); printf(..., DATA1, DATA2); P1: MPI_Send(DATA1 = 10, ..., to P0, ...); MPI_Reduce(..., ROOT = 0, ...); P2: MPI_Reduce(..., ROOT = 0, ...); MPI_Send(DATA2 = 20, ..., to P0, ...); Librerie MPI Tre possibiliINTERLEAVING • Il programma termina correttamente stampando 10 – 20 • Il programma termina correttamente stampando 20 - 10 • Il programma non termina a causa di un DEADLOCK 12/18

  20. Gestione delle MPI Collective Routine Prima della Modifica - ISP gestisce la Reduce come chiamata BLOCCANTE - ISP genera un solo INTERLEAVING • Fence1: match tra la prima Receivedel Processo 0 e la Senddel Processo 1. • Fence2: match tra le Reduce dei tre processi. • Fence3: match tra la seconda Receivedel Processo 0 e la Senddel Processo 2. Il programma termina correttamente e stampa 10 - 20 13/18

  21. Gestione delle MPI Collective Routine Dopo la Modifica - ISP gestisce la Reduce come chiamata nonBLOCCANTE - 1° INTERLEAVING Esplora i 3 possibili interleaving del programma ROOT • Fence1: match tra la prima Receivedel Processo 0 e la Senddel Processo 1. • Fence2: match tra le Reduce dei tre processi. • Fence3: match tra la seconda Receivedel Processo 0 e la Senddel Processo 2. Il programma termina correttamente e stampa 10 - 20 14/18

  22. Gestione delle MPI Collective Routine Dopo la Modifica - ISP gestisce la Reduce come chiamata nonBLOCCANTE - 2° INTERLEAVING ROOT • Fence1: match tra la prima Receivedel Processo 0 e la Senddel Processo 2. • Fence2: match tra le Reduce dei tre processi. • Fence3: match tra la seconda Receivedel Processo 0 e la Senddel Processo 1. Il programma termina correttamente e stampa 20 - 10 15/18

  23. Gestione delle MPI Collective Routine Dopo la Modifica - ISP gestisce la Reduce come chiamata nonBLOCCANTE - 3° INTERLEAVING ROOT • Fence1: match tra la prima Receivedel Processo 0 e la Senddel Processo 2. • Fence2: il Processo 2 termina, il Processo 0 è bloccato in attesa di un match con gli altri processi per la Reduce, il Processo 1 è bloccato in attesa di un match per la sua Send. Il programma non termina e ISP segnala il DEADLOCK 16/18

  24. Introduzione • ISP –In-SituModelChecker • Gestione delle MPI Collective Routine • Conclusioni

  25. Conclusioni Sviluppi Futuri • Estendere il numero di chiamate MPI gestite • Sviluppo di ISP Plug-in • (Visual Studio e Eclipse) • Verifica di programmi caratterizzati da un paradigma di comunicazione One-Sided 17/18

  26. Conclusioni Conclusioni ISP rappresenta una realizzazione pratica dell’obiettivo della Verifica Formale nel contesto del calcolo parallelo • Garantisce Completezza (non tralascia • interleaving rilevanti) Garantisce Portabilità (Mac OS, Linux, Windows) • Garantisce Correttezza (no falsi positivi) 18/18

  27. UNIVERSITA’ DEGLI STUDI DI ROMA “La Sapienza” Facoltà di Scienze Matematiche, Fisiche e Naturali Corso di Laurea Specialistica in Informatica FormalVerificationofParallelComputing: ISP –In-SituModelChecker GRAZIE Anno Accademico 2008/2009

More Related