Fortran's Relevance Today and in the Future. Peter Crouch, Chairman Fortran Specialist Group Member Groups Convention 5 April 2011

Similar documents
Peter Crouch. Chairman Fortran Specialist Group. BCS Birmingham Branch meeting 19 May 2008

Fortran, alive and well at 59!

Technical Report on further interoperability with C

FORTRAN SPECIALIST GROUP THE FIRST TWO DECADES AN OVERVIEW OF THE ACTIVITIES OF THE FORTRAN SPECIALIST GROUP,

Fortran Coarrays John Reid, ISO Fortran Convener, JKR Associates and Rutherford Appleton Laboratory

Fortran 2008: what s in it for high-performance computing

Current Developments in Fortran Standards. David Muxworthy 15 June 2012

Parallel Programming in Fortran with Coarrays

The new features of Fortran 2003

NO CALCULATOR ALLOWED!!

ISO/IEC : TECHNICAL CORRIGENDUM 2

Technical Specification on further interoperability with C

Evolution of Fortran. Presented by: Tauqeer Ahmad. Seminar on Languages for Scientific Computing

Report from WG5 convener

NAGWare f95 and reliable, portable programming.

Welcome. Modern Fortran (F77 to F90 and beyond) Virtual tutorial starts at BST

NAGWare f95 Recent and Future Developments

C, C++, Fortran: Basics

7. Procedures and Structured Programming

ParaFEM Coding Standard for Fortran 90. Contents. 1.0 Introduction. 2.0 Documentation. 2.1 External Documentation

Review More Arrays Modules Final Review

Verification of Fortran Codes

C interfaces to HSL routines. J. D. Hogg. Version 1.0 5th December Numerical Analysis Group Internal Report

Information technology Programming languages Fortran Part 1: Base language

Co-arrays to be included in the Fortran 2008 Standard

FORTRAN. Some facts and many myths by. Kees Ampt. Kees Ampt

Chapter 4. Fortran Arrays

Declaration and Initialization

Subroutines and Functions

Fortran 2003 and Beyond. Bill Long, Cray Inc. 17-May-2005

REGCM 4.3 Developer Guide

Fortran 90 - A thumbnail sketch

Fortran Coding Standards and Style

Numerical Modelling in Fortran: day 2. Paul Tackley, 2017

TS Further Interoperability of Fortran with C WG5/N1917

Fortran 95/2003 Course

Compiler Support for the Fortran 2003 and 2008 Standards Revision 17

Compiler Support for the Fortran 2003 and 2008 Standards Revision 21

Introduction to Modern Fortran

ISO/IEC JTC 1 N 13145

Language Vulnerabilities Report: The Fortran Annex

Computational Astrophysics AS 3013

Appendix D. Fortran quick reference

Index. classes, 47, 228 coarray examples, 163, 168 copystring, 122 csam, 125 csaxpy, 119 csaxpyval, 120 csyscall, 127 dfetrf,14 dfetrs, 14

Introduction to Fortran Programming. -Internal subprograms (1)-

MPI: A Message-Passing Interface Standard

Fortran. (FORmula TRANslator) History

Migrating A Scientific Application from MPI to Coarrays. John Ashby and John Reid HPCx Consortium Rutherford Appleton Laboratory STFC UK

Implementing the Standards... including Fortran 2003

Introduction to Modern Fortran

The New Features of Fortran 2003

Fortran Signal Handling

Porting CASTEP to GPGPUs. Adrian Jackson, Toni Collis, EPCC, University of Edinburgh Graeme Ackland University of Edinburgh

Lecture V: Introduction to parallel programming with Fortran coarrays

-- Smart Grid Communication --

Programming Tips for Plugins

The Role of Mathematical Equivalence in Fortran. David Muxworthy 27 September 2012

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

FORTRAN 90: Functions, Modules, and Subroutines. Meteorology 227 Fall 2017

DRAFT DRAFT DRAFT ISO/IEC JTC 1/SC 22 N0703. Élément introductif Élément principal Partie n: Titre de la partie. Date: ISO/IEC TR

Recent Updates to the CFD General Notation System (CGNS)

PACKAGE SPECIFICATION HSL 2013

PROBLEM SOLVING WITH FORTRAN 90

