Fortran Compilers David Padua University of Illinois at Urbana-Champaign.

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Configuration management
Software & Services Group, Developer Products Division Copyright© 2010, Intel Corporation. All rights reserved. *Other brands and names are the property.
Fortran Jordan Martin Steven Devine. Background Developed by IBM in the 1950s Designed for use in scientific and engineering fields Originally written.
CS 426 Compiler Construction 1. Introduction. Prolog.
CS 3500 SE - 1 Software Engineering: It’s Much More Than Programming! Sources: “Software Engineering: A Practitioner’s Approach - Fourth Edition” Pressman,
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
Computers: Tools for an Information Age
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Parallelizing Compilers Presented by Yiwei Zhang.
Computer Science 1620 Programming & Problem Solving.
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
1 CHAPTER 4 LANGUAGE/SOFTWARE Hardware Hardware is the machine itself and its various individual equipment. It includes all mechanical, electronic.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Extreme Programming.
Introduction to Programming End Show. Resource Team R.P Ranjan-Lecturer, SPICTEC, Galle. W.M.A.S. Wijesekara-Centre manager,CRC Hali-Ela H.P.U.S Indra.
Programming Languages CPS120: Introduction to Computer Science Lecture 5.
Invitation to Computer Science 5th Edition
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Carolyn Seaman University of Maryland, Baltimore County.
Topic #10: Optimization EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
INTRODUCTION TO COMPUTING CHAPTER NO. 06. Compilers and Language Translation Introduction The Compilation Process Phase 1 – Lexical Analysis Phase 2 –
Introduction to Computers
Overview of the Course Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University.
Chapter 2 소프트웨어공학 Software Engineering 임현승 강원대학교
 Knowledge Acquisition  Machine Learning. The transfer and transformation of potential problem solving expertise from some knowledge source to a program.
Algorithms and Programming
1 History of compiler development 1953 IBM develops the 701 EDPM (Electronic Data Processing Machine), the first general purpose computer, built as a “defense.
Configuration Management (CM)
Extreme/Agile Programming Prabhaker Mateti. ACK These slides are collected from many authors along with a few of mine. Many thanks to all these authors.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
CSC425 - Introduction To Computer Programming 1. 2 Generation Of Programming Languages A set of rules that telling a computer what to do. There are over.
From Quality Control to Quality Assurance…and Beyond Alan Page Microsoft.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
1 Code optimization “Code optimization refers to the techniques used by the compiler to improve the execution efficiency of the generated object code”
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
1 EECS 6083 Compiler Theory Based on slides from text web site: Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Compiler Construction (CS-636)
HNDIT23082 Lecture 06:Software Maintenance. Reasons for changes Errors in the existing system Changes in requirements Technological advances Legislation.
FORTRAN History. FORTRAN - Interesting Facts n FORTRAN is the oldest Language actively in use today. n FORTRAN is still used for new software development.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
FORTRAN Beginnings: FORTRAN is one of the oldest programming languages, originally developed by John Backus and a team of programmers working at IBM. It.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
FORTRAN Boz. Before FORTRAN Machine language and assembly code. Programmers had many problems to overcome.  Lack of instruction sets  Primitive stream.
Reflections on Dynamic Languages and Parallelism David Padua University of Illinois at Urbana-Champaign 1.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
INTRODUCTION CSE 470 : Software Engineering. Goals of Software Engineering To produce software that is absolutely correct. To produce software with minimum.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 0: Historical Overview.
CS498 DHP Program Optimization Fall Course organization  Instructors: Mar í a Garzar á n David Padua.
MANAGEMENT INFORMATION SYSTEM
1 ”MCUDA: An efficient implementation of CUDA kernels for multi-core CPUs” John A. Stratton, Sam S. Stone and Wen-mei W. Hwu Presentation for class TDT24,
ICS 3UI - Introduction to Computer Science
CSCI-235 Micro-Computer Applications
Software Engineering (LECT 1)
Optimization Code Optimization ©SoftMoore Consulting.
History of compiler development
Lecture 2 Introduction to Programming
Software Maintenance PPT By :Dr. R. Mall.
Overview of the Course Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University.
Compiler Construction
Chapter 1 Introduction(1.1)
Lecture 06:Software Maintenance
Extreme Programming.
Introduction to Computers
Presentation transcript:

Fortran Compilers David Padua University of Illinois at Urbana-Champaign

2 The success and the glory of Fortran are its compilers. 1. Introduction

