Course Summary

Price: £1725.00

Duration: 5 Day Course

Scheduled Dates:



Reserve a place

Request more details


Introduction To Modern Fortran Programming Course

Course Overview

The course provides a comprehensive introduction to the key features of modern Fortran including the Fortran base types, arithmetic, precision, arrays and whole array features, I/O, control stuctures, intrinsic and user defined functions, subroutines, modules, pointers and simple data structuring.

The course builds to provide a solid foundation of skills to start working with existing codes and to progress to the more advanced course.

On completion of the course delegates should be able to work with most existing Fortran codes.

Fortran is the main language for numeric computation, especially high performance computing, and over 80% of the workload on the UK's academic research supercomputers is written in Fortran.

The course is suitable for both complete beginners and people with some programming background.

Pre-Requisites

Delegates should be comfortable with using a computer system running Unix, Linux or Windows and using a text editor.

Topics covered

Introduction to Problem Solving

  • Algorithms
  • Top-down and bottom up
  • Object oriented programming
  • Systems analysis and design
  • Unified Modeling Language - UML

Introduction to programming languages

  • History
  • What is a programming language?
  • Program language development and engineering
  • Other programming languages, including: C, Cobol, C++, Java, Csharp
  • Programming language standardisation

Introduction to programming

  • Elements of a programming language
  • Data description statements
  • Control structures
  • Data-processing statements
  • Input and output (I/O) statements
  • Simple examples doing both text and numeric i/o

Arithmetic

  • Real and integer data types
  • The rules for computer arithmetic
  • Finite precision and the implications for computer arithmetic
  • Comprehensive examples to illustrate the above

Arrays

  • Basic array syntax
  • One dimensional and multidimensional arrays
  • Dynamic arrays - the allocatable attribute
  • Whole array processing
  • Array sections
  • Array element ordering
  • Comprehensive set of examples to illustrate the above

I/O

  • Numeric edit descriptors
  • Input and output of reals and integers
  • Character data
  • Files
  • File access - open and close
  • Speed of access - text versus binary
  • Records
  • Handling errors

Functions

  • The first of the two fundamental Fortran building blocks
  • Intrinsic functions
  • User defined functions
  • Scope of variables
  • Internal functions
  • Pure functions
  • Elemental functions
  • Functions and modules

Control Structures

  • Complete coverage of Fortrans control structures

Characters

  • Character data in Fortran
  • Fortran's character functions

Fortran's other data types

  • Complex
  • Logical

Introduction to Derived Types

  • Basic derived type syntax

An Introduction to Pointers

  • Basic pointer syntax
  • Allocate and deallocate
  • Examples to illustrate use
  • Memory leaks

Subroutines

  • Fortran's remaining building block
  • Modules and subroutines
  • Passing parameters in Fortran
  • Passing scalar and array parameters
  • Automatic and allocatable arrays
  • Keyword and optional arguments
  • Internal subroutines and scope
  • Commercial numerical and statistical subroutine libraries

Modules

  • Fortran's code organisation mechanism
  • Basic module syntax
  • Modules for global data
  • Modules for precision specification and constant definition
  • Modules for globally sharing data
  • Modules for derived data types
  • Implicit and explicit interfaces

Data structuring in Fortran

  • Examples to illustrate simple data structuring facilities


Course ID: PTR56