2 3. Syllabus Time Event 9:00{10:00 morning lecture 10:00{10:30 morning break 10:30{12:30 morning practical session 12:30{1:30 lunch break 1:30{2:00 a

Inclusive design guidelines for HCI

Parallel Programming with Coarray Fortran

Compiler Support for the Fortran 2003, 2008, TS29113, and 2018 Standards Revision 24

Compiler support for Fortran 2003 and 2008 standards Ian Chivers & Jane Sleightholme Fortranplus

Modern Fortran OO Features

International Standards Organisation. Parameterized Derived Types. Fortran

Basic Fortran I/O Concepts

Page 1 of 7. Date: 1998/05/31 To: WG5 From: J3/interop Subject: Interoperability syntax (Part 1) References: J3/98-132r1, J3/98-139

Introduction to High-Performance Computing

CS 415 Midterm Exam Spring 2002

An introduction to Fortran. Daniel Price School of Physics and Astronomy Monash University Melbourne, Australia

Advanced Features. SC10 Tutorial, November 15 th Parallel Programming with Coarray Fortran

IEEE 802 EC ITU standing committee

CA Compiler Construction

Walt Brainerd s Fortran 90 programming tips

Concepts Introduced in Chapter 3

Education Strategy Review North West Actuarial Society 28 April Karen Brocklesby Registrar Paul King - Consultant Education Actuary

INF 212 ANALYSIS OF PROG. LANGS PROCEDURES & FUNCTIONS. Instructors: Kaj Dreef Copyright Instructors.

FORTRAN Last revision 13/12/2018

Status of the ISO-STEP Initiative for CGNS-Based Fluid Dynamics Standard

PACKAGE SPECIFICATION HSL 2013

Real Numbers finite subset real numbers floating point numbers Scientific Notation fixed point numbers

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! CoCo Processor - Copyright (c) 1996 Imagine1, Inc.!!!!!!!!

Chapter 3:: Names, Scopes, and Bindings

Microgeneration Installation Standard: MCS

Why Study Assembly Language?

MATH 115: Review for Chapter 1

Unified Model Performance on the NEC SX-6

Revisit the Foundations of ITSM SMSG

Review Functions Subroutines Flow Control Summary

Subprograms. Bilkent University. CS315 Programming Languages Pinar Duygulu

Introduction. A. Bellaachia Page: 1

write (unit=*,fmt=*) i =, i! will print: i = 3

CDCS Recertification Handbook 2014

computational Fluid Dynamics - Prof. V. Esfahanian

Compiler Design. Computer Science & Information Technology (CS) Rank under AIR 100

Transcription:

Fortran's Relevance Today and in the Future Peter Crouch, Chairman Fortran Specialist Group Member Groups Convention 5 April 2011

Early years of Fortran: 1954-1961 1954 Development work starts in IBM 1957 IBM release a Fortran compiler for the IBM 704 1958 IBM release Fortran II, with subroutines and blank common 1960 Philco release ALTAC, a Fortran II look-alike 1961 IBM have eight different compilers (for the 709, 650, 1620 and 7090) and publish a guide to language variations between them 1961 Univac release Fortran I for the SS80, the first compiler called Fortran for a non-ibm machine

25 Years on from release of first Fortran compiler, Pioneer Day Banquet June 1982

Fortran standards summary (1) 1966 ANSI standard X3.9-66 (FORTRAN 66) First programming language standard Developed between 1962 and 1966 Essentially a common subset of vendors offerings The US standard is reproduced as an ISO standard in 1972 1978 ANSI standard X3.9-78 (FORTRAN 77) Introduced CHARACTER data type, IMPLICIT, PARAMETER, SAVE statements, IF - THEN - ELSE construct Also published as ISO standard 1539:1980 1991 ISO/IEC standard 1539:1991 (Fortran 90) Major revision - introduced free form source form, whole array operations, memory allocation at runtime, facilities for modular data and procedure definitions, parameterized intrinsic types, user-defined data types, pointers & many minor modernizations and removal of arbitrary restrictions

Fortran standards summary (2) 1997 2004 ISO/IEC standard 1539-1:1997 (Fortran 95) Minor revision introduced FORALL construct, PURE and ELEMENTAL procedures, initialization for pointers and for structures, some older, duplicated features designated as obsolescent ISO/IEC 1539-1:2004 (Fortran 2003) Major revision - introduced object oriented programming support, standardised interoperability with C, I/O enhancements, including stream access and asynchronous transfers, access to command line arguments & environmental variables, support for IEEE arithmetic and exception handling & for international usage 2010 ISO/IEC standard 1539-1:2010 (Fortran 2008) Major revision - introduced coarrays as an extension for parallel processing, execution of command shell commands, I/O enhancements including getting unique unit numbers, new edit descriptors, BLOCK construct with declarations

Future Fortran standardisation activity Development of Technical Reports, subsiduary standards, on Further Interoperability of Fortran with C Further Coarray Features will take place over the next two to three years. The contents of these Technical Reports will, subject to any changes found to be necessary from their use, be incorporated into future versions of the Fortran standard.

The Fortran Specialist Group is established: 1970 FSG Minutes of 6 January 1970: The objectives of the group were formally agreed to be: (a) to form a focus in the United Kingdom for work concerned with establishing and maintaining FORTRAN standards. (b) to work in association with national and international standardisation bodies. FSG Minutes of 5 April 1976: 4. Revision of objectives Following further discussion, the wording of the proposed revised objectives now becomes "To undertake activities associated with any aspects of Fortran". It is intended to present this for approval at the next Specialist Groups meeting.

FSG Activities 1970-1992 FSG hold typically four to six meetings per year, mostly discussing working party progress, applications, software tools, programming techniques and, from late 1971, Fortran standards developments From late 1970s FSG members become involved in development of Fortran standards Presentations are made at conferences and workshops, e.g. Datafair 73, 75 and 77 and a Fortran Forum in London in 1978 with six US members of X3J3 as speakers Fortran Forums are held in London (4) and Edinburgh (2), sometimes with visiting US speakers, other meetings are held outside London The UK, through FSG members, plays a significant part in development of Fortran 90

FSG Activities 1993-2010 In mid-1990s attendances wilt with the advent of the internet It is decided to hold only annual meetings plus special events Events are held in 2002 and 2005 to discuss UK requirements for inclusion in future Fortran standards From 2002 successful applications are made to BCS to support between one and three FSG members to attend ISO WG5 meetings to help put the UK case on Fortran standards In 2007 a very successful full-day meeting is held with the Computer Conservation Society to mark the 50th anniversary of the release of the first Fortran compiler In 2010 a successful meeting is held with the Institute of Physics to mark the 40th anniversary of the Fortran SG

'Fifty Years of Fortran' meeting January 2007

Some current application areas for Fortran Weather forecasting and climate prediction Analysis of seismic data for oil and gas exploration Nuclear test ban verification Financial analysis Vehicle crash simulation Analysis of data from space probes and satellites Modelling of nuclear weapons Computational fluid dynamics

NEC SX-8 supercomputer as used by UK Met Office

Fortran CFD program used in design of 1000 mph car - September 2010 issue of ITNOW

The CASTEP project: Materials Modelling by Quantum Mechanics

CASTOR HPC Capability

Modern Fortran example code (1) program linear! Program to calculate simple linear regression! Reads input from data file, writes output to screen use file_read use reg_calc integer :: nval character(len=64) :: file_name! Get the name of the input file from the command line if (command_argument_count() >= 1) then call get_command_argument(1, file_name)! Open input file and read data into allocated arrays call read_file(trim(file_name), nval)! Calculate regression and display results if (nval > 0) then call calc_reg(nval) end if end if end program linear

Modern Fortran example code (2) module file_read public :: read_file contains subroutine read_file(file_name, nval)! Open data file and read in number of observations and! x and y data use data_store character(len=*), intent(in) :: file_name integer, intent(out) :: nval integer, parameter :: in_unit = 10 nval = 0 open(unit=in_unit, status="old", action="read", file=file_name, & position="rewind") read(unit=in_unit, fmt=*) nval! Now allocate space for x and y data allocate(xvals(nval), yvals(nval)) read(unit=in_unit, fmt=*) xvals, yvals close(unit=in_unit) end subroutine read_file end module file_read

Modern Fortran example code (3) module kinds! Declaration of real data type with 15 digits of precision and! range of 10-307 to 10 +307 integer, parameter, public :: double = selected_real_kind(15, 307) end module kinds module data_store! Declarations of arrays used to store data for linear regression use kinds, only : double real(kind=double), dimension(:), allocatable, public :: xvals, yvals end module data_store

Modern Fortran example code (4) module reg_calc public :: calc_reg contains subroutine calc_reg(nval)! Calculate linear regression for yvals upon xyals! i.e. y = A + Bx where A is the intercept on the Y axis and B is the! slope of the best fit straight line use data_store use kinds, only : double integer, intent(in) :: nval integer :: i, dastat real(kind=double) :: sumxy, sumxsq, sumysq, ssdureg, ssabreg, & intercept, slope, xbar, ybar, percent, meansq! First calculate means for x and y xbar = sum(xvals) / nval ybar = sum(yvals) / nval! Replace original data with its deviation from means xvals = xvals - xbar yvals = yvals - ybar :

If you want to know more Modern open source and free Fortran compilers are available from a number of sources as are online tutorials Links to the above and more are available from the Resources page of the Fortran SG website at www.fortran.bcs.org/resources.php Fortran and Fortran II history, including 1982 IBM film www.softwarepreservation.org/projects/fortran/ "Modern Fortran Explained", Metcalf, Reid & Cohen, OUP, April 2011

Acknowledgements Many slides in this presentation are based on those used by David Muxworthy for his presentation to the joint BCS/IoP meeting in June 2010 marking the 40th anniversary of the BCS Fortran Specialist Group. Other slides are based on a presentation given by Keith Refson of STFC Rutherford Appleton Laboratory following the FSG AGM in September 2010. Finally I must thank all my colleagues in the Fortran Specialist Group for their assistance and encouragement during my time as Chairman.