protocol based verification of message passing parallel
play

Protocol-based Verification of Message-passing Parallel Programs - PowerPoint PPT Presentation

t i f a r c A t * C o m * p l * t e n t e A e t * A s i W s E n L e o l C l S C D P * o * c O e s u u m E O e R e n v o t t d e * y s * a a E d l u e a t Protocol-based


  1. t i f a r c A t * C o m * p l * t e n t e A e t * A s i W s E n L e o l C l S C D P * o * c O e s u u m E O e R e n v o t t d e * y s * a a E d l u e a t Protocol-based Verification of Message-passing Parallel Programs Hugo A. L´ opez, Eduardo R. B. Marques, Francisco Martins, C´ esar Santos, Vasco T. Vasconcelos Nicholas Ng, Nobuko Yoshida University of Lisbon Imperial College London Technical University of Denmark Advances in Programming Languages and Systems Frankfurt, December 16, 2015 t i f a r c A t C o m * * * p l e n t t e e A t * A s s i W E n L e C o l l S C D P * o c * O e u u s m E e O R e o t n v t d e * y s a E * a d l u e t a

  2. Motivation The types The programs Deductive verification of C+MPI code Evaluation Conclusion Motivation Protocol-based Verification of Message-passing Parallel Programs Vasco T. Vasconcelos

  3. Motivation The types The programs Deductive verification of C+MPI code Evaluation Conclusion High-performance parallel computing • Getting parallel programs right is not easy • Testing is expensive • We can speedup development, producing safer and cheaper solutions Protocol-based Verification of Message-passing Parallel Programs Vasco T. Vasconcelos

  4. Motivation The types The programs Deductive verification of C+MPI code Evaluation Conclusion Finite differences algorithm Input data at rank 0 (0) Scatter data for each participant (2) (0) (1) Each participant computes its finite differences Send/recv boundary values to determine convergence (2) (1) (0) (2) (0) Perform global reduction (AllReduce) to compute the max error; Loop if convergence criterion not met, up until to MAX_ITER Gather the solution data at rank 0, if there was convergence. (0) Protocol-based Verification of Message-passing Parallel Programs Vasco T. Vasconcelos

  5. Motivation The types The programs Deductive verification of C+MPI code Evaluation Conclusion Is this program communication safe? Deadlock free? MPI Init (&argc ,& argv ) ; . . . for ( i t e r = 1; i ≤ NUM ITER ; i t e r ++) { i f ( rank == 0) { MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ n/ s i z e +1] ,1 ,MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ 0 ] , 1 , MPI FLOAT , l e f t , . . . ) ; } e l s e i f ( rank == s i z e − 1) { MPI Recv(& l o c a l [ n/ s i z e +1] ,2 ,MPI FLOAT , r i g h t , . . . ) ; MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Recv(& l o c a l [ 0 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; } e l s e { MPI Recv(& l o c a l [ 0 ] , 1 , MPI INT , l e f t , . . . ) ; MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ n/ s i z e +1] ,1 ,MPI FLOAT , r i g h t , . . . ) ; } } . . . MPI Finalize () ; Protocol-based Verification of Message-passing Parallel Programs Vasco T. Vasconcelos

  6. Motivation The types The programs Deductive verification of C+MPI code Evaluation Conclusion Array length mismatch MPI Init (&argc ,& argv ) ; . . . for ( i t e r = 1; i ≤ NUM ITER ; i t e r ++) { i f ( rank == 0) { MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ n/ s i z e +1] ,1 ,MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ 0 ] , 1 , MPI FLOAT , l e f t , . . . ) ; } e l s e i f ( rank == s i z e − 1) { MPI Recv(& l o c a l [ n/ s i z e +1] ,2 ,MPI FLOAT , r i g h t , . . . ) ; MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Recv(& l o c a l [ 0 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; } e l s e { MPI Recv(& l o c a l [ 0 ] , 1 , MPI INT , l e f t , . . . ) ; MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ n/ s i z e +1] ,1 ,MPI FLOAT , r i g h t , . . . ) ; } } . . . MPI Finalize () ; Protocol-based Verification of Message-passing Parallel Programs Vasco T. Vasconcelos

  7. Motivation The types The programs Deductive verification of C+MPI code Evaluation Conclusion Type mismatch MPI Init (&argc ,& argv ) ; . . . for ( i t e r = 1; i ≤ NUM ITER ; i t e r ++) { i f ( rank == 0) { MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ n/ s i z e +1] ,1 ,MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ 0 ] , 1 , MPI FLOAT , l e f t , . . . ) ; } e l s e i f ( rank == s i z e − 1) { MPI Recv(& l o c a l [ n/ s i z e +1] ,2 ,MPI FLOAT , r i g h t , . . . ) ; MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Recv(& l o c a l [ 0 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; } e l s e { MPI Recv(& l o c a l [ 0 ] , 1 , MPI INT , l e f t , . . . ) ; MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ n/ s i z e +1] ,1 ,MPI FLOAT , r i g h t , . . . ) ; } } . . . MPI Finalize () ; Protocol-based Verification of Message-passing Parallel Programs Vasco T. Vasconcelos

  8. Motivation The types The programs Deductive verification of C+MPI code Evaluation Conclusion Deadlock: wrong send/receive order MPI Init (&argc ,& argv ) ; . . . for ( i t e r = 1; i ≤ NUM ITER ; i t e r ++) { i f ( rank == 0) { MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ n/ s i z e +1] ,1 ,MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ 0 ] , 1 , MPI FLOAT , l e f t , . . . ) ; } e l s e i f ( rank == s i z e − 1) { MPI Recv(& l o c a l [ n/ s i z e +1] ,2 ,MPI FLOAT , r i g h t , . . . ) ; MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Recv(& l o c a l [ 0 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; } e l s e { MPI Recv(& l o c a l [ 0 ] , 1 , MPI INT , l e f t , . . . ) ; MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ n/ s i z e +1] ,1 ,MPI FLOAT , r i g h t , . . . ) ; } } . . . MPI Finalize () ; Protocol-based Verification of Message-passing Parallel Programs Vasco T. Vasconcelos

  9. Motivation The types The programs Deductive verification of C+MPI code Evaluation Conclusion Deadlock: a send operation is missing MPI Init (&argc ,& argv ) ; . . . for ( i t e r = 1; i ≤ NUM ITER ; i t e r ++) { i f ( rank == 0) { MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ n/ s i z e +1] ,1 ,MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ 0 ] , 1 , MPI FLOAT , l e f t , . . . ) ; } e l s e i f ( rank == s i z e − 1) { MPI Recv(& l o c a l [ n/ s i z e +1] ,2 ,MPI FLOAT , r i g h t , . . . ) ; MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Recv(& l o c a l [ 0 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; } e l s e { MPI Recv(& l o c a l [ 0 ] , 1 , MPI INT , l e f t , . . . ) ; MPI Send(& l o c a l [ 1 ] , 1 , MPI FLOAT , l e f t , . . . ) ; MPI Send(& l o c a l [ n/ s i z e ] , 1 , MPI FLOAT , r i g h t , . . . ) ; MPI Recv(& l o c a l [ n/ s i z e +1] ,1 ,MPI FLOAT , r i g h t , . . . ) ; } } . . . MPI Finalize () ; Protocol-based Verification of Message-passing Parallel Programs Vasco T. Vasconcelos

  10. Motivation The types The programs Deductive verification of C+MPI code Evaluation Conclusion State-of-the-art tools • Model checking and symbolic execution (e.g., TASS, CIVL) • Search space grows exponentially with the number of processes • Verification of real-world applications limits the number of processes to less than a dozen • Runtime verification (e.g., ISP, MUST) • Cannot guarantee the absence of faults • Difficulty in producing meaningful test suites • Time to run the test suite • Tests need to be run on hardware similar to that of the production environment Protocol-based Verification of Message-passing Parallel Programs Vasco T. Vasconcelos

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