Source code improvements

The modernisation of the legacy Fortan 77 source code to Fortran 95 was carried out following the standard steps described in literature [4]. The work carried out in this area included: replacing all common blocks with module variables, changing the include statement with the use statement, eliminating implicit typing and implicit interfaces and replacing the static arrays with allocatable versions.

Fortran 77 subroutines were wrapped in Fortran 95 modules, with one per file, according to their functionality. A brief description of the new modules is as follows:

During benchmarking and profiling it was noticed that a couple of subroutines of the core solver had a very poor cache memory utilisation. This problem was corrected by reordering some of the nested loops and evicting IF blocks from some of the other loops. As a result the code performance in the RHS sector increased by approximately 20%, see Table 1.

Some other source code upgrades and reorganisations are listed below:

The new code was compiled with PGI, GNU and Cray compilers using debug and optimised flags, all executables have been tested on several MPI processor topologies and grids with different aspect ratios.

Lucian Anton 2011-09-13