Towards Efficient Compilation of the Hpjava Language for High Performance Computing Han-Ku Lee
Total Page:16
File Type:pdf, Size:1020Kb
Florida State University Libraries Electronic Theses, Treatises and Dissertations The Graduate School 2003 Towards Efficient Compilation of the HPjava Language for High Performance Computing Han-Ku Lee Follow this and additional works at the FSU Digital Library. For more information, please contact [email protected] THE FLORIDA STATE UNIVERSITY COLLEGE OF ARTS AND SCIENCES TOWARDS EFFICIENT COMPILATION OF THE HPJAVA LANGUAGE FOR HIGH PERFORMANCE COMPUTING By HAN-KU LEE A Dissertation submitted to the Department of Computer Science in partial fulfillment of the requirements for the degree of Doctor of Philosophy Degree Awarded: Summer Semester, 2003 The members of the Committee approve the dissertation of Han-Ku Lee defended on June 12, 2003. Gordon Erlebacher Professor Directing Thesis Larry Dennis Outside Committee Member Geoffrey C. Fox Committee Member Michael Mascagni Committee Member Daniel Schwartz Committee Member The Office of Graduate Studies has verified and approved the above named committee members. To my mother, father, big sisters, and all my friends . Especially I thank Dr. Fox, Dr. Carpenter, Dr. Erlebacher, and all my committee members for every concern. iii ACKNOWLEDGEMENTS Development of the HPJava environment was funded in part by National Science Foundation Division of Advanced Computational Infrastructure and Research, contract number 9872125 (any opinions, findings, and conclusions or recommendations expressed in this material are those of the author and do not necessarily reflect the views of the National Science Foundation). iv TABLE OF CONTENTS List of Tables ................................................... .... viii List of Figures ................................................... ... x Abstract ................................................... ......... xiii 1. INTRODUCTION ............................................... 1 1.1 ResearchObjectives.............................. ............... 1 1.2 Organization of This Dissertation .................. ................ 2 2. BACKGROUND ................................................. 4 2.1 Historical Review of Data Parallel Languages . ................ 4 2.1.1 Multi-processing and Distributed Data . .............. 6 2.2 High Performance Fortran .......................... .............. 9 2.2.1 The Processor Arrangement and Templates . ........... 10 2.2.2 DataAlignment................................. ........... 12 2.3 Message-Passing forHPC ........................... ............. 15 2.3.1 OverviewandGoals.............................. ........... 15 2.3.2 Early Message-Passing Frameworks . ............. 15 2.3.3 MPI: A Message-Passing Interface Standard . ............. 17 2.4 High Level Libraries for Distributed Arrays . ................. 19 2.4.1 PARTI......................................... .......... 20 2.4.2 TheGlobalArrayToolkit ......................... ........... 22 2.4.3 NPAC PCRC Runtime Kernel – Adlib . ....... 22 2.5 Discussion ...................................... .............. 23 3. THE HPSPMD PROGRAMMING MODEL ........................ 25 3.1 Motivations ..................................... .............. 25 3.2 HPspmd Language Extensions........................ ............. 26 3.3 Integration of High-Level Libraries . .. .. .. ................. 27 3.4 TheHPJavaLanguage............................... ............ 28 3.4.1 Multiarrays ................................... ............ 28 3.4.2 Processes ..................................... ............ 29 3.4.3 DistributedArrays............................. ............. 31 3.4.4 Parallel Programming and Locations. ............. 33 3.4.5 More Distribution Formats ....................... ............ 36 3.4.6 ArraySections................................. ............ 45 3.4.7 Low Level SPMD Programming ....................... ........ 49 3.5 AdlibforHPJava.................................. ............. 52 v 3.6 Discussion ...................................... .............. 53 4. COMPILATION STRATEGIES FOR HPJAVA ..................... 55 4.1 Multiarray Types and HPspmd Classes . ............. 55 4.2 AbstractSyntaxTree.............................. .............. 58 4.3 Type-Checker.................................... .............. 59 4.3.1 TypeAnalysis .................................. ........... 61 4.3.2 Reachability and Definite (Un)assignment Analysis . .............. 62 4.4 Pre-translation................................. ................ 64 4.5 Basic TranslationScheme .......................... .............. 66 4.5.1 Translation of a multiarray declaration . ............... 67 4.5.2 Translation of multiarray creation . ............... 70 4.5.3 Translation of the on construct ................................ 70 4.5.4 Translation of the at construct ................................ 71 4.5.5 Translation of the overall construct ........................... 72 4.5.6 Translation of element access in multiarrays . ............... 74 4.5.7 Translation of array sections .................... .............. 75 4.5.7.1 Simple array section – no scalar subscripts . ............ 75 4.5.7.2 Integer subscripts in sequential dimensions . .............. 76 4.5.7.3 Scalar subscripts in distributed dimensions . .............. 77 4.6 TestSuites...................................... .............. 78 4.7 Discussion ...................................... .............. 79 5. OPTIMIZATION STRATEGIES FOR HPJAVA ..................... 80 5.1 Partial Redundancy Elimination . ............... 80 5.2 StrengthReduction ............................... .............. 83 5.3 DeadCodeElimination ............................. ............. 85 5.4 LoopUnrolling................................... .............. 85 5.5 Applying PRE,SR,DCE,andLU........................ .......... 86 5.5.1 Case Study: Direct Matrix Multiplication . .............. 87 5.5.2 Case Study: Laplace Equation Using Red-Black Relaxation.......... 89 5.6 Discussion ...................................... .............. 93 6. BENCHMARKING HPJAVA, PART I: NODE PERFORMANCE ......................................... 95 6.1 Importance of Node Performance ..................... ............. 96 6.2 Direct Matrix Multiplication ...................... ................ 97 6.3 Partial Differential Equation ...................... ................ 99 6.3.1 Background on Partial Differential Equations . .............. 99 6.3.2 Laplace Equation Using Red-Black Relaxation . ............. 100 6.3.3 3-Dimensional Diffusion Equation . ............. 104 6.4 Q3–LocalDependenceIndex ......................... ............ 106 6.4.1 BackgroundonQ3................................ .......... 106 6.4.2 DataDescription ............................... ............ 107 6.4.3 ExperimentalStudy–Q3 .......................... .......... 107 6.5 Discussion ...................................... .............. 110 vi 7. BENCHMARKING HPJAVA, PART II: PERFORMANCE ON PARALLEL MACHINES .................... 112 7.1 Direct Matrix Multiplication ...................... ................ 113 7.2 Laplace Equation Using Red-Black Relaxation . ............... 115 7.3 3-Dimensional Diffusion Equation ................... ............... 120 7.4 Q3–LocalDependenceIndex ......................... ............ 121 7.5 Discussion ...................................... .............. 124 8. RELATED SYSTEMS ............................................ 125 8.1 Co-ArrayFortran................................. .............. 125 8.2 ZPL............................................. ............ 126 8.3 JavaParty....................................... .............. 127 8.4 Timber.......................................... ............. 129 8.5 Titanium ........................................ ............. 131 8.6 Discussion ...................................... .............. 132 9. CONCLUSIONS ................................................. 133 9.1 Conclusion...................................... .............. 133 9.2 Contributions................................... ............... 134 9.3 FutureWorks..................................... ............. 135 9.3.1 HPJava ........................................ .......... 135 9.3.2 High-Performance Grid-Enabled Environments . .............. 135 9.3.2.1 Grid Computing Environments . ......... 135 9.3.2.2 HPspmd Programming Model Towards Grid-Enabled Applications 136 9.3.3 Java Numeric Working Group from Java Grande . ......... 138 9.3.4 Web Service Compilation (i.e. Grid Compilation) . .............. 138 9.4 CurrentStatusofHPJava ........................... ............. 140 9.5 Publications.................................... ............... 141 REFERENCES ................................................... ... 143 BIOGRAPHICAL SKETCH .......................................... 147 vii LIST OF TABLES 6.1 Compilers and optimization options lists used on Linux machine. .......... 96 6.2 Speedup of each application over naive translation and sequential Java after applyingHPJOPT2. ................................... .......... 111 7.1 Compilers and optimization options lists used on parallel machines. 113 7.2 Speedup of the naive translation over sequential Java and C programs for the direct matrix multiplication on SMP. ............. 113 7.3 Speedup of the naive translation and PRE for each number of processors over the performance with one processor for the direct matrix multiplication on SMP. ............................................... .......... 114 7.4 Speedup of the naive translation over sequential Java and C programs for the Laplace equation using