Fortranplus
Fortranplus

Advanced modern Fortran

Overview

This 5-day course provides an introduction to the rest of the capabilities of modern Fortran, including generic programming, object oriented programming, parameterised derived types, exception handling using IEEE facilities, C interoperability and parallel programming.

 

The course is suitable for people who have attended the Introduction to modern Fortran course, or have a basic grounding in Fortran or a good grounding in another programming language.

 

The course is also suitable for people wanting to convert from another language and already have a basic grounding in Fortran.

 

All our courses are a mixture of lectures and practical sessions.

Topics covered

The Fortran organisational method, equivalent to classes in other languages

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

Linked lists using pointers

 

Linked lists using allocatable components

 

Linked lists using move_alloc

Operator overloading

Basic syntax

Generic programming

Basic syntax

 

Generic programming and other languages

 

Generic sorting with support for 4 integer and 3 real types

 

Generic statistics module with support for 3 precisions

Mathematical examples

Using linked lists for sparse matrix problems

 

Inner product of two sparse vectors

 

Solving 1st order Ordinary Differential Equations using Runge Kutta Merson

 

Automatic arrays

 

Subroutine as a dummy procedure argument

 

A subroutine to extract the diagonal elements of a matrix

 

The solution of a system of linear simultaneous equations using Gaussian Elimination

Parameterised derived types

Linked list parameterised by real kind type

 

Ragged array parameterised by real kind type

Object Oriented Programming

Basic syntax in Fortran

 

Base class

 

Derived or inherited classes

 

Derived types and structure constructors

 

Structure constructors and generic names

 

Derived classes and inheritance

 

Polymorphism and dynamic binding

Introduction to submodules

Rewrite of Date Class using submodules

Rewrite of Runge Kutta Merson example using a submodule

Introduction to parallel programming

Basic technical background

 

Amdahl's Law

 

Gustafson's law

 

Fortran and parallel programming

Introduction to MPI (Message Passing Interface)

MPI implementations

 

Compiler and implementation combinations

 

Examples highlighting the basic of MPI programming

Introduction to OpenMP

The OpenMP model

 

Examples highlighting the basics of OpenMP programming

Introduction to Coarray Fortran

The Coarray model

 

Examples highlighting the basics of Coarray Fortran

C Interop

Basic introducton

 

Examples illustrating

 

Fortran calling C

 

Fortran calling C++

 

C calling Fortran

 

C++ calling Fortran

 

Calling C++ STL parallel sort routines

 

Querying memory availability under Windows and Linux

IEEE arithmetic

Basic history and background

 

Examples illustrating the use of Fortran's IEEE suport for numeric exception handling

 

Statistical calculations using NANS

Third part libraries

Benchmarking user written generic recursive Quicksort algorithm

 

Benchmarking user written non recursive Quicksort

 

The NAG library for SMP and Multicore

 

Benchmarking one of the NAG parallel sorting routines

 

Comparison of three sorting methods

 

Graphics libraries

 

Examples using the Dislin graphics libraries

Converting from Fortran 77

Deleted language features

 

Obsolescent language features

 

Third party conversion tools

Course material

program examples from 4th edition book (updated 2/9/18)
fourth_edition.zip
Compressed archive in ZIP format [170.5 KB]
Fourth edition new examples and updated material - 10 February 2024
fourth_edition_update_093.pdf
Adobe Acrobat document [1.4 MB]

Click here for the 4th_edition_update.tar  file containing all of the original examples, new examples, and a copy of the above notes.

For more information please contact queries@fortranplus.co.uk

Contact us today!

queries@fortranplus.co.uk

Print | Sitemap
© Fortranplus 2009