� ✁✝ ✡ ✠ ✁ ✞ ✟✠ ✆ ☎ ✁ ✄ ✂ An Overlapping Compiler for Planguage (PC) of Parallel Program Poster: Yingqun Wang Advisor: Dr. Ernesto Gomez Department of Computer Science California State University San Bernardino
☛ ✦ ❄ ✪❈ ❉ ✧ ✴ ✵ ✦ ✮ ✪ ✷ ✸ ✹ ✪✲ ✺ ✯ ✭ ✼ ❃ ✬ ✭ ❁❂ ✬ ✬ ✯ ❂ ✬ ❄❅ ❆ ✫ ✢ ✪ ✪ ✻ ✸ ✪ ✬✭ ✯ ❃ ❂ ❄❅ ❆ ✸ ❇ ✬ ✻ ❋ ✻ ✵ ❇ ✫ ✬ ❁❂ ✬ ✳ ✭ ✽✾ ✿❀ ✸ ✲ ❊ ✪ ✭ ✸ ✻ ✙ ✛ ✪ ✸ ✬ ☞ ✸ ✛ ✘ ✪ ✦ ✥ ✤ ✙ ✘ ✘ ✘ ✘ ✣ ✢ ✙ ✗ ✘ ✖ ✖ ✖ ✕ ✔ ✓✔ ✒ ☞✑ ✏ ✎ ☞ ✍ ✌ ✘ ✘ ✛ ✪ ✻ ✸ ✥ ✸ ✿❀ ✽✾ ✬✭ ✸ ✼ ✻ ✺ ✫ ✲ ✢ ✧ ✹ ✸ ✬✭ ✱ ✪✲ ✪✷ ✦ ✦ ✳ Background (PC) PC is an extension of C and one part of the Planguage. PC compiler already supports MPI (The Message Passing Interface Standard), PVM (Parallel Virtual Machine) and IPSC. It simplifies the writing of message passing code for multiprocessors with distributed memory. Two new operator: ‘@’ and ‘{}’ ease the task of writing parallel programs harness massively. Code comparison of PC and MPI is following: ✚✜✛ ✧✩★ ✴✶✵ ✮✰✯ ✮✰✯ ✮✰✯ ✹✩❇ ✮✰✯ ✮✰✯ ✮✰✯
● P ❚ ❙ ❍ ❙ ❘ ◗ ❙ ❖P ❏ ❍▼ ▲ ❑ ❍ ◆ ■ Background (SOS) SOS : Streams, Overlapping communications and Shortcutting function library built on top of MPI. Stream : Set of programs executing along the same control path in parallel program. Overlapping : Interval between definition and use at one process overlap the interval at another process. Overlapping schedule communication within this interval to avoid synchronization wait by place communication initiation as close as possible to data definition and communication termination. Shortcut : One process can tell other processes to quit if they have same testing condition. Advantage : Speedup for parallel processing of problems with irregular or asymmetric computation.
❯ ❦ ❞ ❥ ❧ ❵ ❝ ❜ ❛ ❱❲ ❡ ❵ ❫❴ ❪❫ ❭ ❱❬ ❩ ❨ ❱ ❳ Project Purpose Improving the PC compiler by add new expression analysis. Previous PC compiler permit one ‘@’ operator at right hand side of expression. The new compiler will recognize the expression like this: ❞❢❡ ❣✐❤ Extending PC compiler to support SOS. Incorporate automatic analysis and placement of overlapping function of SOS calls into codes generated by the PC language as optimization.
♠ ⑨ ⑧ ➂ ➉ ⑥ ❶ ➁ ⑧ ⑩ ❶ ➉ ➈ ⑨ ⑥ ❶ ② ⑨ ⑤⑧ ⑦ ⑤⑥ ① ❸ ❷ ➆ ⑧ ➁ ➈ ⑤ ⑧ ❸ ➉ ⑤ ⑧ ⑤ ➆ ❶ ❷ ➌ ❽ ❽❾ ➋ ② ① ⑧ ➆ ⑩ ❽ ❻ ❸ ⑤ ① ➁ ➊ ❶ ❷ ❸➊ ❷ ⑩ ➆ ♥♦ ① ⑤⑥ ⑤ ❺ ⑤ ❶ ③ ⑨ ⑥ ⑩ ② ⑨ ❽ ⑤⑧ ⑤⑥⑦ ① ✈✇ ✉✈ t ♥s r ♥q ♣ ❽❾ ⑤ ⑩ ⑨ ❶ ➅ ①➄ ➃ ❽ ❾ ❽ ⑤ ❸ ❷ ⑥ ③ ❶ ⑥ ② ❿ ❸ ➀ ⑧ ➁ ➍ ② ❸ Compiler System Flow Diagram ②❼❻ ❺✶➇ ❶✶➂ ②④③ ❷❹❸ PC program is pre-scanned to find communication variables. PC compiler generates C code with SOS overlapping functions (C-SOS). The C-SOS code is compiled by native C compiler linking with SOS API library and PC API library to create executable program.
➎ ↔↕ ➛ ➏➐ ➙ ➙ ➛ ➣↔ → ➏➔ ➓ ➏➒ ➑ Implementation (Pre-scan) Purpose: SOS system build up a queue collecting all variables transferred between processors. To identify the variable of the queue an integer called index is used. All indexes are global variables eliminating parameters augment when communication variables are passed between subroutines. To declare global index of them, communication variables must be known beforehand. Design: Pre-scan module is designed using LEX analysis. The PC program is scanned by pre-scan program, all variables whose right side are ‘@’ operator are communication variables. For example, only ‘x’ in next primary expressions are desired. x@p, x[k]@p.
➜ ➨ ➟ ➝➠ ➡ ➝➢ ➤ ➥➦ ➦➧ ➨ ➝➞ Implementation (grammar) Locate appropriate place to implant SOS function call. 1.SOS system must be initialized before any SOS function call. 2.SOS index variables are declared as global and initialized after communication variables declaration. 3.To guarantee the completion of communication, the “sosdorh_()” and “sosdolh_()” must be called before referring any communication variables. For example: sosdolh_(i); for (i=0;i<5;;){i=i@1; sosdorh_(i);} Improve compiler by permitting two ‘@’ operators appear at the right hand side of expression.
➩ Þ á Ü ❰ ❒ Ü Ýà ß Ü Ü Ý Ý ã ➴ × ➾ Ö Ó Û Ï Ñ ➴ ß Þ Ü Ý Ý Ü ✃ Ö ➚ Ó Ð ➚ Ï ß ➪ Ó Ð ë Ô Ü Ü ➴ ➬ Ö ß ➪ ➚ Ö Þ × × à ❰ ➫➭ Ü Ý Ý Ü æ ç Ï è Ó ê Ñ é Ï ❒ ➪ Ó Ï ✃ Ó è Ï ❰ Þ × à ❰ Ýà ❒ ➴ ñ æ ➴ Ó òó ä ñ ö÷ õ ç ô ➚ ➶ òó ä ñ æ îïð × ✃ Ö ý ✞ ✝ � ✄ ✂ ✂ ý ü ß úû Û á Ü ❰ ❒ Ü Ýà Ïí ß ❰ ➚ à ì ➴ ➬ Ö ❰ ➶ × × ➾ Ö ß ➪ Ü Û á Ü Ú ç ➪ Û Ü ➴ × ➾ Ö ß ➪ Ü á ✃ Ü ❰ ❒ Ü à Ý ß â ✃ Þ ➬ Ñ ➾ Ù ➴ Ö Ó Ð ➚ Ð ✃ Ï Ó Ð ➬ ➚ Ï ❒ Û Ý Ó á Þ ➪ Ó Ô Ï Ö Û Ü Ý ❰ ❒ Ü Ýà ß Þ Ü ➪ ➬ ➚ ➽ ➚ ➾ ➹ ➶ ➪ ➚ ➾ ➽ ➬ ➻➼ ➺➻ ➸ ➫➵ ➳ ➫➲ ➯ ➾ ➪ Ñ Ó ➚ Ï Ö Ó Ô ➚ Ï Ð ➮ ➚ Ï ❰ ✃ ❰ ➬ ➾ ➹ Ö â ➴ Ñ × ➾ Ù Ö Ó Ô Ð ➴ Ï Ó Ô Ñ Ð Ï ➬ ß ➚ ➚ Ð Ó Ï Ü Þ Ö ➪ ã × à ❰ Þ Ü Ý Ý ➪ ß ➚ ❒ ❒ Ü à Ý Ñ ß ➚ Ö ✃ Û ➾ Ð Ó Ö ❰ Ü á Ô Ó Ô Ï Ó Ï Ð Ï Ü Û The compiler is built successfully because it passes the þØÿ � ➾Ø× Ten varieties communication are tested. ➾Ø× ➾Ø× øÕù ➘➷➴ ➘➷➴ ➾Ø× ➾Ø× Results ÐÒÑ ÐÒÑ ➾Ø× ➾Ø× ÔÕÑ ÐÒÑ ÐÒÑ ÐÒÑ ➾Ø× ÐÒÑ ÐÒÑ ÐÒÑ ÐÒÑ ÐÒÑ test of programs. þØÿ � þ ✆☎ ❒④Ü ✁ ✩ÿ ❒➷❮ ➾ØÚ ➾ØÚ ➾ØÚ ➾ØÚ ä✩å ä✩å ➱❐✃
✟ ✏✑ ✓ ✓ ✠✡ ✑✒ ✓ ✎ ✠✍ ✌ ☞ ✠ ☛ Conclusion The project is successfully augmenting the PC compiler by combining SOS overlapping functions. The new version of compiler can benefit the users by brief PC code and taking SOS advantage into parallel program. The current compiler will be evolved by implementing shortcut and stream functions.
Recommend
More recommend