o n the f ly s ynchronization c hecking for i nteractive
play

O n - the -F ly S ynchronization C hecking for I nteractive P - PowerPoint PPT Presentation

O n - the -F ly S ynchronization C hecking for I nteractive P rogramming in X calable MP T atsuya A be and M itsuhisa S ato P2S212 S eptember 10, 2012 Outline 1. What is XcalableMP? 2. Verification of XcalableMP programs 3. Implementation of


  1. O n - the -F ly S ynchronization C hecking for I nteractive P rogramming in X calable MP T atsuya A be and M itsuhisa S ato P2S2’12 S eptember 10, 2012

  2. Outline 1. What is XcalableMP? 2. Verification of XcalableMP programs 3. Implementation of a Verification Tool 4. Experiment 5. Conclusion, Related Work, and Future Work

  3. Outline 1. What is XcalableMP? 2. Verification of XcalableMP programs 3. Implementation of a Verification Tool 4. Experiment 5. Conclusion, Related Work, and Future Work

  4. XcalableMP XcalableMP (XMP) is a new programming language. In XMP , we can write a program to use parallel and distributed computational environments effectively. XMP = C + directives ( ∼ OpenMP) ✓ ✏ #pragma xmp loop on t(i) for (i=0; i<100; i++) { a[i]=a[i]+a[i+1]; } ✒ ✑

  5. � � MPI vs. XMP Message Passing Interface (MPI) is a communication standard for HPC. To compute it in paral- ✓ ✏ lel, distribute a into two computational nodes and int a[101]; synchronize its boundary. a[100]=a[0]; for (i=0; i<100; i++) { 0 49 (50) ▼ · · · a[i]=a[i]+a[i+1]; ▼ q ▼ q ▼ q } ▼ q ▼ q ▼ q ▼ q ▼ ✒ ✑ q ▼ q ▼ q ▼ q q 50 99 ( 0) · · ·

  6. � � MPI To compute it in parallel, distribute 0 49 (50) ▼ · · · a into two computational nodes ▼ q ▼ q ▼ q ▼ ▼ q and synchronize its boundary. ▼ q q ▼ q ▼ q ▼ q ▼ q ▼ q q By message passing in MPI: 50 99 ( 0) · · · ✓ ✏ int a[51]; MPI_Comm_rank(MPI_COMM_WORLD, &me); ... you=(me+1)%2; MPI_Irecv(&(a[50]), 1, MPI_DOUBLE, you, MPI_ANY_TAG, MPI_COMM_WORLD, &req); MPI_Send(&(a[0]), 1, MPI_DOUBLE, you, MPI_ANY_TAG, MPI_COMM_WORLD); MPI_Wait(&req, &stat); for (i=0; i<50; i++) { a[i]=a[i]+a[i+1]; } ✒ ✑

  7. XMP ✓ ✏ #pragma xmp nodes p(2) #pragma xmp template t(100) #pragma xmp distribute t(block) onto p int i, a[100]; #pragma xmp align a[i] with t(i+1) #pragma xmp shadow a[0:1] ... #pragma xmp reflect (a) width (/periodic/0:1) #pragma xmp loop on t(i) for (i=0; i<100; i++) { a[i]=a[i]+a[i+1]; } ✒ ✑

  8. Outline 1. What is XcalableMP? 2. Verification of XcalableMP programs 3. Implementation of a Verification Tool 4. Experiment 5. Conclusion, Related Work, and Future Work

  9. Program Verification in XMP XMP programming ∼ directive programming ✓ ✏ #pragma xmp shadow a[1:3] #pragma xmp reflect (a) width (1:3) ... #pragma xmp reflect (a) width (1:2) ✒ ✑ ✓ ✏ #pragma xmp shadow b[1:2] #pragma xmp reflect (b) width (1:3) ...(no occurence of b)... #pragma xmp reflect (b) width (1:2) ✒ ✑

  10. Redundant bcast ✓ ✏ #pragma xmp bcast (a) from p(1) on p(2:10) #pragma xmp bcast (a) from p(2) on p(11:20) #pragma xmp bcast (a) from p(1) on p(10:11) ✒ ✑ Redundant lock and unlock ✓ ✏ #pragma xmp lock (a[1]:[1]) #pragma xmp lock (a[1]:[1]) #pragma xmp unlock (a[2]:[1]) ✒ ✑

  11. Missing Directive Access distributed arrays without any directive: ✓ ✏ #pragma xmp distribute t(block) onto p int i; int a[100]; #pragma xmp align a[i] with t(i) ... b=a[0] ✒ ✑

  12. Static and Light-Weight Checking in XMP We wish a program verifier would satisfy • Correctness (no false positive): warning → error • Completeness (no false negative): error → warning Types of program verifiers: • dynamic vs. static • light-weight vs. heavy-weight

  13. Static and Light-Weight Checking in XMP We wish a program verifier would satisfy • Correctness (no false positive): warning → error • Completeness (no false negative): error → warning Types of program verifiers: • dynamic vs. static • light-weight vs. heavy-weight # The algorithm is in the proceedings. # A work using more heavy-weight methods is on-going.

  14. Outline 1. What is XcalableMP? 2. Verification of XcalableMP programs 3. Implementation of a Verification Tool 4. Experiment 5. Conclusion, Related Work, and Future Work

  15. Implementation of Engine A stream-processing program tends to be hard to read. To keep readability of the source code of our tool, use • a parser combinator library Parsec • user-defined datatypes in Haskell, and • pattern-matchings by constructors of the user-defined datatypes.

  16. Implementation of User Interface The engine takes a source code and returns line numbers. Possible to link any editor. In this work, link our tool to GNU Emacs. Every time a buffer is updated, check the source code.

  17. Outline 1. What is XcalableMP? 2. Verification of XcalableMP programs 3. Implementation of a Verification Tool 4. Experiment 5. Conclusion, Related Work, and Future Work

  18. Experiment Core i7-M640/Windows 7 Every time find a di- 1.2 Core i7-M640/Ubuntu 11.04 Xeon X5650/CentOS 6.2 rective, add it to a 1 table. The worst 0.8 Time (sec.) case is when ev- 0.6 ery directive is sus- 0.4 pended to be redun- 0.2 dant/missing or not. 0 1000 2000 3000 4000 Synchronization Directives The worst case time complexity is O ( n 2 ) where n is not # of synchronizations but # of directives.

  19. Outline 1. What is XcalableMP? 2. Verification of XcalableMP programs 3. Implementation of a Verification Tool 4. Experiment 5. Conclusion, Related Work, and Future Work

  20. Conclusion We develop a programming tool: • Checks errors when writing an XcalableMP program, • Uses XMP’s features, • Linked to GNU Emacs (possibly other IDEs), and • Runs fast. Abstract descriptions in XMP are useful to not only development of a program but also verification of the program.

  21. Related Work Verification by using features of languages is standard in imperative, functional, logic, object-oriented, and aspect-oriented programming fields etc. In PGASs only, • UPC-SPIN: static, detect race • UPC-CHECK: run-time check, detect deadlock etc. In this work, oriented to light-weightness (just like of a spell-checking tool Flyspell or a variable occurence-check Eclipse plugin) and a little complicated error check in XMP .

  22. Future Work In this work, oriented to light-weight check XMP programs. • To detect more kinds of errors (race, dead-lock, etc.) • To detect missing directives by model checking are left to future work.

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