3 "It was our belief that if FORTRAN, during its first months, were to translate any reasonable "scientific" source program into an object program only half as fast as its hand coded counterpart, then acceptance of our system would be in serious danger. This belief caused us to regard the design of the translator as the real challenge, not the simple task of designing the language.... To this day I believe that our emphasis on object program efficiency rather than on language design was basically correct. I believe that has we failed to produce efficient programs, the widespread use of language like FORTRAN would have been seriously delayed.” John Backus FORTRAN I, II, and III Annals of the History ofComputing Vol. 1, No 1, July 1979

4 “Object programs produced by FORTRAN will be nearly as efficient as those written by good programmers.” Programmer’s Reference Manual October 15, 1956

5 Developing effective Fortran compilers was not easy and success was not guaranteed.

6 “Like most of the early hardware and software systems, Fortran was late in delivery, and didn’t really work when it was delivered. At first people thought it would never be done. Then when it was in field test, with many bugs, and with some of the most important parts unfinished, many thought it would never work.

7 It gradually got to the point where a program in Fortran had a reasonable expectancy of compiling all the way through and maybe even running. This gradual change of status from an experiment to a working system was true of most compilers. It is stressed here in the case of Fortran only because Fortran is now almost taken for granted, as it were built into the computer hardware.” Saul Rosen Programming Languages and Systems McGraw Hill 1967

8 2. The old compilers Early IBM Fortran compilers (Fortran I, Fortran H) were engineering marvels. They introduced the seed of many compiler techniques. These led in time to powerful, general translation algorithms which are among the most beautiful creations of Computer Science.

9 2.1 Early techniques Fifty years ago, it was an open field. Practically every issue was an open problem. Early compiler algorithms were less general than today’s algorithms Two examples next.

Operator priority “The lack of operator priority (often called precedence or hierarchy) in the IT language was the most frequent single cause of errors by users of that compiler” D. Knuth The Fortran I compiler solution: –Replace + and – with ))+(( and ))-(( –Replace * and / with )*( and )/(, respectively –Add (( and )) at the beginning and end resp. of expressions and “sub expressions” “The resulting formula is properly parenthesized, believe it or not” D. Knuth

DO loop optimizations One of the Fortran I compiler's main objective was “to analyze the entire structure of the program in order to generate optimal code from DO statements and references to subscripted variables”. Much of this is accomplished today by applying removal of loop invariants, induction-variable detection, and strength reduction.

12 The Fortran I compiler applied a single transformation that simultaneously moved subexpressions involving loop indices to the outermost possible loop level and applied strength reduction. Only loop indices were recognized as induction variables. “not practical to track down and identify linear changes in subscripts resulting from assignment statements”

Life and compilers were simpler then Fortran I was only 23,500 assembly language instructions and was developed by only 6 people over three years. Today’s compilers are much longer. Target machines were simpler: No caches, no parallelism, no vector extensions.

14 3. Fortran compilers today “Pure” Fortran compilers are less common today. Optimization passes are shared with other languages. Today, machines have become more complex –Vector extensions (SSE, Altivec) –Parallelism (multicores) –Caches Programs are more difficult to analyze due to widespread use of pointers/references and other factors.

How well do they work ? Evidence accumulated for many years show that compilers today fail to meet our expectations. Problems at all levels: –Detection of parallelism (numerical computing) –Vectorization –Locality enhancement –Uniprocessor conventional optimization algorithms (scalarization, cse, …) Today, most compilers include vectorization and parallelization techniques, but no clear way forward. Diminishing returns.

16 Compilers for conventional languages suffer because of –Inaccurate program analysis –Ad hoc optimization strategies –Uneven implementations 3.2 Why ?

Improvements are needed With today’s compiler technology, most likely, widespread parallelism will give us performance at the expense of a dip in productivity.

Today’s challenge We face a challenge similar to that of Like in the 1950s need to improve programmability for performance. After all, performance is what multicore is all about. Like in the 1950s there is much skepticism. Against progress in program optimization we have –The myth that the automatic optimization problem is solved or insurmountable. –The natural desire to work on fashionable problems and “low hanging fruits”

19 Perhaps the solution should resemble that of Fortran I: Language/compiler co-design. And certainly solving the problem will be as rewarding as it was for the Fortran I team: “In any case the intellectual satisfaction of having formulated and solved some difficult problems of translation and the knowledge and experience acquired in the process are themselves almost a sufficient reward for the long effort expended on the FORTRAN project.” 1957 Western Computer Proceeding Paper on the Fortran I compiler