Optimized Execution of Fortran 90 Array Language on Symmetric Shared-Memory Multiprocessors

  • Vivek Sarkar
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1656)


Past compilers have found it challenging to implement Fortran 90 array language on symmetric shared-memory multiprocessors (SMPs) so as to match, let alone beat, the performance of comparable Fortran 77 scalar loops. This is in spite of the fact that the semantics of array language is implicitly concurrent and the semantics of scalar loops is implicitly sequential. A well known obstacle to efficient execution of array language lies in the overhead of using array temporaries to obey the fetch-before-store semantics of array language. We observe that another major obstacle to supporting array language efficiently arises from the fact that most past compilers attempted to compile and optimize each array statement in isolation.

In this paper, we describe a solution for optimized compilation of Fortran 90 array language for execution on SMPs. Our solution optimizes scalarized loops and scalar loops in a common framework. Our solution also adapts past work on array temporary minimization so as to avoid degradation of parallelism and locality. This solution has been implemented in the IBM XL Fortran product compiler for SMPs. To the best of our knowledge, no other Fortran 90 compiler performs such combined optimizations of scalarized loops and scalar loops. Our preliminary experimental results indicate that the performance of Fortran 90 array language can match, and even beat, the performance of comparable scalar loops. In addition to Fortran 90 array language, the approach outlined in this paper will be relevant to similar array language extensions that might appear in Java and other programming languages in the future.


compilers code optimization array language scalarization parallelization 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    John R. Allen. Dependence Analysis for Subscripted Variables and its Application to Program Transformation. PhD thesis, Rice University, Houston, TX, 1983.Google Scholar
  2. 2.
    Utpal Banerjee. Unimodular Transformations of Double Loops. Proceedings of the Third Workshop on Languages and Compilers for Parallel Computing, August 1990.Google Scholar
  3. 3.
    B. Carpenter, Y.-J. Chang, G. Fox, and X. Li. Java as a Language for Scientific Parallel Programming. In Languages and compilers for parallel computing. Proceedings of the 10th international workshop. Held Aug., 1997 in Minneapolis, MN., Lecture Notes in Computer Science. Springer-Verlag, New York, 1998.Google Scholar
  4. 4.
    Jyh-Herng Chow, Leonard E. Lyon, and Vivek Sarkar. Automatic Parallelization for Symmetric Shared-Memory Multiprocessors. CASCON’ 96 conference, November 1996.Google Scholar
  5. 5.
    Jeanne Ferrante, Vivek Sarkar, and Wendy Thrash. On Estimating and Enhancing Cache Effectiveness. Lecture Notes in Computer Science, (589):328–343, 1991. Proceedings of the Fourth International Workshop on Languages and Compilers for Parallel Computing, Santa Clara, California, USA, August 1991. Edited by U. Banerjee, D. Gelernter, A. Nicolau, D. Padua.Google Scholar
  6. 6.
    Francois Irigoin and Remi Triolet. Supernode Partitioning. Conference Record of Fifteenth ACM Symposium on Principles of Programming Languages, 1988.Google Scholar
  7. 7.
    D. H. Kulkarni, S. Tandri, L. Martin, N. Copty, R. Silvera, X. Tian, X. Xue, and J. Wang. XL Fortran Compiler for IBM SMP Systems. AIXpert, pages 312–322, December 1997.Google Scholar
  8. 8.
    Kathryn S. McKinley, Steve Carr, and Chau-Wen Tseng. Improving Data Locality with Loop Transformations. ACM Transactions on Programming Languages and Systems, 18:423–453, July 1996.CrossRefGoogle Scholar
  9. 9.
    Nimrod Megiddo and Vivek Sarkar. Optimal Weighted Loop Fusion for Parallel Programs. Proceedings of the Ninth Annual ACM Symposium on Parallel Algorithms and Architecture, pages 282–291, June 1997.Google Scholar
  10. 10.
    M. Metcalfe and J. Reid. Fortran 90 Explained. Oxford Science Publishers, 1990.Google Scholar
  11. 11.
    Constantine D. Polychronopoulos and David J. Kuck. Guided Self-Scheduling: A Practical Scheduling Scheme for Parallel Supercomputers. IEEE Transactions on Computers, C-36(12), December 1987.Google Scholar
  12. 12.
    John K. Prentice. Performance Benchmarks for Optimizing Fortran 90 Compilers. Fortran Journal, pages 6–12, May/June 1995.Google Scholar
  13. 13.
    Vivek Sarkar. Automatic Selection of High Order Transformations in the IBM XL Fortran Compilers. IBM Journal of Research and Development, 41(3), May 1997.Google Scholar
  14. 14.
    Vivek Sarkar. Loop Transformations for Hierarchical Parallelism and Locality. Lecture Notes in Computer Science, 1151, 1998. Proceedings of LCR98: Fourth Workshop on Languages, Compilers, and Run-time Systems for Scalable Computers. Held in May 1998 at Carnegie Mellon University, Pittsburgh, PA, USA.Google Scholar
  15. 15.
    Vivek Sarkar and Guang R. Gao. Optimization of Array Accesses by Collective Loop Transformations. Proceedings of the ACM 1991 International Conference on Supercomputing, pages 194–205, June 1991. Cologne, Germany.Google Scholar
  16. 16.
    Vivek Sarkar and Radhika Thekkath. A General Framework for Iteration-Reordering Loop Transformations. Proceedings of the ACM SIGPLAN’ 92 Conference on Programming Language Design and Implementation, pages 175–187, June 1992.Google Scholar
  17. 17.
    Michael E. Wolf and Monica S. Lam. A Data Locality Optimization Algorithm. Proceedings of the ACM SIGPLAN Symposium on Programming Language Design and Implementation, pages 30–44, June 1991.Google Scholar
  18. 18.
    Michael E. Wolf and Monica S. Lam. A Loop Transformation Theory and an Algorithm toMaximize Parallelism. IEEE Transactions on Parallel and Distributed Systems, 2(4):452–471, October 1991.CrossRefGoogle Scholar
  19. 19.
    Michael J. Wolfe. Optimizing Supercompilers for Supercomputers. Pitman, London and The MIT Press, Cambridge, Massachusetts, 1989. In the series, Research Monographs in Parallel and Distributed Computing.zbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Vivek Sarkar
    • 1
  1. 1.IBM Thomas J. Watson Research CenterYorktown HeightsUSA

Personalised recommendations