Training:SummerSchool2019:Programme:fortran

From CAC Wiki
Revision as of 14:49, 17 July 2019 by Hasch (Talk | contribs) (Fortran)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Fortran

Description: While to many FORTRAN sounds like Latin, a dead, ancient language with its glory in the past, the reality is quite different. Modern Fortran, as its name, is spelled differently today and very much alive, still widely used. Fortran has undergone significant modifications and improvement in the past two decades -- an evolution on a scale rarely seen in any other languages. If you use MATLAB, you will find Fortran has the identical syntax and simplicity in array operations, yet achieves a much higher performance.

With the latest Fortran standard, the language has gained many modern features, become very different from its ancestor, leaving behind archaic ones like column-oriented formatting, common blocks and a proclivity for UPPER CASE EVERYTHING. Inherited from old FORTRAN standards and enhanced by the newer ones, Fortran is still among the top candidates for scientific computing for its strength in REAL and COMPLEX intrinsics, array processing and floating point operations. Its array handling, enhanced by index looping, makes array processing similar or identical to its counterparts, such as MATLAB, hence superior to other programming languages. The unified interface of intrinsic functions for all data types makes translating mathematical expressions to computer programmes much cleaner and easier. Lastly, the SPMD (single program, multiple data) parallelization scheme supported by the intrinsic partitioned global address space (PGAS) model since Fortran 2008 standard enables scientists and engineers to write parallel code extremely easily without using MPI or OpenMP.

In this one day course, we will cover the following

Review of the language basics and the latest standard 2018

  • Compilers and development environment
  • Data I/O
  • Useful features one should know, e.g. specifiable precision, taking command line arguments, executing system commands, timers, optional arguments in functions and subroutines
  • Array slicing and loop constructs
  • Random number generators, using libraries
  • Writing and compiling source code in multiple files
  • Calling C/C++ functions and interoperability
  • Parallel processing with coarrays and co-routines on shared and distributed memory systems made extremely simple!

The targeted audience would be physicists, mathematicians, engineers, economists and others who are using Fortran in their research. Throughout the day, the participants shall expect do hands-on exercises ranging from simple tryout examples to moderate and advanced parallel code.

Instructor: Hartmut Schmider, Centre for Advanced Computing, Queen's University.

Prerequisites: No prior experience is required, however, knowing a programming language such as C or C++ would be helpful. Being familiar with MATLAB will be an asset. The attendees are assumed to have some knowledge in numerical methods, as the examples presented in the class will be given in the context of scientific computing.

Requirements: It is strongly recommended that one has an SSH client installed on a laptop to be used at the Summer School.