Resources for learning Fortran
FORTRAN (FORmula TRANslation), now more commonly referred to as Fortran, is a programming language, popular in scientific communities and employed on high performance computing (HPC) clusters, frequently with parallel language extensions such as OpenMP (shared memory) and MPI (distributed memory).
Useful References
- Chemisty IT, Oxford, online course
- Online tutorials linked from The Fortran Company
- Notes from School of Aerospace Engineering, Georgia Tech (and others)
- Wikipedia page on FORTRAN
- GCC Wiki page of links to specs for each FORTRAN version from FORTRAN 66 to FORTRAN 2008
- What Every Computer Scientist Should Know About Floating-Point Arithmetic, by David Goldberg
Understanding Arrays
When passing arrays between different program units, it is important to understand a few terms.
An assumed size array is declared using a single asterisk, e.g.
real:: array(*). The program unit containing this declaration would not know the number of dimensions of the arrey.
An assumed shape array is declared using a series of colons (one per extent (dimension)), e.g.
real:: array(:,:) would be a 2D assumed-shape array. Assumed shape arrays appeared with the Fortran 90 standard (so earlier code would have only assumed size arrays).
Assumed size arrays are interoperable (e.g. with C/C++) whereas assumed shape arrays are not.
Related Info
- reading list for those doing HPC
- intro to Linux with useful commands on slide 20
- LLNL intro to parallel programming
- OpenMP for Shared Memory parallelism