Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 5.15 KB

README.md

File metadata and controls

60 lines (41 loc) · 5.15 KB

My FORTRAN Library

Please enjoy using my FORTRAN library. It contains a whole load of random functions and subroutines that I have written over the years. Most of them are overloaded to allow their use by different kinds of arguments. To save repetitive typing you will find some Python scripts dotted around this repository which have been written to create all the different versions of each FORTRAN function or FORTRAN subroutine.

I find the GFortran Intrinsic Procedures Reference an excellent resource when determining what kind an argument must be. As an aside, it niggles me that a lot of intrinsic procedures, according to the FORTRAN standard, are "of default kind" (to me, these are the sort of problems that ISO_FORTRAN_ENV was supposed to fix).

Ditto, the MPI 3.1 Specification PDF and OpenMP 5.0 Specification PDF are excellent resources too.

FORTRAN Language Conventions

All integers are declared as INT64 (from ISO_FORTRAN_ENV), except:

  • when being saved to disk (depending on the situation); and
  • when interacting with an intrinsic procedure (depending on the procedure's specification).

All reals are declared as REAL64 (from ISO_FORTRAN_ENV), except:

  • when being saved to disk (depending on the situation); and
  • when interacting with an intrinsic procedure (depending on the procedure's specification).

GOTO statements are never used because I do not want to be eaten by a velociraptor.

Library Module/Function/Subroutine List

Additionally, mod_safe contains some other constants, such as const_c and const_kb. A full list can be found in consts.f90.

To Do

  • This library is a consolidation of a whole load of functions and subroutines from a variety of different projects. It will take some time to pull them all in and make sure that they all work well together.

Testing

The directory tests contains some basic tests to (hopefully):

  • find any simple bugs that I might have introduced; and
  • demonstrate some simple programming techniques.

Bugs

  • There is a bug in Doxygen which results in FORTRAN INCLUDE statements not being parsed. Until this gets fixed then there is little point in maintaining the Doxygen comments in the source code here. The bug was reported on 2009-07-27 and it shows no sign of being fixed (I first commented on the bug report on 2013-01-11 and as of 2019-03-31 it is still open).